I've recently created a backup file for my Ubuntu 16.04.4 server using
dd in order to prepare for migrating to a larger SSD. I want to mount the backup image through a separate Ubuntu VM running on my local machine to check that the backup worked as expected.
Attempting to loop mount as follows:
mount -o loop image ~/mnt/serverTest
Returns the following error:
mount: /root/mnt/serverTest: can't read superblock on /dev/loop6
Examining the image using fdisk as follows:
fdisk -l image
Gives the following output:
Disk image: 30 GiB, 32212254720 bytes, 62914560 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0xc3ed8245 Device Boot Start End Sectors Size Id Type image1 * 2048 62914526 62912479 30G 83 Linux
This looks pretty promising to me - it seems as though the backup image has been generated correctly - and I even attempted the loop mount with an offset (512*2048=1048576) as follows:
mount -o loop,offset=1048576 image ~/mnt/serverTest
But the exact same error stating that the superblock can't be read comes back.
Finally, examining the image file with badblocks reports no corrupted blocks, however executing
fsck.ext4 image reports a bad magic number in super-block and states that a dos partition table has been found.
TL;DR - Mount errors and fsck.ext4 output seem to suggest something wrong with the backup image, but fdisk output looks alright. What am I missing?
Apologies for the lengthy and probably painfully rookie question - any advice would be much appreciated.