help-grub
[Top][All Lists]
Advanced

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

Fw: "search" and "appleloader" commands missing in Grub 2.00~beta0 for E


From: Jake Thomas
Subject: Fw: "search" and "appleloader" commands missing in Grub 2.00~beta0 for EFI
Date: Wed, 21 Mar 2012 23:22:20 -0700 (PDT)

Sorry about forgetting to hit the "switch to plain text" button. It's difficult 
to remember when it doesn't matter for most e-mails.
I caught my message bearing some "stylish" question marks in the mailing list. 
Hopefully this will make it more readable.



----- Forwarded Message -----
From: Jake Thomas <address@hidden>
To: "address@hidden" <address@hidden> 
Sent: Wednesday, March 21, 2012 11:14 PM
Subject: Re: "search" and "appleloader" commands missing in Grub 2.00~beta0 for 
EFI


Again, I would have liked to respond earlier, but got swamped with homework.

I am struggling with this one. I can't get the architecture of modules I want 
onto the thumb drive in a way in which
Grub will take them.


I downloaded the Grub source code via bzr today (March 21, 2012). I saved the 
grub folder placed in my home directory
via bzr to be untained and renamed it grub_fresh_from_bzr_(unconfigured) . I 
copied this three times to make 

grub_32_EFI, grub_64_EFI, and grub_BIOS .

I opened up three terminals and cd'ed to each of those three (excluding the one 
to remain untainted), and ran
./autogen.sh on each.


For the BIOS one I ran: 
    ./configure --disable-werror --enable-cache-stats --enable-device-mapper


For the 64-bit EFI one I ran:
    ./configure --disable-werror --enable-cache-stats --enable-device-mapper 
--with-platform=efi --target=x86_64 --program-prefix=""

For the 32-bit EFI one I ran:
     ./configure --disable-werror --enable-cache-stats --enable-device-mapper 
--with-platform=efi --target=i386 --program-prefix=""

Then I ran make on each and then "make install" only on the BIOS one.



After realising the presence of a stealth underscore not shown by Nautilus, 
running:
     sudo grub-install --root-directory=/media/SPAACE_ /dev/sdb


installed BIOS Grub to my thumb drive just fine.

It is GPT-structured (no hybrid MBR) and has a BIOS boot partition. It has 
eight partitions. Go gdisk.


I also have a dedicated EFI System Partition on the thumb drive (ESP) marked as 
such by the EF01 partition type
in the GPT. There is only on ESP on the thumb drive and it is formated as FAT16.


Things went south when I tried to install Grub for x86_64-efi and Grub for 
i386-efi on the thumb drive.

This consists of placing BOOTIA32.EFI and BOOTX64.EFI in at /efi/boot on the 
ESP and putting the modules for those two architectures also
on the ESP, one architecture in one folder and one in the other. I'm doing 
/boot/grub/x86_64-efi and /boot/grub/x86_32-efi for the two folders (prefixes).

Running: 

    sudo ./grub-install --boot-directory=/media/esp/boot/grub/x86_64-efi 
--removable /dev/sdg

        from where I compiled Grub for x86_64-efi placed a grub folder in 
/media/esp/boot/grub/x86_64-efi and in there
        a "fonts" folder, an "i386-pc" folder, a "locale" folder, a "themes" 
folder and a "grubenv" file.

    Well, what's up with the i386-pc folder? I want x86_64-efi. The modules in 
the i386-pc folder are the wrong architecture for
Grub when I boot into a 64-bit EFI machine (my MacBook). I specifically 
specified "x86_64" and "efi" after ./configure, so I'm baffled

why it even has i386-pc anything.


    I noticed that grub-install has a "--target" option. That sounded 
promising. It wasn't.


    I tried "--target=x86_64-efi", "--target=x64-efi", "--target=EFI", and a 
bunch of other things that came to mind.

    Where is the infinitive list of possible targets for this? I looked in "man 
grub-install", "info grub-install", "grub-install --help", and
"./configure --help", and didn't see it anywhere in any of them. But I could 
have sworn that one time in a day gone by I saw a list of them somewhere.



  Each time I tried to specify the target as 64 bit and EFI, it yeilded:
        source_dir doesn't exist. Please specify --target or --directory

   But when I did "--target=i386-pc", that did work. Not helpful, but it worked.

    So I tried manually copying *.mod and *.lst from the grub-core directory to 
/boot/grub/x86_64-efi. They had different md5s from the
ones in the 32-bit EFI counterpart folder, so I was hopeful that those would be 
the right architecture.

    When I boot with the manually copied-over ones, it says it can't find most 
of the modules I tell it to insert, even when I provide a path to them.

    Weirdly, when I said "insmod search" it said something like 
"search_label.mod" not found. Well I didn't ask for "search_label.mod". I asked
for search.mod. And according to ls, search.mod and search_label.mod were both 
there anyways.

And never did grub-install make an EFI bootable image. I mounted the thumb 
drive's ESP to /boot/efi, efi/boot, 

tried "sudo mount --bind [where it was] [where I thought it would have a better 
chance]", and none of that got it to make an image.

I had to make the images myself.

I made the images with:


     ../grub-mkimage -d . -o BOOTIA32.EFI -O i386-efi -p 
"/boot/grub/x86_32-efi" part_gpt part_msdos fat ext2 normal chain linux boot 
configfile multiboot

and:

    ../grub-mkimage -d . -o BOOTX64.EFI -O x86_64-efi -p 
"/boot/grub/x86_64-efi" part_gpt part_msdos fat ext2 normal chain linux boot 
configfile multiboot



So, in summary, how do I get Grub x86_64-efi and Grub i386-efi on the thumb 
drive?

You people have been good help before, thank you. That darn underscore. Jordan, 
you're good.

Jake           



reply via email to

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