How to install DietPi onto already installed MVMe m.2 SSD (using official Pi HAT)

Hi,

I have been running 2 PI4’s on SSD’s (SATA). That was easy for me to setup as, being external, I could easily connect the SSD directly to my Mac and do it.

I now have a PI5 with a PCIe m.2 SSD already installed via the official Pi HAT.

I’ve google a bunch of times to install DietPi onto the SSD having booted DietPi from an SD.

Every time it has failed. The process I have follows is as follows. I would appreciate any nuts as to what to wrong or missing. My connection is via SSH

  • download and install DietPI on SD
  • boot up Pi
  • Edit rpi-eeprom-config & add BOOT_ORDER=0xf416
  • reboot
  • Clone SD to SSD using sudo rpi-clone nvme0n1
  • remove SD
  • reboot

Thanks!

edit: I’m aware that this is quite simple with Raspberry Pi OS as there BOOT_ORDER can be changed in raspi-config and there is an SD Card Copier pre-installed as well.

Why not flashing DietPi directly to SSD. And if this is not possible, remove the SSD before booting SD if you are not able to change booting order now. Anyway boot order can be changed on a running DietPi system as well. And for the copy process, we have a blog post describing it very well.

Thanks for your quick reply.

What is the command to do this (or do I have to take take the SSD out and connect to my Mac)?

I have changed it; it’s set to BOOT_ORDER=0xf416

Thanks! …I’ll go ad find it. Edit: I have found this post, but it’s for USB SSDs. I can;t find any other.

edit: I guess I could install Raspberry Pi OS onto the SD card and then use that to install DietPi directly onto the SSD?

And? Doesn’t matter. It can be used for all kind of data move.

Why? You can use every operating system to boot from SD. Doesn’t matter.

Yes connect the SSD to a different device lile pc and flash it same way like SS card.

OK, great; (the blog post is titled: “…to a USB stick/disk or an onboard eMMC” so this wasn’t clear to me that it could be anything).

Only because I know how to do it using rpi-clone (bear in mind I didn’t know about your blog post at the time and so wasn’t sure how to do it with DeitPi).

Thanks!

As on every other Debian based system using dd.