From da353a5231ad925013d01065768864307c70651a Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 23 Sep 2007 10:04:49 +0200 Subject: Adding live-helper 1.0~a4-1. --- helpers/lh_binary_usb | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'helpers/lh_binary_usb') diff --git a/helpers/lh_binary_usb b/helpers/lh_binary_usb index 241488e9e..9371f6731 100755 --- a/helpers/lh_binary_usb +++ b/helpers/lh_binary_usb @@ -60,7 +60,12 @@ do PACKAGES="${PACKAGES} parted" fi - if [ ! -f chroot/usr/bin/syslinux ] + if [ "${LIVE_BOOTLOADER}" = "grub" ] && [ ! -f chroot/usr/sbin/grub ] + then + PACKAGES="${PACKAGES} grub" + fi + + if [ "${LIVE_BOOTLOADER}" = "syslinux" ] && [ ! -f chroot/usr/bin/syslinux ] then PACKAGES="${PACKAGES} syslinux" fi @@ -104,7 +109,17 @@ do Chroot "parted -s ${FREELO} mkpartfs primary fat16 0.0 100%" || true Chroot "parted -s ${FREELO} set 1 boot on" || true Chroot "parted -s ${FREELO} set 1 lba off" || true - cat chroot/usr/lib/syslinux/mbr.bin > ${FREELO} + + case "${LIVE_BOOTLOADER}" in + grub) + Chroot "grub-install --no-floppy ${FREELO}" + ;; + + syslinux) + cat chroot/usr/lib/syslinux/mbr.bin > ${FREELO} + ;; + esac + ${LH_LOSETUP} -d ${FREELO} lh_losetup $FREELO binary.img 1 -- cgit v1.2.3