This is a modified post by nerasezi in the Ubuntu Forum
The main source for the UEFI was the Ubuntu UEFI guide
The following are the steps he did:
Use a live CD which matches the UEFI architecture. Mostly x86-64.
Boot up the live cd (xubuntu or lubuntu. Those are lightweight desktop but it should work with Ubuntu and kubuntu as well).
Be sure your live system is booting in UEFI mode. You may check it on the UEFI setup, probably under Boot option or similar. In my case it just put the "UEFI" prefix before the device name.
Once the live system is running set through the terminal a root password by typing
sudo passwd root
Then log out from the default live cd user and log in as root in gui mode.
Plug in the hard drive. I use a USB3 portable HDD but in most cases the hard drive is a SATA internal drive. Anyway, be sure you've BACKED UP ALL YOUR DATA, cause the process is going to wipe off everything on the drive.
Launch Gparted (a gui tool is much easier than the text one) and select the drive you're willing to install the system into. (Be sure to select the right one!)
Point to the top menu and select Device>Create Partition Table... A warning message pops out. Click on Advanced and select "gpt". Say OK
A new GPT disk layout had been created.
Now you need to create partitions on it. It's very important that you create as the first and primary partition, a FAT32 volume and you need to assign the label EFI to it. Once the partition is created, right click on it and select "manage flags". Check the "boot" flag and say OK.
Move on to the creation of the / partition (you may want to separate /home and /boot. Do it as you usually do. In my case I've just created the / partition), and a swap area. Always prefer primary partitions cause with GPT the 4 primary partition limitation has been removed.
Close Gparted.
Install the system into the hard drive "/" partition and remember to point here the bootloader (GRUB 1.99) to install to. If you've created a separete "/boot" partition, you have to choose that one for the bootloader installation.
Here comes the part from the UEFIBooting guide:
Building GRUB2 (U)EFI
Download the latest grub2 source code ZIP file. ftp://ftp.gnu.org/gnu/grub/
Building grub2 requires the following programs to be installed (build dependencies):
bison
autoconf
automake
flex
autogen
python (2.x series) (for autogen.sh if building from bzr repo)
texinfo
help2man
gettext (NLS support)
device-mapper
freetype2 (libs)
sudo apt-get install bison libopts25 libselinux1-dev autogen m4 autoconf help2man libopts25-dev flex libfont-freetype-perl automake autotools-dev freetype2-demos texinfo efibootmgr
efibootmgr was added to the software you need to install because you will need it later on.
For 64-bit (U)EFI:
export EFI_ARCH=x86_64
./configure --with-platform=efi --target=${EFI_ARCH} --program-prefix=""
make
In case you have a 32-bit architecture, check the online documentation at the link I have provided at the top.
Install GRUB2 in (U)EFI systems
Determine your EFI SYSTEM PARTITION. (it should be /dev/sda1 or /dev/sdb1 if is set on the 2nd hd)
Then mount the partition at /mnt/EFISYS (or at any mountpoint you wish). The following code assumes /dev/sda1 to be EFISYS partition.
sudo mkdir -p /mnt/EFISYS
sudo modprobe dm-mod
sudo mount -t vfat -o rw,users /dev/sda1 /mnt/EFISYS
sudo mkdir -p /mnt/EFISYS/efi/grub
Then, build an EFI application for GRUB and copy it and the other modules:
Enter the "grub2 compiled source/grub-core" directory - Default : /usr/lib/grub/{EFI_ARCH}
grub-mkimage -O ${EFI_ARCH}-efi -d . -o grub.efi -p "" part_gpt part_msdos ntfs ntfscomp hfsplus fat ext2 normal chain boot configfile linux multiboot
sudo cp grub.efi *.mod *.lst /mnt/EFISYS/efi/grub
Note : The -p "" option is important for creating a portable grub.efi app. Now create a grub.cfg in /mnt/EFISYS/efi/grub :
sudo touch /mnt/EFISYS/efi/grub/grub.cfg
Make the firmware launch GRUB2 (U)EFI as default
For non-Mac UEFI systems, efibootmgr is used to modify the UEFI Firmware Boot Manager. This requires the kernel to be booted in UEFI mode and that the kernel processor architecture should match the firmware architecture (and 'noefi' is NOT used) for 'efivars' kernel module to be loaded and efibootmgr to access the boot manager variables. Initially the user is required to manually launch "efi/grub/grub.efi" from the firmware console itself if grub2-efi was installed in BIOS mode. Then efibootmgr should be run to create the boot entry.
sudo modprobe efivars
Enter the "grub2 compiled source/grub-core" directory
grub-probe --target=device /boot/efi/efi/grub/grub.efi
Assuming the output the grub-probe to be /dev/sda1
sudo efibootmgr --create --gpt --disk /dev/sda --part 1 --write-signature --label "GRUB2" --loader "\\EFI\\grub\\grub.efi"
In the above command, /boot/efi/efi/grub/grub/efi can be split up as /boot/efi and /efi/grub/grub.efi, which translates to (/dev/sda) -> partition 1 -> \EFI\grub\grub.efi .
Open Synaptic and remove all grub packages and install just the grub-efi packages (amd64 for me) and all the necessary dependencies.
Once the installation is over, run sudo update-grub in the terminal. You should edit "grub.cfg" from /boot/grub and check that the disk UUID matches your disk and partitions, the voice "insmod part_" and "set root='(hd0," have "gpt" textline. If everything is ok, copy "grub.cfg" to the "efi/grub" on the EFI System Partition.
If something i mentioned before, doesn't match, just edit grub.cfg and manually change them values. Then copy the file to the "efi/grub" directory on the Efi System Partition (should still be mounted under /mnt).
Then when I rebooted the system, a new entry on the Boot tab under the UEFI setup has appeared, named GRUB2 and i set it as the default boot option.
Probably start here: help.ubuntu.com/community/UEFI
UEFI (~EFI) is a firmware interface that is widespread on recent computers, especially those more recent than 2010. It is intended to replace the traditional BIOS firmware interface that is prevalent on earlier machines. This page provides information about installing and booting Ubuntu using EFI, as well as about switching between EFI mode and legacy BIOS mode using Ubuntu.
UPDATE:
Ubuntu 12.10 is intended to be able to be used with Secure Boot.
Softpedia (Sep-2012) >> Canonical Unveils Plans for Ubuntu 12.10 Secure Boot
Canonical, through Jon Melamut, announced on September 20th that they will plan to implement support for Secure Boot in the upcoming Ubuntu
12.10 (Quantal Quetzal) operating system.
Therefore, after a discussion with Free Software Foundation, Canonical decided to drop the EFILinux bootloader implementation in
favor of the GRUB2 bootloader one, signed with their own keys. ..
Muktware (Oct-2012) >> SecureBoot In Ubuntu 12.10
Ubuntu 12.10 is the first distro that supports the Secure Boot architecture by default. Canonical developers have spent a huge amount
of time making sure that Ubuntu runs fine and without problems in all
hardware. Steve Langasek, an Ubuntu developer has put forward a nice
account in his blog, regarding how they are making Secure Boot
supported.
closes with ..
Langasek says that they will backport the secure boot mechanism to Ubuntu 12.04 release as well, so that the LTS version can be installed
in Secure Boot devices. So the next major service pack of Ubuntu
Precise (12.04.2) will include support for SecureBoot.
Best Answer
There are several ways to boot into the firmware setup utility, some of which you seem to be aware of:
systemctl
-- The command you presented earlier,sudo systemctl reboot --firmware-setup
, works on some computers; but it clearly isn't working for you. Windows 8 and later offers a similar feature, so if you can boot into Windows, you could try it, on the off chance that it would work better.efibootmgr
, or some other tool to re-install GRUB or re-create its NVRAM entry once you're done.BTW, chances are it's not Secure Boot per se that's preventing you from entering your firmware setup utility. (Although it could be that Dell linked Secure Boot to making it harder to enter the firmware, this type of linkage is not required of Secure Boot, and I've never encountered it myself.) It's more likely that it's the firmware's "fast start" feature leaving the USB ports uninitialized that's at the root of the problem. Another likely possibility is that you're trying the wrong key or that you're hitting it outside of the (often very narrow) window in which it will work. Ask on a Dell forum or check your documentation to learn what key to press, and try it several times, hitting it repeatedly as the computer starts up.