summaryrefslogtreecommitdiff
path: root/scripts
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:40:30 -0700
commitdc85b1bfe3534839a5e8eb8b4d4a27fec0985610 (patch)
tree252303f4666a540fc5c15cb9c2c0a064e35ac90f /scripts
parente6833f9543cbbc9ece4c02c299971679a3e1b37a (diff)
downloadvyatta-cfg-system-dc85b1bfe3534839a5e8eb8b4d4a27fec0985610.tar.gz
vyatta-cfg-system-dc85b1bfe3534839a5e8eb8b4d4a27fec0985610.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')
-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