I created a filesystem like this:
dd if=/dev/zero of=disk-image count=40960
filesystem is created with this:
/sbin/mkfs -t ext3 -q disk-image
I then mounted and copied some test files and unmounted like this:
mount -o loop disk.image foo
cp "something" foo
sudo umount foo
I then run a e2fsck -c -c disk-image
which returns
"Pass 1: Checking inodes, blocks, and sizes
Inode 185, i_size is 16384, should be 17408. Fix<y>? yes
My question, since this is a file and not a block device, is the above warning something that I should be worried about.
How does one go about doing an fsck on a filesystem that is in a file?
Best Answer
You just run
e2fsck
and specify the image file, just like you would for a block device. I'm not sure why you're using the-c
option (this checks for badblocks).