diff options
| -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 | ||
