2.4 kernel style boot using pivot_root (RFC)

Jan Rekorajski baggins at sith.mimuw.edu.pl
Fri Mar 8 13:54:50 CET 2002


[piątek, 08 marzec 2002], Michal Moskal napisał(a):

> On Fri, Mar 08, 2002 at 01:40:16PM +0100, Jan Rekorajski wrote:
> > [piątek, 08 marzec 2002], Michal Moskal napisał(a):
> > 
> > > Hi,
> > > 
> > > Yesterday qboosh suggested me some additions to bsp to allow pivot_root
> > > style boot using it. I thought it would be funny to have system booted up
> > > this way, so I did it :)
> > > 
> > > There were some more or less severe problems during it.
> > > 
> > >   1) old root (initrd) has to be placed somewhere on real root, I suggest
> > >      /var/lib/bsp/oldroot [RFC]
> > 
> > Why not /boot/root ?
> 
> Bacause it can be on separate partition. /lib/oldroot seems more
> reasonable.

There is /mnt directory, maybe /mnt/oldroot?

> > >      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.

> > >   3) there is problem with devfs. We can mount it in stage 1, unmount
> > >      before trying to unmount oldroot, and mount it again in real root,
> > >      so we don't have to have /dev/ram0 and /dev/console on root filesystem,
> > >      but what then? leave it mounted? what about people not using it?
> > >      and what if there is not devfs in kernel? RFC
> > 
> > Just use normal /dev at first stage.
> 
> Yes, it can be done. But someday normal /dev will be removed from
> kernel. And in fact we don't need any normal device right now, bsp
> can start even without /dev/console, and mount devfs.

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

Janek
-- 
Jan Rękorajski            |  ALL SUSPECTS ARE GUILTY. PERIOD!
baggins<at>mimuw.edu.pl   |  OTHERWISE THEY WOULDN'T BE SUSPECTS, WOULD THEY?
BOFH, MANIAC              |                   -- TROOPS by Kevin Rubio



More information about the pld-devel-en mailing list