summaryrefslogtreecommitdiff
path: root/helpers/lh_binary_usb
diff options
context:
space:
mode:
Diffstat (limited to 'helpers/lh_binary_usb')
-rwxr-xr-xhelpers/lh_binary_usb19
1 files changed, 17 insertions, 2 deletions
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