help-grub
[Top][All Lists]
Advanced

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

Re: grub-mkimage


From: Glenn Washburn
Subject: Re: grub-mkimage
Date: Wed, 9 Feb 2022 21:33:21 -0600

On Wed, 26 Jan 2022 10:34:28 +0100
Pascal <patatetom@gmail.com> wrote:

> hi,
> 
> thank you Andrei for taking the time to read and answer me.
> 
> I try to reduce the space taken by GRUB as much as possible.
> this way, I only have the bootloader and a basic configuration file :
> 
> # ll -h /run/live/bootmnt/efi/boot/bootx64.efi
> -rwxr-xr-x 1 root root 584K 26 janv. 07:46
> /run/live/bootmnt/efi/boot/bootx64.efi
> 
> # cat /run/live/bootmnt/efi/menu.cfg
> menuentry MyLiveSystem {
> linux /boot/kernel ...
> initrd /boot/initramfs
> }
> 
> I tried to remove efi_gop and efi_uga but I always get (at least with Qemu)
> the following error message :
> 
> error: no suitable video mode found.
> Booting in blind mode
> 
> adding video and/or video_fb modules (which are required/used by efi_*
> modules) does not change anything.
> 
> I tried to use grub-mkstandalone but I fail to generate a bootloader that
> works as simply as my tiny one.
> here is the command used :
> 
> grub-mkstandalone \
>    --disable-shim-lock \
>    --fonts="" --locales="" --themes="" \
>    --modules="linux normal minicmd gzio efi_uga efi_gop fat part_gpt chain"
> \
>    -o /run/live/bootmnt/efi/boot/test.efi \
>    -O x86_64-efi \
>    "boot/grub/grub.cfg=/run/live/bootmnt/efi/menu.cfg"
> 
> as root and prefix use (memdisk), I get the following error message :
> 
> error: file `/boot/kernel' not found.
> 
> only the cmdpath variable refers to my disk with (hd0,gpt2)/efi/boot.
> it works once the root variable is manually set to (hd0,gpt2) (but not with
> (,gpt2)).
> 
> as you are involved in the development of GRUB, I have a small remark about
> grub-mkstandalone : the SOURCE parameter is not discussed in its man page
> apart from the general presentation (eg. invocation).
> I found my last parameter ("boot/grub/grub.cfg=...") on the internet : what
> more information/option can be passed ? prefix may be ?

If you run "grub-mkstandalone --help", you'll see a line at the bottom
saying "Graft point syntax (E.g. /boot/grub/grub.cfg=./grub.cfg) is
accepted". This could proabably be worded better and perhaps more
detailed. However, "graft-point" syntax is FROM=TO where FROM is a path
valid in the host (the one running grub-mkstandalone) and TO is what
the files path should be in the memdisk. If the source argument has no
equal sign, then it treated as SOURCE=SOURCE. As fas as I can tell
that's all that SOURCE is, a list of such arguments.

What kind of prefix are you looking for?

It would be great if you had any ideas on how to make the documentation
more clear or better in some way. If you have some explicit feedback,
please let me/us know. And even better, documentation patches welcome!

> 
> a last question (for today ;-)) to which I did not find an answer : is it
> possible to switch the bootloader to verbose mode ?

If you set the debug variable to "all" (eg. "set debug=all"), then you
turn on all debugging messages. This may be what you're looking for.

Glenn



reply via email to

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