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?
04-18-2010, 05:21 AM
Dale
Are runlevels 3 4 5 the same?
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:
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
:-) :-)
04-18-2010, 05:41 AM
Adam
Are runlevels 3 4 5 the same?
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.
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;
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.
04-18-2010, 05:55 AM
Dale
Are runlevels 3 4 5 the same?
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:
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;
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
:-) :-)
04-18-2010, 08:09 AM
Mick
Are runlevels 3 4 5 the same?
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
04-18-2010, 10:31 AM
Neil Bothwick
Are runlevels 3 4 5 the same?
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
04-18-2010, 03:04 PM
Peter Humphrey
Are runlevels 3 4 5 the same?
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.
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.
04-18-2010, 05:21 PM
Alan McKinnon
Are runlevels 3 4 5 the same?
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
04-18-2010, 05:50 PM
Neil Bothwick
Are runlevels 3 4 5 the same?
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.
04-18-2010, 10:58 PM
Peter Humphrey
Are runlevels 3 4 5 the same?
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.