Raspberry Pi 5 8GB
Having problems shrinking /dev/sdb. Getting e2fsck errors when in /dev/loop0 at step 6
/dev/sdb has a working Pi OS to shrink and is not mounted (32GB) /dev/sda1 mounted in /mnt (256GB ext4)
- sudo e2fsck -B 512 -f -y -n -C 0 /dev/sdb2
runs error free. no errors reported
sudo dcfldd bs=512 if=/dev/sdb2 of=/mnt/20240728-0801.img
sudo fdisk -l /mnt/20240728-0801.img
p1 starting 8192
p2 starting 1056768
lsblk shows no loop0
sudo losetup bs=512 /dev/loop0 /mnt/20240728-0801.img -o $((1056768*512))
sudo gparted /dev/loop0 resize has multiple e2fsck errors so I will try to to resize next image without gparted
one hour later This is a new image and did not try to resize with gparted
Running commands manually.
- sudo e2fsck -B 512 -f -y -n -C 0 /dev/loop0
multiple errors found and repaired same as gparted resize from earlier image. Lots of entries moved to lost and found
How do I find the problem with e2fsck errors reported with loopback device. Is it a bad dcfldd copy or loopback error?
How do I troubleshoot this error?
update 20240728-1728 cst ut-5: my micro-sd card had bad blocks. looking for a good micro-SD and my problems may go away.
Update 20240730 micro-sd cards were ok. Card reader was introducing bad blocks. New card reader ran error free on 2 complete backups, resizing, and restore back to a micro-sd. Problem found and corrected. 30GB dcfldd backup sdb to image changed from 42 minutes to 14 minutes with new card reader.