[Debian-live-changes] r2075 - dists/trunk/live-helper/helpers

daniel at alioth.debian.org daniel at alioth.debian.org
Wed Jun 13 14:23:31 UTC 2007


Author: daniel
Date: 2007-06-13 14:23:31 +0000 (Wed, 13 Jun 2007)
New Revision: 2075

Modified:
   dists/trunk/live-helper/helpers/lh_binary_usb-hdd
Log:


Modified: dists/trunk/live-helper/helpers/lh_binary_usb-hdd
===================================================================
--- dists/trunk/live-helper/helpers/lh_binary_usb-hdd	2007-06-13 13:17:32 UTC (rev 2074)
+++ dists/trunk/live-helper/helpers/lh_binary_usb-hdd	2007-06-13 14:23:31 UTC (rev 2075)
@@ -98,15 +98,29 @@
 
 case "${LIVE_BOOTLOADER}" in
 	grub)
-		#echo "(hd0) ${FREELO}" > binary/boot/grub/device.map
-#grub --batch --no-floppy --device-map=binary/boot/grub/device.map << EOF
-#setup --stage1=binary/boot/grub/stage1 --stage2=binary/boot/grub/stage2 --prefix=/boot/grub (hd0)
-#
-#quit
-#EOF
-		#rm -f binary/boot/grub/device.map
+		${LH_ROOT_COMMAND} mount ${FREELO} binary.tmp
+		cd binary.tmp
 
-		#Chroot "grub-install --no-floppy --root-directory=/ (hd0)"
+		call_grub()
+		{
+
+grub --batch << EOM
+find /boot/vmlinuz
+EOM
+
+		}
+
+		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"
+
+#grub --batch << EOM
+#root $rootpartition
+#setup $usbdev
+#EOM
+
+		cd "${OLDPWD}"
+		${LH_ROOT_COMMAND} umount binary.tmp
 		;;
 
 	syslinux)




More information about the Debian-live-changes mailing list