still cannot reboot with busybox

IraqiGeek geek at IraqiGeek.com
Tue Jan 17 22:20:14 UTC 2006


On Tuesday, January 17, 2006 10:54 PM GMT,
Rob Landley <rob at landley.net> wrote:

> I booted it under User Mode Linux, twiddled /etc/rc.d/rc.sysinit,
> /etc/fstab, and /etc/inittab until it was happy doing so, and then
> couldn't figure out how to actually log in, not knowing any of the
> accounts on the system.  (Cut and pasting a password out of ubuntu's
> /etc/shadow file into the /etc/shadow file here didn't work, it seems
> to be encrypting them differently...)
>
> Tried booting with init=/bin/sh, running passwd and setting a new
> password for root, sync, exit out of UML, and then login with the
> normal init again.
> Still says "Login incorrect" when I try to log in as root.  I don't
> know why. (You're unlikely to be using pam with busybox, perhaps the
> NSA Security Enhanced stuff?)
>
> Ok, bypass login completely and tell inittab to spawn /bin/sh on
> tty0.  Right, I'm in:

The password for root is root :)

>
> sh-3.00# reboot
> reboot: no process killed
>
> Ah.  This mess.  Right.
>
> Ok, to oversimply slight, what we're doing is roughly the equivalent
> of "killall -USR1 init" to halt the system and "killall -USR2 init"
> to reboot the system.  Except that for some reason, killall isn't
> finding init.
> Hmmm...  I just tried "killall inetd" and it didn't find that, either.
> However, "kill -USR1 1" worked just fine.
>
> Alright, there's a couple of problems.
>
> 1) init is always PID 1 (and PID 1 is _special_) so doing a
> find_pid_by_name("init") here is wrong.  (Yes, it used to be that
> "linuxrc" would run as pid 3 or some such.  That was a kernel bug,
> and it was fixed.  I know 2.6 does this right and I'm fairly certain
> current 2.4 does it right
> as well, and if 2.2 doesn't that's a bug in 2.2, and wasting bytes to
> humor it probably isn't the correct approach.  (Bug the 2.2
> maintainer if you're still using that.)

Running vanilla 2.6.11.12 and 2.6.15. No 2.4 or 2.2.

>
> 2) For some reason, killall isn't finding the right name.  That's
> very odd. (Don't we have a killall test in the test suite?  Nope,
> apparently not.)
>
> Ok, so:
>
> I'll fix #1 by having it always kill PID 1.  (I'd do that right now
> but I left my laptop power cord at work and have to go back to get
> it, what's left in the battery will probably die before I finish
> reading my email...)
>
> I'll take a look at #2 later this evening too.  Shouldn't be too hard
> to fix.
>
> Rob

I really appretiate your time here. I'm not in a hurry, but would like to 
rollout a descent build of the rootfs, so I can move my focus on building a 
nice dynamic router mini-distro around that (and hopefully to follow with an 
asterisk mini-distro).

Regards,
IraqiGeek
www.iraqigeek.com





More information about the busybox mailing list