DietPi Reformat | NanoPi R5C

hello, is there any way to reformat/clean install DietPi based on my situation?

My SBC is a NanoPi R5C. As per the documentation, I have to press the MASK key during bootup to access a sort of recovery mode to wipe the eMMC. Unfortunately, I have pressed too hard on the button which caused it to dislocate :frowning: I am still able to login through SSH. Is there a way to reformat/clean install it from within? Thanks!

Ar you still able to boot from SD card?

I don’t think so. Only way to boot from SD card is by pushing the MASK button first during bootup. :frowning:

Theoretically you could try to wipe the emmc while connected. On some device this will allow to boot from SD card.

kindly advise how I can wipe the emmc while connected. thanks!

Warning:

This procedure will erase everything on the eMMC, including any operating system or files on it.

  1. Identify the eMMC Device:
    First, connect to your NanoPi via SSH or serial console, and use lsblk to locate the eMMC device.
lsblk

The eMMC device is likely named /dev/mmcblkX (replace X with the actual device number, e.g., mmcblk0).

  1. Wipe the eMMC Using dd:
    Now, you can wipe the entire eMMC by overwriting it with zeros. This process is irreversible and will take time, depending on the size of the eMMC.
sudo dd if=/dev/zero of=/dev/mmcblkX bs=1M status=progress

At this point, the eMMC is completely wiped. You can try proceeding to install a new OS.