Add script that automatically updates/installs GRUB2

This script also handles RAID devices
This commit is contained in:
Michael Tremer
2014-12-18 17:27:47 +01:00
parent bbf2fe8902
commit ff3bae7b89
4 changed files with 138 additions and 9 deletions

View File

@@ -1,6 +1,7 @@
etc/system-release
etc/issue
opt/pakfire/etc/pakfire.conf
usr/local/bin/update-bootloader
var/ipfire/header.pl
var/ipfire/langs
var/ipfire/lang.pl

View File

@@ -180,16 +180,10 @@ case "$(uname -m)" in
echo "GRUB_TERMINAL=\"serial\"" >> /etc/default/grub
echo "GRUB_SERIAL_COMMAND=\"serial --unit=0 --speed=115200\"" >> /etc/default/grub
fi
grub-mkconfig -o /boot/grub/grub.cfg
ROOT=$(mount | grep " / " | cut -d" " -f1)
ROOT=${ROOT::-1}
if ! grub-install --no-floppy --recheck "${ROOT}"; then
if ! grub-install --no-floppy --recheck --force "${ROOT}"; then
logger -p syslog.emerg -t ipfire \
"Could not update the bootloader!"
fi
if ! /usr/local/bin/update-bootloader; then
logger -p syslog.emerg -t ipfire \
"Could not update the bootloader!"
fi
;;
esac