FC11, SELinux, and initrd no-boot scenario and resolution

view full story

http://forums.fedoraforum.org – So, I had fun with this one the past week. I had an FC11 system running just fine. Then one day it would not boot - it was hung somewhere inside the init script of the initrd image. CTRL-ALT-DEL would reboot the system. Using grub editor, I could temporarily delete the initrd line and boot into the system OK. But what was going on? mkinitrd was of no help to me. I even did a yum update, which got a new kernel, which also generated a new initrd - no joy. I extracted the initrd file system and edited the init script. I eventually hit on this tidbit: If I commented out this line: daemonize --ignore-missing /bin/plymouthd and rebuild the initrd image - the system would finally at least tell me what the problem was: mount failed for selinuxfs on /selinux. No such file or directory. So, I examine the root (the real root, not the initrd temporary root) - and sure enough, no /selinux. I make one and reboot. The system goes into a "targeted policy relabel" operation, reboots, and I am back in business - even with my original, unmodified, initrd. I have no idea what happened to my /selinux directory, but I think the initrd "init" script needs to check for this directory's existance, and make it if necessary. Or at least report that it isn't there. In FC11 right now the system just HANGS without this directory being present, without any clue as to what the problem is! Hope this is helpful to someone else.... (HowTos)