[TriLUG] runlevels, kernel arguements and LILO

rpjday rpjday at mindspring.com
Fri Nov 9 18:06:21 EST 2001


On Fri, 9 Nov 2001, Kevin - The Alchemist - Sonney wrote:

> On Fri, Nov 09, 2001 at 09:25:38PM -0500, Chris Merrill spoke thusly:
> > I've seen several references in various HOWTOs that say you can
> > pass a kernel argument to select the runlevel...but it only said you
> > can use 'single' for runlevel 0 and 'emergency' for ???.  Is there a 
> > way to pass a kernel argument to select whichever runlevel I want?
> 
> Nope. Tahts' controlled by the init process, which reads it from /etc/inittab
> 
> > If not, is there any other way to select different runlevels from
> > LILO?
> 
> [fish]
> Again, nope. Anything you pass via LILO has to be either translated to
> a kernel parameter ([kernelname] single in lilo actualy translates to 
> /path/to/kernel S [other params]).

maybe i'm misunderstanding the question, but you can certainly
select any runlevel you want at boot time, both with lilo and grub.

with lilo, the rule as i understood it was that, at the boot prompt,
whatever you typed could be any combination of arguments to either
lilo, the kernel or the init process.

consider the boot line

  boot: linux root=/dev/hda3 2

the rule was:

1) lilo would process and strip off anything it recognized as one
  of *its* parameters (in this case, "linux")

2) the kernel would process and strip off anything it recognized
  as one of *its* parameters (in this case, "root=/dev/hda3")

3) anything left was passed on as an argument to "init" (in this
  case, "2")

  i just tried this with grub as well.  using the command line editor,
i overrode the initddefault entry of 3 in /etc/inittab and booted directly
both to run levels 2 and 5 (on separate occasions, of course :-).

  was this not what the original question was asking?

rday




More information about the TriLUG mailing list