geerlingguy / rpi-clone

A shell script to clone a booted disk on a Raspberry Pi.
https://rpi-clone.jeffgeerling.com/
BSD 3-Clause "New" or "Revised" License
290 stars 19 forks source link

Unable to locate boot device #48

Open supermavster opened 1 week ago

supermavster commented 1 week ago

sudo rpi-clone -f sdc

 ~ "^/boot(/firmware)?$" &&  == "vfat" { print substr(, 2); exit }

Unable to locate boot device

https://github.com/geerlingguy/rpi-clone/blob/deda2cb349801c477fcb3099989398699baf0770/rpi-clone#L946

framps commented 1 week ago

Would you please show the output of mount ?

yoni13 commented 4 days ago

Hello, same error on diet-pi while trying to copy from sdcard to an nvmessd

Command I ran

sudo wipefs --all --force /dev/nvme0n1
sudo dd if=/dev/zero of=/dev/nvme0n1 bs=1024 count=1
# Install rpi-clone.
git clone https://github.com/geerlingguy/rpi-clone.git
cd rpi-clone
sudo cp rpi-clone rpi-clone-setup /usr/local/sbin

# Clone to the NVMe drive (usually nvme0n1, but check with `lsblk`).
sudo rpi-clone nvme0n1

lsblk

root@orangepi3b:~/rpi-clone# lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda           8:0    0 931.5G  0 disk 
└─sda1        8:1    0 931.5G  0 part /srv/dev-disk-by-uuid-8637c3a8-fbd7-410b-a81c-fae73b9ac600
mtdblock0    31:0    0    16M  0 disk 
mmcblk1     179:0    0  29.8G  0 disk 
└─mmcblk1p1 179:1    0  29.7G  0 part /var/folder2ram/var/cache/samba
                                      /var/folder2ram/var/lib/monit
                                      /var/folder2ram/var/lib/rrdcached
                                      /var/folder2ram/var/spool
                                      /var/folder2ram/var/lib/openmediavault/rrd
                                      /var/folder2ram/var/tmp
                                      /
nvme0n1     259:0    0 238.5G  0 disk 

And output of mount

https://bin.bloerg.net/5Cph2d

framps commented 3 days ago

rpi-clone expects to have two partitions and /boot/firmware or /boot mounted to partition 1 and / to partition 2.

According your lsblk output diet-pi just uses one partition and that's not supported by rpi-clone.