Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Selecting runlevel at boot time
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
BackSeat
Apprentice
Apprentice


Joined: 12 Apr 2002
Posts: 242
Location: Reading, UK

PostPosted: Tue Apr 30, 2002 10:38 pm    Post subject: Selecting runlevel at boot time Reply with quote

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
View user's profile Send private message
AutoBot
l33t
l33t


Joined: 22 Apr 2002
Posts: 968
Location: Usually Out

PostPosted: Wed May 01, 2002 6:21 am    Post subject: Reply with quote

Try this :)
Code:

man inittab

_________________
This message self destructed a long time ago.
Back to top
View user's profile Send private message
BackSeat
Apprentice
Apprentice


Joined: 12 Apr 2002
Posts: 242
Location: Reading, UK

PostPosted: Wed May 01, 2002 6:58 am    Post subject: Reply with quote

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
View user's profile Send private message
BackSeat
Apprentice
Apprentice


Joined: 12 Apr 2002
Posts: 242
Location: Reading, UK

PostPosted: Wed May 01, 2002 3:51 pm    Post subject: Running mysql without a network Reply with quote

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
View user's profile Send private message
BackSeat
Apprentice
Apprentice


Joined: 12 Apr 2002
Posts: 242
Location: Reading, UK

PostPosted: Thu May 02, 2002 12:32 pm    Post subject: Reply with quote

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
View user's profile Send private message
AutoBot
l33t
l33t


Joined: 22 Apr 2002
Posts: 968
Location: Usually Out

PostPosted: Thu May 02, 2002 7:08 pm    Post subject: Reply with quote

Unless I still don't understand the question I believe you could just type:
Code:

init 3

Or whatever level you wanted in the prompt before you boot.
_________________
This message self destructed a long time ago.
Back to top
View user's profile Send private message
richajoh
n00b
n00b


Joined: 02 May 2002
Posts: 2
Location: Round Rock, TX

PostPosted: Thu May 02, 2002 7:22 pm    Post subject: Reply with quote

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
View user's profile Send private message
BackSeat
Apprentice
Apprentice


Joined: 12 Apr 2002
Posts: 242
Location: Reading, UK

PostPosted: Thu May 02, 2002 8:00 pm    Post subject: Reply with quote

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
View user's profile Send private message
richajoh
n00b
n00b


Joined: 02 May 2002
Posts: 2
Location: Round Rock, TX

PostPosted: Thu May 02, 2002 8:07 pm    Post subject: Reply with quote

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
View user's profile Send private message
AutoBot
l33t
l33t


Joined: 22 Apr 2002
Posts: 968
Location: Usually Out

PostPosted: Thu May 02, 2002 9:56 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware 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