[Debian-live-changes] r2076 - in dists/trunk/live-helper: docs helpers
daniel at alioth.debian.org
daniel at alioth.debian.org
Wed Jun 13 19:06:25 UTC 2007
Author: daniel
Date: 2007-06-13 19:06:24 +0000 (Wed, 13 Jun 2007)
New Revision: 2076
Modified:
dists/trunk/live-helper/docs/CREDITS
dists/trunk/live-helper/docs/ChangeLog
dists/trunk/live-helper/helpers/lh_binary_grub
dists/trunk/live-helper/helpers/lh_binary_iso
dists/trunk/live-helper/helpers/lh_binary_usb-hdd
dists/trunk/live-helper/helpers/lh_clean
Log:
Modified: dists/trunk/live-helper/docs/CREDITS
===================================================================
--- dists/trunk/live-helper/docs/CREDITS 2007-06-13 14:23:31 UTC (rev 2075)
+++ dists/trunk/live-helper/docs/CREDITS 2007-06-13 19:06:24 UTC (rev 2076)
@@ -17,6 +17,7 @@
* Richard Nelson <rjent at rjent.pair.com>
* Scott Edwards <debian at foss.daxal.com>
* Sebastian Raveau <sebastien.raveau at epita.fr>
+ * Thomas Lange <lange at informatik.uni-koeln.de>
* Trent Buck <trentbuck at gmail.com>
Donations (alphaetical order):
Modified: dists/trunk/live-helper/docs/ChangeLog
===================================================================
--- dists/trunk/live-helper/docs/ChangeLog 2007-06-13 14:23:31 UTC (rev 2075)
+++ dists/trunk/live-helper/docs/ChangeLog 2007-06-13 19:06:24 UTC (rev 2076)
@@ -7,6 +7,9 @@
- Fixed typos which made caching fail on rebuilds.
* helpers/lh_clean:
- Added unmount of binfmt on clean.
+ * helpers/lh_binary_usb-hdd:
+ - Including script to write grub to the loop device from Thomas Lange
+ <lange at informatik.uni-koeln.de>.
2007-06-10 Daniel Baumann <daniel at debian.org>
Modified: dists/trunk/live-helper/helpers/lh_binary_grub
===================================================================
--- dists/trunk/live-helper/helpers/lh_binary_grub 2007-06-13 14:23:31 UTC (rev 2075)
+++ dists/trunk/live-helper/helpers/lh_binary_grub 2007-06-13 19:06:24 UTC (rev 2076)
@@ -230,7 +230,7 @@
;;
tar|usb-hdd)
- cp chroot/usr/lib/grub/*/stage1 chroot/usr/lib/grub/*/stage2 binary/boot/grub
+ cp chroot/usr/lib/grub/*/stage1 chroot/usr/lib/grub/*/e2fs_stage1_5 chroot/usr/lib/grub/*/stage2 binary/boot/grub
;;
esac
Modified: dists/trunk/live-helper/helpers/lh_binary_iso
===================================================================
--- dists/trunk/live-helper/helpers/lh_binary_iso 2007-06-13 14:23:31 UTC (rev 2075)
+++ dists/trunk/live-helper/helpers/lh_binary_iso 2007-06-13 19:06:24 UTC (rev 2076)
@@ -128,7 +128,7 @@
;;
esac
-cat >> chroot/binary.sh << EOF
+cat > chroot/binary.sh << EOF
${LH_GENISOIMAGE} ${GENISOIMAGE_OPTIONS} -o binary.iso -J -l -cache-inodes binary
EOF
Modified: dists/trunk/live-helper/helpers/lh_binary_usb-hdd
===================================================================
--- dists/trunk/live-helper/helpers/lh_binary_usb-hdd 2007-06-13 14:23:31 UTC (rev 2075)
+++ dists/trunk/live-helper/helpers/lh_binary_usb-hdd 2007-06-13 19:06:24 UTC (rev 2076)
@@ -79,7 +79,7 @@
# Everything which comes here needs to be cleaned up,
DU_DIM="`du -ms binary | cut -f1`"
REAL_DIM="`expr ${DU_DIM} + ${DU_DIM} / 50`" # Just 2% more to be sure, need something more sophistcated here...
-dd if=/dev/zero of=binary.img bs=1024k count=${REAL_DIM}
+dd if=/dev/zero of=chroot/binary.img bs=1024k count=${REAL_DIM}
FREELO="`${LH_LOSETUP} -f`"
if [ ! -b chroot/${FREELO} ]
then
@@ -90,55 +90,60 @@
fi
echo "!!! The following error/warning messages can be ignored !!!"
-lh_losetup $FREELO binary.img 0
+lh_losetup $FREELO chroot/binary.img 0
Chroot "parted -s ${FREELO} mklabel msdos" || true
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
-case "${LIVE_BOOTLOADER}" in
- grub)
- ${LH_ROOT_COMMAND} mount ${FREELO} binary.tmp
- cd binary.tmp
+if [ "${LIVE_BOOTLOADER}" = "syslinux" ]
+then
+ cat chroot/usr/lib/syslinux/mbr.bin > ${FREELO}
+fi
- call_grub()
- {
+${LH_LOSETUP} -d ${FREELO}
+FREELO="`${LH_LOSETUP} -f`"
+lh_losetup $FREELO chroot/binary.img 1
+Chroot " mkfs.vfat -F 16 -n DEBIAN_LIVE ${FREELO}"
+mkdir -p chroot/binary.tmp
+${LH_ROOT_COMMAND} mount ${FREELO} chroot/binary.tmp
+cp -r binary/* chroot/binary.tmp
+
+FIXME()
+{
+if [ "${LIVE_BOOTLOADER}" = "grub" ]
+then
+
+cat > chroot/grub.sh << EOF
+cd binary.tmp
grub --batch << EOM
-find /boot/vmlinuz
+find /live/vmlinuz
EOM
+EOF
- }
+ rootpartition="`Chroot 'sh grub.sh' 2>/dev/null | grep -A 1 'find /live/vmlinuz' | grep -v 'find /live/vmlinuz'`"
+ usbdev="`echo $rootpartition | sed -e 's/,[[:digit:]]//'`"
+ echo "Root partition is $rootpartition, device is: $usbdev"
- rootpartition="`call_grub 2>/dev/null | grep -A 1 'find /boot/vmlinuz' | grep -v 'find /boot/vmlinuz'`"
- usbdev="`echo $rootpartition | sed -e 's/,[[:digit:]]//'`"
- echo "Root partition is $rootpartition, device is: $usbdev"
+ echo "WAITING..." && read
+#cat > chroot/grub.sh << EOF
#grub --batch << EOM
#root $rootpartition
#setup $usbdev
#EOM
+#EOF
- cd "${OLDPWD}"
- ${LH_ROOT_COMMAND} umount binary.tmp
- ;;
+#Chroot "sh grub.sh"
- syslinux)
- cat chroot/usr/lib/syslinux/mbr.bin > ${FREELO}
- ;;
-esac
+ rm -f chroot/grub.sh
+fi
+}
-${LH_LOSETUP} -d ${FREELO}
+${LH_ROOT_COMMAND} umount chroot/binary.tmp
+rmdir chroot/binary.tmp
-FREELO="`${LH_LOSETUP} -f`"
-lh_losetup $FREELO binary.img 1
-Chroot " mkfs.vfat -F 16 -n DEBIAN_LIVE ${FREELO}"
-mkdir -p binary.tmp
-${LH_ROOT_COMMAND} mount ${FREELO} binary.tmp
-cp -r binary/* binary.tmp
-${LH_ROOT_COMMAND} umount binary.tmp
-rmdir binary.tmp
-
if [ "${LIVE_BOOTLOADER}" = "syslinux" ]
then
Chroot "syslinux ${FREELO}"
@@ -146,16 +151,6 @@
${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}" ]
@@ -164,6 +159,8 @@
mv chroot/dev.tmp chroot/dev
fi
+mv chroot/binary.img ./
+
# Removing depends
Remove_package
Modified: dists/trunk/live-helper/helpers/lh_clean
===================================================================
--- dists/trunk/live-helper/helpers/lh_clean 2007-06-13 14:23:31 UTC (rev 2075)
+++ dists/trunk/live-helper/helpers/lh_clean 2007-06-13 19:06:24 UTC (rev 2076)
@@ -73,10 +73,11 @@
;;
binary)
+ ${LH_ROOT_COMMAND} umount -f binary.tmp > /dev/null 2>&1 || true
+ rm -rf binary.tmp
rm -f binary.iso
rm -f binary.img
rm -f binary*.tar.gz
- rm -f packages.txt
rm -rf binary
rm -rf tftpboot
More information about the Debian-live-changes
mailing list