grub-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] search -d|--disk


From: Arthur Marsh
Subject: Re: [PATCH] search -d|--disk
Date: Wed, 24 Jun 2009 12:33:52 +0930
User-agent: Mozilla-Thunderbird 2.0.0.19 (X11/20090103)

Robert Millan wrote, on 24/06/09 07:25:
On Tue, Jun 23, 2009 at 05:17:22PM -0400, Pavel Roskin wrote:
QEMU has a feature in which you can specify the boot drive from command
line (-boot parameter).  After i386-qemu port is merged, I plan to add
some code to read this from CMOS and export it to some variable.

When on GRUB, it is up to the user to decide what "boot this drive" means.
An interesting option is to search for a specific file in the disk we're told,
and then act upon it (e.g. configfile /grub.cfg, multiboot /grub.elf,
linux /vmlinuz, whatever).
I think the convention is to load the first sector of the disk.

That's the BIOS convention, which is useful when there's a BIOS.  Otherwise
there isn't much you can do with 512 bytes of code.

Maybe we could pass
environment variables using some qemu facility.

Yes, qemu exports -boot parameter to CMOS, just like memory size.  GRUB can
read it from there.

I implemented it only for files.  It's trivial to do it for labels/uuids
too, but it's annoying because doing so results in code duplication.
Yes, it's annoying, but partial implementations are annoying to the end users.

Perhaps it should be possible to implement disk filtering using the
mechanism used to skip floppies.

I'll see what I can do.


Please cc: me when this patch is merged - I'd like to get to the bottom of why:

search --no-floppy --fs-uuid --set bfdeb6d6-0b77-4beb-a63d-bdc3e455b8ea

fails. (See https://savannah.gnu.org/bugs/?26834 )

Being able to only search the correct disk (and produce meaningful debugging output) would help find the source of this problem which prevents automatic booting with GRUB2.

Regards,

Arthur.





reply via email to

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