mirror of
https://git.proxmox.com/git/grub2
synced 2025-07-27 06:30:35 +00:00
Add grub-mkrescue patch from Thomas Schmitt to allow reducing the size
of xorriso-created images. Use this to ensure that grub-rescue-floppy.img fits well within size limits (closes: #548320).
This commit is contained in:
parent
435338fe74
commit
0bf6faa1b2
3
debian/changelog
vendored
3
debian/changelog
vendored
@ -27,6 +27,9 @@ grub2 (1.98+20100602-1) UNRELEASED; urgency=low
|
|||||||
installation media etc., without having to build-depend on grub-pc which
|
installation media etc., without having to build-depend on grub-pc which
|
||||||
isn't coinstallable with other platform variants and does invasive
|
isn't coinstallable with other platform variants and does invasive
|
||||||
things in its postinst.
|
things in its postinst.
|
||||||
|
* Add grub-mkrescue patch from Thomas Schmitt to allow reducing the size
|
||||||
|
of xorriso-created images. Use this to ensure that
|
||||||
|
grub-rescue-floppy.img fits well within size limits (closes: #548320).
|
||||||
|
|
||||||
-- Colin Watson <cjwatson@debian.org> Tue, 01 Jun 2010 15:54:54 +0100
|
-- Colin Watson <cjwatson@debian.org> Tue, 01 Jun 2010 15:54:54 +0100
|
||||||
|
|
||||||
|
1
debian/grub-rescue-pc.links
vendored
1
debian/grub-rescue-pc.links
vendored
@ -1,4 +1,3 @@
|
|||||||
# Truth would be uselessly confusing for users. Let's give 'em what they
|
# Truth would be uselessly confusing for users. Let's give 'em what they
|
||||||
# wanted instead.
|
# wanted instead.
|
||||||
usr/lib/grub-rescue/grub-rescue-cdrom.iso usr/lib/grub-rescue/grub-rescue-usb.img
|
usr/lib/grub-rescue/grub-rescue-cdrom.iso usr/lib/grub-rescue/grub-rescue-usb.img
|
||||||
usr/lib/grub-rescue/grub-rescue-cdrom.iso usr/lib/grub-rescue/grub-rescue-floppy.img
|
|
||||||
|
58
debian/patches/909_mkrescue_diet.diff
vendored
Normal file
58
debian/patches/909_mkrescue_diet.diff
vendored
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
Description: Allow reducing size of xorriso-created rescue images
|
||||||
|
This lets us create smaller images that will fit on floppy disks. It has
|
||||||
|
been approved by the upstream maintainer but has not yet been applied.
|
||||||
|
Author: Thomas Schmitt <scdbackup@gmx.net>
|
||||||
|
Origin: other, http://lists.gnu.org/archive/html/grub-devel/2010-05/msg00100.html
|
||||||
|
Forwarded: yes
|
||||||
|
Last-Update: 2010-06-02
|
||||||
|
|
||||||
|
Index: b/util/grub-mkrescue.in
|
||||||
|
===================================================================
|
||||||
|
--- a/util/grub-mkrescue.in
|
||||||
|
+++ b/util/grub-mkrescue.in
|
||||||
|
@@ -40,6 +40,9 @@
|
||||||
|
override_dir=
|
||||||
|
grub_mkimage=${bindir}/`echo grub-mkimage | sed ${transform}`
|
||||||
|
|
||||||
|
+xorriso=xorriso
|
||||||
|
+diet=no
|
||||||
|
+
|
||||||
|
# Usage: usage
|
||||||
|
# Print the usage.
|
||||||
|
usage () {
|
||||||
|
@@ -53,6 +56,8 @@
|
||||||
|
--modules=MODULES pre-load specified modules MODULES
|
||||||
|
--rom-directory=DIR save rom images in DIR [optional]
|
||||||
|
--grub-mkimage=FILE use FILE as grub-mkimage
|
||||||
|
+ --xorriso=PROGFILE use PROGFILE as xorriso program [optional]
|
||||||
|
+ --diet apply size reducing measures [optional]
|
||||||
|
|
||||||
|
$0 generates a bootable rescue image with specified source files or directories.
|
||||||
|
|
||||||
|
@@ -83,6 +88,10 @@
|
||||||
|
;;
|
||||||
|
--grub-mkimage=*)
|
||||||
|
grub_mkimage=`echo "$option" | sed 's/--grub-mkimage=//'` ;;
|
||||||
|
+ --xorriso=*)
|
||||||
|
+ xorriso=`echo "${option}/" | sed 's/--xorriso=//'` ;;
|
||||||
|
+ --diet)
|
||||||
|
+ diet=yes ;;
|
||||||
|
-*)
|
||||||
|
echo "Unrecognized option \`$option'" 1>&2
|
||||||
|
usage
|
||||||
|
@@ -267,7 +276,14 @@
|
||||||
|
fi
|
||||||
|
|
||||||
|
# build iso image
|
||||||
|
-xorriso -pathspecs on -as mkisofs ${grub_mkisofs_arguments} --protective-msdos-label -o ${output_image} -r ${iso9660_dir} ${source}
|
||||||
|
+if [ "${diet}" = yes ]; then
|
||||||
|
+ if [ -e "${output_image}" ]; then
|
||||||
|
+ rm "${output_image}" || exit 1
|
||||||
|
+ fi
|
||||||
|
+ "${xorriso}" -report_about HINT -as mkisofs -graft-points -no-pad ${grub_mkisofs_arguments} --protective-msdos-label -r ${iso9660_dir} ${source} | cat >"${output_image}"
|
||||||
|
+else
|
||||||
|
+ "${xorriso}" -report_about HINT -as mkisofs -graft-points ${grub_mkisofs_arguments} --protective-msdos-label -o "${output_image}" -r ${iso9660_dir} ${source}
|
||||||
|
+fi
|
||||||
|
rm -rf ${iso9660_dir}
|
||||||
|
|
||||||
|
rm -f ${embed_img}
|
1
debian/patches/series
vendored
1
debian/patches/series
vendored
@ -7,3 +7,4 @@
|
|||||||
904_disable_floppies.diff
|
904_disable_floppies.diff
|
||||||
907_grub.cfg_400.diff
|
907_grub.cfg_400.diff
|
||||||
908_gfxpayload_keep_default.diff
|
908_gfxpayload_keep_default.diff
|
||||||
|
909_mkrescue_diet.diff
|
||||||
|
9
debian/rules
vendored
9
debian/rules
vendored
@ -114,12 +114,17 @@ build/stamps/build-grub-rescue-pc: build/stamps/build-grub-pc
|
|||||||
mkdir -p build/grub-rescue-pc/lib/grub
|
mkdir -p build/grub-rescue-pc/lib/grub
|
||||||
rm -rf build/grub-rescue-pc/lib/grub/i386-pc
|
rm -rf build/grub-rescue-pc/lib/grub/i386-pc
|
||||||
cp -a build/grub-pc build/grub-rescue-pc/lib/grub/i386-pc
|
cp -a build/grub-pc build/grub-rescue-pc/lib/grub/i386-pc
|
||||||
# save space, especially for floppy image
|
|
||||||
rm -rf build/grub-rescue-pc/lib/grub/i386-pc/po
|
|
||||||
$(CURDIR)/build/grub-rescue-pc/grub-mkrescue \
|
$(CURDIR)/build/grub-rescue-pc/grub-mkrescue \
|
||||||
--grub-mkimage=$(CURDIR)/build/grub-pc/grub-mkimage \
|
--grub-mkimage=$(CURDIR)/build/grub-pc/grub-mkimage \
|
||||||
--output=$(CURDIR)/build/grub-rescue-pc/grub-rescue-cdrom.iso \
|
--output=$(CURDIR)/build/grub-rescue-pc/grub-rescue-cdrom.iso \
|
||||||
$(CURDIR)/build/grub-rescue-pc/rescue-disk
|
$(CURDIR)/build/grub-rescue-pc/rescue-disk
|
||||||
|
# save space for floppy image
|
||||||
|
rm -rf build/grub-rescue-pc/lib/grub/i386-pc/po
|
||||||
|
$(CURDIR)/build/grub-rescue-pc/grub-mkrescue \
|
||||||
|
--grub-mkimage=$(CURDIR)/build/grub-pc/grub-mkimage \
|
||||||
|
--output=$(CURDIR)/build/grub-rescue-pc/grub-rescue-floppy.img \
|
||||||
|
--diet \
|
||||||
|
$(CURDIR)/build/grub-rescue-pc/rescue-disk
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
install/grub-pc install/grub-efi-ia32 install/grub-efi-amd64 install/grub-ieee1275 install/grub-coreboot install/grub-emu install/grub-yeeloong::
|
install/grub-pc install/grub-efi-ia32 install/grub-efi-amd64 install/grub-ieee1275 install/grub-coreboot install/grub-emu install/grub-yeeloong::
|
||||||
|
Loading…
Reference in New Issue
Block a user