summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--meta/packages/initrdscripts/files/init-install.sh24
-rw-r--r--meta/packages/initrdscripts/initramfs-live-install_1.0.bb2
2 files changed, 21 insertions, 5 deletions
diff --git a/meta/packages/initrdscripts/files/init-install.sh b/meta/packages/initrdscripts/files/init-install.sh
index 9ef6c47b8..ecd0a1b44 100644
--- a/meta/packages/initrdscripts/files/init-install.sh
+++ b/meta/packages/initrdscripts/files/init-install.sh
@@ -49,6 +49,22 @@ fi
echo "Installing image on /dev/${device}"
+#
+# The udev automounter can cause pain here, kill it
+#
+rm -f /etc/udev/scripts/mount*
+
+#
+# Unmount anything the automounter had mounted
+#
+umount /dev/${device} 2> /dev/null || /bin/true
+umount /dev/${device}1 2> /dev/null || /bin/true
+umount /dev/${device}2 2> /dev/null || /bin/true
+umount /dev/${device}3 2> /dev/null || /bin/true
+umount /dev/${device}4 2> /dev/null || /bin/true
+umount /dev/${device}5 2> /dev/null || /bin/true
+umount /dev/${device}6 2> /dev/null || /bin/true
+
if [ ! -b /dev/sda ] ; then
mknod /dev/sda b 8 0
fi
@@ -109,13 +125,13 @@ echo "Formatting swap partition...(/dev/${device}3)"
mkswap $swap
mkdir /ssd
-mkdir /mnt
+mkdir /rootmnt
mount $rootfs /ssd
-mount -o rw,loop,noatime,nodiratime /media/$1/$2 /mnt
+mount -o rw,loop,noatime,nodiratime /media/$1/$2 /rootmnt
echo "Copying rootfs files..."
-cp -a /mnt/* /ssd
+cp -a /rootmnt/* /ssd
if [ -d /ssd/etc/ ] ; then
echo "$swap swap swap defaults 0 0" >> /ssd/etc/fstab
@@ -127,7 +143,7 @@ if [ -d /ssd/etc/ ] ; then
fi
umount /ssd
-umount /mnt
+umount /rootmnt
echo "Preparing boot partition..."
mount $bootfs /ssd
diff --git a/meta/packages/initrdscripts/initramfs-live-install_1.0.bb b/meta/packages/initrdscripts/initramfs-live-install_1.0.bb
index baea5e4ab..a557094da 100644
--- a/meta/packages/initrdscripts/initramfs-live-install_1.0.bb
+++ b/meta/packages/initrdscripts/initramfs-live-install_1.0.bb
@@ -2,7 +2,7 @@ DESCRIPTON = "A live image init script"
SRC_URI = "file://init-install.sh"
-PR = "r2"
+PR = "r3"
RDEPENDS="grub parted e2fsprogs-mke2fs"