I'm having trouble clonig a hard disk with an old Gentoo system on it.
I have the disk and a blank target disk (both mechanical SATA - target is bigger than source) connected via USB. They show up as /dev/sdb (source) and /dev/sdc (target).
So I run a simple dd command as shown here below:
Code: Select all
# dd if=/dev/sdb of=/dev/sdc status=progress |
711426560 bytes (711 MB, 678 MiB) copied, 120 s, 5,9 MB/s
dd: error reading '/dev/sdb': Input/output error
1389632+0 records in
1389632+0 records out
711491584 bytes (711 MB, 679 MiB) copied, 145,221 s, 4,9 MB/s Code: Select all
Disk /dev/sdc: 465,8 GiB, 500107862016 bytes, 976773168 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: 0x05dbeb60
Device Boot Start End Sectors Size Id Type
/dev/sdc1 * 63 208844 208782 102M 83 Linux
/dev/sdc2 208845 2184839 1975995 964,9M 82 Linux swap / Solaris
/dev/sdc3 2184840 488375999 486191160 231,9G 83 LinuxSo when I connect the source and target disks to my "rescue" system again, I can confirm that it is not possible to mount root.
Code: Select all
# mount /dev/sdc3 ./disk
mount: /root/disk: wrong fs type, bad option, bad superblock on /dev/sdc
3, missing codepage or helper program, or other error.Code: Select all
# mount /dev/sdb3 ./diskCode: Select all
# mount /dev/sdc1 ./disk
# ls ./disk/Code: Select all
# dumpe2fs -h /dev/sdc3
dumpe2fs 1.44.1 (24-Mar-2018)
dumpe2fs: Bad magic number in super-block while trying to open /dev/sdc3
Couldn't find valid filesystem superblock.Code: Select all
# mke2fs -n /dev/sdc
mke2fs 1.44.1 (24-Mar-2018)
Found a dos partition table in /dev/sdc
Proceed anyway? (y,N) y
Creating filesystem with 122096646 4k blocks and 30531584 inodes
Filesystem UUID: 0e78bf4a-bbff-474e-84a6-83034ca45bac
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
102400000Code: Select all
# fsck -b 32768 /dev/sdc
fsck from util-linux 2.31.1
e2fsck 1.44.1 (24-Mar-2018)
fsck.ext2: Bad magic number in super-block while trying to open /dev/sdc
The superblock could not be read or does not describe a valid ext2/ext3/ext4
filesystem. If the device is valid and it really contains an ext2/ext3/ext4
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
or
e2fsck -b 32768 <device>
Found a dos partition table in /dev/sdcWhat can I try?
Vieri
[EDIT]
BTW I know fsck found a DOS partition table in /dev/sdc, but keep in mind that the target disk is 500GB in size.




