From 52856255026d37001e9a4b7749110a0e49ef2c5d Mon Sep 17 00:00:00 2001 From: Kim Hagen Date: Wed, 12 Jun 2019 12:37:24 +0200 Subject: Force create raid without answering the question if you want to create it. Update initramfs to include raidconfig avoiding md127 being created on reboot. --- scripts/install/install-get-partition | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'scripts/install') diff --git a/scripts/install/install-get-partition b/scripts/install/install-get-partition index b3f2741e..9f6473e1 100755 --- a/scripts/install/install-get-partition +++ b/scripts/install/install-get-partition @@ -302,12 +302,16 @@ check_for_new_raid () { echo "Creating RAID-1 group on partitions: /dev/${drive1}${data_dev} /dev/${drive2}${data_dev}" raid_dev=md0 - mdadm --create /dev/$raid_dev --level=1 --raid-disks=2 --metadata=0.90 \ + yes|mdadm --create /dev/$raid_dev --level=1 --raid-disks=2 --metadata=0.90 \ /dev/${drive1}${data_dev} /dev/${drive2}${data_dev} if [ $? = 0 -a -e /dev/$raid_dev ]; then echo "RAID-1 group created successfully:" cat /proc/mdstat | grep --after-context 2 ^$raid_dev | sed -e 's/^/\t/' + if [ -e /usr/sbin/update-initramfs.orig.initramfs-tools ] + echo "Updating initramfs to include the raid config:" + /usr/sbin/update-initramfs.orig.initramfs-tools -u + fi else echo "Unable to create RAID-1 group!" return -- cgit v1.2.3 From 97985e233201aaee08aeba39abcec5188edc769e Mon Sep 17 00:00:00 2001 From: Kim Hagen Date: Wed, 12 Jun 2019 13:27:38 +0200 Subject: fix if statement --- scripts/install/install-get-partition | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/install') diff --git a/scripts/install/install-get-partition b/scripts/install/install-get-partition index 9f6473e1..560125c2 100755 --- a/scripts/install/install-get-partition +++ b/scripts/install/install-get-partition @@ -308,7 +308,7 @@ check_for_new_raid () { if [ $? = 0 -a -e /dev/$raid_dev ]; then echo "RAID-1 group created successfully:" cat /proc/mdstat | grep --after-context 2 ^$raid_dev | sed -e 's/^/\t/' - if [ -e /usr/sbin/update-initramfs.orig.initramfs-tools ] + if [ -e /usr/sbin/update-initramfs.orig.initramfs-tools ]; then echo "Updating initramfs to include the raid config:" /usr/sbin/update-initramfs.orig.initramfs-tools -u fi -- cgit v1.2.3 From 444975cec833fd6788c89e4ce47475cce948cf87 Mon Sep 17 00:00:00 2001 From: Kim Hagen Date: Tue, 18 Jun 2019 13:55:44 +0200 Subject: [ installer ] T1446: on installing with efi skip the xen extra checks, they use dmidecode which will not work in efi mode Get the UUID of the correct partition based on the install type (bios/efi) --- scripts/install/install-postinst-new | 6 ++++-- scripts/vyatta-grub-setup | 6 +++++- 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'scripts/install') diff --git a/scripts/install/install-postinst-new b/scripts/install/install-postinst-new index ae723627..85eba45f 100755 --- a/scripts/install/install-postinst-new +++ b/scripts/install/install-postinst-new @@ -263,8 +263,10 @@ fi # Install grub install_grub -# Perform additional configuration if installing on Xen -check_for_xen_extras +if [ ! -d /sys/firmware/efi ]; then + # Perform additional configuration if installing on Xen + check_for_xen_extras +fi # # Only start the mdadm daemon if we have the root filesystem running diff --git a/scripts/vyatta-grub-setup b/scripts/vyatta-grub-setup index 236b41ea..de67ba60 100755 --- a/scripts/vyatta-grub-setup +++ b/scripts/vyatta-grub-setup @@ -163,7 +163,11 @@ fi fi if [ ${ROOT_PARTITION:0:2} = "md" ]; then - uuid_root_disk=`/sbin/tune2fs -l /dev/${root_disk}1 | grep UUID | awk '{print $3}'` + if [ -d /sys/firmware/efi ]; then + uuid_root_disk=`/sbin/tune2fs -l /dev/${root_disk}3 | grep UUID | awk '{print $3}'` + else + uuid_root_disk=`/sbin/tune2fs -l /dev/${root_disk}1 | grep UUID | awk '{print $3}'` + fi uuid_root_md=`/sbin/tune2fs -l /dev/md${ROOT_PARTITION#md} | grep UUID | awk '{print $3}'` echo "" echo -e "insmod part_msdos" -- cgit v1.2.3