Skip to content

Commit

Permalink
Including util-linux mount in initramfs.
Browse files Browse the repository at this point in the history
  • Loading branch information
hramrach authored and daniel-baumann committed Dec 12, 2012
1 parent 4c22bea commit 092b1ca
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 11 deletions.
14 changes: 4 additions & 10 deletions backends/initramfs-tools/live.hook
Expand Up @@ -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
Expand Down Expand Up @@ -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 .
5 changes: 5 additions & 0 deletions scripts/boot/9990-cmdline-old
Expand Up @@ -30,6 +30,11 @@ Cmdline_old ()
export DHCP
;;

klibc-mount=*)
KLIBC_MOUNT="${_PARAMETER#klibc-mount=}"
export KLIBC_MOUNT
;;

ethdevice=*)
DEVICE="${_PARAMETER#ethdevice=}"
ETHDEVICE="${DEVICE}"
Expand Down
6 changes: 6 additions & 0 deletions scripts/boot/9990-main.sh
Expand Up @@ -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

Expand Down
3 changes: 2 additions & 1 deletion scripts/boot/9990-overlay.sh
Expand Up @@ -323,7 +323,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}"
Expand Down

0 comments on commit 092b1ca

Please sign in to comment.