From bb0bb603ed3011e83727f89d89c27be4d2309a5a Mon Sep 17 00:00:00 2001 From: Michal Suchanek Date: Fri, 5 Oct 2012 15:32:05 +0200 Subject: [PATCH] Including util-linux mount in initramfs. --- backends/initramfs-tools/live.hook | 14 ++++---------- scripts/boot/9990-cmdline-old | 5 +++++ scripts/boot/9990-main.sh | 6 ++++++ scripts/boot/9990-overlay.sh | 3 ++- 4 files changed, 17 insertions(+), 11 deletions(-) diff --git a/backends/initramfs-tools/live.hook b/backends/initramfs-tools/live.hook index 3860f4c..c5b81b0 100755 --- a/backends/initramfs-tools/live.hook +++ b/backends/initramfs-tools/live.hook @@ -143,6 +143,10 @@ then copy_exec /usr/bin/eject /bin fi +# Program: mount +# fuse does not work with klibc mount +copy_exec /bin/mount /bin/mount.util-linux + [ "${QUIET}" ] || echo -n " utils" # Feature: Verify Checksums @@ -236,14 +240,4 @@ case "${LIVE_DNS}" in ;; esac -case "${LIVE_UNIONMOUNT}" in - true) - [ "${QUIET}" ] || echo -n " unionmount" - - # UnionMount - # only mount from patched util-linux can do this currently - copy_exec /bin/mount /bin/mount_full - ;; -esac - [ "${QUIET}" ] || echo . diff --git a/scripts/boot/9990-cmdline-old b/scripts/boot/9990-cmdline-old index 85f1b62..94c5163 100755 --- a/scripts/boot/9990-cmdline-old +++ b/scripts/boot/9990-cmdline-old @@ -30,6 +30,11 @@ Cmdline_old () export DHCP ;; + klibc-mount=*) + KLIBC_MOUNT="${_PARAMETER#klibc-mount=}" + export KLIBC_MOUNT + ;; + ethdevice=*) DEVICE="${_PARAMETER#ethdevice=}" ETHDEVICE="${DEVICE}" diff --git a/scripts/boot/9990-main.sh b/scripts/boot/9990-main.sh index 983a1cb..0924581 100755 --- a/scripts/boot/9990-main.sh +++ b/scripts/boot/9990-main.sh @@ -32,6 +32,12 @@ Main () . /conf/param.conf fi + if [ -x /bin/mount.util-linux ] && [ -z "${KLIBC_MOUNT}" ] + then + # fuse does not work with klibc mount + ln -f /bin/mount.util-linux /bin/mount + fi + # Needed here too because some things (*cough* udev *cough*) # changes the timeout diff --git a/scripts/boot/9990-overlay.sh b/scripts/boot/9990-overlay.sh index 80b5726..dba042b 100755 --- a/scripts/boot/9990-overlay.sh +++ b/scripts/boot/9990-overlay.sh @@ -335,7 +335,8 @@ setup_unionfs () then # FIXME: handle PERSISTENCE_READONLY unionmountopts="-t ${cow_fstype} -o noatime,union,${cow_mountopt} ${cowdevice}" - mount_full $unionmountopts "${unionmountpoint}" + # unionmount only works with util-linux mount + mount.util-linux $unionmountopts "${unionmountpoint}" else cow_dir="/live/overlay${dir}" rootfs_dir="${rootfs}${dir}" -- 2.1.4