1 |
Adam wrote: |
2 |
> On 04/18/10 15:21, Dale wrote: |
3 |
> |
4 |
>> Adam wrote: |
5 |
>> |
6 |
>>> I want to choose console or X from grub, so i'm thinking i'll do |
7 |
>>> something like 'rc-update delete xdm 4' and then pass softlevel=4 to my |
8 |
>>> grub boot line, to make runlevel 4 a console runlevel. Is that the right |
9 |
>>> way to do it? |
10 |
>>> |
11 |
>>> |
12 |
>>> |
13 |
>> Gentoo doesn't use those runlevels. You need to read this: |
14 |
>> |
15 |
>> man rc-update |
16 |
>> |
17 |
>> Gentoo comes with the following runlevels: |
18 |
>> |
19 |
>> root@smoker ~ # ls /etc/runlevels/ |
20 |
>> total 5 |
21 |
>> drwxr-xr-x 6 root root 152 Jun 11 2008 . |
22 |
>> drwxr-xr-x 81 root root 4832 Apr 18 00:16 .. |
23 |
>> drwxr-xr-x 2 root root 368 Jun 11 2008 boot |
24 |
>> drwxr-xr-x 2 root root 512 Apr 9 20:05 default |
25 |
>> drwxr-xr-x 2 root root 72 Jun 11 2008 nonetwork |
26 |
>> root@smoker ~ # |
27 |
>> |
28 |
>> It generally boots to default. You can change that on the kernel boot |
29 |
>> line but with one of the above instead of a 4 as you posted. |
30 |
>> |
31 |
> http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=4 |
32 |
> |
33 |
> So gentoo does use the numerical runlevels (because that's what init |
34 |
> uses) as well as the gentoo runlevels you've shown. It looks like it |
35 |
> just maps the numbers to the names in inittab; |
36 |
> |
37 |
> l0:0:wait:/sbin/rc shutdown |
38 |
> l0s:0:wait:/sbin/halt -dhp |
39 |
> l1:1:wait:/sbin/rc single |
40 |
> l2:2:wait:/sbin/rc nonetwork |
41 |
> l3:3:wait:/sbin/rc default |
42 |
> l4:4:wait:/sbin/rc default |
43 |
> l5:5:wait:/sbin/rc default |
44 |
> l6:6:wait:/sbin/rc reboot |
45 |
> l6r:6:wait:/sbin/reboot -dk |
46 |
> |
47 |
> so, i guess this means i should point l4 to a custom runlevel in |
48 |
> /etc/runlevels that is the same as default with the exception that xdm |
49 |
> is removed... I'm assuming the linux kernel wont understand the gentoo |
50 |
> named runlevels, and therefore using those names in grub wouldnt work. |
51 |
> |
52 |
> |
53 |
|
54 |
If you want to boot to the single runlevel, just add softlevel=single to |
55 |
the end of the boot line in grub. You can do this in the config or edit |
56 |
the boot line when grub comes up and it should work fine. I have never |
57 |
used the number runlevels. It may work but I have never done it that |
58 |
way so I can't really say one way or the other. |
59 |
|
60 |
You can also create custom runlevels if you need them. I created one a |
61 |
while back to play with and I just added the directory and added the |
62 |
services I wanted in there. That should work fine. There may be other |
63 |
ways to create them as well. |
64 |
|
65 |
Also, you can use eselect to manage this as well. The module is called |
66 |
rc. I don't use it but that is the up and coming way to do it. |
67 |
|
68 |
Dale |
69 |
|
70 |
:-) :-) |