I'm installing Gentoo on an OracleVM VirtualBox 64bit instance on my Intel i7-7700k machine. I am assuming my machine and the VM both support UEFI boot mode, but there is a note in the Gentoo Handbook that says the minimal installation CD does not support UEFI mode as of April 20, 2017.

Does this mean that if I want to use the most up-to-date minimal install iso file, I must use MBR/BIOS for booting? Can I use an older version of the minimal iso and boot in UEFI? I'm confused because the "Default" options in the handbook all refer to UEFI boot mode and it refers to MBR/BIOS as sort of a legacy alternative.

  • If the Gentoo boot media does not support UEFI, you can use any that does. All you need is a bootable medium that provides a basic set of Linux commands. – Andy Dalton Dec 12 '17 at 15:37
  • @AndyDalton If I want to stick with Gentoo, though, I'll have to use BIOS? – vince Dec 12 '17 at 15:51
  • Why are you worried about UEFI when installing a VM? – Rui F Ribeiro Dec 12 '17 at 15:55
  • I'm asking because the Gentoo Handbook offers a couple of different routes for installation -- choosing between BIOS and UEFI is one of the earliest choices in the process. UEFI is treated as the "Default" option in the handbook, so I'd like to use that if possible to make the installation easier. – vince Dec 12 '17 at 15:56
  • In that case, you'll have to eschew the "minimal" installation process. – DopeGhoti Dec 12 '17 at 16:03

Andy Dalton is correct: the Gentoo boot CDs don't work in a UEFI environment (they do have EFI stubs, but IIRC they're for older Macs; in any case, they don't work.) That said, you can use any other boot DVD that does support UEFI to bootstrap the Gentoo installation, as the initial phase is all done in a chroot anyways. You may want to consider that the VirtualBox UEFI environment was (is?) a little strange; I generally use BIOS mode because it's simpler in a VM.

However, if you really do want to install in a UEFI environment, the method that worked for me is the following (I haven't done this in a while):

  1. Create an Ubuntu Server boot DVD (I used 17.10, but anything with UEFI support probably should work, including other distros.)
  2. Make sure that your VirtualBox host has the hard drive attached to a SATA controller. This is critical: only SATA controllers work in UEFI mode.
  3. At the Ubuntu boot menu, choose "Rescue a broken system".
  4. Answer the country, keyboard, hostname and time zone prompts.
  5. When notified that no partitions exist, select Continue.
  6. Choose "Execute a shell in the installer environment" (or press Alt+F2 to go to another console: I prefer this method.)
  7. Ensure that your network is set up.
  8. Partition your drive following the Gentoo handbook instructions. Make sure you follow the GPT instructions and format the EFI partition with FAT.
  9. Continue following the Gentoo handbook, making sure to heed the warning to make /dev/shm (warning when using non-Gentoo installation media.)

The rest, I believe, should work OK. As I mentioned before, it's been a while since I tried this in VirtualBox, but I've had success doing this using a generation 2 Hyper-V VM.

  • Thank you for your in-depth answer. The key piece I was missing was number 9. I think another misunderstanding I had was that the note at the beginning was simply saying that you cannot boot the installation media itself in UEFI. I was thinking the note meant that I could not install a system that uses UEFI via the minimal installation CD, which confused me because the handbook treats UEFI as the 'Default' option. – vince Jan 3 '18 at 13:28
  • The Gentoo minimal install CD now supports UEFI. I've gotten it to boot on Virtualbox without a problem and on my desktop when secure boot is turned off. – zaen Dec 18 '18 at 14:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.