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.

here is what I did to reformat the eMMC with the busted MASK button.

  1. Download RKDevtool v2.96 and DriverAssistant from this link

  2. Download loader (MiniLoaderAll.bin) based on CPU model from this link

  3. Install both downloaded files from step 1.

  4. Start RKDevtool application.

  5. Plug the USB cable to the port near the mask button.

  6. Short the pins 3&4 using paper clip before plugging-in the power cable.

  7. RKDevtool should detect your device.

  8. Point the Loader parameter to the location of MiniLoaderAll.bin and the downloaded dietpi image to the Image parameter.

  9. Click Run. Dietpi should now be flashed to the eMMC module.

Will now close this thread. Thanks!