[Linux-users] Grub options menu on CentOS

C M Reinehr cmr
Tue Aug 21 11:37:23 PDT 2007


Bill,

On Tuesday 21 August 2007 13:09, Bill Campbell wrote:
> I'm gradually learning my way around CentOS systems, but haven't figured
> out how to select different init states from grub.
>
> On the SuSE systems I've been using, one can type ``init 3'' at the grub
> prompt, but CentOS doeesn't provide that prompt.  When I've gone into the
> grub edit mode, and attempted to set it there, I haven't found the correct
> incantation to select different init states (I assume init=/bin/sh would
> work, but that's generally useful only in serious emergencies).
>
> I've compared the /boot/grub/menu.lst files on SuSE and CentOS, but don't
> see anything that looks like it would control this, and the ``info'' pages
> are, as usual, don't seem to go into any useful detail.
>
> How does one configure grub to provide the options prompt where one can
> specify boot options?
>
> Bill

It appears that the answer to your question is in the init manual, rather
than the grub manual. I'm familiar with editing the grub/menu.lst to boot
into single user mode, but I had to do a little research to see what other
possibilities exist. These are lines from my menu.lst file.

This will boot into the default init state as defined in /etc/inittab:
kernel /vmlinuz-2.6.18-custom.5 root=/dev/mapper/vg0-lv_root ro vga=0x314

This will boot into single user mode:
kernel /vmlinuz-2.6.18-custom.5 root=/dev/mapper/vg0-lv_root ro vga=0x314 single

Presumably, if I understand the entry in man:init/Bootflags, you could boot into
init mode 3 by replacing the word single with 3.

You could have as many boot stanzas in menu.lst as you had run levels defined
in /etc/inittab. Of course, if you wanted to boot always into run level three
then you should just edit inittab & define your default run level.

HTH!

cmr

PS	As Lonni recommended you can edit the boot options on the fly, as well
as editing menu.lst.
-- 
Debian 'Etch' - Registered Linux User #241964
--------
"More laws, less justice." -- Marcus Tullius Ciceroca, 42 BC



More information about the Linux-users mailing list