summaryrefslogtreecommitdiff
path: root/meta/packages/initrdscripts/files
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2009-05-26 22:56:03 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2009-05-26 22:56:03 +0100
commitba7f2cc5488520b283c3837b2a5616db21d9b950 (patch)
treea429d8a9960f698f175e62f814bd72039f655b3d /meta/packages/initrdscripts/files
parent91bbdf200bc2dce468bb1f0353e171dad64e88c0 (diff)
downloadopenembedded-core-ba7f2cc5488520b283c3837b2a5616db21d9b950.tar.gz
openembedded-core-ba7f2cc5488520b283c3837b2a5616db21d9b950.tar.bz2
openembedded-core-ba7f2cc5488520b283c3837b2a5616db21d9b950.tar.xz
openembedded-core-ba7f2cc5488520b283c3837b2a5616db21d9b950.zip
initramfs-live-install: Update script to handle udev automounter issues and mount point name that doesn't clash
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/packages/initrdscripts/files')
-rw-r--r--meta/packages/initrdscripts/files/init-install.sh24
1 files changed, 20 insertions, 4 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