Creating a kernel that boots STRAIGHT to command prompt?
I'm running Fedora Core 2-Final and GRUB. I want a "failsafe" kernel that does not start X or any of the other fluff, just one that goes straight to a command prompt. How would I go about doing this?
|
Edit the run level in your /etc/inittab file and the kernel doesn't matter. You can for sure
use run level 1 with most any distro. |
Quote:
|
Can you check the Feodra CDs for a directory named kernels, and see if there's
one in there? Otherwise, if you still have the Mandrake CDs, perhaps you could use the failsafe kernel from there - or at least look at the configuration and make your own for Fedora. I think you can edit grub and pass an option to the kernel to boot linux single (user) or something like that. I don't know grub, never could figure it out, so I use LiLO. |
It isn't the kernel, it's the arguments passed to the kernel on the append line for lilo or on the kernel line for grub. Iirc it's either "single" or "runlevel=1", something along those lines. Actually, I always kept a rh8 cd #1 around for that purpose. Just booted into rescue. Now I use a customized RIP (Rescue Is Possible) boot cd.
|
This is the entry in Mandrake's LiLO for the failsafe kernel:
Code:
image=/boot/vmlinuz |
Ok, looks like mandrake uses "failsafe" as the keyword. Be warned that this is distro specific and highly variable.
|
As you are using GRUB as your boot manager it's quite easy to do what you want:
Edit the grob config file generally /boot/grub/menu.lst WARNING THIS COULD BE DANGEROUS Copy the lines for your standard kernel eg: Code:
title linux Code:
title test If you have an administrative tool for editing the Boot Configuration I strongly suggest you use it instead of hacking the text file. Having made the changes above you can choose Testing as the image to load at boot time and it will stop at a login prompt at run level 3 (There are more run levels that 1 - Single User and 5 - Graphical Mode!) If this all works out you can even make it your default image. The easy option (assuming you don't want this as your default image, would be to type: init 3 when given the option of which kernel to load. |
According to the Grub Manual, grub allows one to create a text configuration file which can be referenced in the kernel line of grub.conf (or /grub/menu.lst if that's what you use), specifying any boot options you need. The only requirement is that the text file is referenced AFTER the kernel: something like kernel=/boot/vmlinuz <filename>.
However, the manual does not give any examples of the text file, or how to refer to it in the kernel line. Using such an option may be just what you need. After doing a little google research, I find that the command is 'configfile file', where configfile is the command, and file is the name of the file. |
All times are GMT -5. The time now is 09:59 AM. |