Chameleon Applications

Chameleon Applications Commit Details

Date:2010-10-29 17:05:34 (13 years 5 months ago)
Author:blackosx
Commit:197
Parents: 196
Message:Revised the EFI script in the same way I did the standard script. It's currently untested. Also made a change to the logic for making partition active on both scripts.
Changes:
M/branches/blackosx/trunk/package/Scripts/HFS/postinstall
M/branches/blackosx/trunk/package/Scripts/Standard/postinstall
M/branches/blackosx/trunk/revision

File differences

branches/blackosx/trunk/package/Scripts/HFS/postinstall
11
22
3
4
5
3
4
5
6
7
8
69
7
810
9
10
1111
1212
1313
1414
1515
16
16
1717
1818
19
20
1921
2022
2123
2224
25
2326
2427
2528
26
29
2730
28
31
2932
3033
31
3234
33
35
3436
3537
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
5838
59
39
6040
6141
6242
6343
6444
65
66
67
68
69
70
71
72
7345
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
7465
7566
7667
7768
69
70
71
72
7873
79
8074
8175
8276
8377
8478
8579
80
81
8682
8783
84
85
86
8887
8988
9089
9190
91
92
93
94
95
96
9297
9398
9499
95100
96101
102
103
97104
105
98106
99107
100108
109
101110
102111
103112
104113
114
105115
106
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
107154
108
155
156
109157
110158
111159
160
161
162
112163
113164
165
114166
115167
168
169
170
171
116172
117173
118
119
174
175
176
177
120178
121
122
179
123180
181
182
183
124184
125185
186
187
126188
127189
190
191
192
193
128194
129195
130196
131197
132198
199
200
133201
202
134203
135204
136205
......
150219
151220
152221
222
223
224
225
153226
154227
155
156
157
158228
159
160
229
230
231
232
233
234
235
236
237
161238
162
239
240
241
242
243
244
163245
246
247
248
249
250
251
252
253
254
164255
165
166256
167
168257
169
170
171
172258
173
174
175
176
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
177275
178
276
277
179278
180279
280
281
282
283
284
285
181286
287
288
289
182290
183291
184
185292
186
187293
294
295
296
297
298
299
188300
189
190
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
191319
192320
193
194
321
322
323
324
325
326
327
328
195329
196
197
198
199
200
201
202
203
204
205
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
206368
369
370
371
207372
208
209
210
211
212373
213
214
215
216
217
218
219
220
221
222
374
375
376
377
378
379
380
381
382
383
384
385
386
223387
388
389
390
391
392
393
394
395
396
397
398
399
400
224401
225
226
227
228
229
230
402
403
404
405
406
407
408
409
410
231411
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247412
248413
249
250
414
415
251416
252417
#!/bin/bash
diskloader="/usr/standalone/i386/boot0"
partitionloader="/usr/standalone/i386/boot1h"
filesystemloader="/usr/standalone/i386/boot"
diskloader="boot0"
diskloaderdualboot="boot0hfs"
partitionloaderhfs="boot1h"
partitionloaderfat="boot1f32"
filesystemloader="boot"
bootervolumename="EFI"
booterextensions="Extra/Extensions"
bootresources="${0%/*}"
diskmicrocodetype[1]="GRUB,47525542"
diskmicrocodetype[2]="LILO,4c494c4f"
start ()
{
# $1 volume
# 1 volume
osxvolume="${@}"
bootresources="${0%/*}"
echo "$bootresources"
if [ -z "${osxvolume}" ]; then
echo
echo "Cannot find the volume. Exiting."
echo
exit
fi
bootdev=$( df "${osxvolume}" | sed -n '2p' | awk '{print $1}' )
osxbootdev=$( df "${osxvolume}" | sed -n '2p' | awk '{print $1}' )
if [ "${bootdev}" = "${bootdev#*disk*s}" ]; then
if [ "${osxbootdev}" = "${osxbootdev#*disk*s}" ]; then
echo
echo "ERROR Volume does not use slices."
echo "Volume may be stored on a RAID array."
echo
exit
exit
fi
partitiontable=$( dd 2>/dev/null if=${bootdev%s*} count=1 skip=1 | dd 2>/dev/null count=8 bs=1 | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
if [ "${partitiontable:0:16}" == "4546492050415254" ]; then
partitiontable=$( dd 2>/dev/null if=${bootdev%s*} count=1 | dd 2>/dev/null count=64 bs=1 skip=446 | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
if [ "${partitiontable:8:2}" == "ee" ]; then
if [ "${partitiontable:40:2}" == "00" ] && [ "${partitiontable:72:2}" == "00" ] && [ "${partitiontable:104:2}" == "00" ]; then
partitiontable="GPT"
else
partitiontable="GPT/MBR"
fi
fi
else
echo
echo "ERROR Volume is not on a GPT partitioned disc."
echo
exit
fi
echo "${partitiontable} found."
echo "OS X Volume is ${osxvolume}"
echo "OX X Volume device is ${bootdev}"
bootvolume="/Volumes/$bootervolumename"
bootdev=${bootdev%s*}s1
bootdev=${osxbootdev%s*}s1
bootrdev=${bootdev/disk/rdisk}
bootdisk=${bootdev%s*}
bootrdisk=${bootdisk/disk/rdisk}
bootslice=${bootdev#*disk*s}
echo "EFI Volume device is ${bootdev}"
echo "EFI Volume raw device is ${bootrdev}"
echo "EFI Volume slice is ${bootslice}"
echo "Disk device is ${bootdisk}"
echo "Disk raw device is ${bootrdisk}"
echo "Disk loader is ${diskloader}"
echo "Partition loader is ${partitionloader}"
echo "Filesystem loader is ${filesystemloader}"
echo "==============================================="
echo "Installer Variables:"
echo "********************"
echo "OS X Volume is ${osxvolume}"
echo "OX X Volume device is ${osxbootdev}"
echo "bootdev: EFI Volume device is ${bootdev}"
echo "bootrdev: EFI Volume raw device is ${bootrdev}"
echo "bootslice: EFI Volume slice is ${bootslice}"
echo "bootdisk: Disk device is ${bootdisk}"
echo "bootrdisk: Disk raw device is ${bootrdisk}"
echo "diskloader: Disk loader is ${diskloader}"
echo "diskloaderdualboot: Disk loader is ${diskloaderdualboot}"
echo "partitionloaderhfs: Partition loader is ${partitionloaderhfs}"
echo "partitionloaderfat: Partition loader is ${partitionloaderfat}"
echo "filesystemloader: Filesystem loader is ${filesystemloader}"
echo "bootresources: Boot Resources is ${bootresources}"
echo "-----------------------------------------------"
echo ""
echo ""
}
checkdiskmicrocodetype ()
{
echo "==============================================="
echo "Diskmicrocodetype: CHECKED FOR EFI"
echo "******************"
diskmicrocode=$( dd 2>/dev/null if=${bootdisk} count=1 | dd 2>/dev/null count=1 bs=437 | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
diskmicrocodetypecounter=0
while [ ${diskmicrocodetypecounter} -lt ${#diskmicrocodetype[@]} ]; do
diskmicrocodetypecounter=$(( ${diskmicrocodetypecounter} + 1 ))
diskmicrocodetypeid=${diskmicrocodetype[${diskmicrocodetypecounter}]#*,}
if [ ! "${diskmicrocode}" = "${diskmicrocode/${diskmicrocodetypeid}/}" ]; then
echo "${diskmicrocodetype[${diskmicrocodetypecounter}]%,*} found."
else
echo "Didn't find a match for ${diskmicrocodetype[${diskmicrocodetypecounter}]%,*}"
fi
done
echo "-----------------------------------------------"
echo ""
echo ""
}
checkdiskmicrocode ()
{
echo "==============================================="
echo "Diskmicrocode: CHECKED FOR EFI"
echo "*************"
# Note: The checks for Boot0 and Boot0hfs assume the code doesn't change!!
# 1 action ( check or set )
diskmicrocode=$( dd 2>/dev/null if=${bootdisk} count=1 | dd 2>/dev/null count=1 bs=437 | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
diskmicrocodemd5=$( dd 2>/dev/null if=${bootdisk} count=1 | dd 2>/dev/null count=1 bs=437 | md5 )
#echo "${diskmicrocode}"
if [ $( echo "${diskmicrocode}" | awk -F0 '{print NF-1}' ) = 874 ]; then
echo "Diskmicrocode = 874 (Which means the first 437 bytes of the MBR Disk Sector is blank)"
if [ "${1}" = "set" ]; then
echo "No disk microcode found. Updating."
diskupdate=true
echo "diskupdate is now set to true."
else
echo "No disk microcode found."
fi
else
# There is already something on the MBR
if [ ${1} = set ]; then
echo "Disk microcode found. Preserving."
# See if a Windows bootloader already exists
windowsloader=$( dd 2>/dev/null if=${bootdisk} count=4 bs=1 | xxd | awk '{print $2$3}' )
if [ "${windowsloader}" == "33c08ed0" ] ; then
echo "Found existing Windows Boot Loader"
echo "Will replace loader with Boot0hfs"
diskupdate=true
echo "diskupdate is now set to true."
fi
# See if a Chameleon stage0 boot file already exists
stage0type=$( dd 2>/dev/null if=${bootdisk} count=3 bs=1 skip=105 | xxd | awk '{print $2$3}' )
if [ "${stage0type}" == "0b807c" ] || [ "${stage0type}" == "0a803c" ] ; then
echo "Found existing Chameleon Stage 0 Loader"
# if found Boot0HFS without a Windows installation set diskupdate to true
if [ "${stage0type}" == "0b807c" ] && [ "${disksignature}" == "00000000" ]; then
echo "Found existing Chameleon Boot0HFS without a Windows installation"
echo "Will replace loader with Boot0"
diskupdate=true
echo "diskupdate is now set to true."
fi
# if found Boot0 with a Windows installation set diskupdate to true
if [ "${stage0type}" == "0a803c" ] && [ "${disksignature}" != "00000000" ]; then
echo "Found existing Chameleon Boot0 with a Windows installation"
echo "Will replace loader with Boot0hfs"
diskupdate=true
echo "diskupdate is now set to true."
fi
fi
# If neither a Windows or Chameleon Boot Loader exists
if [ "${stage0type}" != "0b807c" ] && [ "${stage0type}" != "0a803c" ] && [ "${windowsloader}" != "33c08ed0" ] ; then
test=$(echo "${diskmicrocode}" | awk -F0 '{print NF-1}' )
echo "Disk microcode found: ${test} - Preserving."
echo "diskupdate is left at false"
fi
else
echo "Disk microcode found."
test=$(echo "${diskmicrocode}" | awk -F0 '{print NF-1}' )
echo "Disk microcode found: ${test}"
fi
echo "Disk microcode MD5 is ${diskmicrocodemd5}"
fi
echo "-----------------------------------------------"
echo ""
echo ""
}
checkdisksignature ()
{
echo "==============================================="
echo "Find Disk Signature: CHECKED FOR EFI"
echo "*************"
disksignature=$( dd 2>/dev/null if=${bootdisk} count=1 | dd 2>/dev/null count=4 bs=1 skip=440 | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
if [ $( echo "${disksignature}" | awk -F0 '{print NF-1}' ) = 8 ]; then
echo "No disk signature found."
echo "${disksignature}"
if [ $disksignature = "00000000" ]; then
echo "Just Zero's found meaning Windows isn't installed."
else
echo "Disk signature found."
echo "Disk signature is 0x${disksignature}"
echo "Non Zero means we've found a Windows installation"
fi
echo "-----------------------------------------------"
echo ""
echo ""
}
checkpartitionbootcode ()
{
echo "==============================================="
echo "Find Partition Bootcode: CHECKED FOR EFI"
echo "************************"
# 1 action ( check or set )
partitionbootcode=$( dd if=${bootrdev} count=1 2>/dev/null | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
partitionbootcodeextended=$( dd if=${bootrdev} count=1 skip=1 2>/dev/null | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
echo "${partitionbootcode}"
if [ $( echo "${partitionbootcode}" | awk -F0 '{print NF-1}' ) = 1024 ]; then
echo "partitionbootcode = 1024 (Which means the whole 512 bytes of the MBR Disk Sector is blank)"
if [ "${1}" = "set" ]; then
echo "No partition bootcode found. Updating."
else
fi
echo "Partition bootcode MD5 is ${partitionbootcodemd5}"
fi
echo "-----------------------------------------------"
echo ""
echo ""
}
checkpartitionactive ()
{
partitionactive=$( fdisk440 -d ${bootrdisk} | grep -n "*" | awk -F: '{print $1}')
if [ -n "${partitionactive}" ]; then
echo "Partition flagged active is ${partitionactive}"
start ${3}
echo "==============================================="
echo "Check the format of the EFI partition"
echo "***************************"
if [ "$( df | grep ${bootdev} )" ]; then
echo "EFI partition is currently mounted, so un-mounting it"
#umount -f ${bootdev}
else
echo "No partition flagged active."
echo "EFI partition is currently not mounted"
fi
if [ "$( fstyp ${bootdev} | grep hfs )" ]; then
echo "${bootdev} is a currently formatted as HFS"
efiformat="hfs"
fi
if [ "$( fstyp ${bootdev} | grep msdos )" ]; then
echo "${bootdev} is currently formatted as msdos"
efiformat="msdos"
#echo "Executing command: newfs_hfs -v ${bootervolumename} ${bootdev}"
#newfs_hfs -v "${bootervolumename}" "${bootdev}"
fi
echo "-----------------------------------------------"
echo ""
echo ""
}
start ${3}
if [ "$( df | grep ${bootdev} )" ]; then
umount -f ${bootdev}
fi
if ! [ "$( fstyp ${bootdev} | grep hfs )" ]; then
echo "${bootdev} isn't a HFS partition"
echo "Executing command: newfs_hfs -v ${bootervolumename} ${bootdev}"
newfs_hfs -v "${bootervolumename}" "${bootdev}"
echo "==============================================="
echo "Determine Partition Scheme: CHANGED FOR EFI"
echo "***************************"
partitiontable=$( dd 2>/dev/null if=${bootdisk} count=1 skip=1 | dd 2>/dev/null count=8 bs=1 | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
if [ "${partitiontable:0:16}" == "4546492050415254" ]; then
partitiontable=$( dd 2>/dev/null if=${bootdisk} count=1 | dd 2>/dev/null count=64 bs=1 skip=446 | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
if [ "${partitiontable:8:2}" == "ee" ]; then
echo "Found System ID 'EE' to identify GPT Partition"
if [ "${partitiontable:40:2}" == "00" ] && [ "${partitiontable:72:2}" == "00" ] && [ "${partitiontable:104:2}" == "00" ]; then
echo "Found System ID '00' for each remaining possible partition"
partitiontable="GPT"
else
partitiontable="GPT/MBR"
fi
fi
else
echo "${bootdev} is already a HFS partition (skipping)"
echo "ERROR Volume is not on a GPT partitioned disc."
exit
fi
echo "${partitiontable} found."
echo "-----------------------------------------------"
echo ""
echo ""
diskupdate=false
checkdisksignature
checkdiskmicrocodetype
checkdiskmicrocode set
checkdisksignature
checkpartitionbootcode set
checkpartitionactive
echo "==============================================="
echo "Can we install the Chameleon bootloader files? : CHECKED FOR EFI"
echo "**********************************************"
if ${diskupdate}; then
echo "Executing command: fdisk440 -u -f ${diskloader} -y ${bootdisk}"
fdisk440 -u -f "${osxvolume}/${diskloader}" -y ${bootdisk}
echo "Diskupdate = true, so yes"
#---------------------------------------------------------------------
# Check bytes 438-446 of the GPTdiskProtectiveMBR for a Windows Disk Signature
#---------------------------------------------------------------------
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}
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}
fi
else
echo "Diskupdate is false, so no stage 0 file was written"
fi
echo "Executing command: dd if=${partitionloader} of=${bootrdev}"
dd if="${osxvolume}/${partitionloader}" of=${bootrdev}
if [ ${efiformat} = "hfs" ]; then
echo "Executing command: dd if=/usr/standalone/i386/${partitionloaderhfs} of=${bootrdev}"
dd if="${bootvolume}/usr/standalone/i386/${partitionloaderhfs}" of=${bootrdev}
fi
if [ ${efiformat} = "msdos" ]; then
echo "Executing command: dd if=/usr/standalone/i386/${partitionloaderfat} of=${bootrdev}"
dd if="${bootvolume}/usr/standalone/i386/${partitionloaderfat}" of=${bootrdev}
fi
# If table is GPT make the first partition active (BadAxe compatibility).
[ "${partitiontable}" = "GPT" ] && bootslice=1
if [[ "${partitiontable}" = "GPT" ]]; then
fdisk440 -e ${bootdisk} <<-MAKEACTIVE
print
flag ${bootslice}
write
y
quit
MAKEACTIVE
echo "Executing command: cp /usr/standalone/i386/${filesystemloader} ${bootvolume}"
cp "${bootvolume}/usr/standalone/i386/${filesystemloader}" "${bootvolume}"
echo "Executing command: ${bootresources}/Tools/SetFile -a V ${bootvolume}/${filesystemloader}"
"${bootresources}/Tools/SetFile" -a V "${bootvolume}/${filesystemloader}"
echo "-----------------------------------------------"
echo ""
echo ""
echo "==============================================="
echo "Set Active Partition ONLY if Windows is not installed: CHECKED FOR EFI"
echo "*****************************************************"
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}')
echo "Current Active Partition: ${partitionactive}"
if [ "${partitionactive}" = "${bootslice}" ]; then
echo "${bootvolume} is already flagged as active"
else
echo "${bootvolume} is not flagged as active, so let's do it."
# 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
print
flag ${bootslice}
write
y
quit
MAKEACTIVE
fi
else
echo "Windows is installed so we let that remain the active partition"
fi
echo "-----------------------------------------------"
echo ""
echo ""
checkdiskmicrocode check
checkdisksignature
checkpartitionbootcode check
checkpartitionactive
[ -d "${bootvolume}" ] || mkdir -p "${bootvolume}"
echo "Executing command: mount_hfs ${bootdev} ${bootvolume}"
mount_hfs "${bootdev}" "${bootvolume}"
echo "Executing command: cp ${osxvolume}${filesystemloader} ${bootvolume}/boot"
cp "${osxvolume}${filesystemloader}" "${bootvolume}/boot"
#if ! [ -d "${bootvolume}/Extra/Extensions" ]; then
#echo "Executing command: mkdir -p ${bootvolume}/Extra/Extensions"
#mkdir -p "${bootvolume}/Extra/Extensions"
#checkdiskmicrocode check - why check as it would have changed after writing boot0?
#checkdisksignature - This should still be the same, but if it's changed then it's too late - unless we backed it up?
#checkpartitionbootcode check - why check as it would have changed after writing boot0?
echo "==============================================="
echo "Check EFI Partition:"
echo "***************************"
echo "Skipping for now"
# Check efi partition
#if [ -d /Volumes/EFI ]; then
#umount -f /Volumes/EFI
#rm -R -f /Volumes/EFI
#fi
echo "-----------------------------------------------"
echo ""
echo ""
if [ -d "${bootvolume}/Extra/Extensions" ]; then
echo "-----------------------------------------------"
echo "Duplicating Extra to ExtraBackup Folder, then removing Extra"
echo "-----------------------------------------------"
echo "Executing command: mkdir -p ${bootvolume}/Extra/Extensions"
#mkdir -p "${bootvolume}/ExtraBackup"
#cp -f -R "${bootvolume}/Extra" "${bootvolume}/ExtraBackup"
#rm -f -R "${bootvolume}/Extra"
fi
# unpack any existing Extensions.mkext already on the booter volume
#if [ -e "${bootvolume}/Extra/Extensions.mkext" ]; then
#echo "Executing command: mkextunpack -d ${bootvolume}/Extra/Extensions ${bootvolume}/Extra/Extensions.mkext"
#mkextunpack -d "${bootvolume}/Extra/Extensions" "${bootvolume}/Extra/Extensions.mkext"
#echo "Executing command: rm -R -f ${bootvolume}/Extra/Extensions.mkext"
#rm -R -f "${bootvolume}/Extra/Extensions.mkext"
#fi
if [ -f "${2}/ExtraBackup/Extensions.mkext" ]; then
echo "-----------------------------------------------"
echo "Mkext section"
echo "-----------------------------------------------"
echo "Executing command: mkextunpack -d ${2}/Extra/Extensions ${2}/ExtraBackup/Extensions.mkext"
#mkextunpack -d "${2}/.Chameleon/Extra/Extensions" "${2}/.Chameleon/ExtraBackup/Extensions.mkext"
echo "Executing command: rm -R -f ${2}/ExtraBackup/Extensions.mkext"
#rm -R -f "${2}/ExtraBackup/Extensions.mkext"
fi
# copy existing /Extra
#if [ -d "${2}/Extra" ]; then
#[ -d "${bootvolume}/Extra/Extensions" ] || mkdir -p "${bootvolume}/Extra/Extensions"
#echo "Executing command: find ${2}/Extra -name '*.plist' -depth 1 -exec cp -f {} ${bootvolume}/Extra \;"
#find "${2}/Extra" -name '*.plist' -depth 1 -exec cp -f {} "${bootvolume}/Extra/" \;
#if [ -f "${2}/Extra/Extensions.mkext" ]; then
#echo "Executing command: mkextunpack -d ${2}/Extra/Extensions ${2}/Extra/Extensions.mkext"
#mkextunpack -d "${bootvolume}/Extra/Extensions" "${2}/Extra/Extensions.mkext"
#fi
#if [ -d "${2}/Extra/Extensions" ]; then
#echo "Executing command: find ${2}/Extra/Extensions -name '*.kext' -depth 1 -exec cp -R {} ${bootvolume}/Extra/Extensions \;"
#find "${2}/Extra/Extensions" -name '*.kext' -depth 1 -exec cp -R {} "${bootvolume}/Extra/Extensions" \;
#fi
#fi
# setup link for extras
#[ -h "${2}/.Chameleon" ] && unlink "${2}/.Chameleon"
#echo "Executing command: ln -s /Volumes/${bootervolumename} ${2}/.Chameleon"
#ln -s "/Volumes/${bootervolumename}" "${2}/.Chameleon"
#echo "Executing command: ln -s . ${2}/.Chameleon"
#ln -s "${2}" "${2}/.Chameleon"
exit
branches/blackosx/trunk/package/Scripts/Standard/postinstall
309309
310310
311311
312
312
313
314
313315
314316
315317
......
321323
322324
323325
324
325
326326
327327
328328
partitionactive=$( fdisk440 -d ${bootrdisk} | grep -n "*" | awk -F: '{print $1}')
echo "Current Active Partition: ${partitionactive}"
if [ ${partitionactive} -ne ${bootslice} ]; then
if [ "${partitionactive}" = "${bootslice}" ]; then
echo "${bootvolume} is already flagged as active"
else
echo "${bootvolume} is not flagged as active, so let's do it."
# BadAxe requires EFI partition to be flagged active.
# but it doesn't' hurt to do it for any non-windows partition.
y
quit
MAKEACTIVE
else
echo "${bootvolume} is already flagged as active"
fi
else
echo "Windows is installed so we let that remain the active partition"
branches/blackosx/trunk/revision
1
1
2
3
195
<<<<<<< .mine
194=======
195>>>>>>> .r196

Archive Download the corresponding diff file

Revision: 197