Skip to content

Commit

Permalink
grub_install: remove pre-jessie code
Browse files Browse the repository at this point in the history
  • Loading branch information
zeha committed Nov 17, 2023
1 parent f01e4a2 commit 94b63ad
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 29 deletions.
27 changes: 7 additions & 20 deletions chroot-script
Original file line number Diff line number Diff line change
Expand Up @@ -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}."
Expand Down
10 changes: 1 addition & 9 deletions grml-debootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 94b63ad

Please sign in to comment.