Brian, you write:> Using RedHat 7.0, if you simply create your journal on the root file-
> system, figure out it's inode number, issue a
>
> lilo -R linux rw rootflags=journal=inode_num
>
> and reboot, things go mostly well. I say mostly because there are
> problems. As the system is coming up for the first time with the
> journal enabled, the ritual fsck & mount process in the initscripts
> will have a problem with the ext3 mounted root filesystem.
If you use e2fsprogs-1.20.WIP-0103 (from sourceforge), I believe that
tune2fs will let you create a journal on root while it is still mounted.
I'm not 100% sure if this is in 0103, or it was added afterwards, as
I have done a lot of changes since then.
> It will think it's ext2 (because I have not changed that in the
/etc/fstab
> yet) and complain with:
I'm not sure why you would not change /etc/fstab, given that you want to
add a journal to the root filesystem.
> fsck.ext2(null):
> The superblock could not be read or does not describe a correct ext2
> filesystem. If the device is valid and it really contains an ext2
> filesystem (and not swap or ufs or something else), then the superblock
> is corrupt, and you might try running e2fsck with an alternate superblock:
> e2fsck -b 8193 <device>
>
>: Filesystem has unsupported features(s) while trying to open /dev/hda5
>
> It seems that this problem is only on the first boot after installing
> the journal. Subsequent boots go just fine with the system believing
> the root filesystem is ext2 and clean (of course :-).
>
> If I want to alleviate this problem with the first boot, I can change
> the root filesystem type in fstab to ext3, install the
> e2fsprogs-1.20.WIP.sct-20001207.i386.rpm (so that I have an fsck.ext3)
> but then the system complains with:
As you say, having an fsck.ext3 will help with the above problems, even
if you don't change /etc/fstab to have ext3 for root, since fsck.ext2
can handle journals just fine (it is the same program as fsck.ext3).
> /: recovering journal
> JFS DEBUG: (recovery.c, 254): journal_recover: JFS: recovery, exit status
0, recovered transactions 1 to 4
> JFS DEBUG: (recovery.c, 256): journal_recover: JFS: Replayed 16 and revoked
0/0 blockes
> Warning... fsck.ext3 for device /dev/hda5 exited with singal 11.
> fsck.ext3: Bad magic number in super-block while trying to re-open /
This is rather strange... I have never seen something like that. It looks
like the journal replay somehow overwrote the superblock? Seeing signal 11
(SEGV) is a bad sign. If you can reproduce this, it would be worthwhile to
install a non-stripped e2fsck and run under gdb to see where this is
happening.
> when booting up. This is followed by a slew of really ugly stuff,
> like programs not being found etc.
>
> So the question is, what to do? Grin and bear it for now or is
> there a solution that makes the first boot more elegant?
Use the new tune2fs. Stephen at one point wanted to make a new e2fsprogs
RPM, but we are waiting for Ted to make a new e2fsprogs release with the
latest fixes. Soon hopefully.
Cheers, Andreas
--
Andreas Dilger \ "If a man ate a pound of pasta and a pound of antipasto,
\ would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/ -- Dogbert