You are not logged in.

#1 2014-12-17 04:07:44

stevenmw
Banned
Registered: 2014-10-12
Posts: 48

[SOLVED]How exactly do you install Arch using UEFI?

I want to switch my laptop to UEFI. I have a few questions I'd like to ask.

* Does UEFI require a bios boot partition?
* If not but I add a bios boot partition and efi partition is it true I can boot into my system both with UEFI enabled and not enabled?

----

Will the following set my laptop to use UEFI?

Create a partition scheme as follows;

1. bios boot -- about 2mb -- ef02
2. efi boot partition -- about 200mb (is this size about right?) -- fat32
3. root -- 8300
4. swap
5. home -- 8300

----

Then when I mount everything I make sure to mount the efi partition like
   
    mount /dev/sda2 /mnt/boot/efi

It goes to /boot/efi right?

----

Then when installing GRUB, I install it like;
   
    grub-install --efi-directory=/boot/efi --bootloader-id=grub_uefi --recheck

----

And finally I'd run the
   
    grub-mkconfig -o /boot/grub/grub.cfg

----

Is that the gist for the most part?

Last edited by stevenmw (2014-12-18 17:51:37)

Offline

#2 2014-12-17 04:24:53

whitetimer
Member
Registered: 2010-05-23
Posts: 207

Re: [SOLVED]How exactly do you install Arch using UEFI?

I found an easier option to Grub, all i did was install grub to /dev/sda then run grub-mkconfig unmount all and reboot then install os-prober and run grub-mkconfig again and it picks up windows.

Works perfect

Offline

#3 2014-12-17 04:26:03

stevenmw
Banned
Registered: 2014-10-12
Posts: 48

Re: [SOLVED]How exactly do you install Arch using UEFI?

I'm not running a dual boot. Just Arch. Thank you for the response though! I've read the wiki, I would just like some clarification.

Last edited by stevenmw (2014-12-17 05:09:50)

Offline

#4 2014-12-17 06:31:32

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED]How exactly do you install Arch using UEFI?

UEFI does not coexist with BIOS; the former replaces the latter. See https://www.happyassassin.net/2014/01/2 … work-then/

Not an Installation issue, moving to NC...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2014-12-17 09:33:23

TheSaint
Member
From: my computer
Registered: 2007-08-19
Posts: 1,523

Re: [SOLVED]How exactly do you install Arch using UEFI?

@ Jason
MBR and UEFI booting can coexist. I.E. Arch ISO does it.
The difference may reside in some BIOS, which has more features for the latter. Anyways mostly they can use both methods.
@stevenmw
You may expertize in a virtualbox and follow the wiki, side by side.

Last edited by TheSaint (2014-12-17 09:37:24)


do it good first, it will be faster than do it twice the saint wink

Offline

#6 2014-12-17 15:05:40

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,744
Website

Re: [SOLVED]How exactly do you install Arch using UEFI?

stevenmw wrote:

I want to switch my laptop to UEFI. I have a few questions I'd like to ask.

* Does UEFI require a bios boot partition?
* If not but I add a bios boot partition and efi partition is it true I can boot into my system both with UEFI enabled and not enabled?

No -- a BIOS boot partition is required for non-EFI booting with a GPT disk.
Yes -- this is what I do.

Will the following set my laptop to use UEFI?

Create a partition scheme as follows;

1. bios boot -- about 2mb -- ef02
2. efi boot partition -- about 200mb (is this size about right?) -- fat32
3. root -- 8300
4. swap
5. home -- 8300

I would advise using a 512MiB EFI system partition -- it is not strictly a requirement but I know of motherboards that will not read other sizes.

Then when I mount everything I make sure to mount the efi partition like
   
    mount /dev/sda2 /mnt/boot/efi

It goes to /boot/efi right?

Mount it to /mnt/boot -- other distro's use the efi sub-directory but you're better off keeping it simple with Arch.
https://wiki.archlinux.org/index.php/Be … partitions

Then when installing GRUB, I install it like;
   
    grub-install --efi-directory=/boot/efi --bootloader-id=grub_uefi --recheck

----

And finally I'd run the
   
    grub-mkconfig -o /boot/grub/grub.cfg

----

Is that the gist for the most part?

Again, just use /boot as the $ESP --  as the ArchWiki advises:
https://wiki.archlinux.org/index.php/Be … ide#GRUB_2

Offline

#7 2014-12-17 15:17:36

ANOKNUSA
Member
Registered: 2010-10-22
Posts: 2,141

Re: [SOLVED]How exactly do you install Arch using UEFI?

TheSaint wrote:

MBR and UEFI booting can coexist. I.E. Arch ISO does it.

That's not what he meant. A motherboard either has BIOS firmware or UEFI firmware. Many computers manufactured in the last few years have UEFI that's capable of booting in "legacy mode" for compatibility with old-fashioned bootloaders like Syslinux and NTLDR. It's still UEFI though, and with the advent of Windows 8 more machines are being manufactured now without any legacy support.

@OP: Head_on_a_stick describes what many people do for the sake of redundancy (if UEFI fails for some reason, you can boot in "legacy" mode). Using that method will require a BIOS boot partition, but otherwise using GRUB, Gummiboot or rEFInd with plain UEFI does not require that partition. Just a FAT32-formatted EFI partition.

Offline

#8 2014-12-17 17:11:31

stevenmw
Banned
Registered: 2014-10-12
Posts: 48

Re: [SOLVED]How exactly do you install Arch using UEFI?

@jasonwryan, Thanks for that link, really informative. I'm still trying to get through it in my spare time here at work.

@TheSaint, if I install it in a VM though how can I ensure I've actually installed it correctly?

I had another look at the GRUB wiki article last night (Been reading over it quite a bit lately in order to possibly contribute to getting it cleaned up which is why I want to clarify facts / steps for UEFI. Also, for personal gain seeing as how I'm changing up my laptop and need the information.) and I noticed something I had missed.

The article says it is not necessary to specify /boot/efi that /boot will work fine.Here is what it says;

First, ensure that the UEFI partition has been mounted (e.g. created as /boot or /boot/efi). Grub is not particular about the mountpoint, so either will be fine. Once complete, the following command will install the GRUB UEFI application to $esp/EFI/grub, install its modules to /boot/grub/x86_64-efi, and place the bootable grubx64.efi stub in $esp/EFI/arch_grub:

I think I've got it for the most part thanks all of the replies so far.

----

ANOKNUSA wrote:

That's not what he meant. A motherboard either has BIOS firmware or UEFI firmware. Many computers manufactured in the last few years have UEFI that's capable of booting in "legacy mode" for compatibility with old-fashioned bootloaders like Syslinux and NTLDR. It's still UEFI though, and with the advent of Windows 8 more machines are being manufactured now without any legacy support.

This was my understanding as well until i read a few things and got turned around. Thanks for clarifying it. And thank you jasonwryan for bringing it up.
----

One thing I'd like clarification on is the GRUB install command. The following will put everything where it needs to be and how it needs to be?

    grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=grub_uefi --recheck

----
Then in order to ensure I did everything right can I just take a look at my /boot directory and if everything is laid out in a particular format that means I've done it right?

Last edited by stevenmw (2014-12-17 17:14:08)

Offline

#9 2014-12-17 17:46:42

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,744
Website

Re: [SOLVED]How exactly do you install Arch using UEFI?

stevenmw wrote:

One thing I'd like clarification on is the GRUB install command. The following will put everything where it needs to be and how it needs to be?

    grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=grub_uefi --recheck

----
Then in order to ensure I did everything right can I just take a look at my /boot directory and if everything is laid out in a particular format that means I've done it right?

I'm not sure why you require clarification on this point, the Beginner's Guide is quite clear:
https://wiki.archlinux.org/index.php/Be … ide#GRUB_2
But yes, if $ESP==/boot (as it should if you follow the guide), then that is correct.

You can tell if it is correct by whether it boots up or not...

(EDIT: Post number 666 -- the post of the beast! tongue )

Last edited by Head_on_a_Stick (2014-12-17 17:47:54)

Offline

#10 2014-12-17 18:08:11

stevenmw
Banned
Registered: 2014-10-12
Posts: 48

Re: [SOLVED]How exactly do you install Arch using UEFI?

Head_on_a_Stick wrote:

I'm not sure why you require clarification on this point, the Beginner's Guide is quite clear:

It just means something to me to know if i'm doing something right. Maybe someone else will read several things and get turned around and this thread will help them in the future? Plus I want to update the grub article since it is poorly written so I wanted to check my facts so to speak.

Yeah, the whole if it boot is a good test. Haha. I've had some things works before on a fluke though.



Thanks, everyone. I'm going to mark this as solved and hopefully an admin can close it.
I've discovered a couple of notes I'd like to add after I finish a few tests in a VM.

----
[I heard that whenever a user makes their 666th post an Arch user somewhere is forced to use Windows Vista.]

Last edited by stevenmw (2014-12-18 04:32:54)

Offline

#11 2014-12-18 17:51:22

stevenmw
Banned
Registered: 2014-10-12
Posts: 48

Re: [SOLVED]How exactly do you install Arch using UEFI?

Here is what I did,

I booted Arch install media (not from UEFI).

I made my partition scheme is gdisk:

  1. 2M -- ef02 -- BIOS boot
  2. 500M -- ef00  -- efi
  3. 30G -- 8300 -- root
  4. 12G -- 8200 -- swap
  5. 195G -- 8300 -- home

I then did my mkfs:

  mkfs.ext2 /dev/sda2
  mkfs.fat -s2 -F32 /dev/sda2
  mkfs.ext4 /dev/sda3
  mkswap /dev/sda4
  mkfs.ext4 /dev/sda5

----

When I first made my file extensions I made the mistake of not making the efi partition fat32. I knew it had to be fat32 and I wasn't sure if just making it ef00 was enough. So I searched Google. I didn't find much so I pushed forward.

I eventually got an error when trying to do grub-install, it said /dev/sda2 does not look like and efi partition.

So I thought about it, was it the size I chose, was it that I was just putting it in /boot, was it not fat32? I immediately decided it must not be fat32. And I was right. After a search I discovered I needed to do mkfs.fat. So I did this and success! Grub installed everything where it needed to be. (So it is true when they say Arch doesn't care if you have /boot/efi or /boot/EFI. Just using /boot is enough. That is fact.)

But now I had another error. I forgot to install efibootmgr package... By this time I thought I had it so I started all over. This was actually my laptop so I wasn't going to give it more than two tries. So I started from scratch. A second and final try...

I set up my partition scheme, did my mk stuff, and mounted all of my filesystems. Then Installed the base and base-devel packages. I went into arch-chroot on /mnt and then into a bash..

I went through a couple of basic setup things and then I installed grub and efibootmgr. I then ran

    grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=grub_uefi --recheck

Hooray! No errors reported! I checked /boot and everything was there and laid out perfectly!

So I did the grub-mkconfig..... And rebooted.

But it wouldn't boot!

----

I started to dig around the Arch wiki and read it is a good idea to start out in UEFI mode and go into the  install media and proceed. So I tried this in a VM. The Arch install media would not start in UEFI mode. So I just came to the conclusion that there is something I am missing. Either in GRUB or something I don't understand about my laptop.

I installed Fedora 21 in a VM out of UEFI mode and then again where I started out in UEFI mode. Starting out in UEFI mode did seem to make a difference. I just gave up on my laptop and installed it back with bios and no UEFI. I'm going to dig around and see if I can find what I'm doing wrong.

Could it boil down to not being able to start out in UEFI mode and then switch back into UEFI mode after install? I highly doubt it. There is just something I'm missing..

----

Marking this as solved. Thanks everyone.

----
Edit:
Starting out in UEFI mode made the difference! I just wasn't being patient with my VM. Starting out in UEFI mode and then performing the install makes the difference! After following that process I can boot into Arch using UEFI!

Also, I mentioned I couldn't get Arch install media to start in UEFI. That was my fault. When i created my usb i didn't make it a UEFI bootable device! So I would go into my boot options and I would see UEFI but my usb only showed in the legacy list.

Last edited by stevenmw (2014-12-18 20:47:57)

Offline

#12 2014-12-21 18:19:57

stevenmw
Banned
Registered: 2014-10-12
Posts: 48

Re: [SOLVED]How exactly do you install Arch using UEFI?

I've cleaned up the GRUB article's UEFI instructions.

Offline

Board footer

Powered by FluxBB