On Monday 16 May 2011 13:10:52 Dale wrote:
> Mick wrote:

> > Did you try creating a new runlevel (dale_special) and then booting into
> > it by appending softlevel=dale_special ?
> > 
> > That will prove if the Gentoo softlevel mechanism is no longer available.
> 
> I tried some of the other runlevels, nonetwork, single, boot and none of
> those work except for single by just putting "rw single" in the boot
> line.  Single doesn't work if I select it by using softlevel=single.
> That does work if I am in default then switch to single in a console
> tho.  That would be using the "rc single" command.  I used to have
> another runlevel that I created myself but I removed it a good while
> back when I got boot set up like I wanted.  It appears that openrc has
> not been told what softlevel is.  I do see where it is passed on to the
> OS from grub during the boot process tho.

OK, it is clear then that (some?) of the gentoo runlevels called with the 
softlevel incantation do not work as they used to with baselayout 1.  I just 
tried softlevel=single and it definitely didn't work.  Also, 
softlevel=sysinit, didn't work.  However, softlevel=nonetwork *did* work ... 
well, sort of.  It mounted everything, then started devices including my 
network card (I have enabled rc_hotplugging devices in /etc/rc.conf so this 
may have something to do with it) and then it stopped before starting things 
like iptables, local, etc.

Sure enough I had an IP address and was able to connect to the world ... 
albeit without iptables running (not sure I would have a use case for this 
scenario).

I'm not sure if setting rc_hotplug made this messy, but from 

$ ls -la /etc/runlevels/
total 32
drwxr-xr-x  8 root root 4096 May  2 10:54 .
drwxr-xr-x 88 root root 4096 May 16 21:11 ..
drwxr-xr-x  2 root root 4096 May  2 10:54 boot
drwxr-xr-x  2 root root 4096 May 15 20:01 default
drwxr-xr-x  2 root root 4096 Jan 21  2010 nonetwork
drwxr-xr-x  2 root root 4096 May  2 10:54 shutdown
drwxr-xr-x  2 root root 4096 Jan 21  2010 single
drwxr-xr-x  2 root root 4096 May  2 10:54 sysinit

single and sysinit are ignored (runlevel 3 comes up).


> > I think that nox brings you all the way up to runlevel 3, not runlevel 1.
> 
> I have used nox before on a CD.  The reason I like to use the ones I
> already have is that I already know exactly what is running and what is
> not.  When I boot to single by adding "rw single" to the end of the boot
> line, I still have to start some services to get where I want to be.
> Being able to boot to the boot runlevel is much better since I have some
> things already set to start.  Openrc doesn't mount things listed in
> fstab such as /home/ portage and /var which are separate partitions.

I wouldn't expect it to mount anything other than / under single.


> >> The thing is, I do use them which is why I went to the trouble of
> >> setting them up to begin with.  I actually use them pretty regular.
> >> Just because others don't use them doesn't mean that I don't or
> >> shouldn't.

In that case you probably need runlevel 3, but just with nox?


> > The definitive answer is that the gentoo "single" softlevel does not
> > work. The Linux standard "single" or "S" or "1" runlevel works fine (but
> > I can't recall if I tried "1" recently).
> > 
> > So the question remains what is happening with other softlevels if you
> > care to create them.
> 
> I'm beginning to think that openrc goes back to the "old" Linux way.  In
> other words, it uses the init levels instead of softlevels.  

Yes, this seems to be the case, although not in a clear way (otherwise why is 
softlevel=nonetwork working?)


> The only
> thing that makes me think that is not true, init=runlevel doesn't work
> either.  I suspect that init=/bin/bash would work but not tested yet.  

init="/bin/bash" works.  You log in as root user without passwd.  Only the / 
fs is mounted as rw.  Everything else is a manual job and you must run sync 
after you make any changes, or your fs may not forgive you.


> I
> have this 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

If you append any number from above, like 1, or 2, or 3, etc. to the kernel 
line it will work.


> I assume I could edit that to look like this:
> 
> l0:0:wait:/sbin/rc shutdown
> l0s:0:wait:/sbin/halt -dhp
> l1:1:wait:/sbin/rc single
> l2:2:wait:/sbin/rc boot
> l3:3:wait:/sbin/rc nonetwork
> l4:4:wait:/sbin/rc default
> l5:5:wait:/sbin/rc default
> l6:6:wait:/sbin/rc reboot
> l6r:6:wait:/sbin/reboot -dk
> #z6:6:respawn:/sbin/sulogin
> 
> The only problem with that is that there are more runlevel options than
> there are lines there for me to add.

I am not sure that you are meant to edit this manually.  I thought that if you 
want another runlevel you are meant to add this using rc-update and then add 
the services via symlinks in /etc/runlevels/<my_runlevel_name>/


> Even tho I can sort of get to what I want, I still want to get the new
> way sorted so that I can get the doc team to update the docs.  If this
> has been overlooked, then it may be that the devs will have to add this
> feature or make other changes so that this is doable.
> 
> I also posted on the forums.  They are equally stumped.  I am beginning
> to think this was over looked somehow.

Please let us know what's the new way to do this once it settles.

-- 
Regards,
Mick

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to