Re: initrd redesign (was Re: Partition nightmare Was: Migrating to larger numbers)

Werner Almesberger (almesber@lrc.di.epfl.ch)
Tue, 15 Jun 1999 01:27:27 +0200


Miquel van Smoorenburg wrote:
> Well I still have the diffs for when I did this in an 1.1.x kernel
> [I think, since the patch is dated 30 Mar 1995 ;)] by overloading chroot()
> for init. See ftp://ftp.cistron.nl/pub/people/miquels/kernel/Old/new_root_diffs

In some way, it's a little more general than the current thing, but then
there's still a lot of special-casing (e.g. pid == 1), and it seems to
assume that the old root is no longer referenced, which doesn't necessarily
have to be true. You can actually get that case quite easily if you're lazy
(e.g. my Psion happily boots with initrd kept busy by a loop device), or if
you're doing something complex in initrd, e.g. running some demons.

Not that I'm particularly proud of "put_old" in change_root, but it allows
such cases to function. What I'd expect from an approach using mount point
relocation is to get rid of hard-coded things like /initrd and, worse,
/dev/root.old. Also allowing a name different from /linuxrc would be nice.

- Werner

-- 
  _________________________________________________________________________
 / Werner Almesberger, ICA, EPFL, CH       werner.almesberger@ica.epfl.ch /
/_IN_R_131__Tel_+41_21_693_6621__Fax_+41_21_693_6610_____________________/

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/