• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Changing run levels in Linux

 
Ranch Hand
Posts: 10198
3
Mac PPC Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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).




 
Saloon Keeper
Posts: 27763
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Joe San
Ranch Hand
Posts: 10198
3
Mac PPC Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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?
 
Ranch Hand
Posts: 1923
Scala Postgres Database Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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:
reply
    Bookmark Topic Watch Topic
  • New Topic