Re: initramfs: is it supposed to work?
From: H. Peter Anvin
Date: Fri Dec 31 2004 - 03:09:36 EST
Followup to: <41D4A2A6.3060607@xxxxxxxxxx>
By author: Michael Tokarev <mjt@xxxxxxxxxx>
In newsgroup: linux.dev.kernel
>
> o And finally, when booting the "right way", using initramfs where
> /init gets executed with pid=1 and should do the same pivot_root
> and things like that, before the umount loop mentioned above,
> it looks almost right:
> rootfs /initrd rootfs ro 0 0
> /dev/hda1 / ext3 rw 0 0
> (this is where eg umount from busybox chokes, also entering
> endless loop.. but tha's a different story, it's an obvious
> bug in busybox.. however in order to fix it properly one have
> to know which cases like the 3 mentioned above are possible).
>
You don't pivot_root initramfs, because initramfs *IS* rootfs.
Instead, use the run-init program from the klibc distribution, or
something similar. It cleans up the initramfs contents and overmounts
it with the new root filesystem.
-hpa
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/