summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-core/initrdscripts/files/init-install.sh14
1 files changed, 7 insertions, 7 deletions
diff --git a/meta/recipes-core/initrdscripts/files/init-install.sh b/meta/recipes-core/initrdscripts/files/init-install.sh
index f9e9768e43..1925d90693 100644
--- a/meta/recipes-core/initrdscripts/files/init-install.sh
+++ b/meta/recipes-core/initrdscripts/files/init-install.sh
@@ -141,7 +141,7 @@ swap_start=$((rootfs_end))
141# 2) they are detected asynchronously (need rootwait) 141# 2) they are detected asynchronously (need rootwait)
142rootwait="" 142rootwait=""
143part_prefix="" 143part_prefix=""
144if [ ! "${device#mmcblk}" = "${device}" ]; then 144if [ ! "${device#/dev/mmcblk}" = "${device}" ]; then
145 part_prefix="p" 145 part_prefix="p"
146 rootwait="rootwait" 146 rootwait="rootwait"
147fi 147fi
@@ -211,13 +211,13 @@ echo "Copying rootfs files..."
211cp -a /src_root/* /tgt_root 211cp -a /src_root/* /tgt_root
212if [ -d /tgt_root/etc/ ] ; then 212if [ -d /tgt_root/etc/ ] ; then
213 if [ $grub_version -ne 0 ] ; then 213 if [ $grub_version -ne 0 ] ; then
214 boot_uuid=$(blkid -o value -s UUID ${device}2) 214 boot_uuid=$(blkid -o value -s UUID ${bootfs})
215 swap_part_uuid=$(blkid -o value -s PARTUUID ${device}4) 215 swap_part_uuid=$(blkid -o value -s PARTUUID ${swap})
216 bootdev="UUID=$boot_uuid" 216 bootdev="UUID=$boot_uuid"
217 swapdev=/dev/disk/by-partuuid/$swap_part_uuid 217 swapdev=/dev/disk/by-partuuid/$swap_part_uuid
218 else 218 else
219 bootdev=${device}2 219 bootdev=${bootfs}
220 swapdev=${device}4 220 swapdev=${swap}
221 fi 221 fi
222 echo "$swapdev swap swap defaults 0 0" >> /tgt_root/etc/fstab 222 echo "$swapdev swap swap defaults 0 0" >> /tgt_root/etc/fstab
223 echo "$bootdev /boot ext3 defaults 1 2" >> /tgt_root/etc/fstab 223 echo "$bootdev /boot ext3 defaults 1 2" >> /tgt_root/etc/fstab
@@ -234,8 +234,8 @@ mount $bootfs /boot
234echo "Preparing boot partition..." 234echo "Preparing boot partition..."
235if [ -f /etc/grub.d/00_header -a $grub_version -ne 0 ] ; then 235if [ -f /etc/grub.d/00_header -a $grub_version -ne 0 ] ; then
236 echo "Preparing custom grub2 menu..." 236 echo "Preparing custom grub2 menu..."
237 root_part_uuid=$(blkid -o value -s PARTUUID ${device}3) 237 root_part_uuid=$(blkid -o value -s PARTUUID ${rootfs})
238 boot_uuid=$(blkid -o value -s UUID ${device}2) 238 boot_uuid=$(blkid -o value -s UUID ${bootfs})
239 GRUBCFG="/boot/grub/grub.cfg" 239 GRUBCFG="/boot/grub/grub.cfg"
240 mkdir -p $(dirname $GRUBCFG) 240 mkdir -p $(dirname $GRUBCFG)
241 cat >$GRUBCFG <<_EOF 241 cat >$GRUBCFG <<_EOF