Есть два диска 128G и 16G. На диске два раздела - загрузочный и данных.
Как перенести один диск на другой?
Я пробовал
dd if=/dev/sdBIG of=/dev/sdSMALL bs=64K conv=noerror,sync
Но система после копирования и загрузки ругается на испорченный второй раздел и требует чтобы я все починил.
# e2fsck -fy /dev/mmcblk0p2
e2fsck 1.43.3 (04-Sep-2016)
The filesystem size (according to the superblock) is 27563520 blocks
The physical size of the device is 845824 blocks
Either the superblock or the partition table is likely to be corrupt!
Abort? yes
если ответить no то он на каждый блок требует подтверждения
Error reading block 1048608 (Invalid argument) while getting next inode from scan. Ignore error? yes
Force rewrite? yes
Error reading block 1048609 (Invalid argument) while getting next inode from scan. Ignore error? yes
Force rewrite? yes
...
пробую сделать resize - не дает
resize2fs -f /dev/mmcblk0p2 845824
resize2fs 1.43.3 (04-Sep-2016)
Resizing the filesystem on /dev/mmcblk0p2 to 845824 (4k) blocks.
resize2fs: Can't read a block bitmap while trying to resize /dev/mmcblk0p2
Please run 'e2fsck -fy /dev/mmcblk0p2' to fix the filesystem
after the aborted resize operation.