Chameleon

Chameleon Svn Source Tree

Root/branches/meklort/efisysinst.sh

Source at commit 406 created 13 years 9 months ago.
By azimutz, Consolidating this position: while testing the new theme and boot-log function, i realized that when it comes to verbose boot, using the -v flag on Boot.plist (or typed at boot prompt) and using the Menu (Boot Verbose), doesn't produce the exact same output; using the Menu displays all the messages, while typing -v causes some of the first messages to disappear. So, moving this to an early stage isn't anymore a question of what is printed to screen or not! Tests also showed another diff: when using -v flag typed, the Boot Banner is cleared and messages start to print right away, while using Boot Verbose on the Menu, keeps the Banner, prints the first 2 or 3 messages right below it and the rest are only printed, when this code runs and does it's thing. Moving the code to this position fixes this glitch.
1#!/bin/sh
2
3# efisysinst.sh
4#
5#
6# Created by mackerintel on 2/2/09.
7# Copyright 2009 mackerintel. All rights reserved.
8
9if [[ x$1 == x ]]; then
10echo Usage: $0 disknumber;
11exit 0;
12fi
13
14if [[ `dd if=/dev/disk${1}s1 count=8 bs=1 skip=82 | uuencode -m -|head -n 2|tail -n 1` != "RkFUMzIgICA=" ]]; then
15echo "/dev/disk${1}s1" "isn't" a FAT32 partition;
16exit 1;
17fi
18
19if [ ! -f boot1f32 ]; then
20echo "boot1f32 not found";
21exit 1;
22fi
23if [ ! -f boot0 ]; then
24echo "boot0 not found";
25exit 1;
26fi
27dd if=/dev/disk${1}s1 count=1 bs=512 of=/tmp/origbs
28cp boot1f32 /tmp/newbs
29dd if=/tmp/origbs of=/tmp/newbs skip=3 seek=3 bs=1 count=87 conv=notrunc
30dd of=/dev/disk${1}s1 count=1 bs=512 if=/tmp/newbs
31dd if=boot0 of=/dev/disk${1} count=430 bs=1
32

Archive Download this file

Revision: 406