diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2009-05-26 22:56:03 +0100 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2009-05-26 22:56:03 +0100 |
commit | ba7f2cc5488520b283c3837b2a5616db21d9b950 (patch) | |
tree | a429d8a9960f698f175e62f814bd72039f655b3d /meta | |
parent | 91bbdf200bc2dce468bb1f0353e171dad64e88c0 (diff) | |
download | openembedded-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')
-rw-r--r-- | meta/packages/initrdscripts/files/init-install.sh | 24 | ||||
-rw-r--r-- | meta/packages/initrdscripts/initramfs-live-install_1.0.bb | 2 |
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" |