Re: difference between run levels 1 and S
On Sat, 25 May 2002, Bret Hughes wrote: > Is the issue whether s is entered at boot or via telinit? Not sure but > like Mr Wagner, I have always assumed 1 and s were the same but clearly > they are not. > > Keep us informed of any progress you make on figuring this out. i can tell you what piqued my curiosity. i was explaining the "runlevel" command, which shows you two pieces of info -- the previous run level and the current level. if you've just booted to run level 3, say, that command will show you: # runlevel N 3 as in, this machine came from a New boot (really, no previous run level) and is now in 3. if you change run levels using "init", say "init 2", then runlevel will tell you: # runlevel 3 2 so far, so good. if, however, you take it down to runlevel 1 with "init 1", you get: # runlevel 1 S ? in other words, switching to run level 1 involves init consulting /etc/inittab, running everything in /etc/rc1.d (mostly K scripts), but the last two entries in /etc/rc1.d are S00single and S17keytable, which takes you from run level 1 to run level S. so far, i've established that {S,s} is *not* equivalent to 1, since run level 1 does consult /etc/inittab, while {S,s} does not. and, as far as i can tell, you're supposed to go to single-user mode by going to run level 1. as a test, try "init s" and see what happens. very different from "init 1" -- with "init s", none of /etc/rc1.d is consulted, so services are *not* killed. i also quote from "linux administration handbook," by nemeth et al. "Single-user mode was traditionally init level 1. It brought down all multiuser and remote login processes and made sure the system was running a minimal complement of software. Since single-user mode provides root access to the system, however, administrators wanted the system to prompt for the root password whenever it was booted into single-user mode. The S run level was created to address this need: it spawns a process that prompts for the root password. On Linux, the S level serves only this purpose and is not a destination in itself." other than the fact that my red hat box does *not* prompt for the root password, this emphasizes that 1 != s yet again. anyway, i think i'll rename /etc/inittab and have some fun experimenting with 1 versus {s,S}. but, as i said, i think it's pretty clear that 1 != s. rday ___ Redhat-list mailing list [EMAIL PROTECTED] https://listman.redhat.com/mailman/listinfo/redhat-list
Re: difference between run levels 1 and S
I think we figured all of this out already. Runlevel 1 is a defined runlevel (/etc/inittab) who's behavior is based on the related rc.d scripts (Runlevel 1 could therefore spam the screen with ascii art and do nothing more). Runlevel S, obviously, is what one would use if you were just going to get things going (good if you're building a system from scratch... or doing a major rebuild of a b0rked setup). Runlevel 1 would seem to be accessible via init/telinit (since traditionally, runlevel 1 means that none of the network stuff is going among other things), whereas Runlevel S would logically be best (if not only) accessible by rebooting. On Sat, 25 May 2002, Bret Hughes wrote: > On Sat, 2002-05-25 at 15:15, rpjday wrote: > > > > a number of people i've chatted with lately seemed to think > > there was not much difference between run level 1 and run levels > > s or S. after i explained it a couple of times, it occurred to > > me to make sure *i* understood it properly. > > > > as i understand it, run level 1 is similar to the other numeric > > run levels in that all of those run levels are defined in > > /etc/inittab -- regardless of what numeric run level you're > > going to, init consults /etc/inittab to determine what has > > to happen, and this involves running the K and S scripts in > > the appropriate directory. for run level 1, this consists > > almost exclusively of K scripts (not totally, though -- more > > on that in a minute). > > > > in addition, if you boot to run level 1 at, say, the grub > > menu, /etc/inittab *must* exist since, obviously, it has to > > be consulted. > > > > run level S, though, is another matter, in that this takes > > the system directly to a single-user mode *without* consulting > > /etc/inittab -- useful if you've trashed that file. > > Hmmm. Not sure that is true but the init man page does seem to have > some conflicting info. > > >From the init man page: > > BOOTING >After init is invoked as the last step of the kernel boot >sequence, it looks for the file /etc/inittab to see if >there is an entry of the type initdefault (see init >tab(5)). The initdefault entry determines the initial run >level of the system. If there is no such entry (or no >/etc/inittab at all), a runlevel must be entered at the >system console. > >Runlevel S or s bring the system to single user mode and >do not require an /etc/initttab file. In single user >mode, a root shell is opened on /dev/console. > > then later: > > BOOTFLAGS >It is possible to pass a number of flags to init from the >boot monitor (eg. LILO). Init accepts the following flags: > >-s, S, single > Single user mode boot. In this mode /etc/inittab is > examined and the bootup rc scripts are usually run > before the single user mode shell is started. > >1-5 Runlevel to boot into. > > Is the issue whether s is entered at boot or via telinit? Not sure but > like Mr Wagner, I have always assumed 1 and s were the same but clearly > they are not. > > Keep us informed of any progress you make on figuring this out. > > Bret > > > > ___ > Redhat-list mailing list > [EMAIL PROTECTED] > https://listman.redhat.com/mailman/listinfo/redhat-list > -- ___ Redhat-list mailing list [EMAIL PROTECTED] https://listman.redhat.com/mailman/listinfo/redhat-list
Re: difference between run levels 1 and S
On Sat, 2002-05-25 at 15:15, rpjday wrote: > > a number of people i've chatted with lately seemed to think > there was not much difference between run level 1 and run levels > s or S. after i explained it a couple of times, it occurred to > me to make sure *i* understood it properly. > > as i understand it, run level 1 is similar to the other numeric > run levels in that all of those run levels are defined in > /etc/inittab -- regardless of what numeric run level you're > going to, init consults /etc/inittab to determine what has > to happen, and this involves running the K and S scripts in > the appropriate directory. for run level 1, this consists > almost exclusively of K scripts (not totally, though -- more > on that in a minute). > > in addition, if you boot to run level 1 at, say, the grub > menu, /etc/inittab *must* exist since, obviously, it has to > be consulted. > > run level S, though, is another matter, in that this takes > the system directly to a single-user mode *without* consulting > /etc/inittab -- useful if you've trashed that file. Hmmm. Not sure that is true but the init man page does seem to have some conflicting info. >From the init man page: BOOTING After init is invoked as the last step of the kernel boot sequence, it looks for the file /etc/inittab to see if there is an entry of the type initdefault (see init tab(5)). The initdefault entry determines the initial run level of the system. If there is no such entry (or no /etc/inittab at all), a runlevel must be entered at the system console. Runlevel S or s bring the system to single user mode and do not require an /etc/initttab file. In single user mode, a root shell is opened on /dev/console. then later: BOOTFLAGS It is possible to pass a number of flags to init from the boot monitor (eg. LILO). Init accepts the following flags: -s, S, single Single user mode boot. In this mode /etc/inittab is examined and the bootup rc scripts are usually run before the single user mode shell is started. 1-5 Runlevel to boot into. Is the issue whether s is entered at boot or via telinit? Not sure but like Mr Wagner, I have always assumed 1 and s were the same but clearly they are not. Keep us informed of any progress you make on figuring this out. Bret ___ Redhat-list mailing list [EMAIL PROTECTED] https://listman.redhat.com/mailman/listinfo/redhat-list
RE: difference between run levels 1 and S
It's my understanding that Linux 1 = Linux S -Original Message- From: rpjday [mailto:[EMAIL PROTECTED]] Sent: Saturday, May 25, 2002 3:16 PM To: redhat mailing list Subject: difference between run levels 1 and S a number of people i've chatted with lately seemed to think there was not much difference between run level 1 and run levels s or S. after i explained it a couple of times, it occurred to me to make sure *i* understood it properly. as i understand it, run level 1 is similar to the other numeric run levels in that all of those run levels are defined in /etc/inittab -- regardless of what numeric run level you're going to, init consults /etc/inittab to determine what has to happen, and this involves running the K and S scripts in the appropriate directory. for run level 1, this consists almost exclusively of K scripts (not totally, though -- more on that in a minute). in addition, if you boot to run level 1 at, say, the grub menu, /etc/inittab *must* exist since, obviously, it has to be consulted. run level S, though, is another matter, in that this takes the system directly to a single-user mode *without* consulting /etc/inittab -- useful if you've trashed that file. in fact, switching to run level 1 actually involves "K"illing almost everything, then "S"tarting single user mode. so, is that a fair description? am i missing anything critical? is there, somewhere, a decent writeup on this since the man pages for both init and inittab don't discuss this distinction as well as i'd like. rday ___ Redhat-list mailing list [EMAIL PROTECTED] https://listman.redhat.com/mailman/listinfo/redhat-list ___ Redhat-list mailing list [EMAIL PROTECTED] https://listman.redhat.com/mailman/listinfo/redhat-list
difference between run levels 1 and S
a number of people i've chatted with lately seemed to think there was not much difference between run level 1 and run levels s or S. after i explained it a couple of times, it occurred to me to make sure *i* understood it properly. as i understand it, run level 1 is similar to the other numeric run levels in that all of those run levels are defined in /etc/inittab -- regardless of what numeric run level you're going to, init consults /etc/inittab to determine what has to happen, and this involves running the K and S scripts in the appropriate directory. for run level 1, this consists almost exclusively of K scripts (not totally, though -- more on that in a minute). in addition, if you boot to run level 1 at, say, the grub menu, /etc/inittab *must* exist since, obviously, it has to be consulted. run level S, though, is another matter, in that this takes the system directly to a single-user mode *without* consulting /etc/inittab -- useful if you've trashed that file. in fact, switching to run level 1 actually involves "K"illing almost everything, then "S"tarting single user mode. so, is that a fair description? am i missing anything critical? is there, somewhere, a decent writeup on this since the man pages for both init and inittab don't discuss this distinction as well as i'd like. rday ___ Redhat-list mailing list [EMAIL PROTECTED] https://listman.redhat.com/mailman/listinfo/redhat-list