Added fsf extras repo
[fai-configs.git] / scripts / GRUB_PC / 10-setup
CommitLineData
2d1f8014 1#! /bin/bash
2# support for GRUB version 2 (1.98-1)
3
4error=0 ; trap "error=$((error|1))" ERR
5
6set -a
7
8# during softupdate use this file
9[ -r $LOGDIR/disk_var.sh ] && . $LOGDIR/disk_var.sh
10
11[ -z "$BOOT_DEVICE" ] && exit 701
12
13$ROOTCMD grub-mkdevicemap --no-floppy
14# needed for ubuntu
15$ROOTCMD grub-mkconfig -o /boot/grub/grub.cfg
16
17GROOT=$($ROOTCMD grub-probe -tdrive -d $BOOT_DEVICE)
18# see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=606035
19GROOT=$(echo $GROOT | sed 's:md/:md:g')
20
21$ROOTCMD grub-install --no-floppy "$GROOT"
22echo "Grub installed on $BOOT_DEVICE = $GROOT"
23
24$ROOTCMD update-grub
25
26
27exit $error