bug-xorriso
[Top][All Lists]
Advanced

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

Re: [Bug-xorriso] Test Proposal for [bug #46716] Protective MBR partitio


From: Thomas Schmitt
Subject: Re: [Bug-xorriso] Test Proposal for [bug #46716] Protective MBR partition is not marked as bootable
Date: Sun, 27 Dec 2015 21:35:09 +0100

Hi,

i made a man-in-the-middle script which can be handed to
grub-mkrescue as "xorriso" and changes the normal arguments to
those for the mjg layout.

To be downloaded as neighbor of a readily built and executable
GNU xorriso

  cd .../xorriso-1.4.3/frontend/
  wget 
http://libburnia-project.org/browser/libisoburn/trunk/frontend/grub-mkrescue-sed.sh?format=txt
  chmod u+x grub-mkrescue-sed.sh

To be used as

  mkdir minimal
  touch minimal/empty-file.txt

  grub-mkrescue -o output.iso minimal \
       --xorriso=.../xorriso-1.4.3/frontend/grub-mkrescue-sed.sh

The script has two adjustable parameters, by which one can vary
ESP partition number and start of partition 1 if not ESP.

  # First argument of -append_partition
  partno=1

  # Replacement for option --protective-msdos-label
  protective="--protective-msdos-label"

Interesting alternative values are partno=2 and protective="".

The decisive sed expressions are

  s/-efi-boot-part --efi-boot-image/-no-pad -append_partition $partno 0xef 
\/tmp\/$(basename "$dir")\/efi.img/

Variable $dir is the /tmp/... directory with the files. The script
relies on the fact that this path is the next argument after "-r".
Option -no-pad saves 300 KiB of unnecessary zeros before ESP.

  s/--efi-boot efi\.img/-eltorito-alt-boot -e efi.img -no-emul-boot 
-isohybrid-gpt-basdat/

The option --efi-boot isolates efi.img from any modifying
options. I rather switch manually to the next boot image and use
-e with -no-emul-boot. So i can add -isohybrid-gpt-basdat.

  -e "s/--protective-msdos-label/$protective/"

This one shall remove --protective-msdos-label if desired.


I made my tests with Debian Sid's grub-mkrescue.
Most vulnerable to differences is the determination of $dir.
Set in the script debug=yes to get shown what grub-mkrescue
uses as arguments.


Have a nice day :)

Thomas
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]