Messages in this thread | | | From | Chris Lingard <> | Subject | Re: initrd help -- umounts root after pivot_root | Date | Fri, 31 Oct 2003 18:47:47 +0000 |
| |
On Friday 31 October 2003 12:18 am, John R Moser wrote: > Been trying with 2.4.20, 2.4.22, 2.6.0-test9, how the heck do I get this > to work? > I set everthing up on /dev/shm type tmpfs, then > cd /dev/shm > mkdir initrd > pivot_root . initrd
Might be better to do something like:
mount -t devfs none /dev mount -t proc none /proc mkdir -p ram mount -t tmpfs tmpfs /ram cd /ram mkdir proc cdrom mount -t proc none /ram/proc /mount_cdrom
This is the start of my linuxrc script and creates the future root at /ram
> Of course, the kernel unmounts / and then swears that it can't find init > when the linuxrc exits. > > The documentation says that linuxrc should pivot_root to the real root in > Documentation/initrd.txt so I thought that's what the script sholud do. > Apparently the doc is bad/old.
man pivot_root
mkdir initrd sbin/pivot_root . initrd mount devfs -t devfs /dev exec /usr/sbin/chroot . /sbin/init <dev/console >dev/console 2>&1
(These is no automatic call to /sbin/init)
The documentation is bad insofar as root=/dev/rd/0 now fails
Also you will need to search for a patch to umount your old /initrd. Please feel free you email me direct for a very unofficial patch to linux-2.4.22
Chris Lingard - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |