[lkml]   [2001]   [Jun]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: PID of init != 1 when initrd with pivot_root
> > But the problem still remains. How do I make my /sbin/init run with PID 1 
> > using initial ramdisk under the new root change mechanism? I don't want to
> > use the old change_root mechanism...
> I had the same problem when doing some development for mkCDrec.
> This project uses busybox, whose init does not run if its PID != 1.
> I asked the busybox folks same question you did and never got a response.
> As a kludge, and after looking at the busybox source code, I renamed init
> to linuxrc. In this case the program is functionally equivalent to init,
> except that it does not do the PID == 1 check.
> An excerpt from my real linuxrc:
> echo Pivot_root: my PID is $$
> # exec /usr/sbin/chroot . /sbin/init < dev/console > dev/console 2>&1
> # Okay, try this:
> exec /usr/sbin/chroot . /sbin/linuxrc < /dev/console > /dev/console 2>&1
> /sbin/linuxrc is actually init, renamed.

I fugured it out. The Documentation/initrd.txt says to use root=/dev/rd/0 with
devfs. Well, that's wrong. You should use root=/dev/ram0 even with devfs no
matter what the documentation says. And my linuxrc finaly runs with PID == 1.

Ivan Vadovic
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:54    [W:2.219 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site