Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Grub2] How to install on a UEFI+GPT setup ?
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
d2_racing
Bodhisattva
Bodhisattva


Joined: 25 Apr 2005
Posts: 13047
Location: Ste-Foy,Canada

PostPosted: Sun Oct 07, 2012 3:26 pm    Post subject: [Grub2] How to install on a UEFI+GPT setup ? Reply with quote

Hi guys, I'm gonna have my new PC this week and I shock to see that I don't know how to install Grub2 yet on that new box.

I will have this box :

Code:

CPU : Core I7 3770 3.4 Gigs 8Meg Cache Socket 1155
http://www.intel.fr/content/www/fr/fr/benchmarks/desktop/3rd-gen-core-i7-3770.html

Board : Intel DZ77BH55K Z77 LGA1155 32 Gigs Max

http://www.intel.com/content/www/us/en/motherboards/desktop-motherboards/desktop-board-dz77bh-55k.html

Memory  : Kingston HyperX 16 Gig 1600 Mhz DDR3

SSD : Intel SSD 520 Series MLC 120 gigs

http://ark.intel.com/products/66248/Intel-SSD-520-Series-120GB-2_5in-SATA-6Gbs-25nm-MLC

SSD : Intel SSD 520 Series MLC 240 Gigs 520SSDSC2CW240A3K5

http://ark.intel.com/products/66250/Intel-SSD-520-Series-240GB-2_5in-SATA-6Gbs-25nm-MLC

Hard disk : WD Black 1TB

Burner : LG GH24NS90 24x

Video card  : Gigabyte GTX670 GV-N670OC-2GD 980Mhz 2Gigs de Mémoire GDDR5

http://www.newegg.ca/Product/Product.aspx?Item=N82E16814125423

Monitor : LG Flatron E2442T-BN 24''

http://www.ncix.ca/products/?sku=72571

Case : Antec Nine Hundred TWOV3

http://www.antec.com/product.php?id=2699&fid=4

Power Supply : OCZ ZX 850W 80+Gold

http://www.ocztechnology.com/ocz-zx-series-850w-power-supply.html


So right now, basically I don't understand how to install Grub2 on that setup.

http://wiki.gentoo.org/wiki/GRUB2#UEFI.2FGPT
http://dev.gentoo.org/~scarabeus/grub-2-guide.xml

I don't understand, what I need to do :

Do I need a 100 megs partition formatted VFAT as my /boot partition ?

Do I need a 32 megs partition for my EF02 partition type for the GPT stuff ?

Do I need a /boot partition for my kernels like a ext2 partition ?

Do I need to create a EFI flash driver with a Kernel on it ?

Help !!!!
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54033
Location: 56N 3W

PostPosted: Sun Oct 07, 2012 3:31 pm    Post subject: Reply with quote

d2_racing,

Recent kernels are EFI compliant. You don't need a bootloader at all.
Yes you need an EFI partition.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
d2_racing
Bodhisattva
Bodhisattva


Joined: 25 Apr 2005
Posts: 13047
Location: Ste-Foy,Canada

PostPosted: Sun Oct 07, 2012 3:35 pm    Post subject: Reply with quote

Ok then, my friend, just tell me how to install that then ?

I think my setup will be like this :

Code:

/boot ext2 as /dev/sda1

efi partition 32 megs as /dev/sda2

/ as /dev/sda3 btrfs with 100 gigs



So, basically I don't need a /boot/efi partition VFAT then ?

And the EFI USB stick that I need to create, I don't need that ?

I found that wiki too : https://wiki.archlinux.org/index.php/GRUB2#GPT_specific_instructions

Are these all outdated or what ?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54033
Location: 56N 3W

PostPosted: Sun Oct 07, 2012 3:47 pm    Post subject: Reply with quote

d2_racing,

Code:
less /usr/src/linux/Documentation/x86/efi-stub.txt

_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
d2_racing
Bodhisattva
Bodhisattva


Joined: 25 Apr 2005
Posts: 13047
Location: Ste-Foy,Canada

PostPosted: Sun Oct 07, 2012 5:01 pm    Post subject: Reply with quote

Ok, now I know that the kernel can boot directly the bzimage.efi

But, I would like to use Grub2 to boot my kernel instead of the bzimage.efi inside the EF02 partition FAT32 filesystem.

Finally, can I still use a /boot parititon or I will need to move my stuff to the EF02 ?

https://wiki.archlinux.org/index.php/Unified_Extensible_Firmware_Interface#Booting_an_OS_using_UEFI

https://wiki.archlinux.org/index.php/Unified_Extensible_Firmware_Interface#For_GPT_partitioned_disks
Back to top
View user's profile Send private message
platojones
Veteran
Veteran


Joined: 23 Oct 2002
Posts: 1602
Location: Just over the horizon

PostPosted: Sun Oct 07, 2012 5:19 pm    Post subject: Reply with quote

d2_racing wrote:
Ok, now I know that the kernel can boot directly the bzimage.efi

But, I would like to use Grub2 to boot my kernel instead of the bzimage.efi inside the EF02 partition FAT32 filesystem.

Finally, can I still use a /boot parititon or I will need to move my stuff to the EF02 ?

https://wiki.archlinux.org/index.php/Unified_Extensible_Firmware_Interface#Booting_an_OS_using_UEFI

https://wiki.archlinux.org/index.php/Unified_Extensible_Firmware_Interface#For_GPT_partitioned_disks


I have a dual boot setup, so I went with GRUB2 as well...it's not bad at all, once you get it set up.

Those 2 links you have there are really, really useful.

Here's my partition scheme...all set up as GPT using gdisk...I don't have and didn't need an EF02 partiton. Note that partitions 2 & 3 are Windoze only, so you won't need to worry about them. My linux /boot partition is partition 4 and my EFI boot partition (vfat) is partition 1:

Code:

GPT fdisk (gdisk) version 0.8.4

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.
Disk /dev/sda: 3907029168 sectors, 1.8 TiB
Logical sector size: 512 bytes
Disk identifier (GUID): 886607A1-ACEC-49FE-BBAE-D4B08C5E5130
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 3907029134
Partitions will be aligned on 2048-sector boundaries
Total free space is 1751156845 sectors (835.0 GiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048          206847   100.0 MiB   EF00  EFI system partition
   2          206848          468991   128.0 MiB   0C01  Microsoft reserved part
   3          468992      1048578047   499.8 GiB   0700  Basic data partition
   4      1048578048      1069549567   10.0 GiB    8300  Linux boot
   5      1069549568      2118125567   500.0 GiB   8300  Linux root
   6      2118125568      2134902783   8.0 GiB     8200  Linux swap
   7      2134902784      2155874303   10.0 GiB    8300  Recovery


Here's how my partition 1 and 4 look:

Code:

/dev/sda4      ext2      10321208     61188   9735732   1% /boot
/dev/sda1      vfat         98304     27439     70865  28% /boot/efi


This may or may not be the best scheme, but it all works.

I found the most difficult part of this process was getting a linux live cd that would boot up under EFI...which is essential. The only one I could get to work consistently for my motherboard was a USB stick with an ARCHBOOT image.
Back to top
View user's profile Send private message
d2_racing
Bodhisattva
Bodhisattva


Joined: 25 Apr 2005
Posts: 13047
Location: Ste-Foy,Canada

PostPosted: Sun Oct 07, 2012 5:58 pm    Post subject: Reply with quote

Ok platojones, I found that the latest SystemRescueCD has the possibility to boot in UEFI mode, I hope : http://www.sysresccd.org/Changes-x86

Beside having the

/dev/sda4 ext2 10321208 61188 9735732 1% /boot
/dev/sda1 vfat 98304 27439 70865 28% /boot/efi

How did you install Grub2 ?

Also, can you post your grub.cfg plz ?

Thanks !!
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Sun Oct 07, 2012 6:21 pm    Post subject: Reply with quote

A few tips I've gathered from doing this:

  • Get the EFI Shell program and make sure you can get that to run. It should go in "$EFI_MOUNT/efi/boot/bootx64.efi". This is a command line (actually a pretty horrible MS-DOS clone) that can start GRUB2 or a kernel from the EFI partition if your normal boot sequence breaks. Watch out as there's two different versions of it for different versions of EFI.
  • GRUB2 is pretty awkward to install and you need to get the cmdline switches exactly right. Use sys-boot/efibootmgr to see if it's added itself to the firmware boot list.
  • If you're using GRUB then you don't need a kernel in the EFI partition, but it's a good idea to keep a working one around as a rescue method.
Back to top
View user's profile Send private message
platojones
Veteran
Veteran


Joined: 23 Oct 2002
Posts: 1602
Location: Just over the horizon

PostPosted: Sun Oct 07, 2012 6:27 pm    Post subject: Reply with quote

d2_racing wrote:
Ok platojones, I found that the latest SystemRescueCD has the possibility to boot in UEFI mode, I hope : http://www.sysresccd.org/Changes-x86

Beside having the

/dev/sda4 ext2 10321208 61188 9735732 1% /boot
/dev/sda1 vfat 98304 27439 70865 28% /boot/efi

How did you install Grub2 ?

Also, can you post your grub.cfg plz ?

Thanks !!


Yes, systemrescuecd does have the possibility to boot in UEFI...it didn't work for me for some reason, but it might work for you.

First, you really need to get your system booted up with a linux CD in UEFI mode...you can't go anywhere until you successfully do that...and it may or may not be easy.

You must confirm you are booted in UEFI mode by looking for /sys/firmware/efi/. If that efi directory is there and populated, you are in UEFI mode. If that directory isn't there, you may need to manually install the efivars kernel module. On some live cds, I had to do that...including the ARCHBOOT cd image I used.
Again, there is no way to install grub2 until you are in UEFI mode.

After that, it's pretty simple...just follow the instructions under the UEFI/GPT section of the GRUB2 wiki:

http://wiki.gentoo.org/wiki/GRUB2

Here's some general info on configuring grub, but really, it's pretty straightforward once you get past the initial step of booting up.

GRUB2 uses a generated grub.cfg now. User modifications are made to files in the /etc/grub.d directory with contains the menu entries and an /etc/defaults/grub config file. The /etc/defaults/grub is primarily for the more 'automated' configuration...which never worked for me. I manually created my own grub entries in /etc/grub.d. Here's my /etc/grub.d/15_gentoo file:

Code:

#!/bin/sh
exec tail -n +3 $0

menuentry "Gentoo Linux 3.6.0" {
        insmod part_gpt
        insmod search_fs_uuid
        search --fs-uuid --no-floppy --set=root 3c7036f8-eeb1-4bb2-9f07-4391efe6cb6f
        linux /bzImage-3.6.0-gentoo-x86_64 root=/dev/sda5
        initrd /initramfs-genkernel-x86_64-3.6.0-gentoo
}


There are other files in there, but I didn't touch them.

With these files, the grub2-mkconfig generates the final grub.cfg which get's installed in /boot/efi/EFI/GRUB2
Back to top
View user's profile Send private message
platojones
Veteran
Veteran


Joined: 23 Oct 2002
Posts: 1602
Location: Just over the horizon

PostPosted: Sun Oct 07, 2012 6:32 pm    Post subject: Reply with quote

Oh, another great set of instructions is here:

https://wiki.archlinux.org/index.php/GRUB2

That's the one I mostly followed.
Back to top
View user's profile Send private message
srs5694
Guru
Guru


Joined: 08 Mar 2004
Posts: 434
Location: Woonsocket, RI

PostPosted: Mon Oct 08, 2012 12:19 am    Post subject: Reply with quote

There are some good tips so far in this thread, but also some misconceptions and lack of important information. Some key issues:


  • Most modern x86-64 motherboards can boot in either (U)EFI mode or in BIOS mode. Thus, you can choose which you want to use. EFI-mode boots offer some minor advantages, such as (possibly) being a bit faster and the ability to boot without GRUB (which IMHO is a monstrosity); but EFI-mode booting is also very much a bleeding-edge technology. In the short run, if you're familiar with BIOS-mode setup and don't want to learn the EFI stuff quite yet, it's simpler to stick with a BIOS-mode installation. OTOH, the industry is moving to UEFI pretty rapidly these days, so sooner or later you'll have to learn it.
  • In gdisk, the partition type code EF00 refers to an EFI System Partition (ESP), which is a FAT partition that holds an arbitrary number of boot loaders, boot managers, EFI drivers, and other EFI software and configuration files. The type code EF02 refers to a BIOS Boot Partition, which is a storage area for raw code used to hold GRUB 2's second-stage boot loader.
  • The ESP should officially hold a FAT32 filesystem, although in practice FAT16 usually works, and occasionally it works better than FAT32. The EFI spec is mute on the subject of the ESP's size. Microsoft creates a 100 MiB ESP by default, and Apple creates one that's 200 MiB. My own recommendation is to size it somewhere between 100 MiB and 500 MiB, depending on how you intend to use it. Some boot loaders, such as the kernel's EFI stub loader and ELILO, require that the EFI be able to read the kernel and the initrd file. The easiest way to ensure that this is possible is to put these files on the ESP. Thus, if you use one of these boot loaders, a large (200 MiB or bigger) ESP is advisable, so that you've got room to store multiple kernels and initrds, especially if you multi-boot multiple distributions or over time as these files' sizes inevitably creep upward. OTOH, if you use GRUB to boot, it can read the kernel and initrd from another partition, so the ESP can be in the 100-200 MiB range.
  • In Linux, the ESP is conventionally mounted at /boot/efi; however, some users mount it elsewhere. Mounting it at /boot can be convenient, since kernels normally get stored at /boot, which automatically puts them on the ESP.
  • If you boot in BIOS mode, the BIOS Boot Partition can be quite small -- something like 32KiB worked at one time, although I hear some recent versions aren't happy with anything smaller than about 2 MiB.
  • If you're uncertain of which way you want to boot, you can always create both an ESP and a BIOS Boot Partition. That way, you can switch boot modes relatively easily. (Your Linux installation itself needs no changes to switch boot modes; you just need to switch the firmware's configuration and possibly install or update a boot loader.)
  • IMHO, GRUB 2 on EFI is the worst possible boot configuration. In my experience on three UEFI PCs and one Mac, GRUB 2 has been unreliable, flaky, and just generally awful. It often works initially but then starts failing to boot. Other times it doesn't work at all. IMHO, ELILO and Fedora's patched version of GRUB Legacy are both superior to GRUB 2, and the kernel's EFI stub loader is better still. See my Web page on the topic for more information about EFI boot loader options.
  • Installing an EFI shell program can be useful. It normally goes in the ESP's root directory as shellx64.efi or something similar, although this isn't really standardized. Some EFIs provide an option to launch the shell, but others don't. For the latter, either installing the shell as a boot loader (so that it appears in the firmware's boot menu) or adding it to another boot manager program (such as GRUB or rEFInd) can make it available. (In fact, rEFInd has an option specifically to launch an EFI shell.)
  • FWIW, I maintain rEFInd, which you might or might not want to use. I've designed it specifically to help manage Linux boots with the kernel's EFI stub loader; with the right options, simply installing a new kernel (and its matching initrd, if necessary) on the ESP or another partition that the EFI can read will make it bootable, with no configuration file changes for the new kernel required.
Back to top
View user's profile Send private message
d2_racing
Bodhisattva
Bodhisattva


Joined: 25 Apr 2005
Posts: 13047
Location: Ste-Foy,Canada

PostPosted: Mon Oct 08, 2012 3:00 am    Post subject: Reply with quote

Nice response srs5694, I gonna stick with the BIOS-mode, but I will create the EF00 partition and the EF02 partition too, just to be sure that in the future, I can stick with the method that I want.
Back to top
View user's profile Send private message
d2_racing
Bodhisattva
Bodhisattva


Joined: 25 Apr 2005
Posts: 13047
Location: Ste-Foy,Canada

PostPosted: Mon Oct 08, 2012 3:24 am    Post subject: Reply with quote

Do you know if these days, intel enable by default the UEFI stuff ?
Back to top
View user's profile Send private message
srs5694
Guru
Guru


Joined: 08 Mar 2004
Posts: 434
Location: Woonsocket, RI

PostPosted: Mon Oct 08, 2012 4:16 pm    Post subject: Reply with quote

d2_racing wrote:
Do you know if these days, intel enable by default the UEFI stuff ?


I don't know if EFI-mode booting is enabled with the default firmware settings, but I'm pretty sure that Intel has been shipping EFI-based motherboards for at least two or three years. I know I've got EFI support on an Intel motherboard that I bought at least two years ago. I recommend you read your manual to see what the options are. (Download the manual in PDF form and use a PDF viewer's search function to search for "EFI" and "legacy.") Find the EFI options on your actual computer and set them however you want. If you need specific advice on this, post information on the options your board has -- they vary greatly from one system to another, so it's impossible to offer general advice on how to set the options to achieve a particular goal.
Back to top
View user's profile Send private message
d2_racing
Bodhisattva
Bodhisattva


Joined: 25 Apr 2005
Posts: 13047
Location: Ste-Foy,Canada

PostPosted: Mon Oct 08, 2012 4:35 pm    Post subject: Reply with quote

The PC comes with Windows 7, so maybe it will come with the UEFI stuff enabled by default.
Back to top
View user's profile Send private message
89c51
Tux's lil' helper
Tux's lil' helper


Joined: 31 Dec 2005
Posts: 113
Location: Greece

PostPosted: Thu Oct 18, 2012 10:34 am    Post subject: Reply with quote

@d2_racing

Have you purchased this motherboard??? I have the same and it is a pain in many ways.

https://bugzilla.kernel.org/show_bug.cgi?id=47191

I also wasn't able to boot it with UEFI in firmwares>057. (Single boot Linux only)
Back to top
View user's profile Send private message
d2_racing
Bodhisattva
Bodhisattva


Joined: 25 Apr 2005
Posts: 13047
Location: Ste-Foy,Canada

PostPosted: Sat Nov 24, 2012 9:46 pm    Post subject: Reply with quote

Yes, I have the same.

I updated my UEFI from the intel website and I'm running vanilla-sources 3.6.7 without any problem.

By the way, anyone is able to boot with Grub2 inside a UEFI enviromnent right now ?

If so, can you post how you did it with Grub2, because right now, it's not working on my side.

Right now, I'm using the Legacy boot mode to boot my Linux, since my UEFI setup is not working.
Back to top
View user's profile Send private message
srs5694
Guru
Guru


Joined: 08 Mar 2004
Posts: 434
Location: Woonsocket, RI

PostPosted: Sun Nov 25, 2012 12:34 am    Post subject: Reply with quote

d2_racing wrote:
By the way, anyone is able to boot with Grub2 inside a UEFI enviromnent right now ?

If so, can you post how you did it with Grub2, because right now, it's not working on my side.

Right now, I'm using the Legacy boot mode to boot my Linux, since my UEFI setup is not working.


I've used GRUB in EFI mode, but it's not my preferred way of booting. The best GRUB instructions I know of are the Ubuntu wiki's UEFIBooting page (which used to be hosted on the GRUB site, but they inexplicably removed it, so the Ubuntu people picked it up). A simpler introduction exists on my Web page on the subject.

For EFI-mode booting, I prefer to use the 3.3.0 or later kernel's EFI stub loader, which turns the kernel into its own boot loader. In my experience, this is the most reliable way to boot an EFI-based computer into Linux. The problem is that this boot loader is only a boot loader. If you need to select which kernel to run, or especially which OS to run, you'll need a boot manager on top of that. Many EFI implementations provide a boot manager, but most of these are pretty poor. Thus, you may want to use my rEFInd or the simpler gummiboot boot manager.
Back to top
View user's profile Send private message
d2_racing
Bodhisattva
Bodhisattva


Joined: 25 Apr 2005
Posts: 13047
Location: Ste-Foy,Canada

PostPosted: Sun Nov 25, 2012 5:40 am    Post subject: Reply with quote

Can you validate that part that I wrote : https://gentooquebec.org/gwiki/index.php/Grub2#Installation_en_mode_UEFI

I just want to know where do I need to create the grub.cfg file ?

Do I need to create it on the /boot/grub/grub.cfg or do I really need to push it to /boot/efi//GRUB2

For the rest, I know how to boot in UEFI mode with the SystemRescueCD LiveCD.

Thanks :P
Back to top
View user's profile Send private message
srs5694
Guru
Guru


Joined: 08 Mar 2004
Posts: 434
Location: Woonsocket, RI

PostPosted: Sun Nov 25, 2012 3:23 pm    Post subject: Reply with quote

d2_racing wrote:
Can you validate that part that I wrote : https://gentooquebec.org/gwiki/index.php/Grub2#Installation_en_mode_UEFI


Sorry, I don't speak French, and I don't trust machine translation enough to use it for a task like that.
Back to top
View user's profile Send private message
d2_racing
Bodhisattva
Bodhisattva


Joined: 25 Apr 2005
Posts: 13047
Location: Ste-Foy,Canada

PostPosted: Sun Nov 25, 2012 4:20 pm    Post subject: Reply with quote

I have done a simple version here : https://gentooquebec.org/gwiki/index.php/Grub2_English
Back to top
View user's profile Send private message
srs5694
Guru
Guru


Joined: 08 Mar 2004
Posts: 434
Location: Woonsocket, RI

PostPosted: Sun Nov 25, 2012 8:18 pm    Post subject: Reply with quote

d2_racing wrote:
I have done a simple version here : https://gentooquebec.org/gwiki/index.php/Grub2_English


Some comments:


  • The directory "/sys/Firmware/EFI" doesn't exist even on EFI systems; it should be "/sys/firmware/efi" (all lowercase).
  • The first command in the "Installing Grub2 with the UEFI mode" section is "mount /dev/sda1 /boot/efi"; however, there's no guarantee that the ESP will be on /dev/sda1. You should instruct readers how to identify the ESP via gdisk or parted.
  • The command "mkdir -p /boot/efi/{EFI/BOOT,GRUB2}" is likely to be confusing to somebody who needs to read this documentation. Even expressed this way, it should be "mkdir -p /boot/efi/EFI/{BOOT,GRUB2}" -- the EFI directory of the ESP holds the subdirectories that hold boot loaders, so it's not optional. Several subsequent commands omit the EFI directory. This might work for you, but it doesn't conform to the expectations in the EFI spec, so it's conceivable that such installations will cause problems down the road.
  • It looks like you're configuring GRUB to look for grub.cfg on the ESP rather than in /boot/grub. This is good; it's far better this way than what Ubuntu does, since it renders the system more resilient to removal of Linux or damage to the /boot partition (or the root partition, if you don't split off a separate /boot).
  • You should point out what might need to be changed in the efibootmgr command near the end. Also, you need either doubled-up backslashes or quotation marks around single backslashes in the filename passed to the --loader parameter. Using both is redundant. I'm sure it works on some systems, but some might flake out when they see that.
  • I realize that's a page on GRUB, but you might want to point out that alternatives to GRUB exist for EFI-based computers. GRUB 2 is familiar to users of BIOS-based systems, but IMHO it's far from the best choice for most EFI users, and a comment that other alternatives exist is worth including somewhere.
Back to top
View user's profile Send private message
d2_racing
Bodhisattva
Bodhisattva


Joined: 25 Apr 2005
Posts: 13047
Location: Ste-Foy,Canada

PostPosted: Sun Nov 25, 2012 8:37 pm    Post subject: Reply with quote

Some comments:

srs5694 wrote:


  • The directory "/sys/Firmware/EFI" doesn't exist even on EFI systems; it should be "/sys/firmware/efi" (all lowercase).


I changed for /sys/firmware/efi, thanks for this one :P

srs5694 wrote:

  • The first command in the "Installing Grub2 with the UEFI mode" section is "mount /dev/sda1 /boot/efi"; however, there's no guarantee that the ESP will be on /dev/sda1. You should instruct readers how to identify the ESP via gdisk or parted.


  • This guide is part of an installation guide, so the user knows that the /dev/sda1 is the ESP partition.

    srs5694 wrote:

  • The command "mkdir -p /boot/efi/{EFI/BOOT,GRUB2}" is likely to be confusing to somebody who needs to read this documentation. Even expressed this way, it should be "mkdir -p /boot/efi/EFI/{BOOT,GRUB2}" -- the EFI directory of the ESP holds the subdirectories that hold boot loaders, so it's not optional. Several subsequent commands omit the EFI directory. This might work for you, but it doesn't conform to the expectations in the EFI spec, so it's conceivable that such installations will cause problems down the road.


  • I changed that one too.


    srs5694 wrote:

  • It looks like you're configuring GRUB to look for grub.cfg on the ESP rather than in /boot/grub. This is good; it's far better this way than what Ubuntu does, since it renders the system more resilient to removal of Linux or damage to the /boot partition (or the root partition, if you don't split off a separate /boot).


  • srs5694 wrote:

  • You should point out what might need to be changed in the efibootmgr command near the end. Also, you need either doubled-up backslashes or quotation marks around single backslashes in the filename passed to the --loader parameter. Using both is redundant. I'm sure it works on some systems, but some might flake out when they see that.
  • I realize that's a page on GRUB, but you might want to point out that alternatives to GRUB exist for EFI-based computers. GRUB 2 is familiar to users of BIOS-based systems, but IMHO it's far from the best choice for most EFI users, and a comment that other alternatives exist is worth including somewhere.


  • Yeah, I'm gonna write something about refind.

    By the way, do you know if there will be an official refind Gentoo package ?
    Back to top
    View user's profile Send private message
    srs5694
    Guru
    Guru


    Joined: 08 Mar 2004
    Posts: 434
    Location: Woonsocket, RI

    PostPosted: Mon Nov 26, 2012 12:08 am    Post subject: Reply with quote

    d2_racing wrote:
    By the way, do you know if there will be an official refind Gentoo package ?


    I don't know. According to this thread, somebody was working on an ebuild of rEFInd a while back, but I don't know if it's going to make it into the official tree. One stumbling block has been a very outdated version of GNU-EFI; however, I just received notification that this bug report I filed a while back on this issue has received attention, so a newer version should be out soon. OTOH, the version to which they've updated hasn't worked for me, so this may make matters worse. (Maybe not, though; it could be a quirk on my end that's caused problems.)
    Back to top
    View user's profile Send private message
    d2_racing
    Bodhisattva
    Bodhisattva


    Joined: 25 Apr 2005
    Posts: 13047
    Location: Ste-Foy,Canada

    PostPosted: Mon Nov 26, 2012 1:28 am    Post subject: Reply with quote

    Hi srs5694, can you answer a couples of questions for me ?

    1. When someone runs this command :

    Code:

    grub2-install --no-floppy --target=x86_64-efi --efi-directory=/boot/efi /dev/sda


    Grub2 by default will install the grub2.efi where ? /boot/efi/EFI/BOOT/ or /boot/efi/EFI/GRUB2/

    2. How does Grub2 knows that now the /boot/grub2/grub.cfg is now inside /boot/efi/EFI/GRUB2 ?

    I don't have a box right now to test that.

    3. Can you explain to me what is difference between /boot/efi/EFI/BOOT and /boot/efi/EFI/GRUB2 ? Why Grub2 needs a separate entry ?

    Can we create an entry with efibootmgr that point to /boot/efi/EFI/GRUB2 instead of /boot/efi/EFI/BOOT ?

    4. Finally, do you know if this setup is possible :

    /boot/efi/EFI/WINDOWS
    /boot/efi/EFI/GENTOO/BOOT
    /boot/efi/EFI/GENTOO/GRUB2
    Back to top
    View user's profile Send private message
    Display posts from previous:   
    Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
    Goto page 1, 2  Next
    Page 1 of 2

     
    Jump to:  
    You cannot post new topics in this forum
    You cannot reply to topics in this forum
    You cannot edit your posts in this forum
    You cannot delete your posts in this forum
    You cannot vote in polls in this forum