Chameleon

Chameleon Commit Details

Date:2011-09-22 19:17:27 (12 years 9 months ago)
Author:blackosx
Commit:1559
Parents: 1558
Message:Use boot0md instead of boot0hfs for dualboot. More tweaks.
Changes:
M/branches/blackosx/package/Scripts/Install/WriteChameleonStage0.sh
M/branches/blackosx/package/Scripts/Install/CheckDiskMicrocode.sh
M/branches/blackosx/package/Scripts/Standard/postinstall
M/branches/blackosx/package/Scripts/EFI/postinstall

File differences

branches/blackosx/package/Scripts/Standard/postinstall
3333
3434
3535
36
36
3737
3838
3939
# Initialise Script Globals
stage0Loader="boot0"
stage0LoaderDualBoot="boot0hfs"
stage0LoaderDualBoot="boot0md"
stage1LoaderHFS="boot1h"
stage1LoaderFAT="boot1f32"
stage2Loader="boot"
branches/blackosx/package/Scripts/EFI/postinstall
3131
3232
3333
34
34
3535
3636
3737
# Initialise Script Globals
stage0Loader="boot0"
stage0LoaderDualBoot="boot0hfs"
stage0LoaderDualBoot="boot0md"
stage1LoaderHFS="boot1h"
stage1LoaderFAT="boot1f32"
stage2Loader="boot"
branches/blackosx/package/Scripts/Install/WriteChameleonStage0.sh
77
88
99
10
11
10
11
1212
1313
1414
......
3838
3939
4040
41
41
4242
43
43
4444
4545
4646
47
47
4848
4949
5050
# Writes Chameleon stage 0 loader.
# Receives disksignature: 0 = Windows not found, 1 = Windows Found
# Receives stage0Loader: Name of file - boot0
# Receives stage0Loaderdualboot: Name of file - boot0hfs
# Receives stage0Loader: for example, boot0
# Receives stage0Loaderdualboot: for example, boot0md
# Receives targetDisk: for example, /dev/disk3
# Receives targetVolume: for example, /Volumes/USB
# Receives scriptDir: The location of the main script dir.
echo "Executing command: fdisk440 -u -f /usr/standalone/i386/${stage0Loader} -y ${targetDisk}"
"${scriptDir}"/Tools/fdisk440 -u -f "${targetVolume}"/usr/standalone/i386/${stage0Loader} -y ${targetDisk}
"$scriptDir"InstallLog.sh "${targetVolume}" "Written boot0 to ${targetDisk}."
"$scriptDir"InstallLog.sh "${targetVolume}" "Written ${stage0Loader to ${targetDisk}."
else
# Windows is also installed on the HDD so we need to write boot0hfs
# Windows is also installed on the HDD so we need to write boot0md
echo "Executing command: /fdisk440 -u -f /usr/standalone/i386/${stage0Loaderdualboot} -y ${targetDisk}"
"${scriptDir}"/Tools/fdisk440 -u -f "${targetVolume}"/usr/standalone/i386/${stage0Loaderdualboot} -y ${targetDisk}
"$scriptDir"InstallLog.sh "${targetVolume}" "Written boot0hfs to ${targetDisk}."
"$scriptDir"InstallLog.sh "${targetVolume}" "Written ${stage0Loaderdualboot} to ${targetDisk}."
fi
branches/blackosx/package/Scripts/Install/CheckDiskMicrocode.sh
4949
5050
5151
52
53
52
53
5454
5555
5656
......
7979
8080
8181
82
83
82
83
8484
8585
8686
# Check bytes 440-443 of the GPTdiskProtectiveMBR for a Windows Disk Signature
windowsloader=$( dd 2>/dev/null if="$targetDisk" count=4 bs=1 | xxd | awk '{print $2$3}' )
if [ "${windowsloader}" == "33c08ed0" ] ; then
echo "Found existing Windows Boot Loader so will replace with Chameleon Boot0hfs"
"$scriptDir"InstallLog.sh "${targetVolume}" "Found existing Windows boot loader - Will replace with boot0hfs"
echo "Found existing Windows Boot Loader so will replace with Chameleon boot0md"
"$scriptDir"InstallLog.sh "${targetVolume}" "Found existing Windows boot loader - Will replace with boot0md"
fi
# See if a Chameleon stage0 boot file already exists
# Script CheckDiskSignature.sh returned 1 if a Windows installation was found
if [ "$diskSigCheck" = "1" ]; then
echo "Found existing Windows installation so will replace stage 0 loader with Boot0hfs"
"$scriptDir"InstallLog.sh "${targetVolume}" "As Windows is installed - Replace boot0 with boot0hfs"
echo "Found existing Windows installation so will replace stage 0 loader with boot0md"
"$scriptDir"InstallLog.sh "${targetVolume}" "As Windows is installed - Replace boot0 with boot0md"
exit 0
fi
fi

Archive Download the corresponding diff file

Revision: 1559