GentooThis forum is for the discussion of Gentoo Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm building a fresh system, and have decided to use GPT. The guide I read, and the Gentoo wiki indicate that a BIOS partition is optional so I omitted it. Silly me.
I now have 12 partitions defined, with the first starting at sector 2048, /boot on sda1 and Linux Mint 17.1 installed on sda4.
Code:
grub2-install /dev/sda
fails, saying it wants a BIOS partition.
Can I add a BIOS partition in sectors 32-2047 without losing everything?
I assume that all of the partition numbers will be increased by 1, and that Mint 17.1 will not boot until I get grub installed and configured in the new Gentoo system.
My knowledge about anything non-BIOS is, at best, limited. However and since no one has answered I can point out a few things that might put you in the right track.
First of them being that one of the arguments to use GRUB2 instead of legacy has always been that it is supposed to support UEFI and all that new stuff I know nothing about (not that my machines support that, so...)
Quote:
Originally Posted by CollieJim
I'm building a fresh system, and have decided to use GPT. The guide I read, and the Gentoo wiki indicate that a BIOS partition is optional so I omitted it. Silly me.
I now have 12 partitions defined, with the first starting at sector 2048, /boot on sda1 and Linux Mint 17.1 installed on sda4.
Code:
grub2-install /dev/sda
fails, saying it wants a BIOS partition.
I am sure that you, by now, know that Gentoo can enable and disable code paths in individual packages via USE flags, there are some special sets of USE flags that can be controlled with special variables in your make.conf file (such as VIDEO_CARDS, INPUT_DEVICES...). Grub2 makes use of one of those to control some architecture specific features. This is the output for "eix grub" in my machine,
As you see, there's a variable named GRUB_PLATFORMS which can be used to enable things such as efi support. You probably want GRUB_PLATFORMS="efi-64 pc", or GRUB_PLATFORMS="efi-64".
"equery u grub" will provide more info on the different flags for this package.
Quote:
Will UUIDs survive the change?
Thanks
Jim
Unless you undo and then re-do the partitions, UUIDs shouldn't change. That's what they are all about after all, otherwise they wouldn't be any good.
Last edited by i92guboj; 12-30-2014 at 03:04 AM.
Reason: forgot eix output
I think what the grub message says it needs a BIOS partition to install. But you have instead have GPT type partitions. I would say use grub 2.00 which supports UEFI (GPT partitions). Please read accompanying manual for how to setup EFI (GPT) partitions. Also you would need a pc which supports UEFI based booting ( the newer secure boot ones).
Can I add a BIOS partition in sectors 32-2047 without losing everything?
Yes -- I do this in my EFI system to enable non-EFI booting; it will be added as partition number 13 in your system.
Code:
Number Start (sector) End (sector) Size Code Name
1 233394176 234441614 511.4 MiB EF00 EFI System
2 2048 201326579 96.0 GiB 8300 Linux filesystem
3 34 2047 1007.0 KiB EF02 BIOS boot partition
4 209712510 233394175 11.3 GiB 8300 Linux filesystem
5 201326592 209711103 4.0 GiB 8200
I would recommend using gdisk -- press "n" to make a new partition & it should offer sectors 34 & 2047 as the default start & end sectors, then use type "ef02" to make a BIOS boot partition.
It should be noted, however, that you may not be able to boot a GPT disk in non-EFI mode at all; it works with my system but it is entirely firmware-dependent. https://wiki.archlinux.org/index.php/GPT#BIOS_systems
I would strongly recommend using EFI-mode booting (if Gentoo supports this).
I added GRUB_PLATFORMS_EFI-x64 to USE and got past the initial problem. Thanks for the pointer.
The latest issue is that grub2-install wants to access efivars and cannot find it. It occurred to me that even though I've installed a kernel that provides it, I'm still using the one on the installation disc. I will check to see if there is a boot option on the disc that can be more efi-friendly.
Failing success there, I may remove GRUB_PLATFORMS from USE, create the BIOS partition, re-emerge grub, and try again. I was concerned that partitions' numbers represented their physical order.
I've added a BIOS boot partition, but still cannot get grub2 to work.
Linux Mint 17.1 was installed first in sda4. It boots OK, with sda1 mounted at /boot/efi, and has stuff in /boot/efi/EFI.
Gentoo's efforts are ignored. In order to use a new kernel I have to boot Mint, update-grub, and then boot Gentoo again.
I'm using an HP Pavilion dv6 notebook. When the initial splash screen appears I press ESC and get a menu which includes "BIOS SETUP." Selecting that gives me the usual abbreviated BIOS menus, with "Secure boot" permanently disabled. I have Legacy mode enabled so I can boot from DVD.
I'm trying to follow the instructions at wiki.gentoo.org/wiki/GRUB2.
Code:
/ # gdisk /dev/sda
GPT fdisk (gdisk) version 0.8.10
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present
Found valid GPT with protective MBR; using GPT.
Command (? for help): p
Disk /dev/sda: 1465149168 sectors, 698.6 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 47B630FC-BE27-414E-BC50-6AED591BB1B6
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 1465149134
Partitions will be aligned on 8-sector boundaries
Total free space is 168752847 sectors (80.5 GiB)
Number Start (sector) End (sector) Size Code Name
1 2048 391167 190.0 MiB EF00
2 391168 16392191 7.6 GiB 8200
3 16392192 96393215 38.1 GiB 8300
4 96393216 176394239 38.1 GiB 8300
5 176394240 236394495 28.6 GiB 8300
6 236394496 296394751 28.6 GiB 8300
7 296394752 316395519 9.5 GiB 8300
8 316395520 396396543 38.1 GiB 8300
9 396396544 436396031 19.1 GiB 8300
10 436396032 1236396031 381.5 GiB 8300
11 1236396032 1276395519 19.1 GiB 8300
12 1276395520 1296396287 9.5 GiB 8300
13 34 2047 1007.0 KiB EF02 BIOS boot partition
Code:
/boot # ls -al
total 7988
drwxr-xr-x 5 root root 4096 Jan 4 22:08 .
drwxr-xr-x 22 root root 4096 Jan 1 16:55 ..
-rw-r--r-- 1 root root 97283 Jan 4 22:08 config-3.17.7-gentoo-print-G10
drwxr-xr-x 2 root root 4096 Jan 2 16:24 efi
drwxr-xr-x 7 root root 4096 Jan 5 11:33 grub
-rwxr-xr-x 1 root root 0 Jan 2 16:12 .keep
drwxr-xr-x 2 root root 4096 Jan 4 22:08 OldKernels
-rw-r--r-- 1 root root 2835493 Jan 4 22:08 System.map-3.17.7-gentoo-print-G10
-rw-r--r-- 1 root root 5219568 Jan 4 22:08 vmlinuz-3.17.7-gentoo-print-G10
/boot # mount /dev/sda1 efi
/boot # ls efi
EFI
/boot # ls grub
fonts #grub.cfg# grub.cfg grubenv i386-pc locale themes x86_64-efi
/boot # grub2-install /dev/sda
Installing for x86_64-efi platform.
Installation finished. No error reported.
/boot # grub2-mkconfig -o /boot/grub/grub.cfg
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-3.17.7-gentoo-print-G10
Found Linux Mint 17.1 Rebecca (17.1) on /dev/sda4
done
/boot # efibootmgr -v
BootCurrent: 0001
Timeout: 0 seconds
BootOrder: 3001,3002,3003,2001,2002,2003
Boot0000* Notebook Hard Drive BIOS(2,0,18).......................................................................
Boot0001* ubuntu HD(1,800,5f000,97e014e7-562b-4802-ae88-6650c69785a1)File(\EFI\ubuntu\shimx64.efi)
Boot0002* Ubuntu HD(1,800,5f000,97e014e7-562b-4802-ae88-6650c69785a1)File(\EFI\ubuntu\grubx64.efi)RC
Boot0003* gentoo HD(1,800,5f000,97e014e7-562b-4802-ae88-6650c69785a1)File(\EFI\gentoo\grubx64.efi)
Boot0004* USB Hard Drive - ChipsBnk Multi-Reader BIOS(7,500,18).......................................................................
Boot2001* USB Drive (UEFI) RC
Boot2002* Internal CD/DVD ROM Drive (UEFI) RC
Boot3001* Internal Hard Disk or Solid State Disk RC
Boot3002* Internal Hard Disk or Solid State Disk RC
Boot3003* Internal Hard Disk or Solid State Disk RC
481 14:38:28 /boot # efibootmgr -c
BootCurrent: 0001
Timeout: 0 seconds
BootOrder: 0005,3001,3002,3003,2001,2002,2003
Boot0000* Notebook Hard Drive
Boot0001* ubuntu
Boot0002* Ubuntu
Boot0003* gentoo
Boot0004* USB Hard Drive - ChipsBnk Multi-Reader
Boot2001* USB Drive (UEFI)
Boot2002* Internal CD/DVD ROM Drive (UEFI)
Boot3001* Internal Hard Disk or Solid State Disk
Boot3002* Internal Hard Disk or Solid State Disk
Boot3003* Internal Hard Disk or Solid State Disk
Boot0005* Linux
No error, but no work either. A reboot shows the menu created by Mint's update-grub.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.