2.4 kernel style boot using pivot_root (RFC)

Michal Moskal malekith at pld.org.pl
Fri Mar 8 14:20:34 CET 2002

On Fri, Mar 08, 2002 at 01:54:50PM +0100, Jan Rekorajski wrote:
> > Bacause it can be on separate partition. /lib/oldroot seems more
> > reasonable.
> There is /mnt directory, maybe /mnt/oldroot?

It is probably better suited, but more prone to removal by stupid
user. But it could be solution (with echo "don't delete tralalal..." >

> > > >      Bsp from initrd, at end of its life does exec /sbin/bsp (from real
> > > >      root filesystem, in the meantime we have to close /dev/console but
> > > >      this ain't problem), that unmounts oldroot, frees ramdisk and does
> > > >      exec /sbin/init. This works :) anyway RFC.
> > > 
> > > I can send you linuxrc.c from Rescue CD.
> > 
> > I would appriciate that. Anyway, without any files open I couldn't
> > unmount /oldroot while 1st stage bsp was running.
> I did it from modified rc-scripts, at the start of rc
> umount /initrd ; flushbufs
> I send linuxrc separately.

This can be also done at the beginning of PLD rc-scripts (second stage
bsp wouldn't be needed then), but I guess doing everything in bsp is less 
error prone (doesn't require recent rc-scripts and so on).

> Have you tried with /dev mounted automagically by kernel? Just curious.

No, but this should be ok. We would unmount it anyway (and mount new
one) after changing root, but if kernel mounted it, we wouldn't have to
have any devices on initrd.

: Michal Moskal :::::::: malekith/at/pld.org.pl :  GCS {C,UL}++++$ a? !tv
: PLD Linux ::::::: Wroclaw University, CS Dept :  {E-,w}-- {b++,e}>+++ h

More information about the pld-devel-en mailing list