You are not logged in.

#1 2004-11-20 21:49:47

BryanY
Member
Registered: 2004-08-01
Posts: 30

Specify runlevel in grub?

I've read the Grub wiki. but i haven't quite figured out how to do this.

Basically I'd like an additional option in my boot menu to boot Arch in single user mode (runlevel 1) in case something goes wrong.

Offline

#2 2004-11-20 23:04:19

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: Specify runlevel in grub?

isn't it just a matter of appending
init=3 or init 3
to the end of the kernel line?


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#3 2004-11-22 15:18:43

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Specify runlevel in grub?

you don't need "init" just add the runlevel number at the end

kernel /boot/vmlinuz-2.X ro root=/dev/hda3 5
   or
kernel /boot/vmlinuz-2.X ro root=/dev/hda3 3

Offline

#4 2004-11-22 16:45:14

z4ziggy
Member
From: Israel
Registered: 2004-03-29
Posts: 573
Website

Re: Specify runlevel in grub?

tnx phrakture wink i was looking for this too... smile

Offline

#5 2004-11-22 17:26:55

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Specify runlevel in grub?

z4ziggy wrote:

tnx phrakture wink i was looking for this too... smile

np... with grub, I don't usually keep a safemode in there... if I have boot problems, I just hit "e" on the grub boot screen and add the runlevel at the end...

Offline

#6 2004-11-22 17:42:01

dp
Member
From: Zürich, Switzerland
Registered: 2003-05-27
Posts: 3,378
Website

Re: Specify runlevel in grub?

is there a way to specify the DAEMONS at boottime (lilo- or grub-prompt)?

i have a laptop and sometimes i work in the train ... but booting on battery with all the DAEMONS is just time/battery lost

(arch ist not sys V)


The impossible missions are the only ones which succeed.

Offline

#7 2004-11-22 17:42:37

z4ziggy
Member
From: Israel
Registered: 2004-03-29
Posts: 573
Website

Re: Specify runlevel in grub?

thats actually what im gonna do wink im not gonna hold the grub "door" opened, i just gonna use it for fast boots when needed (nvidia install... grrrr....)

Offline

#8 2004-11-22 17:52:03

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Specify runlevel in grub?

dp wrote:

is there a way to specify the DAEMONS at boottime (lilo- or grub-prompt)?

i have a laptop and sometimes i work in the train ... but booting on battery with all the DAEMONS is just time/battery lost

(arch ist not sys V)

hmmm, you bring up a good point. perhaps there needs to be a way to change boot DAEMONS at different runlevels - I will look into a workaround... see if anything interesting can be done without making arch a sys V boot system....

Offline

#9 2005-07-12 02:21:36

big_gie
Member
Registered: 2005-01-19
Posts: 637

Re: Specify runlevel in grub?

I was looking for the "runlevel controled by grub" thing and found that thread... I know its old but its interesting.

is there a way to specify the DAEMONS at boottime (lilo- or grub-prompt)? i have a laptop and sometimes i work in the train ... but booting on battery with all the DAEMONS is just time/battery lost

I'm interested in the same thing. I've managed to control wich ServerLayout xorg uses (via kdm). I've created a wiki page : http://wiki2.archlinux.org/index.php/XLayout

A similar technic could be used for controling deamons.

Have you found something on your side?

Offline

#10 2005-07-12 09:22:37

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: Specify runlevel in grub?

phrakture wrote:
dp wrote:

is there a way to specify the DAEMONS at boottime (lilo- or grub-prompt)?

i have a laptop and sometimes i work in the train ... but booting on battery with all the DAEMONS is just time/battery lost

(arch ist not sys V)

hmmm, you bring up a good point. perhaps there needs to be a way to change boot DAEMONS at different runlevels - I will look into a workaround... see if anything interesting can be done without making arch a sys V boot system....


Well you can pass whatever options you want to the kernel, and then parse em in a bash script from /proc/cmdline.

But if you want a different daemon setup for a different runlevel, try the following......

For this example, im gonna make runlevel 4 have my custom daemons.

1) Edit inittab for your new runlevel, add this after the rc.multi line.

cr:4:wait:/etc/rc.multi4

and edit the regular rc.multi line to:

rm:235:wait:/etc/rc.multi

Then make a copy of /etc/rc.multi, called /etc/rc.multi4. In this, change:

for daemon in "${DAEMONS[@]}"; do

to

for daemon in "${DAEMONS4[@]}"; do

And finally, in your rc.conf, create your new daemons line

DAEMONS4=(network firewall dbus hal ivman)

and now when you boot to init4, it runs your custom daemons line!

iphitus

Offline

#11 2005-07-12 14:52:24

big_gie
Member
Registered: 2005-01-19
Posts: 637

Re: Specify runlevel in grub?

yeah that's a good one smile

Thanks iphitus!

Offline

Board footer

Powered by FluxBB