RPi4 SD card to USB Drive failed - drive unmounted #153

Open
opened 2023-01-23 23:57:29 +01:00 by mpikosdimitris · 4 comments
mpikosdimitris commented 2023-01-23 23:57:29 +01:00 (Migrated from github.com)

Hello, i have this issue, trying to clone my sd card to an ssd drive with usb case and i'm getting my drive unmounted and not recognized by lsblk until i restart the system.

pi@raspberrypi:~ $ **sudo lsblk**
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
**sda           8:0    0 111.8G  0 disk
└─sda1        8:1    0 111.8G  0 part**
mmcblk0     179:0    0  29.7G  0 disk
├─mmcblk0p1 179:1    0   256M  0 part /boot
└─mmcblk0p2 179:2    0  29.5G  0 part /

pi@raspberrypi:~ $ **sudo rpi-clone sda**

Booted disk: mmcblk0 31.9GB                Destination disk: sda 120.0GB
---------------------------------------------------------------------------
Part      Size    FS     Label           Part   Size    FS    Label
1 /boot   256.0M  fat32  --              1      111.8G  ntfs  --
2 root     29.5G  ext4   rootfs
---------------------------------------------------------------------------
== Initialize: IMAGE partition table - partition number mismatch: 2 -> 1 ==
1 /boot               (49.5M used)   : MKFS  SYNC to sda1
2 root                (13.9G used)   : RESIZE  MKFS  SYNC to sda2
---------------------------------------------------------------------------
Run setup script       : no.
Verbose mode           : no.
-----------------------:
** WARNING **          : All destination disk sda data will be overwritten!
-----------------------:

Initialize and clone to the destination disk sda?  (yes/no): yes
Optional destination ext type file system label (16 chars max):

Initializing
  Imaging past partition 1 start.
  => dd if=/dev/mmcblk0 of=/dev/sda bs=1M count=8 ...
  Resizing destination disk last partition ...
    Resize failed.  See /tmp/rpi-clone-output.
    Try running rpi-clone again.

fdisk: cannot open /dev/sda: No such file or directory

this is the part that rpi-clone fails and after that the lsblk not recognizes the drive.

pi@raspberrypi:~ $ sudo lsblk
NAME        MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
mmcblk0     179:0    0 29.7G  0 disk
├─mmcblk0p1 179:1    0  256M  0 part /boot
└─mmcblk0p2 179:2    0 29.5G  0 part /
pi@raspberrypi:~ $

this is the outpout file

pi@raspberrypi:/tmp $ cat rpi-clone-output
sfdisk: cannot open /dev/sda: No such file or directory

====rpi-clone
==orig:
label: dos
label-id: 0x6707a26f
device: /dev/mmcblk0
unit: sectors
sector-size: 512

/dev/mmcblk0p1 : start=        8192, size=      524288, type=c
/dev/mmcblk0p2 : start=      532480, size=    61801472, type=83

==edited:
label: dos
label-id: 0x6707a26f
device: /dev/mmcblk0
unit: sectors
sector-size: 512

/dev/mmcblk0p1 : start=        8192, size=      524288, type=c
/dev/mmcblk0p2 : start=      532480,  type=83

any suggestions ?

Hello, i have this issue, trying to clone my sd card to an ssd drive with usb case and i'm getting my drive unmounted and not recognized by lsblk until i restart the system. ``` pi@raspberrypi:~ $ **sudo lsblk** NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT **sda 8:0 0 111.8G 0 disk └─sda1 8:1 0 111.8G 0 part** mmcblk0 179:0 0 29.7G 0 disk ├─mmcblk0p1 179:1 0 256M 0 part /boot └─mmcblk0p2 179:2 0 29.5G 0 part / pi@raspberrypi:~ $ **sudo rpi-clone sda** Booted disk: mmcblk0 31.9GB Destination disk: sda 120.0GB --------------------------------------------------------------------------- Part Size FS Label Part Size FS Label 1 /boot 256.0M fat32 -- 1 111.8G ntfs -- 2 root 29.5G ext4 rootfs --------------------------------------------------------------------------- == Initialize: IMAGE partition table - partition number mismatch: 2 -> 1 == 1 /boot (49.5M used) : MKFS SYNC to sda1 2 root (13.9G used) : RESIZE MKFS SYNC to sda2 --------------------------------------------------------------------------- Run setup script : no. Verbose mode : no. -----------------------: ** WARNING ** : All destination disk sda data will be overwritten! -----------------------: Initialize and clone to the destination disk sda? (yes/no): yes Optional destination ext type file system label (16 chars max): Initializing Imaging past partition 1 start. => dd if=/dev/mmcblk0 of=/dev/sda bs=1M count=8 ... Resizing destination disk last partition ... Resize failed. See /tmp/rpi-clone-output. Try running rpi-clone again. fdisk: cannot open /dev/sda: No such file or directory ``` this is the part that rpi-clone fails and after that the lsblk not recognizes the drive. ``` pi@raspberrypi:~ $ sudo lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT mmcblk0 179:0 0 29.7G 0 disk ├─mmcblk0p1 179:1 0 256M 0 part /boot └─mmcblk0p2 179:2 0 29.5G 0 part / pi@raspberrypi:~ $ ``` this is the outpout file ``` pi@raspberrypi:/tmp $ cat rpi-clone-output sfdisk: cannot open /dev/sda: No such file or directory ====rpi-clone ==orig: label: dos label-id: 0x6707a26f device: /dev/mmcblk0 unit: sectors sector-size: 512 /dev/mmcblk0p1 : start= 8192, size= 524288, type=c /dev/mmcblk0p2 : start= 532480, size= 61801472, type=83 ==edited: label: dos label-id: 0x6707a26f device: /dev/mmcblk0 unit: sectors sector-size: 512 /dev/mmcblk0p1 : start= 8192, size= 524288, type=c /dev/mmcblk0p2 : start= 532480, type=83 ``` any suggestions ?
ThiloHettmer commented 2023-06-01 12:04:10 +02:00 (Migrated from github.com)

I got the same issue. Have you fixed it?

I got the same issue. Have you fixed it?
ThiloHettmer commented 2023-06-01 22:50:11 +02:00 (Migrated from github.com)

Little update for anyone who encounters the same issue. It was the ssd case that has the jmicron chipset. Look for asmedia instead.

Little update for anyone who encounters the same issue. It was the ssd case that has the jmicron chipset. Look for asmedia instead.
rhys96999 commented 2023-11-01 15:10:57 +01:00 (Migrated from github.com)

Same problem for me and same solution

Same problem for me and same solution
jdrch commented 2023-11-13 21:19:21 +01:00 (Migrated from github.com)

This is very interesting. I have 2 Kingston Technology USB microSD card readers. The 1st is a MobileLite G4 USB 3.0 which blocks the adjacent USB port on the affected Pi 3B+. The 2nd is a MobileLite Plus microSD Reader that is narrow enough to not have the same fit issue. I guess I'd tested rpi-clone with the former 1st and then set up an unattended cron job with the latter installed so that I'd always have a full sytem backup ready to go.

However the cron job would fail unpredictably, and I couldn't figure out why. I recently updated to Debian 12 on the same Pi 3B+ and noticed rpi-clone was failing again. Swapping the readers fixed the issue. Super odd; thanks for the fix!

This is very interesting. I have 2 Kingston Technology USB microSD card readers. The 1st is a MobileLite G4 USB 3.0 which blocks the adjacent USB port on the affected Pi 3B+. The 2nd is a [MobileLite Plus microSD Reader](https://www.kingston.com/en/memory-card-readers/mobilelite-plus-microsd-reader) that is narrow enough to not have the same fit issue. I guess I'd tested `rpi-clone` with the former 1st and then set up an unattended `cron` job with the latter installed so that I'd always have a full sytem backup ready to go. However the `cron` job would fail unpredictably, and I couldn't figure out why. I recently updated to Debian 12 on the same Pi 3B+ and noticed `rpi-clone` was failing again. Swapping the readers fixed the issue. Super odd; thanks for the fix!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Lerking/rpi-clone#153
No description provided.