From 0b654837bba8ddabde530d5c0b7d1efdb4139a32 Mon Sep 17 00:00:00 2001 From: Ben Howard Date: Fri, 30 Sep 2011 16:23:34 -0600 Subject: Adding check for missing mtab during chrooted binary rootfs stage. --- scripts/build/lb_binary_rootfs | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'scripts/build') diff --git a/scripts/build/lb_binary_rootfs b/scripts/build/lb_binary_rootfs index 280cd1a54..96523a866 100755 --- a/scripts/build/lb_binary_rootfs +++ b/scripts/build/lb_binary_rootfs @@ -122,12 +122,24 @@ case "${LB_CHROOT_FILESYSTEM}" in case "${LB_BUILD_WITH_CHROOT}" in true) dd if=/dev/zero of=chroot/filesystem.${LB_CHROOT_FILESYSTEM} bs=1024k count=0 seek=${REAL_DIM} + + if ! Chroot chroot "test -s /etc/mtab" + then + Chroot chroot "ln -s /proc/mounts/mtab /etc/mtab" + FAKE_MTAB="true" + fi + Chroot chroot "mkfs.${LB_CHROOT_FILESYSTEM} -F -b 1024 -N ${REAL_INODES} -m 0 filesystem.${LB_CHROOT_FILESYSTEM}" mkdir -p filesystem.tmp ${LB_ROOT_COMMAND} mount -o loop chroot/filesystem.${LB_CHROOT_FILESYSTEM} filesystem.tmp cp -a chroot/chroot/* filesystem.tmp + if [ "${FAKE_MTAB}" = "true" ] + then + Chroot chroot "rm -f /etc/mtab" + fi + ${LB_ROOT_COMMAND} umount filesystem.tmp rmdir filesystem.tmp -- cgit v1.2.3