Error with NVME on RPi Compute Module 4 #123
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hi,
I am getting this when trying to close to a NVME SSD:
pi@raspberrypi:~ $ sudo sys-clone nvme0n1 -f2
Target disk nvme0n1 ends with a digit so may be a partition.
sys-clone requires disk names like 'sda' and not partition names like 'sda1'.
Continue anyway? (yes/no): yes
Booted disk: mmcblk0 31.9GB Destination disk: nvme0n1 256.1GB
Part Size FS Label Part Size FS Label
1 /boot 256.0M fat32 -- 1 256.0M fat32 --
2 root 29.5G ext4 rootfs 2 238.2G -- --
== Initialize: IMAGE partition table - forced by option ==
1 /boot (48.0M used) : MKFS SYNC to nvme0n11
2 root (1.8G used) : RESIZE MKFS SYNC to nvme0n12
-f2 : force initialize to first two partitions only.
Run setup script : no.
Initialize and clone to the destination disk nvme0n1? (yes/no): yes
Optional destination ext type file system label (16 chars max): gateway
Initializing
Imaging past partition 1 start.
=> dd if=/dev/mmcblk0 of=/dev/nvme0n1 bs=1M count=8 ...
Resizing destination disk last partition ...
Resize success.
Changing destination Disk ID ...
=> mkfs -t vfat -F 32 /dev/nvme0n11 ...
=> mkfs -t ext4 -L gateway /dev/nvme0n12 ...
Syncing file systems (can take a long time)
Syncing mounted partitions:
Mounting /dev/nvme0n12 on /mnt/clone
mount: /mnt/clone: special device /dev/nvme0n12 does not exist.
Mount failure of /dev/nvme0n12 on /mnt/clone.
Aborting!
Hi, I have the same issue. Have you found the solution?
Hardware: RPI CM4 (no wifi/ no mmc) + RPI IO Board, Samsung EVO 980, pci-m.2 adapter that is tested. I already managed to install and boot Raspbian 32 bit from NVMe; However, I am struggling to install Ubuntu Sever 64 bit in a similar fashion. I have tried "SD Copier" and "dd" but I could not boot, now I want to see if rpi-clone can do any different, but run into this issue...
I think I have a solution to this issue. Here I highlight some lines of the return message of
rpi-clone:The message above indicates that
rpi-clonedoes not generate correct partition names for NVMe drive, which should be/dev/nvme0n1p1and/dev/nvme0n1p2. In such a case, one can try the following modification inrpi-clone:Unfortunately, I do not have an NVMe drive by my hand so that I cannot really test it. Can somebody verify if the solution works?
Beware that even the solution above works, it is not a rigorous one. If anyone can improve the solution, it will be much appreciated.
[Update]
Finally, I had my solution tested with the following configuration:
With the correction, everything works quite well. I can now boot my rpi with NVMe drive.
Hey hey! Im facing a similar issue. Im coping over from source "nvme0n1" to a "sda". The error I receive is "Error: Could not stat device /dev/nvme0n1p - No such file or directory." Seems like its messing up the partition names and moving "p1" to "1p". Could this be the same fix but for the source drive?
lsblk output:
I guess you can try to modify line 571--584 of
rpi-cloneusing similar approach.Yes this is exactly what i ended up doing! Had some issues with UUID's as this is on a ubuntu server but ended up resolving that with the following:
Then you have to edit "/etc/fstab" on the right volume with gedit, nano or else.
In a terminal, type:
sudo vim /mnt/clone/etc/fstaband replace the old UUIDs by the new ones.
WARNING : Modifying "/boot/grub/grub.cfg" is very tricky. It should normally be generated with the command
sudo update-grub.Replace the old UUIDs by the new ones in "/boot/grub/grub.cfg" by entering the following in a terminal :
sudo vim /mnt/clone/boot/grub/grub.cfg:%s/OLDUUID/NEWUUID/gcIf you use the tricky solution, I recommend you to launch
sudo update-grubonce you have successfully booted the system.@psistwu
I did the same with raspberry pi buster. It copied file systems fine. But it doesn't boot from NVMe.
All up to date raspberry pi OS (armhf buster) and firmware.
Thanks
@mgrouch
What is your hardware configuration?
Also, did you change the boot order with
usbboot? You may refer to the following YouTube video for the detail.https://youtu.be/4Womn10v71s
@psistwu
CM4 with McuZone board.
Your Solution is absolutely correct.
Opened a PR with the two changes discussed above: https://github.com/billw2/rpi-clone/pull/147