summaryrefslogtreecommitdiffstats
path: root/meta/packages/initrdscripts
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
parent91bbdf200bc2dce468bb1f0353e171dad64e88c0 (diff)
downloadpoky-ba7f2cc5488520b283c3837b2a5616db21d9b950.tar.gz
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')
-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 9ef6c47b8e..ecd0a1b44a 100644
--- a/meta/packages/initrdscripts/files/init-install.sh
+++ b/meta/packages/initrdscripts/files/init-install.sh
@@ -49,6 +49,22 @@ fi
49 49
50echo "Installing image on /dev/${device}" 50echo "Installing image on /dev/${device}"
51 51
52#
53# The udev automounter can cause pain here, kill it
54#
55rm -f /etc/udev/scripts/mount*
56
57#
58# Unmount anything the automounter had mounted
59#
60umount /dev/${device} 2> /dev/null || /bin/true
61umount /dev/${device}1 2> /dev/null || /bin/true
62umount /dev/${device}2 2> /dev/null || /bin/true
63umount /dev/${device}3 2> /dev/null || /bin/true
64umount /dev/${device}4 2> /dev/null || /bin/true
65umount /dev/${device}5 2> /dev/null || /bin/true
66umount /dev/${device}6 2> /dev/null || /bin/true
67
52if [ ! -b /dev/sda ] ; then 68if [ ! -b /dev/sda ] ; then
53 mknod /dev/sda b 8 0 69 mknod /dev/sda b 8 0
54fi 70fi
@@ -109,13 +125,13 @@ echo "Formatting swap partition...(/dev/${device}3)"
109mkswap $swap 125mkswap $swap
110 126
111mkdir /ssd 127mkdir /ssd
112mkdir /mnt 128mkdir /rootmnt
113 129
114mount $rootfs /ssd 130mount $rootfs /ssd
115mount -o rw,loop,noatime,nodiratime /media/$1/$2 /mnt 131mount -o rw,loop,noatime,nodiratime /media/$1/$2 /rootmnt
116 132
117echo "Copying rootfs files..." 133echo "Copying rootfs files..."
118cp -a /mnt/* /ssd 134cp -a /rootmnt/* /ssd
119 135
120if [ -d /ssd/etc/ ] ; then 136if [ -d /ssd/etc/ ] ; then
121 echo "$swap swap swap defaults 0 0" >> /ssd/etc/fstab 137 echo "$swap swap swap defaults 0 0" >> /ssd/etc/fstab
@@ -127,7 +143,7 @@ if [ -d /ssd/etc/ ] ; then
127fi 143fi
128 144
129umount /ssd 145umount /ssd
130umount /mnt 146umount /rootmnt
131 147
132echo "Preparing boot partition..." 148echo "Preparing boot partition..."
133mount $bootfs /ssd 149mount $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 baea5e4abd..a557094da8 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"
2 2
3SRC_URI = "file://init-install.sh" 3SRC_URI = "file://init-install.sh"
4 4
5PR = "r2" 5PR = "r3"
6 6
7RDEPENDS="grub parted e2fsprogs-mke2fs" 7RDEPENDS="grub parted e2fsprogs-mke2fs"
8 8