summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2017-12-27 22:29:53 +0100
committerChristian Poessinger <christian@poessinger.com>2017-12-27 23:33:29 +0100
commit28ab553cfbe8d682314d61d0bac520deacfa14c7 (patch)
treeaaa114e2b5190ae3a90b7d6815eb9c02bef8a6de
parent9499b3e5f88ce72054046ac8a6c0da305f1b5fa4 (diff)
downloadvyatta-cfg-system-28ab553cfbe8d682314d61d0bac520deacfa14c7.tar.gz
vyatta-cfg-system-28ab553cfbe8d682314d61d0bac520deacfa14c7.zip
T496: remove diagnostic partition for RAID1 installs
-rw-r--r--debian/changelog6
-rwxr-xr-xscripts/install-system21
-rwxr-xr-xscripts/install/install-get-partition22
-rwxr-xr-xscripts/vyatta-grub-setup27
4 files changed, 9 insertions, 67 deletions
diff --git a/debian/changelog b/debian/changelog
index e69f9e04..d1169cde 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+vyatta-cfg-system (0.20.44+vyos2+current6) unstable; urgency=medium
+
+ * T496: remove diagnostic partition for RAID1 installs
+
+ -- Christian Poessinger <christian@poessinger.com> Wed, 27 Dec 2017 23:32:44 +0100
+
vyatta-cfg-system (0.20.44+vyos2+current5) unstable; urgency=medium
* T488: GRUB can't boot from software RAID
diff --git a/scripts/install-system b/scripts/install-system
index 108153da..e8464951 100755
--- a/scripts/install-system
+++ b/scripts/install-system
@@ -399,7 +399,7 @@ check_for_new_raid () {
#
# Partition creation variables are in units of megabytes.
part_start_offset=2
- part_diag_size=60
+ data_dev=1
if [ $drivesize1 -lt $drivesize2 ]; then
root_size=$drivesize1
@@ -407,25 +407,6 @@ check_for_new_raid () {
root_size=$drivesize2
fi
- let min_size_with_diag=${MIN_ROOT}+${part_diag_size}
- if [ $root_size -ge $min_size_with_diag ]; then
- echo "Would you like me to create a $part_diag_size MB partition for diagnostics?"
- echo -n "(Yes/No) [No]: "
- diag_response=$(get_response "No" "Yes No Y N")
- if [ "$diag_response" == "yes" ] || [ "$diag_response" == "y" ]; then
- for drive in $drives
- do
- echo "Creating diag partition on drive $drive"
- create_partitions "$drive" $part_diag_size $part_start_offset "no"
- sfdisk --change-id /dev/$drive 1 0x6
- done
- data_dev=2
- let part_start_offset+=$part_diag_size
- else
- data_dev=1
- fi
- fi
-
let root_size-=$part_start_offset
for drive in $drives
diff --git a/scripts/install/install-get-partition b/scripts/install/install-get-partition
index 0ddbd443..f1b373ae 100755
--- a/scripts/install/install-get-partition
+++ b/scripts/install/install-get-partition
@@ -259,12 +259,12 @@ check_for_new_raid () {
done
# Need to leave space on both disks between the MBR and the start
- # of the first partition for grub. Grub needs to embed a large
+ # of the first partition for grub. Grub needs to embed a large
# boot image there when booting off RAID devices.
#
# Partition creation variables are in units of megabytes.
part_start_offset=2
- part_diag_size=60
+ data_dev=1
if [ $drivesize1 -lt $drivesize2 ]; then
root_size=$drivesize1
@@ -272,24 +272,6 @@ check_for_new_raid () {
root_size=$drivesize2
fi
- let min_size_with_diag=${MIN_ROOT}+${part_diag_size}
- if [ $root_size -ge $min_size_with_diag ]; then
- echo "Would you like me to create a $part_diag_size MB partition for diagnostics?"
- echo -n "(Yes/No) [No]: "
- diag_response=$(get_response "No" "Yes No Y N")
- if [ "$diag_response" == "yes" ] || [ "$diag_response" == "y" ]; then
- for drive in $drives; do
- echo "Creating diag partition on drive $drive"
- create_partitions "$drive" $part_diag_size $part_start_offset "no"
- sfdisk --change-id /dev/$drive 1 0x6
- done
- data_dev=2
- let part_start_offset+=$part_diag_size
- else
- data_dev=1
- fi
- fi
-
let root_size-=$part_start_offset
for drive in $drives; do
diff --git a/scripts/vyatta-grub-setup b/scripts/vyatta-grub-setup
index d263eff3..ea4dc905 100755
--- a/scripts/vyatta-grub-setup
+++ b/scripts/vyatta-grub-setup
@@ -133,11 +133,6 @@ if [ -n "$xen_kernel_version" ] || [ -n "$union_xen_kernel_version" ]; then
default_console=0
fi
-# Check for diagnostic partition residing in first partition of drive
-# holding the root partition.
-
-diag_drive_number=""
-
if [ ${ROOT_PARTITION:0:2} = "md" ]; then
# Select the first disk in the RAID group to look for diag partition on
root_disks=`echo /sys/block/$ROOT_PARTITION/slaves/*`
@@ -149,20 +144,6 @@ else
root_disk=${ROOT_PARTITION:0:${#ROOT_PARTITION}-1}
fi
-# If the root partition is not occupying the first partition, then we
-# can look for a diag partition there.
-if [ "$ROOT_PARTITION" != "${root_disk}1" ]; then
- first_part_fstype=`fdisk -l /dev/$root_disk | grep ^/dev/${root_disk}1 | awk '{ print $6 }'`
-
- if [ "$first_part_fstype" = "FAT16" -o "$first_part_fstype" = "Dell" ]; then
- # Translate the Linux drive letter (e.g. the "a" in "/dev/sda") into
- # a drive number that grub uses. i.e. "a" = 0, "b" = 1, etc.
- diag_drive_letter=${root_disk:2:1}
- diag_drive_number=`echo $diag_drive_letter | od -t u1 -N 1 | awk '{ print $2 }'`
- let diag_drive_number-=97
- fi
-fi
-
(
# create the grub.cfg file for grub
# The "default=" line selects which boot option will be used by default.
@@ -318,14 +299,6 @@ fi
echo -e "\tinitrd $reset_boot_path/initrd.img"
echo -e "}"
- if [ -n "$diag_drive_number" ]; then
- echo
- echo -e "menuentry \"Diagnostics\" {"
- echo -e "\tchainloader (hd$diag_drive_number,1)+1"
- echo -e "}"
- fi
-
-
) >"$ROOTFSDIR"/boot/grub/grub.cfg
( [ -s /boot/grub/menu.lst ] &&