[TriLUG] fsck'ing an image vs a partition

Scott Lambdin via TriLUG trilug at trilug.org
Tue Oct 25 16:50:37 EDT 2022


Maybe do not use -f with the sda?

On Tue, Oct 25, 2022, 10:37 AM Brian via TriLUG <trilug at trilug.org> wrote:

> Hi Gang,
>
> I've got a head-scratcher.  I have an image of an ext4 filesystem, and a
> microSD card.  I can run fsck -f on the image file and it reports no
> errors.  I dd the image onto the SD's first partition (which is more
> than large enough for it).  I dd the image BACK from the SD card into
> another file, diff the two files and they're identical.  HOWEVER, when I
> fsck the SD partition, there are errors galore.
>
> What gives?  Why would the same collection of bytes fsck differently
> being a file versus an actual block device?
>
> Command history:
>
> dd if=p1.img of=/dev/sda1
> dd if=/dev/sda1 of=what.img bs=512 count=...
> diff what.img p1.img            // no differences
> fsck -f p1.img                  // no errors
> fsck -f what.img                // no errors
> fsck -f /dev/sda1               // errors galore
>
> Thanks,
> -Brian
> --
> This message was sent to: Scott Lambdin <lopaki at gmail.com>
> To unsubscribe, send a blank message to trilug-leave at trilug.org from that
> address.
> TriLUG mailing list : https://www.trilug.org/mailman/listinfo/trilug
> Unsubscribe or edit options on the web  :
> https://www.trilug.org/mailman/options/trilug/lopaki%40gmail.com
> Welcome to TriLUG: https://trilug.org/welcome


More information about the TriLUG mailing list