View previous topic :: View next topic |
Author |
Message |
Lido n00b
Joined: 02 Oct 2002 Posts: 4
|
Posted: Wed Oct 02, 2002 8:44 pm Post subject: Booting to runlevels |
|
|
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 |
|
|
Xinos n00b
Joined: 16 Sep 2002 Posts: 42 Location: Birmingham, Alabama
|
Posted: Thu Oct 03, 2002 2:50 pm Post subject: |
|
|
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 |
|
|
Lido n00b
Joined: 02 Oct 2002 Posts: 4
|
Posted: Mon Oct 07, 2002 12:57 am Post subject: |
|
|
This seems to work great. Thanks Xinos! |
|
Back to top |
|
|
|
|
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
|
|