[RndTbl] RHEL et al. - how to break mkinitrd(8)

Sean Cody sean at tinfoilhat.ca
Fri Jul 8 11:04:13 CDT 2011


I would err on the side of reporting it.
At least the error should point out what it's tripping over.

Mounting _over_ root is a legitimate case base mounting a swap slice to anything is a corner case that should be noted or at least the error can die and state 'OMGWTFBBQ you can't mount a swap slice, I smell a fat finger!'

-- 
Sean (mobile)

On 2011-07-07, at 10:06 PM, "Adam Thompson" <athompso at athompso.net> wrote:

> 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
> 
> 
> 
> _______________________________________________
> Roundtable mailing list
> Roundtable at muug.mb.ca
> http://www.muug.mb.ca/mailman/listinfo/roundtable



More information about the Roundtable mailing list