From: Michael Prokop Date: Thu, 4 Jun 2015 08:06:40 +0000 (+0200) Subject: Always remove /boot/grub/device.map to avoid leaking host data X-Git-Tag: v0.71~25 X-Git-Url: https://git.grml.org/?p=grml-debootstrap.git;a=commitdiff_plain;h=2aa17c12916879dc6bb68e55a2b32dbfc30fb0fd Always remove /boot/grub/device.map to avoid leaking host data Thanks: Patrick Schleizer for bug report and feedback Fixes #27 @ github --- diff --git a/chroot-script b/chroot-script index e1c183a..0e31f70 100755 --- a/chroot-script +++ b/chroot-script @@ -585,11 +585,13 @@ grub_install() { echo "Installing grub on ${GRUB}:" grub-install --no-floppy "$GRUB" done + rm -f /boot/grub/device.map else echo "Installing grub on ${GRUB}:" case "$RELEASE" in lenny|squeeze|wheezy) grub-install --no-floppy "$(readlink -f "${GRUB}")" + rm -f /boot/grub/device.map ;; *) echo "(hd0) ${GRUB}" > /boot/grub/device.map