[Unionfs] UnionFS as root filesystem
Francesco Carsana
francescocarsana at ds4.it
Tue Mar 14 15:49:13 EST 2006
> rename in your RAMDISK /linuxrc to /etc/init and add the "exec chroot
> ..."-line.
>
>
I've made the changes that you suggested, but if I rename /linuxrc to
/etc/init, the kernel doesn't find linuxrc and goes in panic...
My menu.lst is now:
title Debian GNU/Linux, kernel 2.4.27 (Safe Mode)
kernel (hd0,0)/boot/vmlinuz-2.4.27 ro root=/dev/hda2
init=/etc/init
ramdisk_size=100000 lang=us screen=1280x1024
vga=0x31B nomce apm=power-off
initrd (hd0,0)/boot/roinitrd.img.gz
savedefault
boot
and my linuxrc:
#!/bin/sh
set -x
export PATH=.:/:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin
mount -t proc /proc /proc
mkdir -p /mnt
mkdir -p /mnt/hda2
mount -nt ext3 -o rw /dev/hda2 /mnt/hda2
mkdir -p /mnt/hda1
mount -nt ext3 -o ro /dev/hda1 /mnt/hda1
modprobe unionfs
mount -t unionfs -o dirs="/mnt/hda2=rw:/mnt/hda1=ro" unionfs /mnt/hda2
cd /mnt/hda2
mkdir -p initrd
pivot_root . initrd
exec chroot . /sbin/init <dev/console >dev/console 2>&1
and I obtain this messages:
Usage: init 0123456SsQqAaBbCcUu
VFS: Mounted root (ext3 filesystem).
Trying to move old root to /initrd ... okay
Freeing unused kernel memory: 144k freed
Warning: unable to open an initial console.
Kernel panic: No init found. Try passing init= option to kernel
It seems that kernel remount /dev/hda2 and so i lost the unionfs, that
is moved to initrd directory...
How can I solve it?
More information about the unionfs
mailing list