View previous topic :: View next topic |
Author |
Message |
BackSeat Apprentice
Joined: 12 Apr 2002 Posts: 242 Location: Reading, UK
|
Posted: Tue Apr 30, 2002 10:38 pm Post subject: Selecting runlevel at boot time |
|
|
I've read the Gentoo init system details, but one thing that isn't made clear. If I want to bring up my system to a specific runlevel - for example, nonetwork - what do I need to do at boot time or to the menu.lst to achieve that?
Thanks,
BS |
|
Back to top |
|
|
AutoBot l33t
Joined: 22 Apr 2002 Posts: 968 Location: Usually Out
|
Posted: Wed May 01, 2002 6:21 am Post subject: |
|
|
Try this
_________________ This message self destructed a long time ago. |
|
Back to top |
|
|
BackSeat Apprentice
Joined: 12 Apr 2002 Posts: 242 Location: Reading, UK
|
Posted: Wed May 01, 2002 6:58 am Post subject: |
|
|
I'm sorry, I didn't make myself clear.
I have a laptop which, when running in an office environment, I want to bring up with eth0 running DHCP. This is set in my 'default' runlevel.
However, when I'm working disconnected, I currently have to wait for the DHCPREQUEST to timeout on eth0. I do have another runlevel, 'nonetwork', which does not enable DHCP.
My question is: what can I do with grub which allow me to select whether I boot to the 'default' or 'nonetwork' runlevel?
Thanks,
BS |
|
Back to top |
|
|
BackSeat Apprentice
Joined: 12 Apr 2002 Posts: 242 Location: Reading, UK
|
Posted: Wed May 01, 2002 3:51 pm Post subject: Running mysql without a network |
|
|
Hmmmm.... I'm now trying to run mysql, but it won't run without the network being up. I've done this sort of thing many times before, so I am sure I am just getting caught in a Gentooism. Can someone shed some light on how to get mysql running on a standalone machine?
Thanks,
BS |
|
Back to top |
|
|
BackSeat Apprentice
Joined: 12 Apr 2002 Posts: 242 Location: Reading, UK
|
Posted: Thu May 02, 2002 12:32 pm Post subject: |
|
|
Well, either this topic is of no interest to anyone else, or it is too difficult to do!
Is it possible to select the runlevel at boot time that Gentoo will boot to? |
|
Back to top |
|
|
AutoBot l33t
Joined: 22 Apr 2002 Posts: 968 Location: Usually Out
|
Posted: Thu May 02, 2002 7:08 pm Post subject: |
|
|
Unless I still don't understand the question I believe you could just type:
Or whatever level you wanted in the prompt before you boot. _________________ This message self destructed a long time ago. |
|
Back to top |
|
|
richajoh n00b
Joined: 02 May 2002 Posts: 2 Location: Round Rock, TX
|
Posted: Thu May 02, 2002 7:22 pm Post subject: |
|
|
Since you mentioned menu.lst I'll assume you are using grub.
Yes you can do this, quite easily actually.
When you boot up and are sitting at the grub menu, highlight your gentoo boot and hit 'e' for edit. This will bring up the grub command line for that boot. Highlight the line beginning with 'kernel' and hit 'e' again. You can now edit that line. At the end put the number of the runlevel you want, such as 3, and hit enter. Be sure there is a space between the last statement and your '3'.
Now you are back to the editor with your new kernel line highlighted. From here just hit 'b' for boot and off you go.
I created a new runlevel 3 that doesn't boot X (redhat style) and made 5 the default (X) in inittab. |
|
Back to top |
|
|
BackSeat Apprentice
Joined: 12 Apr 2002 Posts: 242 Location: Reading, UK
|
Posted: Thu May 02, 2002 8:00 pm Post subject: |
|
|
Thanks for the replies; however, I already know about numeric runlevels. My question was 'how do I select at boot time to boot to the runlevel I call "nonetwork" or the one I call "fred" or whatever'?
Or can't this be done?
Thanks |
|
Back to top |
|
|
richajoh n00b
Joined: 02 May 2002 Posts: 2 Location: Round Rock, TX
|
Posted: Thu May 02, 2002 8:07 pm Post subject: |
|
|
I believe you need to associate your new runlevel with one of the numbers in inittab.
I did this with mine, copied 'default' to 'nox', removed xdm from nox, and changed 3 to point to 'nox'. Then made 5 the default.
When the kernel is done loading it hands the boot off to inittab, it needs to know about your new runlevel. |
|
Back to top |
|
|
AutoBot l33t
Joined: 22 Apr 2002 Posts: 968 Location: Usually Out
|
Posted: Thu May 02, 2002 9:56 pm Post subject: |
|
|
richajoh wrote: | I believe you need to associate your new runlevel with one of the numbers in inittab.
I did this with mine, copied 'default' to 'nox', removed xdm from nox, and changed 3 to point to 'nox'. Then made 5 the default.
When the kernel is done loading it hands the boot off to inittab, it needs to know about your new runlevel. |
Such I was assuming that BackSeat had already done something similar, sorry to assume will try to be more specific next time. _________________ This message self destructed a long time ago. |
|
Back to top |
|
|
|