[RndTbl] RHEL et al. - how to break mkinitrd(8)
Adam Thompson
athompso at athompso.net
Thu Jul 7 22:06:39 CDT 2011
CentOS 5.6 system. Running happily.
Applied kernel update, reboot, PANIC - unable to mount root filesystem.
(Along with other various weird error messages.)
Spent a lot of time deconstructing initrd(4)s.
Final root cause of the problem: in fstab(5), I had manually added a swap
partition.
"mount -a" didn't care, but mkinitrd sure did: I had fstab like this:
/dev/sda1 / ext3 defaults 1 1
/dev/sdb1 / swap defaults 0 0
Mkinitrd(8) was tripping over the "/" in field #2 of the swap record, and
generating a non-functional /init script in the initrd. Changing the
second line to read "/dev/sdb1 swap swap defaults 0 0" fixed the problem.
Aside from documenting this for the edification of others, what's the
consensus: is this a bug in mkinitrd(8) that should be reported? (i.e. it
should do more sanity checks?)
-Adam Thompson
athompso at athompso.net
More information about the Roundtable
mailing list