summaryrefslogtreecommitdiff
path: root/helpers/lh_binary_usb
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2007-09-23 10:04:49 +0200
committerDaniel Baumann <daniel@debian.org>2011-03-09 18:18:29 +0100
commitda353a5231ad925013d01065768864307c70651a (patch)
tree589606906e4e8966797f352ec63162cbb4016da0 /helpers/lh_binary_usb
parent068a51b175546dfeac45c747236817cb41db50d7 (diff)
downloadvyos-live-build-da353a5231ad925013d01065768864307c70651a.tar.gz
vyos-live-build-da353a5231ad925013d01065768864307c70651a.zip
Adding live-helper 1.0~a4-1.
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