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
226 stars 15 forks source link

Raspberry Pi 5 OS - Impossible to boot #44

Open kikaragyozov opened 1 day ago

kikaragyozov commented 1 day ago

I'm trying to ditch my current SD card and switch entirely to a portable SSD connected via USB.

Things I did:

  1. Deleted all partitions on my SSD.
  2. Manually created partitions equal to the ones on my SD card, with minimum space matching the ones on the SD card:
    NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS           FSTYPE UUID                                 PARTUUID                             LABEL
    sda           8:0    0 931.5G  0 disk
    ├─sda1        8:1    0   512M  0 part /media/pi/FF61-CD85   vfat   FF61-CD85                            deb0b539-01
    └─sda2        8:2    0   931G  0 part /media/pi/Extreme Pro ext4   335884ab-a981-4e26-a064-d61879180b66 deb0b539-02                          Extreme Pro
    mmcblk0     179:0    0  14.9G  0 disk
    ├─mmcblk0p1 179:1    0   512M  0 part /boot/firmware        vfat   D735-E67D                            41d867f7-01                          bootfs
    └─mmcblk0p2 179:2    0  14.4G  0 part /                     ext4   b69628b0-b5d6-474c-9bed-477305ae01ad 41d867f7-02                          rootfs
  3. Ran sudo rpi-clone sda
  4. Process completed successfully.
  5. Used raspi-config to change boot order to USB.
  6. Realized I should have done this before cloning/syncing.
  7. Restarted device.
  8. Ran again sudo rpi-clone sda without literally doing anything else.
  9. Process completed successfully.
  10. Shut down Raspberry Pi.
  11. Setup failed to boot into SSD, and as a fallback it booted into my SD card.
  12. Verified via an HDMI cable connection that the issue for not booting into the SSD (with an unplugged SD card) was due to a unable to read partition as FAT (partition 0) error.

I'm at a complete loss. Any help would be appreciated. I verified fstab entries - they seem to be correct. PARTUUIDS match with the ones specified there. I'm really not sure what's going on.

Fstab file:

proc            /proc           proc    defaults          0       0
PARTUUID=deb0b539-01  /boot/firmware  vfat    defaults          0       2
PARTUUID=deb0b539-02  /               ext4    defaults,noatime  0       1
# a swapfile is not a swap partition, no line here
#   use  dphys-swapfile swap[on|off]  for that
kikaragyozov commented 1 day ago

I've solved my issue by utilizing the built-in SD copier. Still no clue what went wrong with rpi-clone.