From 5a1ab0a03ff910cdbc1c0903c5edf88a18a056c7 Mon Sep 17 00:00:00 2001 From: Bob Gilligan Date: Wed, 17 Jun 2009 10:40:30 -0700 Subject: 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. --- scripts/install-system | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'scripts/install-system') 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 -- cgit v1.2.3