I tried installing runit and runit-run on Ubuntu 8.04. They installed just fine, but my boot stalled after the first restart. It stopped at something like "keyboard mapping" and just hung indefinitely. I tried to reboot into Ubuntu's "recovery mode" so I could remove the runit and runit-run packages, but I couldn't get to a console to type in the "apt-get remove" command. I was working on burning a new copy of Ubuntu to do a re-install. While I was waiting for the Ubuntu CD, I was reading
"Embedded Linux Primer" and I came to the section about kernel command line arguments. You can tell Linux which file to use for the 'init' process. It turns out that package runit-run moves the old init to /sbin/init.sysv ( or maybe that file was already there and simply hard-linked ). All you need to do is tell the kernel to use /sbin/init.sysv instead of /sbin/init at boot time. Once I did that, I was able to do a normal boot, and nuke runit and runit-run.
Here's how to use the normal sysv init:
- Start or reboot your machine
- Interrupt the Grub bootloader by hitting the up or down key. That's the program which lets you select between different kernels versions and Windows XP (if you're hard core and you don't have a dual-boot machine, then you're probably not reading this post anyway because you weren't stupid enough to do what I did)
- Select the kernel at the top of your screen
- Type 'e' to edit the kernel command line
- select the kernel command line from this new window
- go to the end of the line and enter
- init=/sbin/init.sysv
- hit 'b' to boot with your modified command line arguments
- when it goes through the boot process, remove runit and runit-run:
- sudo apt-get remove runit runit-run
More kernel command lines may be found at:
www.kernel.org/pub/linux/kernel/people/gregkh/lkn/lkn_pdf/ch09.pdf
No comments:
Post a Comment