[Debian-live-changes] r1043 - dists/trunk/live-helper/helpers
Daniel Baumann
daniel at alioth.debian.org
Thu Apr 12 13:24:44 UTC 2007
Author: daniel
Date: 2007-04-12 13:24:43 +0000 (Thu, 12 Apr 2007)
New Revision: 1043
Modified:
dists/trunk/live-helper/helpers/lh_binary_usb
Log:
Modified: dists/trunk/live-helper/helpers/lh_binary_usb
===================================================================
--- dists/trunk/live-helper/helpers/lh_binary_usb 2007-04-12 08:54:55 UTC (rev 1042)
+++ dists/trunk/live-helper/helpers/lh_binary_usb 2007-04-12 13:24:43 UTC (rev 1043)
@@ -65,15 +65,21 @@
PACKAGES="${PACKAGES} parted"
fi
- if [ "${LIVE_BOOTLOADER}" = "grub" ] && [ ! -f chroot/usr/sbin/grub ]
- then
- PACKAGES="${PACKAGES} grub"
- fi
+ case "${LIVE_BOOTLOADER}" in
+ grub)
+ if [ ! -f chroot/usr/sbin/grub ]
+ then
+ PACKAGES="${PACKAGES} grub"
+ fi
+ ;;
- if [ "${LIVE_BOOTLOADER}" = "syslinux" ] && [ ! -f chroot/usr/bin/syslinux ]
- then
- PACKAGES="${PACKAGES} syslinux"
- fi
+ syslinux)
+ if [ ! -f chroot/usr/bin/syslinux ]
+ then
+ PACKAGES="${PACKAGES} syslinux"
+ fi
+ ;;
+ esac
if [ -n "${PACKAGES}" ]
then
@@ -117,7 +123,9 @@
case "${LIVE_BOOTLOADER}" in
grub)
- Chroot "grub-install --no-floppy ${FREELO}"
+ echo "(hd0) ${FREELO}" > chroot/boot/grub/device.map
+ Chroot "grub-install --recheck --no-floppy --root-directory=/boot/grub (hd0)"
+ rm -f chroot/boot/grub/device.map
;;
syslinux)
@@ -127,6 +135,7 @@
${LH_LOSETUP} -d ${FREELO}
+ FREELO="`${LH_LOSETUP} -f`"
lh_losetup $FREELO binary.img 1
Chroot "mkfs.msdos -n DEBIAN_LIVE ${FREELO}"
mkdir -p binary.tmp
@@ -134,8 +143,24 @@
cp -r binary/* binary.tmp
umount binary.tmp
rmdir binary.tmp
- Chroot "syslinux ${FREELO}"
+
+ if [ "${LIVE_BOOTLOADER}" = "syslinux" ]
+ then
+ Chroot "syslinux ${FREELO}"
+ fi
+
${LH_LOSETUP} -d ${FREELO}
+
+ #if [ "${LIVE_BOOTLOADER}" = "grub" ]
+ #then
+ # FREELO="`${LH_LOSETUP} -f`"
+ # lh_losetup $FREELO binary.img 0
+
+ # dd if=binary/boot/grub/stage1 of=${FREELO} bs=512 count=1
+ # dd if=binary/boot/grub/stage2 of=${FREELO} bs=512 seek=1
+
+ # ${LH_LOSETUP} -d ${FREELO}
+ #fi
echo "!!! The above error/warning messages can be ignored !!!"
if [ -n "${MAKEDEV}" ]
More information about the Debian-live-changes
mailing list