You are not logged in.

#1 2016-03-21 09:41:33

Xi0N
Member
From: Bilbao - Spain
Registered: 2007-11-29
Posts: 832
Website

Help setting up UEFI multi boot system

Hi! For the first time, I'm trying to setup my whole new system in UEFI mode.

I'm used to BIOS and MBR, so I have a couple of questions, see if you guys can help me out smile
I'm testing on a virtual environment, because I'm still waiting for my new disk to arrive and so far, this is what I want:

Two disks:

/dev/sda will have arch
/dev/sdb will have a windows 10 installation

I've been following the setup guides and the wiki to where I can understand and so far this is what I did:

/dev/sda1: 100 Mb EFI partition formatted as fat32 mounted on /boot/efi
/dev/sda2: Rest of the disk btrfs with root and home subvolumes

I installed arch and ran the common grub commands to install everything.

First question: Does the EFI partition have to be mounted? If so, did I mount it right? Becaise grub created yet another "EFI" subdir like /boot/efi/EFI/xxxxx


After booting once and seeing it was working, i tried to install windows 10 on /dev/sdb

The install went OK, but at the end the setup was complaining of being unable to find the boot partition, and here comes my second batch of questions:

Did this happen because windows saw that other EFI partition?
Should I have only one EFI partition in the whole system?
Should I use $esp as /boot and mount it as such?


My idea was to have both disk with their own EFI partition. Then boot always from /dev/sda (the arch installation) and on grub, select either arch or windows: I wanted to do this because i want in the future if, by any means my arch setup fails, I can still be able to boot into my windows system and vice-versa. Is this the best setup for my idea?

Any critic is welcome since i'm still lerning this kind of setup


Thanks!

Last edited by Xi0N (2016-03-21 11:27:28)

Offline

#2 2016-03-21 11:56:38

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

Re: Help setting up UEFI multi boot system

You should let Windows install, first. Then install Arch later (which is more flexible than windows). You'll find the ESP made by windows and use that. For my taste I'd avoid the grub and use systemd-boot.


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

Offline

#3 2016-03-21 13:04:38

satanselbow
Member
Registered: 2011-06-15
Posts: 538

Re: Help setting up UEFI multi boot system

TheSaint wrote:

You should let Windows install, first. Then install Arch later (which is more flexible than windows). You'll find the ESP made by windows and use that. For my taste I'd avoid the grub and use systemd-boot.

Totally agree - but each disk that has an OS should have it's own esp. In your 2 disk setup it may be more sane for Arch to use it's own esp on it's own disk. I would also highly recommend putting W10 on the 1st hdd (/dev/sda) as putting it anywhere else is highly likely to break on update at some point (W10 SP1 will probably do it lol). You will want to install Windows 1st as previously mentioned.

Grub is completely redundant in a simple dual-boot with UEFI.

Last edited by satanselbow (2016-03-21 15:11:20)

Offline

#4 2016-03-21 13:25:55

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,456
Website

Re: Help setting up UEFI multi boot system

satanselbow wrote:

but each disk that has an OS should have it's own esp.

Why?  That just makes an extra step, an extra partition, and makes it difficult to chose the OS you want to boot (you'd need to select a boot disk from bios rather than just selecting an OS from the efi bootloader menu).


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#5 2016-03-21 15:10:32

satanselbow
Member
Registered: 2011-06-15
Posts: 538

Re: Help setting up UEFI multi boot system

Trilby wrote:
satanselbow wrote:

but each disk that has an OS should have it's own esp.

Why?  That just makes an extra step, an extra partition, and makes it difficult to chose the OS you want to boot (you'd need to select a boot disk from bios rather than just selecting an OS from the efi bootloader menu).

Hmmm... just re-read the, largely ambiguous, docs and tested it myself... you are quite correct - my understanding was somewhat flawed, apologies.

Offline

#6 2016-03-21 15:28:12

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,456
Website

Re: Help setting up UEFI multi boot system

No worries.  It was a genuine question as I was unsure: I've never done this myself.  Thanks for taking the time to test it to be sure.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#7 2016-03-21 15:41:04

Xi0N
Member
From: Bilbao - Spain
Registered: 2007-11-29
Posts: 832
Website

Re: Help setting up UEFI multi boot system

Ok, so I monted /dev/sda2 (Windows EFi partition) on /boot, installed arch on /dev/sdb1 (btrfs with only a root subvolume) and then ran this in order to install the bootloader for Arch:

grub-install --efi-directory=/boot --bootloader-id=Arch-grub
No failures
then:

grub-mkconfig -o /boot/grub/grub.cfg


I got a couple of messages complaining about the other ntfs partitions.
Then when I reboot, the machine goes straight to windows 10: Shouldn't I see a boot manager of some sort?

EDIT: Nevermind the last question: Just discovered how to configure uefi boot order smile

However, Grub does not detect the windows boot and does not give me "Windows 10" as an option to boot from. I know you guys suggested systemd-boot but I'm trying to get a multiboot UI here,... this seems like the fastest way

EDIT2: ntfs-3g was needed for that.... well.. it seems to be working now smile

Thanks. Any (more) suggestions are welcome.

Last edited by Xi0N (2016-03-21 15:51:46)

Offline

#8 2016-03-21 15:52:36

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,456
Website

Re: Help setting up UEFI multi boot system

Satanselbow might be right for Grub.  Despite all the recommendations in this thread you went with grub and the grub wiki says the following:

grub wiki wrote:

An EFI System Partition (ESP) is needed on every disc you want to boot using EFI.

So perhaps you need to have the extra ESP or not use grub.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#9 2016-03-21 15:53:23

newbie1962
Member
From: italy
Registered: 2012-07-24
Posts: 137

Re: Help setting up UEFI multi boot system

for my this command is not correct.

grub-install --efi-directory=/boot --bootloader-id=Arch-grub

for my the command correct is

grub-install --efi-directory=/boot/efi --bootloader-id=Arch-grub 

Last edited by newbie1962 (2016-03-21 15:54:23)


hp-envy dv7

Offline

#10 2016-03-21 16:00:02

Xi0N
Member
From: Bilbao - Spain
Registered: 2007-11-29
Posts: 832
Website

Re: Help setting up UEFI multi boot system

Trilby wrote:

Satanselbow might be right for Grub.  Despite all the recommendations in this thread you went with grub and the grub wiki says the following:

grub wiki wrote:

An EFI System Partition (ESP) is needed on every disc you want to boot using EFI.

So perhaps you need to have the extra ESP or not use grub.

If I don't use Grub, how do I select the system I want to boot?: my idea of using grub is so I can have a list with OSs that can be booted. Newbie on EFI matters,maybe there motherboard will show me that OS selection menu I'm talking about?

Last edited by Xi0N (2016-03-21 16:00:25)

Offline

#11 2016-03-21 16:01:44

Xi0N
Member
From: Bilbao - Spain
Registered: 2007-11-29
Posts: 832
Website

Re: Help setting up UEFI multi boot system

for my the command correct is

grub-install --efi-directory=/boot/efi --bootloader-id=Arch-grub 

If I do this, I will get a double /efi subdir

/boot/EFI/EFI/xxxxx

Offline

#12 2016-03-21 16:04:23

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,456
Website

Re: Help setting up UEFI multi boot system

The menu is just a bootmanager.  Systemd already provides systemd-boot, that is sufficient to have a meno to select from.  Window's own loader may have a menu option as well - but I have no idea how that'd work, you'd have to ask windows people.

EDIT: in reply the to newbie's post, that is bad advice.  It works for him as he didn't use /boot as his $esp.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#13 2016-03-21 16:15:44

Xi0N
Member
From: Bilbao - Spain
Registered: 2007-11-29
Posts: 832
Website

Re: Help setting up UEFI multi boot system

Trilby wrote:

The menu is just a bootmanager.  Systemd already provides systemd-boot, that is sufficient to have a meno to select from.  Window's own loader may have a menu option as well - but I have no idea how that'd work, you'd have to ask windows people.

EDIT: in reply the to newbie's post, that is bad advice.  It works for him as he didn't use /boot as his $esp.


Ok, but apart from that, my setup should be OK?

I will give your suggestion a try and see if I can skip grub altogether and manage a multiboot environment just with systemd-boot. smile If I can't make it work and this setup looks fine to you experts, I'll fall back to it in case i can't make the systemd-boot thing work

Last edited by Xi0N (2016-03-21 16:16:23)

Offline

#14 2016-03-21 16:17:44

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,456
Website

Re: Help setting up UEFI multi boot system

Xi0N wrote:

apart from that, my setup should be OK? ... I'll fall back to it in case i can't make the systemd-boot thing work

I can't help with this.  I've never used GRUB(2).


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#15 2016-03-21 20:58:30

surfatwork
Member
Registered: 2012-01-05
Posts: 139

Re: Help setting up UEFI multi boot system

my 2 cents: I have found https://wiki.archlinux.org/index.php/REFInd to be very straightforward for managing uefi boot.
haven't tried systemd-boot, so cant comment on that

Last edited by surfatwork (2016-03-21 20:59:15)

Offline

#16 2016-03-22 07:48:23

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

Re: Help setting up UEFI multi boot system

Xi0N wrote:

If I don't use Grub, how do I select the system I want to boot?

There's a bunch of boot loaders. I'd lean on systemd-boot, the simplest.


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

Offline

#17 2016-03-22 08:12:36

Xi0N
Member
From: Bilbao - Spain
Registered: 2007-11-29
Posts: 832
Website

Re: Help setting up UEFI multi boot system

TheSaint wrote:
Xi0N wrote:

If I don't use Grub, how do I select the system I want to boot?

There's a bunch of boot loaders. I'd lean on systemd-boot, the simplest.


I was thinking about grub because it seems to have an autoconfiguration feature. Now, I'm testing systemd-boot smile


However, on virtualbox, where I'm testing the setup, I'm unable to see more than one efi partition.

I installed windows on /dev/sda with it's own efi partition.
Then, I installed arch on /dev/sdb, being /dev/sdb1 the EFI partition, but I can't configure the efi boot manager to see an EFI partition other than the windows one.... I'm starting to think this might be a VM limitation that wouldn't happen on a real life setup, right?

I'd boot from /dev/sdb1 and on the boot prompt, have both options: Booting from windows and booting arch.

Last edited by Xi0N (2016-03-22 08:13:29)

Offline

#18 2016-03-22 08:15:56

satanselbow
Member
Registered: 2011-06-15
Posts: 538

Re: Help setting up UEFI multi boot system

Trilby wrote:

Satanselbow might be right for Grub.  Despite all the recommendations in this thread you went with grub and the grub wiki says the following:

grub wiki wrote:

An EFI System Partition (ESP) is needed on every disc you want to boot using EFI.

So perhaps you need to have the extra ESP or not use grub.

For my own sanity I'm gonna run through a few more scenario.

It is wholly plausible to have an ESP on each disk - and may be an essential workaround when utilising the 100MB Windows created ESP, which is rather small as a default (deliberate MS attempt to discourage multibooting perhaps?); W10 + Arch = 66MB of 100MB which leaves room for 1 more install?

Resizing the ESP is do-able but involves shuffling subsequent partitions down the disk so would best be performed immediately after Windows installation to minimise the volume of data to be moved. This can be performed simply from a GParted equipped live distro. Backup contents + check flags.

Many linux distributions "force" the use of grub from their graphical installers (or at least offer no alternative) - my own personal preference would be to have systemd-boot controlling the entire machine - whether it is even possible to create systemd-boot entries across a 2nd disk is currently uncertain.

This is rapidly turning into a blog post... if I turn up anything definite and certain i'll turn to the wiki wink

Offline

#19 2016-03-22 08:16:02

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,999
Website

Re: Help setting up UEFI multi boot system

Xi0N wrote:

I've been following the setup guides and the wiki to where I can understand and so far this is what I did:

/dev/sda1: 100 Mb EFI partition formatted as fat32 mounted on /boot/efi

It's probably best to mount /boot to the ESP rather than /boot/efi as the former method is more flexible (ie, it allows the use of systemd-boot or EFI_STUB booting).

Does the EFI partition have to be mounted?

If the ESP is mounted to /boot/efi then it needs to be mounted during GRUB updates as the binary is placed on the ESP.

If the ESP is mounted to /boot then it needs to be mounted during kernel (and microcode) updates as well.

One benefit of systemd-boot is that the ESP is automatically un-mounted during normal use and re-mounted on demand.

After booting once and seeing it was working, i tried to install windows 10 on /dev/sdb

The install went OK, but at the end the setup was complaining of being unable to find the boot partition

AFAIUI, Windows needs to be on the "first" disk.

Whichever disks you use, you should share the Windows-generated ESP between the two systems and mount it to /boot

I recommend using systemd-boot as it will generate a Windows menu entry automagically with that configuration.

See https://wiki.archlinux.org/index.php/Du … FI_systems


Jin, Jîyan, Azadî

Offline

#20 2016-03-22 08:39:14

Xi0N
Member
From: Bilbao - Spain
Registered: 2007-11-29
Posts: 832
Website

Re: Help setting up UEFI multi boot system

Head_on_a_Stick wrote:
Xi0N wrote:

I've been following the setup guides and the wiki to where I can understand and so far this is what I did:

/dev/sda1: 100 Mb EFI partition formatted as fat32 mounted on /boot/efi

It's probably best to mount /boot to the ESP rather than /boot/efi as the former method is more flexible (ie, it allows the use of systemd-boot or EFI_STUB booting).

Does the EFI partition have to be mounted?

If the ESP is mounted to /boot/efi then it needs to be mounted during GRUB updates as the binary is placed on the ESP.

If the ESP is mounted to /boot then it needs to be mounted during kernel (and microcode) updates as well.

One benefit of systemd-boot is that the ESP is automatically un-mounted during normal use and re-mounted on demand.

After booting once and seeing it was working, i tried to install windows 10 on /dev/sdb

The install went OK, but at the end the setup was complaining of being unable to find the boot partition

AFAIUI, Windows needs to be on the "first" disk.

Whichever disks you use, you should share the Windows-generated ESP between the two systems and mount it to /boot

I recommend using systemd-boot as it will generate a Windows menu entry automagically with that configuration.

See https://wiki.archlinux.org/index.php/Du … FI_systems


I see what you mean.... the dilemma here is that windows is unpredictable: In the way it makes changes without consulting and follows standards when they want, and other times, make up the rules: That's why I don't trust to give the ESP control and responsability to them.
I will try to dual boot from the arch setup using systemd-boot on the /dev/sdb1 partition (the EFI partition i will create) because you can't predict when windows is going to mess with the ESP partition without previous warning, rendering you with an unbootable machine: That's why I like to let windows do whatever he wants on its parttitions and then, boot with arch and pass control over to windows if I want to.
I guess it's just a debate and a schema that can be modified: There's no right, no wrong implementation of it. Perhaps your way will be the correct one after I install the real system some months down the road, perhaps not smile.

What I don't understan still is wether grub needs to be on the efi partition (if you mount $ESP on /boot, you'll end up with grub on it) or if you have to mount it under /boot/efi and end up with the duplicated efi folders thing /boot/efi/EFI/xxx.

Offline

#21 2016-03-22 08:48:59

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

Re: Help setting up UEFI multi boot system

[OT=OFF]

satanselbow wrote:

Many linux distributions "force" the use of grub

Our wiki leads to grub too. Even syslinux and lilo would do the same.
[OT=ON]
For UEFI, the options are systemd-boot or directly booting the kernel from BIOS.
AFAIK, the ESP number is irrelevant, but complicating.


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

Offline

#22 2016-03-22 09:16:34

Xi0N
Member
From: Bilbao - Spain
Registered: 2007-11-29
Posts: 832
Website

Re: Help setting up UEFI multi boot system

EDIT: Convinced: I'll use the same esp partition and if windows decides to mess it up, I'll just re-generate the menu entries and reinstall linux package. Worst case scenario: I'll create a esp partition on a thumb drive and boot from there, in case the windows disk goes kaput smile


However, bootctl install does not autodetect the windows install: it always boots arch directly sad

Offline

#23 2016-03-22 09:23:11

satanselbow
Member
Registered: 2011-06-15
Posts: 538

Re: Help setting up UEFI multi boot system

TheSaint wrote:

[OT=OFF]

satanselbow wrote:

Many linux distributions "force" the use of grub

Our wiki leads to grub too. Even syslinux and lilo would do the same.
[OT=ON]
For UEFI, the options are systemd-boot or directly booting the kernel from BIOS.
AFAIK, the ESP number is irrelevant, but complicating.

IMHO Grub should be unnecessary (under UEFI) and adds an extra layer of fud.

Purely as an example - Ubuntu based distro do not offer systemd-boot as an option at install but do provide bootctl as part of systemd. It therefore looks feasible to install with the enforced Grub and then unify back to systemd-boot as part of post-install tweakage wink

Last edited by satanselbow (2016-03-22 09:23:33)

Offline

#24 2016-03-22 10:21:55

surfatwork
Member
Registered: 2012-01-05
Posts: 139

Re: Help setting up UEFI multi boot system

GRUB is certainly unnecessary - under UEFI or otherwise. Every distro I have ever installed has offered the option to install the bootloader or not. Even if bootloader installation is forced, it is fairly straightforward to tweak the installation config file and comment out any bootloader installation steps.
With refind, you simply have to point the UEFI to boot the refind stub, which can then boot everything else - be it windows or linux. this way, there is no messing with UEFI entries more than once.

Offline

#25 2016-03-22 10:42:34

Xi0N
Member
From: Bilbao - Spain
Registered: 2007-11-29
Posts: 832
Website

Re: Help setting up UEFI multi boot system

surfatwork wrote:

GRUB is certainly unnecessary - under UEFI or otherwise. Every distro I have ever installed has offered the option to install the bootloader or not. Even if bootloader installation is forced, it is fairly straightforward to tweak the installation config file and comment out any bootloader installation steps.
With refind, you simply have to point the UEFI to boot the refind stub, which can then boot everything else - be it windows or linux. this way, there is no messing with UEFI entries more than once.


Thanks for the suggestion! refind detected the windows boot without any problems! and has a nice UI. I'll give it a try until someone can clarify why systemd-boot does not detect the windows install automatically.

Offline

Board footer

Powered by FluxBB