Last change
on this file was
c5c522c,
checked in by Edwin Eefting <edwin@datux.nl>, 8 years ago
|
initial commit, transferred from cleaned syn3 svn tree
|
-
Property mode set to
100755
|
File size:
961 bytes
|
Rev | Line | |
---|
[c5c522c] | 1 | #!/bin/bash |
---|
| 2 | |
---|
| 3 | |
---|
| 4 | |
---|
| 5 | |
---|
| 6 | #mount boot als hij nog niet gemount is |
---|
| 7 | mount /boot |
---|
| 8 | ERR=$? |
---|
| 9 | [ "$ERR" != "0" ] && [ "$ERR" != "32" ] && exit 1 |
---|
| 10 | |
---|
| 11 | |
---|
| 12 | #bepaal welke partities we hebben in onze boot raid array md0 |
---|
| 13 | PARTS=` |
---|
| 14 | mdadm --detail /dev/md0| |
---|
| 15 | grep -v /dev/md0| |
---|
| 16 | grep /dev| |
---|
| 17 | sed 's#^[^/]*##g' #remove spaces |
---|
| 18 | ` || exit 1 |
---|
| 19 | |
---|
| 20 | |
---|
| 21 | #installeer bootloader op alle disks |
---|
| 22 | for PART in $PARTS; do |
---|
| 23 | DISK="`getdisk $PART`" |
---|
| 24 | |
---|
| 25 | #install juiste soort mbr |
---|
| 26 | if blkid $DISK | grep gpt >/dev/null; then |
---|
| 27 | echo "Installing GPT MBR on $DISK" |
---|
| 28 | dd if=/usr/share/syslinux/gptmbr.bin of=$DISK || exit 1 |
---|
| 29 | else |
---|
| 30 | echo "Installing legacy MBR on $DISK" |
---|
| 31 | dd if=/usr/share/syslinux/mbr.bin of=$DISK || exit 1 |
---|
| 32 | fi |
---|
| 33 | done |
---|
| 34 | |
---|
| 35 | |
---|
| 36 | cp /usr/share/syslinux/vesamenu.c32 /boot/syslinux || exit 1 |
---|
| 37 | cp /usr/share/syslinux/libcom32.c32 /boot/syslinux || exit 1 |
---|
| 38 | cp /usr/share/syslinux/libutil.c32 /boot/syslinux || exit 1 |
---|
| 39 | extlinux --install -r /boot/syslinux || exit 1 |
---|
| 40 | |
---|
| 41 | echo "SYN-3 bootloader install completed" |
---|
| 42 | |
---|
| 43 | exit 0 |
---|
| 44 | |
---|
Note: See
TracBrowser
for help on using the repository browser.