Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Booting to runlevels
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Lido
n00b
n00b


Joined: 02 Oct 2002
Posts: 4

PostPosted: Wed Oct 02, 2002 8:44 pm    Post subject: Booting to runlevels Reply with quote

I'm coming to Gentoo from a FreeBSD background, so the way Linux does booting and the concept of runlevels is somewhat foreign to me.

If possible, I'd like to set up my laptop to easily boot to various different named runlevels, depending on where I'm using the machine. My network settings at work are different than those at home, and gentoo named runlevels seem like they might be a good solution to this problem. However, I'd rather not have to login as root every time I boot to select which runlevel to use by using "/sbin/rc".

Is there a way to boot to a specific runlevel using grub? I browsed through /etc looking for where the default runlevel gets started, but I couldn't find it. It all seems mysterious to me.

Help, please?
Back to top
View user's profile Send private message
Xinos
n00b
n00b


Joined: 16 Sep 2002
Posts: 42
Location: Birmingham, Alabama

PostPosted: Thu Oct 03, 2002 2:50 pm    Post subject: Reply with quote

The run levels are specified in /etc/inittab by default config but there setup is a little different than most gentoo sources. everything points to the rc command which and then the directory to boot to which is located in /etc/runlevels. From my example below inside of /etc/runlevels I should have boot, default, nonnetwork, single. There should be no reason why you cannot modify this on your own. The first line, initdefault, spefies which directory to boot to.

id:3:initdefault:

si:S:sysinit:/sbin/rc boot
l0:0:wait:/sbin/rc shutdown
l1:1:wait:/sbin/rc single
l2:2:wait:/sbin/rc nonetwork
l3:3:wait:/sbin/rc default
l4:4:wait:/sbin/rc default
l5:5:wait:/sbin/rc default
l6:6:wait:/sbin/rc reboot
z6:6:respawn:/sbin/sulogin

From what reading I have done with grub I believe to boot to a certain run level other than the default just specify the runlevel you want after your kernel line, like this:

kernel /boot/bzImage root=/dev/hdb3 readonly hdd=ide-scsi 1
or
kernel /boot/bzImage root=/dev/hdb3 readonly hdd=ide-scsi 4

The 1 or 4 specifies that I wan that run level. I have not tried but let me know if that works.
_________________
~ Always ask questions!

K. Allan Wilson
Back to top
View user's profile Send private message
Lido
n00b
n00b


Joined: 02 Oct 2002
Posts: 4

PostPosted: Mon Oct 07, 2002 12:57 am    Post subject: Reply with quote

This seems to work great. Thanks Xinos!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum