[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-xorriso] bootspec grub2_mbr broken
From: |
Thomas Schmitt |
Subject: |
Re: [Bug-xorriso] bootspec grub2_mbr broken |
Date: |
Fri, 04 Apr 2014 15:21:28 +0200 |
Hi,
> xorriso : FAILURE : Unrecognized keyword with -boot_image grub grub2_mbr=on
> xorriso : HINT : Allowed with grub2_mbr= are: off , on
Ouch !
> But, when seeing this error no one should have been able to use this
> option before. Is it supposed to work? ;)
The feature works inside grub-mkrescue because xorriso is used there
via its mkisofs emulation:
xorriso -as mkisofs ...lotsa.options ... --grub2-mbr disk_path ...more...
> Here the string comparisions are wrong:
> strcmp(treatpt + 9, "off")
It should not care for "on" or "off" at all. It should take a file path.
The mistake is more fundamental. It looks like there was an older plan
of me and GRUB2 developer Vladimir Serbinenko. We changed it later
but i forgot to change the code in xorriso command -boot_image.
Vladimir tested the feature via the emulation code in xorriso/emulators.c
} else if(strcmp(argpt, "--embedded-boot")==0 ||
strcmp(argpt, "-generic-boot")==0 ||
strcmp(argpt, "-G") == 0 ||
strcmp(argpt, "-isohybrid-mbr") == 0 ||
strcmp(argpt, "--grub2-mbr") == 0) {
...
ret= Xorriso_set_system_area_path(xorriso, argv[i], 0);
...
else if(strcmp(argpt, "--grub2-mbr") == 0)
xorriso->system_area_options=
(xorriso->system_area_options & ~2) | 0x4000;
This is what
-boot_image grub grub2_mbr=...path...
should do (and what is described in man xorriso).
Thank you for testing and reporting.
I will send a mail when the code is corrected.
Have a nice day :)
Thomas