* [gentoo-user] Are runlevels 3 4 5 the same?
@ 2010-04-18 5:09 Adam
2010-04-18 5:21 ` Dale
2010-04-18 8:09 ` Mick
0 siblings, 2 replies; 11+ messages in thread
From: Adam @ 2010-04-18 5:09 UTC (permalink / raw
To: gentoo-user
I want to choose console or X from grub, so i'm thinking i'll do
something like 'rc-update delete xdm 4' and then pass softlevel=4 to my
grub boot line, to make runlevel 4 a console runlevel. Is that the right
way to do it?
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] Are runlevels 3 4 5 the same?
2010-04-18 5:09 [gentoo-user] Are runlevels 3 4 5 the same? Adam
@ 2010-04-18 5:21 ` Dale
2010-04-18 5:41 ` Adam
2010-04-18 17:21 ` Alan McKinnon
2010-04-18 8:09 ` Mick
1 sibling, 2 replies; 11+ messages in thread
From: Dale @ 2010-04-18 5:21 UTC (permalink / raw
To: gentoo-user
Adam wrote:
> I want to choose console or X from grub, so i'm thinking i'll do
> something like 'rc-update delete xdm 4' and then pass softlevel=4 to my
> grub boot line, to make runlevel 4 a console runlevel. Is that the right
> way to do it?
>
>
Gentoo doesn't use those runlevels. You need to read this:
man rc-update
Gentoo comes with the following runlevels:
root@smoker ~ # ls /etc/runlevels/
total 5
drwxr-xr-x 6 root root 152 Jun 11 2008 .
drwxr-xr-x 81 root root 4832 Apr 18 00:16 ..
drwxr-xr-x 2 root root 368 Jun 11 2008 boot
drwxr-xr-x 2 root root 512 Apr 9 20:05 default
drwxr-xr-x 2 root root 72 Jun 11 2008 nonetwork
root@smoker ~ #
It generally boots to default. You can change that on the kernel boot
line but with one of the above instead of a 4 as you posted.
Post back if you get stumped along the way.
Dale
:-) :-)
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] Are runlevels 3 4 5 the same?
2010-04-18 5:21 ` Dale
@ 2010-04-18 5:41 ` Adam
2010-04-18 5:55 ` Dale
2010-04-18 15:04 ` Peter Humphrey
2010-04-18 17:21 ` Alan McKinnon
1 sibling, 2 replies; 11+ messages in thread
From: Adam @ 2010-04-18 5:41 UTC (permalink / raw
To: gentoo-user
On 04/18/10 15:21, Dale wrote:
> Adam wrote:
>> I want to choose console or X from grub, so i'm thinking i'll do
>> something like 'rc-update delete xdm 4' and then pass softlevel=4 to my
>> grub boot line, to make runlevel 4 a console runlevel. Is that the right
>> way to do it?
>>
>>
>
> Gentoo doesn't use those runlevels. You need to read this:
>
> man rc-update
>
> Gentoo comes with the following runlevels:
>
> root@smoker ~ # ls /etc/runlevels/
> total 5
> drwxr-xr-x 6 root root 152 Jun 11 2008 .
> drwxr-xr-x 81 root root 4832 Apr 18 00:16 ..
> drwxr-xr-x 2 root root 368 Jun 11 2008 boot
> drwxr-xr-x 2 root root 512 Apr 9 20:05 default
> drwxr-xr-x 2 root root 72 Jun 11 2008 nonetwork
> root@smoker ~ #
>
> It generally boots to default. You can change that on the kernel boot
> line but with one of the above instead of a 4 as you posted.
http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=4
So gentoo does use the numerical runlevels (because that's what init
uses) as well as the gentoo runlevels you've shown. It looks like it
just maps the numbers to the names in inittab;
l0:0:wait:/sbin/rc shutdown
l0s:0:wait:/sbin/halt -dhp
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
l6r:6:wait:/sbin/reboot -dk
so, i guess this means i should point l4 to a custom runlevel in
/etc/runlevels that is the same as default with the exception that xdm
is removed... I'm assuming the linux kernel wont understand the gentoo
named runlevels, and therefore using those names in grub wouldnt work.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] Are runlevels 3 4 5 the same?
2010-04-18 5:41 ` Adam
@ 2010-04-18 5:55 ` Dale
2010-04-18 15:04 ` Peter Humphrey
1 sibling, 0 replies; 11+ messages in thread
From: Dale @ 2010-04-18 5:55 UTC (permalink / raw
To: gentoo-user
Adam wrote:
> On 04/18/10 15:21, Dale wrote:
>
>> Adam wrote:
>>
>>> I want to choose console or X from grub, so i'm thinking i'll do
>>> something like 'rc-update delete xdm 4' and then pass softlevel=4 to my
>>> grub boot line, to make runlevel 4 a console runlevel. Is that the right
>>> way to do it?
>>>
>>>
>>>
>> Gentoo doesn't use those runlevels. You need to read this:
>>
>> man rc-update
>>
>> Gentoo comes with the following runlevels:
>>
>> root@smoker ~ # ls /etc/runlevels/
>> total 5
>> drwxr-xr-x 6 root root 152 Jun 11 2008 .
>> drwxr-xr-x 81 root root 4832 Apr 18 00:16 ..
>> drwxr-xr-x 2 root root 368 Jun 11 2008 boot
>> drwxr-xr-x 2 root root 512 Apr 9 20:05 default
>> drwxr-xr-x 2 root root 72 Jun 11 2008 nonetwork
>> root@smoker ~ #
>>
>> It generally boots to default. You can change that on the kernel boot
>> line but with one of the above instead of a 4 as you posted.
>>
> http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=4
>
> So gentoo does use the numerical runlevels (because that's what init
> uses) as well as the gentoo runlevels you've shown. It looks like it
> just maps the numbers to the names in inittab;
>
> l0:0:wait:/sbin/rc shutdown
> l0s:0:wait:/sbin/halt -dhp
> 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
> l6r:6:wait:/sbin/reboot -dk
>
> so, i guess this means i should point l4 to a custom runlevel in
> /etc/runlevels that is the same as default with the exception that xdm
> is removed... I'm assuming the linux kernel wont understand the gentoo
> named runlevels, and therefore using those names in grub wouldnt work.
>
>
If you want to boot to the single runlevel, just add softlevel=single to
the end of the boot line in grub. You can do this in the config or edit
the boot line when grub comes up and it should work fine. I have never
used the number runlevels. It may work but I have never done it that
way so I can't really say one way or the other.
You can also create custom runlevels if you need them. I created one a
while back to play with and I just added the directory and added the
services I wanted in there. That should work fine. There may be other
ways to create them as well.
Also, you can use eselect to manage this as well. The module is called
rc. I don't use it but that is the up and coming way to do it.
Dale
:-) :-)
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] Are runlevels 3 4 5 the same?
2010-04-18 5:09 [gentoo-user] Are runlevels 3 4 5 the same? Adam
2010-04-18 5:21 ` Dale
@ 2010-04-18 8:09 ` Mick
2010-04-18 10:31 ` Neil Bothwick
1 sibling, 1 reply; 11+ messages in thread
From: Mick @ 2010-04-18 8:09 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: Text/Plain, Size: 602 bytes --]
On Sunday 18 April 2010 06:09:38 Adam wrote:
> I want to choose console or X from grub, so i'm thinking i'll do
> something like 'rc-update delete xdm 4' and then pass softlevel=4 to my
> grub boot line, to make runlevel 4 a console runlevel. Is that the right
> way to do it?
You could create a new default runlevel for this purpose, or you could try
passing the 'nox' option to the kernel, at boot time. There was a bug filed
some time ago because an xinit update broke this option, but I believe it has
been fixed now. Try it and see if this is what you need.
--
Regards,
Mick
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] Are runlevels 3 4 5 the same?
2010-04-18 8:09 ` Mick
@ 2010-04-18 10:31 ` Neil Bothwick
0 siblings, 0 replies; 11+ messages in thread
From: Neil Bothwick @ 2010-04-18 10:31 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 796 bytes --]
On Sun, 18 Apr 2010 09:09:42 +0100, Mick wrote:
> > I want to choose console or X from grub, so i'm thinking i'll do
> > something like 'rc-update delete xdm 4' and then pass softlevel=4 to
> > my grub boot line, to make runlevel 4 a console runlevel. Is that the
> > right way to do it?
>
> You could create a new default runlevel for this purpose, or you could
> try passing the 'nox' option to the kernel, at boot time. There was a
> bug filed some time ago because an xinit update broke this option, but
> I believe it has been fixed now. Try it and see if this is what you
> need.
The correct option is gentoo=nox. nox on its own sometimes works, but
it's not the proper way to do it.
--
Neil Bothwick
SITCOM: Single Income, Two Children, Oppressive Mortgage
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] Are runlevels 3 4 5 the same?
2010-04-18 5:41 ` Adam
2010-04-18 5:55 ` Dale
@ 2010-04-18 15:04 ` Peter Humphrey
2010-04-18 17:50 ` Neil Bothwick
1 sibling, 1 reply; 11+ messages in thread
From: Peter Humphrey @ 2010-04-18 15:04 UTC (permalink / raw
To: gentoo-user
On Sunday 18 April 2010 06:41:47 Adam wrote:
> i guess this means i should point l4 to a custom runlevel in
> /etc/runlevels that is the same as default with the exception that
> xdm is removed...
That's what I do. I have /etc/runlevels/no-x/ which contains all the
services I want started if I boot a CLI-only system. It's sometimes
handy to have all the virtual consoles available, so single mode doesn't
help here.
> I'm assuming the linux kernel wont understand the gentoo named
> runlevels, and therefore using those names in grub wouldnt work.
Grub runs before the kernel; in fact grub finds the kernel on the disk
from the details you specify in /boot/grub/grub.conf.
Here's a snippet from my grub.conf:
title=Gentoo Linux 2.6.33-r1
root (hd0,0)
kernel /boot/kernel-x86_64-2.6.33-gentoo-r1 root=/dev/md3
vga=0x31A video=vesafb:mtrr:2,ypan fbcon=scrollback:128k splash=silent
title=Gentoo Linux 2.6.33-r1, no X
root (hd0,0)
kernel /boot/kernel-x86_64-2.6.33-gentoo-r1 root=/dev/md3
vga=0x317 video=vesafb:mtrr:2,ypan fbcon=scrollback:128k splash=silent
softlevel=no-x
Then I just scroll to the version I want and hit Enter.
--
Rgds
Peter.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] Are runlevels 3 4 5 the same?
2010-04-18 5:21 ` Dale
2010-04-18 5:41 ` Adam
@ 2010-04-18 17:21 ` Alan McKinnon
1 sibling, 0 replies; 11+ messages in thread
From: Alan McKinnon @ 2010-04-18 17:21 UTC (permalink / raw
To: gentoo-user; +Cc: Dale
On Sunday 18 April 2010 07:21:56 Dale wrote:
> Adam wrote:
> > I want to choose console or X from grub, so i'm thinking i'll do
> > something like 'rc-update delete xdm 4' and then pass softlevel=4 to my
> > grub boot line, to make runlevel 4 a console runlevel. Is that the right
> > way to do it?
>
> Gentoo doesn't use those runlevels. You need to read this:
Well said Dale.
Numbered runlevels a-la ancient init are a stupid idea, were always a stupid
idea and always will be a stupid idea.
I have never seen anyone actually use them!
Here's what people do use:
- a boot config for single user/maintenance (fix stuff with this)
- what you use everyday. Possibly also
- another config for some rare circumstance (like occasionally not running X
for some reason. But most folk just stop xdm to do that)
>
> man rc-update
>
> Gentoo comes with the following runlevels:
>
> root@smoker ~ # ls /etc/runlevels/
> total 5
> drwxr-xr-x 6 root root 152 Jun 11 2008 .
> drwxr-xr-x 81 root root 4832 Apr 18 00:16 ..
> drwxr-xr-x 2 root root 368 Jun 11 2008 boot
> drwxr-xr-x 2 root root 512 Apr 9 20:05 default
> drwxr-xr-x 2 root root 72 Jun 11 2008 nonetwork
> root@smoker ~ #
>
> It generally boots to default. You can change that on the kernel boot
> line but with one of the above instead of a 4 as you posted.
>
> Post back if you get stumped along the way.
>
> Dale
>
> :-) :-)
--
alan dot mckinnon at gmail dot com
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] Are runlevels 3 4 5 the same?
2010-04-18 15:04 ` Peter Humphrey
@ 2010-04-18 17:50 ` Neil Bothwick
2010-04-18 22:58 ` Peter Humphrey
0 siblings, 1 reply; 11+ messages in thread
From: Neil Bothwick @ 2010-04-18 17:50 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 492 bytes --]
On Sun, 18 Apr 2010 16:04:37 +0100, Peter Humphrey wrote:
> That's what I do. I have /etc/runlevels/no-x/ which contains all the
> services I want started if I boot a CLI-only system. It's sometimes
> handy to have all the virtual consoles available, so single mode
> doesn't help here.
That's whay I used to do until I found the gentoo=nox option, it saves
maintaining an extra runlevel.
--
Neil Bothwick
When cryptography is outlawed, bayl bhgynjf jvyy unir cevinpl.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] Are runlevels 3 4 5 the same?
2010-04-18 17:50 ` Neil Bothwick
@ 2010-04-18 22:58 ` Peter Humphrey
2010-04-19 0:48 ` Neil Bothwick
0 siblings, 1 reply; 11+ messages in thread
From: Peter Humphrey @ 2010-04-18 22:58 UTC (permalink / raw
To: gentoo-user
On Sunday 18 April 2010 18:50:01 Neil Bothwick wrote:
> On Sun, 18 Apr 2010 16:04:37 +0100, Peter Humphrey wrote:
> > That's what I do. I have /etc/runlevels/no-x/ which contains all
> > the services I want started if I boot a CLI-only system. It's
> > sometimes handy to have all the virtual consoles available, so
> > single mode doesn't help here.
>
> That's whay I used to do until I found the gentoo=nox option, it
> saves maintaining an extra runlevel.
But X isn't the only thing I don't run when not running X, if you see
what I mean. Only about 3 other things differ at the moment, but I leave
the possibilities open.
And I don't have to type anything at the grub command prompt.
And maintaining the other run level is not arduous anyway, as changes
occur only when I install or remove a system service. Rarely, in other
words.
To each his own, of course, as ever.
--
Rgds
Peter.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] Are runlevels 3 4 5 the same?
2010-04-18 22:58 ` Peter Humphrey
@ 2010-04-19 0:48 ` Neil Bothwick
0 siblings, 0 replies; 11+ messages in thread
From: Neil Bothwick @ 2010-04-19 0:48 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1131 bytes --]
On Sun, 18 Apr 2010 23:58:17 +0100, Peter Humphrey wrote:
> > That's whay I used to do until I found the gentoo=nox option, it
> > saves maintaining an extra runlevel.
>
> But X isn't the only thing I don't run when not running X, if you see
> what I mean. Only about 3 other things differ at the moment, but I
> leave the possibilities open.
In that case, another level is a better option.
> And I don't have to type anything at the grub command prompt.
Of course not, you have an extra GRUB menu option to specify the runlevel,
as I do to specify the nox option.
> And maintaining the other run level is not arduous anyway, as changes
> occur only when I install or remove a system service. Rarely, in other
> words.
I used a script in local.stop to copy all symlinks in default to the nox
runlevel, except the ones I didn't want to run, which were only xdm and
vmware, hence my preference for the simpler soluton when it bacame
available.
> To each his own, of course, as ever.
Indeed, choice is wonderful.
--
Neil Bothwick
Uhura: Captain, you're being flamed on channel one.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2010-04-19 1:07 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-18 5:09 [gentoo-user] Are runlevels 3 4 5 the same? Adam
2010-04-18 5:21 ` Dale
2010-04-18 5:41 ` Adam
2010-04-18 5:55 ` Dale
2010-04-18 15:04 ` Peter Humphrey
2010-04-18 17:50 ` Neil Bothwick
2010-04-18 22:58 ` Peter Humphrey
2010-04-19 0:48 ` Neil Bothwick
2010-04-18 17:21 ` Alan McKinnon
2010-04-18 8:09 ` Mick
2010-04-18 10:31 ` Neil Bothwick
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox