[Top][All Lists]

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

Re: Chainload grub2 to grub-legacy on ahci / efi.

From: Stéphan Gorget
Subject: Re: Chainload grub2 to grub-legacy on ahci / efi.
Date: Thu, 29 Oct 2015 10:49:27 +0000

On Tue, Aug 25, 2015 at 11:18 PM, Stéphan Gorget <address@hidden> wrote:
> Hello,
> I tried to chainload grub-legacy from grub2 using efi. I have the
> following setup
> (ahci0,gpt1) - vfat - just the efi file at that place :
> /efi/redhat/grub.efi  (/boot/efi)
> (ahci0,gpt2) - ext* - kernel and grub
>         (/boot)
> (ahci0,gpt3) - ext* - Linux FS
>         (/)
> I noticed that none of the device is detected as efidisk and they all
> have the device id GRUB_DISK_DEVICE_ATA_ID, furthermore when I put
> debug=all I can clearly see that it does not use the efidisk code
> path.
> I define root and prefix and try to chainload the grub.efi. However
> whatever I do it end up saying "Not a valid root device". BTW
> chainloading on the same setup but on BIOS works just fine, even
> though I know it's a different story.
> I also know I can just start the kernel from there and it works but I
> would rather chainload. I can also just bail out and leave the boot
> order fallback to disk, but I would like to avoid that also.
> To put into context the grub2-git-version I am testing from is loaded
> via network on an ipv6-only network and I want to use grub2 to replace
> any pxe/ipxe/gpxe in order to simplify the decision making to just
> boot local or start an imaging process.
> I am pretty new to Grub and low level debugging, so maybe I am missing
> something obvious or I am just trying to do something that it is not
> designed for. Any help would be appreciated.
> Stéphan

Answering my own question some modules were conflicting, and I was
seeing ahci or ata depending on what I was loading. To make it work
nicely I included the following list of modules in the image (same
list as the one used on the fedora package) :

all_video boot btrfs cat chain configfile echo efifwsetup efinet ext2
fat font gfxmenu gfxterm gzio halt hfsplus iso9660 jpeg linux linux16
loadenv loopback lvm mdraid09 mdraid1x minicmd normal part_apple
part_gpt part_msdos password_pbkdf2 png reboot search search_fs_file
search_fs_uuid search_label serial sleep syslinuxcfg test tftp video

And then I was able to chainload grub-legacy EFI binary using the
following command :

search -s root -n -f /efi/redhat/grub.efi
set prefix=(${root})/efi/redhat
chainloader ${prefix}/grub.efi

I hope this can be helpful to someone one day.


reply via email to

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