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