I’m not coming up with a lot of useful (clear) results when searching for a solution to this issue.
Is it OK to simply dd the 128GB disk to the 32GB disk using count to stop after the 16GB partition was cloned?
A bit more context: I had to clone a 16GB eMMC and only had a 128GB SD around. Now I purchased a 32GB eMMC and want to clone it again. The partition holds a root filesystem for an ARMv8 device. I don’t have the 16GB eMMC anymore, that would have been the easy way out.
@InFerNo@lemmy.ml you should do the partition not the whole disk. Then create a new partition in the 32gb disk or mount the dd file with a loopback device and transfer the files to the whole 32gb disk
I recommend FSArchiver, it can handle different size partitions
Is the 16gb partition the first partition? If so I’d just dd the 128gb drive at the 32gb drive then fix the partition table and remove the others.
If it’s not the first partition use gparted to copy it to the new drive.
Do you only have the root parition or do you have everything else too (like /boot)?
- If you only have root, reinstall the OS then just overwrite the root partition with your old one.
- Run fsck on the root partition and/or use gparted to expand the ext4 partition. You might have to fuck around with the disk UUIDs to get it to boot again. You’ll most likely have to at the very least change your /etc/fstab file to update the UUID of the boot partition.
if you have everything, you can just dd the sd disk to the emmc, provided that you didn’t mess around with the partitions after.
- Copy with dd to the emmc with or without the count, it doesn’t matter that much if time isn’t a priority. (something like
dd if=/dev/sdcard of=/dev/newemmc
). If it fails and says the device is out of memory after 32GB, that’s fine. Any other error is not fine. - Use gparted to expand the root partition.
- fsck the partition.
INFO: What filesystem does your source drive/partition have?