On 05/03/2016 11:56 PM, Andrei Borzenkov wrote:
04.05.2016 06:49, SevenBits пишет:
On Tuesday, May 3, 2016, Andrei Borzenkov <address@hidden> wrote:
04.05.2016 06:34, SevenBits пишет:
On Tuesday, May 3, 2016, Andrei Borzenkov <address@hidden
04.05.2016 03:57, SevenBits пишет:
I used this command to create a bootable GRUB UEFI image:
../grub-mkstandalone -d . -o ~/Desktop/boot.efi --format=x86_64-efi
--grub-mkimage=../grub-mkimage --install-modules="boot linux ext2
configfile lspci ls help echo fat exfat hfs hfsplus part_msdos
part_apple terminal sleep loopback normal fixvideo iso9660 loadbios
Unfortunately, I have accidentally erased the grub.cfg file
in this command and I (stupidly) did not include it in source
my rest of my project.
Is there a way to extract this GRUB configuration file from a built
image? In other words, if I have an image that was built with
command, can I extract the configuration file from it?
You can take https://github.com/arvidjaar/bootinfoscript as
extract GRUB modules parsing. Modules are in "mods" section of
image. I actually started with standalone script to do it, but
enough incentive to finish.
How exactly does this script work? Do I call it on my GRUB image?
Did you try to read README before asking?
I can't access GitHub right now, which is why I asked. I'll check
BIS scans system for known bootloaders and bootloader related files. It
is intended x86 systems with legacy boot (or, better - nobody tried it
somewhere else). For supported bootloader it tries to parse binaries and
display some more information.
It has rudimentary support for EFI, but here the problem starts with
simple fact that we have no way to even detect GRUB image - it may be
stored under any name and located practically anywhere.
So, I've taken a look at the script, and while it appears to work, it
doesn't quite do what I need. The script scans my MBR, but I don't want
it to scan my MBR; I need to scan only *one* file that I have. Ideally,
I'd like to be able to pass the path of this file to the script.
In other words: I don't want to look at the system GRUB (which is using
legacy), but rather a specific GRUB EFI image on my hard drive.
Calling ./bootinfoscript -h gives the list of commands, but there isn't
any to specify the file to look at. Is there any way to accomplish this?
Can it actually extract files, or just list what files are
It does extract them during processing.
Help-grub mailing list