Hi...
In my initram I make something like this:
CHROOT_DIR="/new_root"
RO_TMP_DIR="/.ro"
RW_TMP_DIR="/.rw"
MOUNT_RO_OPT="-o ro,noatime"
MOUNT_RW_OPT="-o rw,noatime"
BOOT_DEVICE="/dev/sda1"
RO_DEVICE="/dev/sda3"
RW_DEVICE="/dev/sda4"
echo "mounting ro" >> /log 2>> /log
mount ${MOUNT_RO_OPT} ${RO_DEVICE} $RO_TMP_DIR >> /log 2>> /log
echo "mounting rw" >> /log 2>> /log
mount ${MOUNT_RW_OPT} ${RW_DEVICE} $RW_TMP_DIR >> /log 2>> /log
echo "making union" >> /log 2>> /log
mount -t aufs -o br=${RW_TMP_DIR}=rw:${RO_TMP_DIR}=ro none $CHROOT_DIR >>
/log 2>> /log
echo "moving ro and rw" 2>> /log
mount --move ${RO_TMP_DIR} ${CHROOT_DIR}/.ro 2>> /log
mount --move ${RW_TMP_DIR} ${CHROOT_DIR}/.rw 2>> /log
and then, a normal chroot is done into a modified Gentoo.
All is working fine, but when I want to umount /.rw or remount as readonly,
I always get "device is busy", no matters how I do it, always that...
Do Im doing something wrong?
This is my /proc/mounts once boot in Gentoo:
/dev/sda3 /.ro ext2 ro,noatime,errors=continue 0 0
/dev/sda4 /.rw ext2 rw,noatime,errors=continue 0 0
none / aufs rw,si=da6c4b25 0 0
/dev/sda1 /boot ext2 ro,noatime,errors=continue 0 0
proc /proc proc rw,nosuid,nodev,noexec 0 0
sysfs /sys sysfs rw,nosuid,nodev,noexec 0 0
udev /dev tmpfs rw,nosuid,size=10240k,mode=755 0 0
devpts /dev/pts devpts rw,nosuid,noexec,gid=5,mode=620 0 0
shm /dev/shm tmpfs rw,nosuid,nodev,noexec 0 0
tmpfs /tmp tmpfs rw,noatime 0 0
usbfs /proc/bus/usb usbfs rw,nosuid,noexec,devgid=85,devmode=664 0 0
binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc rw,nosuid,nodev,noexec 0 0
The same for the mtab..
This is my Kernel:
Linux rocinante 2.6.29.6-rt24-aldebaran-rt #3 PREEMPT RT Thu May 12 17:49:33
CEST 2011 i586 Geode(TM) Integrated Processor by AMD PCS AuthenticAMD
GNU/Linux
And the version of AuFs im currently using: aufs
2-standalone.tree-29-20100913
Thanks!
------------------------------------------------------------------------------
Simplify data backup and recovery for your virtual environment with vRanger.
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Data protection magic?
Nope - It's vRanger. Get your free trial download today.
http://p.sf.net/sfu/quest-sfdev2dev