diff options
Diffstat (limited to 'meta/recipes-core/initrdscripts/files/init-install-efi-testfs.sh')
-rw-r--r-- | meta/recipes-core/initrdscripts/files/init-install-efi-testfs.sh | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/meta/recipes-core/initrdscripts/files/init-install-efi-testfs.sh b/meta/recipes-core/initrdscripts/files/init-install-efi-testfs.sh index 7a0b4d4406..1fcd29e54c 100644 --- a/meta/recipes-core/initrdscripts/files/init-install-efi-testfs.sh +++ b/meta/recipes-core/initrdscripts/files/init-install-efi-testfs.sh @@ -27,7 +27,7 @@ do # Try sleeping here to avoid getting kernel messages # obscuring/confusing user sleep 5 - echo "Found drive at /dev/${device}. Do you want to install this image there ? [y/n]" + echo "Found drive at /dev/${device}. Do you want to install this image there? [y/n]" read answer if [ "$answer" = "y" ] ; then break @@ -69,7 +69,7 @@ umount /dev/${device}* 2> /dev/null || /bin/true mkdir -p /tmp cat /proc/mounts > /etc/mtab -disk_size=$(parted /dev/${device} unit mb print | grep Disk | cut -d" " -f 3 | sed -e "s/MB//") +disk_size=$(parted /dev/${device} unit mb print | grep '^Disk .*: .*MB' | cut -d" " -f 3 | sed -e "s/MB//") testfs_size=$((disk_size*testfs_ratio/100)) rootfs_size=$((disk_size-boot_size-testfs_size)) @@ -133,7 +133,7 @@ mount -o rw,loop,noatime,nodiratime /run/media/$1/$2 /rootmnt echo "Copying rootfs files..." cp -a /rootmnt/* /ssd -touch /ssd/etc/masterimage +touch /ssd/etc/controllerimage if [ -d /ssd/etc/ ] ; then # We dont want udev to mount our root device while we're booting... @@ -171,19 +171,19 @@ if [ -f /run/media/$1/EFI/BOOT/grub.cfg ]; then fi if [ -d /run/media/$1/loader ]; then - GUMMIBOOT_CFGS="/ssd/loader/entries/*.conf" - # copy config files for gummiboot + SYSTEMDBOOT_CFGS="/ssd/loader/entries/*.conf" + # copy config files for systemd-boot cp -dr /run/media/$1/loader /ssd # delete the install entry rm -f /ssd/loader/entries/install.conf # delete the initrd lines - sed -i "/initrd /d" $GUMMIBOOT_CFGS + sed -i "/initrd /d" $SYSTEMDBOOT_CFGS # delete any LABEL= strings - sed -i "s/ LABEL=[^ ]*/ /" $GUMMIBOOT_CFGS + sed -i "s/ LABEL=[^ ]*/ /" $SYSTEMDBOOT_CFGS # delete any root= strings - sed -i "s/ root=[^ ]*/ /" $GUMMIBOOT_CFGS + sed -i "s/ root=[^ ]*/ /" $SYSTEMDBOOT_CFGS # add the root= and other standard boot options - sed -i "s@options *@options root=$rootfs rw $rootwait quiet @" $GUMMIBOOT_CFGS + sed -i "s@options *@options root=$rootfs rw $rootwait quiet @" $SYSTEMDBOOT_CFGS # Add the test label echo -ne "title test\nlinux /test-kernel\noptions root=$testfs rw $rootwait quiet\n" > /ssd/loader/entries/test.conf fi |