Replace unionfs with aufs

Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
This commit is contained in:
Aaron Griffin 2009-04-14 14:38:11 -05:00
parent 31c277e575
commit 8d10415b04

View File

@ -21,7 +21,7 @@ _mnt_squashfs()
img="/tmpfs/${base_img}" img="/tmpfs/${base_img}"
fi fi
msg "::: Adding new union branch: ${base_img%.*}" msg "::: Adding new aufs branch: ${base_img%.*}"
mkdir -p "/tmpfs/mnt/loop${LOOP_NUM}" mkdir -p "/tmpfs/mnt/loop${LOOP_NUM}"
# sometimes it takes udev a while to create device nodes # sometimes it takes udev a while to create device nodes
while [ ! -e "/dev/loop${LOOP_NUM}" ]; do while [ ! -e "/dev/loop${LOOP_NUM}" ]; do
@ -33,7 +33,7 @@ _mnt_squashfs()
fi fi
/bin/mount -r -t squashfs "/dev/loop${LOOP_NUM}" "/tmpfs/mnt/loop${LOOP_NUM}" /bin/mount -r -t squashfs "/dev/loop${LOOP_NUM}" "/tmpfs/mnt/loop${LOOP_NUM}"
if [ "${mnt}" = "/" ]; then if [ "${mnt}" = "/" ]; then
/bin/mount -t unionfs -o remount,add=:/tmpfs/mnt/loop${LOOP_NUM}=ro none "/real_root" /bin/mount -t aufs -o remount,add=:/tmpfs/mnt/loop${LOOP_NUM}=ro none "/real_root"
else else
_mnt_bind "/tmpfs/mnt/loop${LOOP_NUM}" "${mnt}" _mnt_bind "/tmpfs/mnt/loop${LOOP_NUM}" "${mnt}"
fi fi
@ -108,10 +108,10 @@ run_hook ()
fi fi
/bin/modprobe -q squashfs >/dev/null 2>&1 /bin/modprobe -q squashfs >/dev/null 2>&1
/bin/modprobe -q unionfs >/dev/null 2>&1 /bin/modprobe -q aufs >/dev/null 2>&1
msg ":: Mounting root (union) filesystem" msg ":: Mounting root (aufs) filesystem"
/bin/mount -t unionfs -o dirs=/tmpfs=rw none /real_root /bin/mount -t aufs -o dirs=/tmpfs=rw none /real_root
export LOOP_NUM="0" export LOOP_NUM="0"
msg ":: Mounting images" msg ":: Mounting images"