From 94b63adbec9c06ba30e6e898871462e251ca1823 Mon Sep 17 00:00:00 2001 From: Chris Hofstaedtler Date: Mon, 13 Nov 2023 23:28:55 +0100 Subject: [PATCH] grub_install: remove pre-jessie code --- chroot-script | 27 +++++++-------------------- grml-debootstrap | 10 +--------- 2 files changed, 8 insertions(+), 29 deletions(-) diff --git a/chroot-script b/chroot-script index ace535f..ad23449 100755 --- a/chroot-script +++ b/chroot-script @@ -730,26 +730,13 @@ grub_install() { done rm -f /boot/grub/device.map else - echo "Installing grub on ${GRUB}:" - case "$RELEASE" in - lenny|squeeze|wheezy) - local grub_dev - grub_dev="$(readlink -f "${GRUB}")" - if ! grub-install --no-floppy "${grub_dev}" ; then - echo "Error: failed to execute 'grub-install --no-floppy ${grub_dev}'." >&2 - exit 1 - fi - rm -f /boot/grub/device.map - ;; - *) - echo "(hd0) ${GRUB}" > /boot/grub/device.map - if ! grub-install "(hd0)" ; then - echo "Error: failed to execute 'grub-install (hd0)'." >&2 - exit 1 - fi - rm /boot/grub/device.map - ;; - esac + echo "Installing grub on ${GRUB}:" + echo "(hd0) ${GRUB}" > /boot/grub/device.map + if ! grub-install "(hd0)" ; then + echo "Error: failed to execute 'grub-install (hd0)'." >&2 + exit 1 + fi + rm /boot/grub/device.map fi echo "Adjusting grub configuration for use on ${GRUB}." diff --git a/grml-debootstrap b/grml-debootstrap index 00ce363..513c27b 100755 --- a/grml-debootstrap +++ b/grml-debootstrap @@ -1618,15 +1618,7 @@ grub_install() { eerror "Error: grub not installed inside Virtual Machine. Can not install bootloader." ; eend 1 bailout 1 fi - - case "$RELEASE" in - lenny|squeeze|wheezy) - cp "${MNTPOINT}"/usr/lib/grub/i386-pc/* "${MNTPOINT}/boot/grub/" - ;; - *) - cp -a "${MNTPOINT}"/usr/lib/grub/i386-pc "${MNTPOINT}/boot/grub/" - ;; - esac + cp -a "${MNTPOINT}"/usr/lib/grub/i386-pc "${MNTPOINT}/boot/grub/" if [ -n "$VMEFI" ]; then -- 2.1.4