1 |
On Monday 16 May 2011 13:10:52 Dale wrote: |
2 |
> Mick wrote: |
3 |
|
4 |
> > Did you try creating a new runlevel (dale_special) and then booting into |
5 |
> > it by appending softlevel=dale_special ? |
6 |
> > |
7 |
> > That will prove if the Gentoo softlevel mechanism is no longer available. |
8 |
> |
9 |
> I tried some of the other runlevels, nonetwork, single, boot and none of |
10 |
> those work except for single by just putting "rw single" in the boot |
11 |
> line. Single doesn't work if I select it by using softlevel=single. |
12 |
> That does work if I am in default then switch to single in a console |
13 |
> tho. That would be using the "rc single" command. I used to have |
14 |
> another runlevel that I created myself but I removed it a good while |
15 |
> back when I got boot set up like I wanted. It appears that openrc has |
16 |
> not been told what softlevel is. I do see where it is passed on to the |
17 |
> OS from grub during the boot process tho. |
18 |
|
19 |
OK, it is clear then that (some?) of the gentoo runlevels called with the |
20 |
softlevel incantation do not work as they used to with baselayout 1. I just |
21 |
tried softlevel=single and it definitely didn't work. Also, |
22 |
softlevel=sysinit, didn't work. However, softlevel=nonetwork *did* work ... |
23 |
well, sort of. It mounted everything, then started devices including my |
24 |
network card (I have enabled rc_hotplugging devices in /etc/rc.conf so this |
25 |
may have something to do with it) and then it stopped before starting things |
26 |
like iptables, local, etc. |
27 |
|
28 |
Sure enough I had an IP address and was able to connect to the world ... |
29 |
albeit without iptables running (not sure I would have a use case for this |
30 |
scenario). |
31 |
|
32 |
I'm not sure if setting rc_hotplug made this messy, but from |
33 |
|
34 |
$ ls -la /etc/runlevels/ |
35 |
total 32 |
36 |
drwxr-xr-x 8 root root 4096 May 2 10:54 . |
37 |
drwxr-xr-x 88 root root 4096 May 16 21:11 .. |
38 |
drwxr-xr-x 2 root root 4096 May 2 10:54 boot |
39 |
drwxr-xr-x 2 root root 4096 May 15 20:01 default |
40 |
drwxr-xr-x 2 root root 4096 Jan 21 2010 nonetwork |
41 |
drwxr-xr-x 2 root root 4096 May 2 10:54 shutdown |
42 |
drwxr-xr-x 2 root root 4096 Jan 21 2010 single |
43 |
drwxr-xr-x 2 root root 4096 May 2 10:54 sysinit |
44 |
|
45 |
single and sysinit are ignored (runlevel 3 comes up). |
46 |
|
47 |
|
48 |
> > I think that nox brings you all the way up to runlevel 3, not runlevel 1. |
49 |
> |
50 |
> I have used nox before on a CD. The reason I like to use the ones I |
51 |
> already have is that I already know exactly what is running and what is |
52 |
> not. When I boot to single by adding "rw single" to the end of the boot |
53 |
> line, I still have to start some services to get where I want to be. |
54 |
> Being able to boot to the boot runlevel is much better since I have some |
55 |
> things already set to start. Openrc doesn't mount things listed in |
56 |
> fstab such as /home/ portage and /var which are separate partitions. |
57 |
|
58 |
I wouldn't expect it to mount anything other than / under single. |
59 |
|
60 |
|
61 |
> >> The thing is, I do use them which is why I went to the trouble of |
62 |
> >> setting them up to begin with. I actually use them pretty regular. |
63 |
> >> Just because others don't use them doesn't mean that I don't or |
64 |
> >> shouldn't. |
65 |
|
66 |
In that case you probably need runlevel 3, but just with nox? |
67 |
|
68 |
|
69 |
> > The definitive answer is that the gentoo "single" softlevel does not |
70 |
> > work. The Linux standard "single" or "S" or "1" runlevel works fine (but |
71 |
> > I can't recall if I tried "1" recently). |
72 |
> > |
73 |
> > So the question remains what is happening with other softlevels if you |
74 |
> > care to create them. |
75 |
> |
76 |
> I'm beginning to think that openrc goes back to the "old" Linux way. In |
77 |
> other words, it uses the init levels instead of softlevels. |
78 |
|
79 |
Yes, this seems to be the case, although not in a clear way (otherwise why is |
80 |
softlevel=nonetwork working?) |
81 |
|
82 |
|
83 |
> The only |
84 |
> thing that makes me think that is not true, init=runlevel doesn't work |
85 |
> either. I suspect that init=/bin/bash would work but not tested yet. |
86 |
|
87 |
init="/bin/bash" works. You log in as root user without passwd. Only the / |
88 |
fs is mounted as rw. Everything else is a manual job and you must run sync |
89 |
after you make any changes, or your fs may not forgive you. |
90 |
|
91 |
|
92 |
> I |
93 |
> have this in inittab: |
94 |
> |
95 |
> l0:0:wait:/sbin/rc shutdown |
96 |
> l0s:0:wait:/sbin/halt -dhp |
97 |
> l1:1:wait:/sbin/rc single |
98 |
> l2:2:wait:/sbin/rc nonetwork |
99 |
> l3:3:wait:/sbin/rc default |
100 |
> l4:4:wait:/sbin/rc default |
101 |
> l5:5:wait:/sbin/rc default |
102 |
> l6:6:wait:/sbin/rc reboot |
103 |
> l6r:6:wait:/sbin/reboot -dk |
104 |
|
105 |
If you append any number from above, like 1, or 2, or 3, etc. to the kernel |
106 |
line it will work. |
107 |
|
108 |
|
109 |
> I assume I could edit that to look like this: |
110 |
> |
111 |
> l0:0:wait:/sbin/rc shutdown |
112 |
> l0s:0:wait:/sbin/halt -dhp |
113 |
> l1:1:wait:/sbin/rc single |
114 |
> l2:2:wait:/sbin/rc boot |
115 |
> l3:3:wait:/sbin/rc nonetwork |
116 |
> l4:4:wait:/sbin/rc default |
117 |
> l5:5:wait:/sbin/rc default |
118 |
> l6:6:wait:/sbin/rc reboot |
119 |
> l6r:6:wait:/sbin/reboot -dk |
120 |
> #z6:6:respawn:/sbin/sulogin |
121 |
> |
122 |
> The only problem with that is that there are more runlevel options than |
123 |
> there are lines there for me to add. |
124 |
|
125 |
I am not sure that you are meant to edit this manually. I thought that if you |
126 |
want another runlevel you are meant to add this using rc-update and then add |
127 |
the services via symlinks in /etc/runlevels/<my_runlevel_name>/ |
128 |
|
129 |
|
130 |
> Even tho I can sort of get to what I want, I still want to get the new |
131 |
> way sorted so that I can get the doc team to update the docs. If this |
132 |
> has been overlooked, then it may be that the devs will have to add this |
133 |
> feature or make other changes so that this is doable. |
134 |
> |
135 |
> I also posted on the forums. They are equally stumped. I am beginning |
136 |
> to think this was over looked somehow. |
137 |
|
138 |
Please let us know what's the new way to do this once it settles. |
139 |
|
140 |
-- |
141 |
Regards, |
142 |
Mick |