## Pre-requisites Before Any Method Before cloning or migrating, you need to ensure your Pi 5 can see and boot from the NVMe drive. **Enable PCIe and verify detection**: Boot from your existing SD card and edit `/boot/firmware/config.txt`: bash `sudo nano /boot/firmware/config.txt` Add these lines at the bottom under `[all]`: `dtparam=nvme` Optionally, for faster (but experimental) Gen 3 speeds: `dtparam=pciex1_gen=3` **Update your bootloader** to ensure NVMe support is present: (https://www.jeffgeerling.com/blog/2023/nvme-ssd-boot-raspberry-pi-5)​ `sudo apt update && sudo apt upgrade -y sudo rpi-eeprom-update` If an update is available, use `raspi-config`: `sudo raspi-config` Navigate to **Advanced Options → Bootloader Version → Latest**, then reboot. **Verify the NVMe is detected**: bash `lsblk ls /dev/nvme0` You should see `/dev/nvme0n1` listed if the drive is recognised correctly. (https://learn.pimoroni.com/article/getting-started-with-nvme-base) --- #### Copy the entire SD card to nvme drive `sudo dd if=/dev/mmcblk0 of=/dev/nvme0n1 bs=4M conv=fsync status=progress` ### Perplexity > ## Option 2: Using the dd Command (Headless/CLI Method) If you're running OpenPlotter without a desktop, or prefer command-line tools, `dd` provides a straightforward byte-for-byte copy.[](https://notenoughtech.com/raspberry-pi/boot-raspberry-pi-5-from-nvme/)​ bash `sudo dd if=/dev/mmcblk0 of=/dev/nvme0n1 bs=4M conv=fsync status=progress` **Key parameters**: (https://raspberrytips.com/copy-pi-sd-card-to-nvme-ssd/)​ - `if=/dev/mmcblk0` — input file (your SD card) - `of=/dev/nvme0n1` — output file (your NVMe SSD) - `bs=4M` — 4MB block size for efficient copying - `conv=fsync` — ensures data integrity by forcing physical writes - `status=progress` — shows progress during the operation **Disadvantage**: Unlike SD Card Copier, `dd` does **not** automatically expand partitions. After cloning, you'll need to expand the root partition manually: --- ## Setting Boot Order for NVMe After cloning, you must configure the Pi 5 to boot from NVMe. You have two options: **Method A — Using raspi-config** (easiest):(https://learn.pimoroni.com/article/getting-started-with-nvme-base)​ `sudo raspi-config` Navigate to **Advanced Options → Boot Order → NVMe/USB Boot**, then finish and reboot. All being well you should now have booted up using the nvme drive, sometimes having the sd card inserted can cause errors, shut down/turn off, remove sd card, power up again. #### Now you should have the nvme drive with a boot partition and a root partition Run lsblk to check, "snap" has loaded some other stuff to run clementine music player here. ``` pi@openplotter:~ $ lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS loop0 7:0 0 4K 1 loop /snap/bare/5 loop1 7:1 0 338.2M 1 loop /snap/clementine/1843 loop2 7:2 0 49.1M 1 loop /snap/core18/2950 loop3 7:3 0 49.1M 1 loop /snap/core18/2956 loop4 7:4 0 91.7M 1 loop /snap/gtk-common-themes/1535 loop5 7:5 0 44.2M 1 loop /snap/snapd/25205 loop6 7:6 0 44.3M 1 loop /snap/snapd/25585 nvme0n1 259:0 0 476.9G 0 disk ├─nvme0n1p1 259:1 0 512M 0 part /boot/firmware └─nvme0n1p2 259:2 0 59G 0 part / ``` ### There's lots of empty space left Run `sudo parted /dev/nvme0n1` Should result in something like ... ``` pi@openplotter:~ $ sudo parted /dev/nvme0n1 GNU Parted 3.5 Using /dev/nvme0n1 Welcome to GNU Parted! Type 'help' to view a list of commands. (parted) ``` Type `print free` Should return something like. ```pi@openplotter:~ $ sudo parted /dev/nvme0n1 GNU Parted 3.5 Using /dev/nvme0n1 Welcome to GNU Parted! Type 'help' to view a list of commands. (parted) print free Model: BIWIN CE430T5D100-512G (nvme) Disk /dev/nvme0n1: 512GB Sector size (logical/physical): 512B/512B Partition Table: msdos Disk Flags: Number Start End Size Type File system Flags 32.3kB 4194kB 4162kB Free Space 1 4194kB 541MB 537MB primary fat32 lba 2 541MB 63.9GB 63.3GB primary ext4 63.9GB 512GB 448GB Free Space (parted) ``` Now still in (parted) ` mkpart primary ext4 -448G 100%` Note the -448G and 100% which tells parted to make a partition starting 448G from the end and use all space Still in (parted) input `print` & enter, should return something like> ```(parted) print Model: BIWIN CE430T5D100-512G (nvme) Disk /dev/nvme0n1: 512GB Sector size (logical/physical): 512B/512B Partition Table: msdos Disk Flags: Number Start End Size Type File system Flags 1 4194kB 541MB 537MB primary fat32 lba 2 541MB 63.9GB 63.3GB primary ext4 3 512GB 512GB 1049kB primary ext4 lba (parted) ``` Next format the new partition `sudo mkfs.ext4 /dev/nvme0n1p3` Now in the raspberry pi desktop, copen the file manager & have a look, 448Gb volume should be listed, click on it you'll be asked for the main Pi password & it will mount the drive for you. Now to mount it permanently run `lsblk` to check if the partition is mounted & unmount if it is ```pi@openplotter:~ $ lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS loop0 7:0 0 4K 1 loop /snap/bare/5 loop1 7:1 0 338.2M 1 loop /snap/clementine/1843 loop2 7:2 0 49.1M 1 loop /snap/core18/2950 loop3 7:3 0 49.1M 1 loop /snap/core18/2956 loop4 7:4 0 91.7M 1 loop /snap/gtk-common-themes/1535 loop5 7:5 0 44.2M 1 loop /snap/snapd/25205 loop6 7:6 0 44.3M 1 loop /snap/snapd/25585 nvme0n1 259:0 0 476.9G 0 disk ├─nvme0n1p1 259:1 0 512M 0 part /boot/firmware ├─nvme0n1p2 259:2 0 59G 0 part / └─nvme0n1p3 259:3 0 417.5G 0 part /media/pi/f7382f88-db84-4df5-bd71-ce8ae9aaf278 pi@openplotter:~ $ sudo umount /dev/nvme0n1p3 pi@openplotter:~ $ lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS loop0 7:0 0 4K 1 loop /snap/bare/5 loop1 7:1 0 338.2M 1 loop /snap/clementine/1843 loop2 7:2 0 49.1M 1 loop /snap/core18/2950 loop3 7:3 0 49.1M 1 loop /snap/core18/2956 loop4 7:4 0 91.7M 1 loop /snap/gtk-common-themes/1535 loop5 7:5 0 44.2M 1 loop /snap/snapd/25205 loop6 7:6 0 44.3M 1 loop /snap/snapd/25585 nvme0n1 259:0 0 476.9G 0 disk ├─nvme0n1p1 259:1 0 512M 0 part /boot/firmware ├─nvme0n1p2 259:2 0 59G 0 part / └─nvme0n1p3 259:3 0 417.5G 0 part pi@openplotter:~ $ ``` My UUID ```pi@openplotter:~ $ sudo blkid /dev/nvme0n1p3 /dev/nvme0n1p3: UUID="f7382f88-db84-4df5-bd71-ce8ae9aaf278" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="17c713f2-03" ``` Get the UUID: bash `sudo blkid /dev/nvme0n1p3` Copy the UUID string.(https://wiki.archlinux.org/title/Fstab)​ 4. Add to `/etc/fstab` for auto-mount: Edit: bash `sudo nano /etc/fstab` Add a line like: UID=YOUR-UUID-HERE /data ext4 defaults,noatime 0 2` Save and exit. Test fstab: ` `sudo mount -a` Likely return an error ``` ```pi@openplotter:~ $ sudo mount -a mount: (hint) your fstab has been modified, but systemd still uses the old version; use 'systemctl daemon-reload' to reload. ``` input `systemctl daemon-reload` & try again If no errors, it will mount automatically on each boot.(https://wiki.archlinux.org/title/Fstab)​