␊ |
␉if [ ${disksignature} == "00000000" ]; then␊ |
␉␉echo "Executing command: fdisk440 -u -f /usr/standalone/i386/${diskloader} -y ${bootdisk}"␊ |
␉␉fdisk440 -u -f "${bootvolume}/usr/standalone/i386/${diskloader}" -y ${bootdisk}␊ |
␉␉"${bootresources}/Tools/fdisk440" -u -f "${bootvolume}/usr/standalone/i386/${diskloader}" -y ${bootdisk}␊ |
␉else␊ |
␉␉#---------------------------------------------------------------------␊ |
␉␉# If it exists then Windows is also installed on the HDD and we need to write boot0hfs␊ |
␉␉#---------------------------------------------------------------------␊ |
␉␉echo "Executing command: fdisk440 -u -f /usr/standalone/i386/${diskloaderdualboot} -y ${bootdisk}"␊ |
␉␉fdisk440 -u -f "${bootvolume}/usr/standalone/i386/${diskloaderdualboot}" -y ${bootdisk}␊ |
␉␉"${bootresources}/Tools/fdisk440" -u -f "${bootvolume}/usr/standalone/i386/${diskloaderdualboot}" -y ${bootdisk}␊ |
␉fi␊ |
else␊ |
echo "Diskupdate is false, so no stage 0 file was written"␊ |
|
if [ ${disksignature} == "00000000" ]; then␊ |
␉# echo "Windows is not installed so let's change the active partition"␊ |
␊ |
␉partitionactive=$( fdisk440 -d ${bootrdisk} | grep -n "*" | awk -F: '{print $1}')␊ |
␉partitionactive=$( "${bootresources}/Tools/fdisk440" -d ${bootrdisk} | grep -n "*" | awk -F: '{print $1}')␊ |
␉echo "Current Active Partition: ${partitionactive}"␊ |
␊ |
␉if [ "${partitionactive}" = "${bootslice}" ]; then␊ |
|
␉␉# BadAxe requires EFI partition to be flagged active.␊ |
␉␉# but it doesn't' hurt to do it for any non-windows partition.␊ |
␉␉␊ |
␉␉fdisk440 -e ${bootrdisk} <<-MAKEACTIVE␊ |
␉␉"${bootresources}/Tools/fdisk440" -e ${bootrdisk} <<-MAKEACTIVE␊ |
␉␉print␊ |
␉␉flag ${bootslice}␊ |
␉␉write␊ |