X-Git-Url: https://git.grml.org/?p=grml-debootstrap.git;a=blobdiff_plain;f=chroot-script;h=0e31f7095b8f40b64c7f515112cb56e357f4852d;hp=4d883f333c72c0b3d46663cd7b18b5e22d8dcd37;hb=deb096dbfd48009be6bb4bcd627df9f4f7766031;hpb=cb7144264f65932963e9d2968e91b466eab62be2 diff --git a/chroot-script b/chroot-script index 4d883f3..0e31f70 100755 --- a/chroot-script +++ b/chroot-script @@ -78,7 +78,7 @@ chrootmirror() { fi if [ -z "$COMPONENTS" ] ; then - COMPONENTS='main contrib non-free' + COMPONENTS='main' fi echo "Using repository components $COMPONENTS" @@ -162,8 +162,8 @@ EOF apt-get update $DPKG_OPTIONS else # make sure we have the keys available for aptitude - gpg --keyserver subkeys.pgp.net --recv-keys F61E2E7CECDEA787 - gpg --export F61E2E7CECDEA787 | apt-key add - || true # not yet sure + gpg --keyserver subkeys.pgp.net --recv-keys 709BCE51568573EBC160E590F61E2E7CECDEA787 + gpg --export 709BCE51568573EBC160E590F61E2E7CECDEA787 | apt-key add - || true # not yet sure # why it's necessary, sometimes we get an error even though it works [mika] fi @@ -351,7 +351,11 @@ kernel() { KVER=$(get_kernel_version) if [ -n "$KVER" ] ; then # note: install busybox to be able to debug initramfs - KERNELPACKAGES="linux-image-$KVER linux-headers-$KVER busybox firmware-linux-free firmware-linux" + KERNELPACKAGES="linux-image-$KVER linux-headers-$KVER busybox firmware-linux-free" + # only add firmware-linux if we have non-free as a component + if expr "$COMPONENTS" : '.*non-free' >/dev/null ; then + KERNELPACKAGES="$KERNELPACKAGES firmware-linux" + fi DEBIAN_FRONTEND=$DEBIAN_FRONTEND $APTINSTALL $KERNELPACKAGES else echo "Warning: Could not find a kernel for your system. Your system won't be able to boot itself!" @@ -581,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