Today I tried to make an copy of a Micro SD card to another on Ubuntu 20.04. I used dd
to first write an image of the first SD card to my hard drive, then switched SD cards and wrote the image from my hard drive to the new card. However it seems I was careless, at some point during the dd
operation my screen went black. I suspect that I did not copy to and from the SD cards at all, but copied my boot hard drive to my storage hard drive. The boot drive is 256 GB like the SD cards, so I may have mixed them up, and in the second step copied that image from my storage drive to my boot drive while the machine was running. Rebooting got me stuck in initramfs
. I booted from a USB stick to Ubuntu now and ran sudo fschk -f
on the boot drive. The result contains:
Superblock invalid, trying backup blocks...
Bad magic number in super-block while trying to open /dev/nvme0n1
[...]
Found a dos partition table in /dev/nvme0n1
So is the boot sector toast here? On my storage drive I still have the image file of the first dd
, presumably a copy of the boot drive. If it is indeed a copy of the boot drive, could it work to copy it back to the boot drive with dd
? If not what steps should I take?