summaryrefslogtreecommitdiff
path: root/scripts/install-system
diff options
context:
space:
mode:
authorBob Gilligan <gilligan@vyatta.com>2009-06-17 10:40:30 -0700
committerBob Gilligan <gilligan@vyatta.com>2009-06-17 10:49:32 -0700
commit5a1ab0a03ff910cdbc1c0903c5edf88a18a056c7 (patch)
treecd22c0a6cc370868532cd8f882d0f4ba692aafef /scripts/install-system
parentfdc1a853d0052b32c3f3b4a69e2306a27876225e (diff)
downloadvyatta-cfg-quagga-5a1ab0a03ff910cdbc1c0903c5edf88a18a056c7.tar.gz
vyatta-cfg-quagga-5a1ab0a03ff910cdbc1c0903c5edf88a18a056c7.zip
Bugfix 4490: Mark root partition as "bootable" in the master boot record (MBR).
The MBR provides a flag on each of the partitions to indicate whether it is "bootable" or not. Most BIOS implementations ignore this flag and will boot from a partition whether or not this flag is set. Some BIOS implementations, however, refuse to boot from a partition that is not marked as "bootable". This fix marks the partition that holds the root filesystem as "bootable" so that it can be booted by either type of BIOS.
Diffstat (limited to 'scripts/install-system')
-rwxr-xr-xscripts/install-system9
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/install-system b/scripts/install-system
index 558a5427..a3e27075 100755
--- a/scripts/install-system
+++ b/scripts/install-system
@@ -448,6 +448,9 @@ check_for_new_raid () {
echo "Creating data partition: /dev/${drive}${data_dev}"
create_partitions "$drive" $root_size $part_start_offset "no"
sfdisk --change-id /dev/$drive $data_dev 0xfd
+ # mark data partition as bootable
+ echo "Marking /dev/$drive partition $data_dev bootable" >> $INSTALL_LOG
+ parted /dev/$drive set $data_dev boot on >> $INSTALL_LOG 2>&1
done
# Must give partition device time to settle
@@ -1105,6 +1108,9 @@ setup_method_auto() {
# now take the data and create the partitions
create_partitions "$INSTALL_DRIVE" "$ROOT_PARTITION_SIZE" 0 "yes"
+ # mark data partition as bootable
+ echo "Marking /dev/$INSTALL_DRIVE partition 1 as bootable" >> $INSTALL_LOG
+ parted /dev/$INSTALL_DRIVE set 1 boot on >> $INSTALL_LOG 2>&1
}
# walk the user through a union setup
@@ -1318,6 +1324,9 @@ elif [ "$INSTALL_METHOD" == "vyatta" ]; then
delete_partitions "$INSTALL_DRIVE"
echo "creating config partition"
create_partitions "$INSTALL_DRIVE" "$ROOT_PARTITION_SIZE" 0 "yes"
+ # mark data partition as bootable
+ echo "Marking /dev/$INSTALL_DRIVE partition 1 as bootable" >> $INSTALL_LOG
+ parted /dev/$INSTALL_DRIVE set 1 boot on >> $INSTALL_LOG 2>&1
fi
if [ ! -d /live/image -o -w /live/image ]; then