[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[PATCH] support for newer grub-common package



Hello,

Please accept this simple patch that fixes building ISOs using grub2.
A recent change in grub-common pachage, see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=584415, has mandated the use of a destination format in calls to grub-mkimage, parameter that was not previously supported.

The attached patch checks if the new format specifier is supported and calls grub-mkimage accordingly.

Thanks for considering.

Luigi
--- a/lb_binary_iso	2011-01-14 17:40:25.890057002 +0100
+++ b/lb_binary_iso	2011-01-14 17:44:24.518057002 +0100
@@ -163,7 +163,14 @@
 
 # build core.img
 core_img=\$(mktemp)
+
+# first version requiring -O is 1.98+20100527
+# see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=584415
+if [ "$(grub-mkimage --help | grep '\-O')" ]; then
+    grub-mkimage -d \${input_dir} -o \${core_img} -O i386-pc biosdisk iso9660
+else
 grub-mkimage -d \${input_dir} -o \${core_img} biosdisk iso9660
+fi
 
 # build grub_eltorito image
 cat \${input_dir}/cdboot.img \${core_img} > binary/boot/grub/grub_eltorito

Reply to: