Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mpikosdimitris opened this issue Jan 23, 2023 · 4 comments
Open

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

mpikosdimitris opened this issue Jan 23, 2023 · 4 comments

Comments

@mpikosdimitris
Copy link

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
Copy link

I got the same issue. Have you fixed it?

@ThiloHettmer
Copy link

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

@rhys96999
Copy link

Same problem for me and same solution

@jdrch
Copy link

jdrch commented Nov 13, 2023

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants