wood burning stoves 2.0*
The moose likes Linux / UNIX and the fly likes Changing run levels in Linux Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "Changing run levels in Linux" Watch "Changing run levels in Linux" New topic
Author

Changing run levels in Linux

Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9381
    
    2

Guys,

I'm not finding the /etc/inittab file under /etc on my Linux (Ubuntu 9.10). How and where can I change the runlevel? Below is what I get when I listed the files under /etc/ (just showing a partial list here that starts with i).





SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16054
    
  21

I think what you really meant what "How can I change the default runlevel?". Since that's what's set in inittab.

I'm puzzled. I'm pretty sure that inittab is wired in pretty tightly to the boot process, in addition to being in charge of respawning critical processes. The only way I can see that you could function without one is if the inittab is in an initial boot image that's been swapped out via a pivot chroot operation as part of the later-stage booting where the boot disk is replaced by the root disk.


Customer surveys are for companies who didn't pay proper attention to begin with.
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9381
    
    2

Tim Holloway wrote:I think what you really meant what "How can I change the default runlevel?". Since that's what's set in inittab.

I'm puzzled. I'm pretty sure that inittab is wired in pretty tightly to the boot process, in addition to being in charge of respawning critical processes. The only way I can see that you could function without one is if the inittab is in an initial boot image that's been swapped out via a pivot chroot operation as part of the later-stage booting where the boot disk is replaced by the root disk.


So what do I do now to change the default runlevel?
Stefan Wagner
Ranch Hand

Joined: Jun 02, 2003
Posts: 1923

Ubuntu abandoned inittab in one of the latest releases, that's right.

One way is, if you boot with grub, to interrupt, (e)dit the command line, insert the desired runlevel at the end of the command and press (b)oot, to switch the runlevel on a per-boot basis.
Consequently, you may choose the runlevel in the grup-menu-file (which happens to be changed as well, so you need to find out how to modify the menu - edits to /boot/grub/menu.lst will be overriden by some update-processes).

This would boot to runlevel 3.

The right way in general seems more easy:


http://home.arcor.de/hirnstrom/bewerbung
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Changing run levels in Linux