PDA

View Full Version : [LIVE] ext3fs.img journal corrupt?


miked2024
2009-06-15, 07:13
occasionally i have problems with my live (USB flash drive) installation. when i ssh in, i get input/output errors as the filesystem is mounted read-only.

in order to correct this, i have to power off and transfer the flash drive to another machine (ubuntu vm, in fact) to fsck the ext3fs.img file.

i thought that live didn't use a journal in order to avoid tear on flash drives:

http://xbmc.org/forum/showpost.php?p=243340&postcount=11

is there a way to tell the system to fsck on boot... for instance is it safe to set the fsck flag in /etc/fstab for the unionfs?

l.capriotti
2009-06-15, 10:25
As the name implies ext3fs.img contains an ext3 fs, hence journaled. However, this file contains only differential changes to the filesystem, hence the amount of writes (and journal activity) is very limited. That is why flash tearing is mitigated.

As per checking ext3fs.img, since it is mounted in the early stages of the boot process there is no way to have it fsck except in the initrd scripts, that is quite an inconvenience and hardly feasible.

You should investigate what is the root cause of the corruption since if the system is properly operated no corruption should occur, and eventually rename the ext3fs file, reboot in safe mode, run fsck and rename it back to have it clean upon rebooting again.