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

**URL:** <https://dietpi.com/forum/t/how-to-install-dietpi-onto-already-installed-mvme-m-2-ssd-using-official-pi-hat/24903>\
**Category:** Troubleshooting\
**Created:** [24 January 2026 16:17 UTC](https://dietpi.com/forum/t/how-to-install-dietpi-onto-already-installed-mvme-m-2-ssd-using-official-pi-hat/24903 "2026-01-24T16:17:38Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![jchh](https://dietpi.com/forum/user_avatar/dietpi.com/jchh/32/92_2.png) [@jchh](https://dietpi.com/forum/u/jchh)\
**Post date:** [24 January 2026 16:17 UTC](https://dietpi.com/forum/t/how-to-install-dietpi-onto-already-installed-mvme-m-2-ssd-using-official-pi-hat/24903/1 "2026-01-24T16:17:38Z")

</div>

### 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.

---

<div class="post-metadata">

**Author:** ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)\
**Post date:** [24 January 2026 16:31 UTC](https://dietpi.com/forum/t/how-to-install-dietpi-onto-already-installed-mvme-m-2-ssd-using-official-pi-hat/24903/2 "2026-01-24T16:31:28Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![jchh](https://dietpi.com/forum/user_avatar/dietpi.com/jchh/32/92_2.png) [@jchh](https://dietpi.com/forum/u/jchh)\
**Post date:** [24 January 2026 18:00 UTC](https://dietpi.com/forum/t/how-to-install-dietpi-onto-already-installed-mvme-m-2-ssd-using-official-pi-hat/24903/3 "2026-01-24T18:00:20Z")

</div>

Thanks for your quick reply.

> [@Joulinar](#):
>
> Why not flashing DietPi directly to SSD

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

> [@Joulinar](#):
>
> remove the SSD before booting SD if you are not able to change booting order now.

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

> [@Joulinar](#):
>
> And for the copy process, we have a blog post describing it very well.

Thanks! …I’ll go ad find it. Edit: I have found [this](https://dietpi.com/blog/?p=1236) 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?

---

<div class="post-metadata">

**Author:** ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)\
**Post date:** [24 January 2026 18:52 UTC](https://dietpi.com/forum/t/how-to-install-dietpi-onto-already-installed-mvme-m-2-ssd-using-official-pi-hat/24903/4 "2026-01-24T18:52:56Z")

</div>

> [@jchh](#):
>
> but it’s for USB SSDs.

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

> [@jchh](#):
>
> I guess I could install Raspberry Pi OS onto the SD card

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

> [@jchh](#):
>
> What is the command to do this (or do I have to take take the SSD out and connect to my Mac)?

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

---

<div class="post-metadata">

**Author:** ![jchh](https://dietpi.com/forum/user_avatar/dietpi.com/jchh/32/92_2.png) [@jchh](https://dietpi.com/forum/u/jchh)\
**Post date:** [24 January 2026 19:01 UTC](https://dietpi.com/forum/t/how-to-install-dietpi-onto-already-installed-mvme-m-2-ssd-using-official-pi-hat/24903/5 "2026-01-24T19:01:22Z")

</div>

> [@Joulinar](#):
>
> And? Doesn’t matter.

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

> [@Joulinar](#):
>
> Why? You can use every operating system to boot from SD. Doesn’t matter.

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!

---

<div class="post-metadata">

**Author:** ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)\
**Post date:** [24 January 2026 19:13 UTC](https://dietpi.com/forum/t/how-to-install-dietpi-onto-already-installed-mvme-m-2-ssd-using-official-pi-hat/24903/6 "2026-01-24T19:13:11Z")

</div>

> [@jchh](#):
>
> so wasn’t sure how to do it with DeitPi).

As on every other Debian based system using `dd`.

---

<div class="post-metadata">

**Author:** ![system](https://dietpi.com/forum/uploads/default/original/1X/7e1021de2213860bce185915ce2c1786e56490ec.png) [@system](https://dietpi.com/forum/u/system)\
**Post date:** [24 April 2026 19:49 UTC](https://dietpi.com/forum/t/how-to-install-dietpi-onto-already-installed-mvme-m-2-ssd-using-official-pi-hat/24903/8 "2026-04-24T19:49:27Z")

</div>

Closed on 24 April 2026 19:49 UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
