From e653f517b0e77a85c24967fb9995339416e9726f Mon Sep 17 00:00:00 2001 From: Awais Belal Date: Thu, 4 Feb 2016 13:23:10 +0500 Subject: [PATCH] init-install-efi.sh: use generated partition names for UUID In case of MMC devices we tend to manipulate the partition names as MMC partition naming scheme adds a 'p' in the partition prefix. Currently this fails as UUID generation tries to use device name directly and only appends partition number. We fix this by using the manipulated partition names already generated earlier in the script to be consistent throughout. Signed-off-by: Awais Belal --- init-install-efi.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git init-install-efi.sh init-install-efi.sh index 4523825..a6a9047 100644 --- init-install-efi.sh +++ init-install-efi.sh @@ -194,8 +194,8 @@ mount -o rw,loop,noatime,nodiratime /run/media/$1/$2 /src_root echo "Copying rootfs files..." cp -a /src_root/* /tgt_root if [ -d /tgt_root/etc/ ] ; then - boot_uuid=$(blkid -o value -s UUID ${device}1) - swap_part_uuid=$(blkid -o value -s PARTUUID ${device}3) + boot_uuid=$(blkid -o value -s UUID ${bootfs}) + swap_part_uuid=$(blkid -o value -s PARTUUID ${swap}) echo "/dev/disk/by-partuuid/$swap_part_uuid swap swap defaults 0 0" >> /tgt_root/etc/fstab echo "UUID=$boot_uuid /boot vfat defaults 1 2" >> /tgt_root/etc/fstab # We dont want udev to mount our root device while we're booting... @@ -216,7 +216,7 @@ mkdir -p $EFIDIR cp /run/media/$1/EFI/BOOT/*.efi $EFIDIR if [ -f /run/media/$1/EFI/BOOT/grub.cfg ]; then - root_part_uuid=$(blkid -o value -s PARTUUID ${device}2) + root_part_uuid=$(blkid -o value -s PARTUUID ${rootfs}) GRUBCFG="$EFIDIR/grub.cfg" cp /run/media/$1/EFI/BOOT/grub.cfg $GRUBCFG # Update grub config for the installed image -- 1.9.1