(KAPUT)First UEFI Install

Chat about Linux in general
HaveaMint
Level 4
Level 4
Posts: 226
Joined: Fri Feb 02, 2018 9:56 pm
Location: Somewhere in th USA
Contact:

(KAPUT)First UEFI Install

Post by HaveaMint » Sat Aug 11, 2018 4:56 am

I never had any use for efi but I figured I should do one to learn it a bit. I set it up with 1st part efi, 2nd root, 3rd home, 4th backup and swap last. The way it ended up looks really strange to me.
Selection_008.jpg
Last edited by HaveaMint on Mon Aug 13, 2018 12:18 pm, edited 1 time in total.
"Tune for maximum Smoke and then read the Instructions".

gm10
Level 7
Level 7
Posts: 1555
Joined: Thu Jun 21, 2018 5:11 pm

Re: First UEFI Install

Post by gm10 » Sat Aug 11, 2018 5:35 am

The strange part is that you would be using an MBR partition table. One of the advantages of EFI is that it handles GPT disks properly. No more need for extended partitions. Suggest you change your partition table accordingly (I'm not sure how/if the Disks tool actually handles that, but e.g. GParted surely does).

User avatar
michael louwe
Level 9
Level 9
Posts: 2585
Joined: Sun Sep 11, 2016 11:18 pm

Re: First UEFI Install

Post by michael louwe » Sat Aug 11, 2018 6:04 am

HaveaMint wrote:.
.
UEFI requires GPT disks, 64bit OS and the Secure Boot feature. SB can be manually disabled in BIOS Setup.

GPT disks are limited to 128 Primary partitions = practically unlimited. So, there is no need to manually create Logical or Extended partitions for UEFI install mode, ie all the Linux partitions should be Primary partitions.

HaveaMint
Level 4
Level 4
Posts: 226
Joined: Fri Feb 02, 2018 9:56 pm
Location: Somewhere in th USA
Contact:

Re: First UEFI Install

Post by HaveaMint » Sun Aug 12, 2018 12:54 am

Well it was a bit of a struggle but I think I have a handle on it now. I got an error code trying to install which turned out I needed to set efi flag. I couldn't find any info on whether boot went at the beginning or end of the drive so I put it in the beginning. I would like to say it was fun but it wasn't.
Selection_001.png
"Tune for maximum Smoke and then read the Instructions".

gm10
Level 7
Level 7
Posts: 1555
Joined: Thu Jun 21, 2018 5:11 pm

Re: First UEFI Install

Post by gm10 » Sun Aug 12, 2018 1:55 am

Looking good. Doesn't matter where you put the EFI partition, it's one of the advantages of the UEFI/GPT system, you can do whatever you want basically. Even 50 MB for that EFI partition would have been plenty btw, you certainly won't ever need 500 MB.

HaveaMint
Level 4
Level 4
Posts: 226
Joined: Fri Feb 02, 2018 9:56 pm
Location: Somewhere in th USA
Contact:

Re: First UEFI Install

Post by HaveaMint » Sun Aug 12, 2018 2:28 am

gm10 wrote:
Sun Aug 12, 2018 1:55 am
Looking good. Doesn't matter where you put the EFI partition, it's one of the advantages of the UEFI/GPT system, you can do whatever you want basically. Even 50 MB for that EFI partition would have been plenty btw, you certainly won't ever need 500 MB.
I read somewhere that some were having problems with anything less than 512 efi, didn't make sense to me but todays drive sizes it isn't gonna put a dent in it.
"Tune for maximum Smoke and then read the Instructions".

gm10
Level 7
Level 7
Posts: 1555
Joined: Thu Jun 21, 2018 5:11 pm

Re: First UEFI Install

Post by gm10 » Sun Aug 12, 2018 2:54 am

HaveaMint wrote:
Sun Aug 12, 2018 2:28 am
I read somewhere that some were having problems with anything less than 512 efi, didn't make sense to me but todays drive sizes it isn't gonna put a dent in it.
I think that's actually the size the installer will set it to if you let it handle it. The standard is rather nebulous on it. Personally I've always made rather small ones myself and I even keep some additional stuff in there like memtest and a small Linux image, never had a problems. Also, you can have multiple ESP partitions, anyway, so should I ever run out of room I could just add another one at the end of the disk or something.

Anyway, was just bringing this up since partitions are kinda the topic. As you said, doesn't matter all that much given overall drive sizes these days.

User avatar
slipstick
Level 5
Level 5
Posts: 735
Joined: Sun Oct 21, 2012 9:56 pm
Location: Somewhere on the /LL0 scale

Re: First UEFI Install

Post by slipstick » Sun Aug 12, 2018 3:08 am

HaveaMint wrote:
Sun Aug 12, 2018 2:28 am
gm10 wrote:
Sun Aug 12, 2018 1:55 am
Looking good. Doesn't matter where you put the EFI partition, it's one of the advantages of the UEFI/GPT system, you can do whatever you want basically. Even 50 MB for that EFI partition would have been plenty btw, you certainly won't ever need 500 MB.
I read somewhere that some were having problems with anything less than 512 efi, didn't make sense to me but todays drive sizes it isn't gonna put a dent in it.
Just another data point - my EFI partition is only 105 MB and is only 25% full on my triple boot system: LM18.3, LM17.3, and Windows 7.
In theory, theory and practice are the same. In practice, they ain't.

User avatar
michael louwe
Level 9
Level 9
Posts: 2585
Joined: Sun Sep 11, 2016 11:18 pm

Re: First UEFI Install

Post by michael louwe » Sun Aug 12, 2018 5:00 am

@ HaveaMint, .......
HaveaMint wrote:.
.
The EFI System Partition(ESP) is a boot partition. Boot partitions should be located at the beginning of the hard-disk/drive, esp for HDDs = faster booting. Similarly for the location of the next Root or / partition, which should also be not too large = faster system. The Swap partition should be located last because it is seldom accessed by the LM system.
....... For SSDs, location or size of partitions may be irrelevant.

The ESP should be at least 550MB in size if manually created ... https://www.rodsbooks.com/efi-bootloade ... iples.html .
....... In certain situations, eg those who multi-boot to test various Linux distros, a smallish ESP will be quickly filled up = bootloader installation problems ... https://www.reddit.com/r/linux4noobs/co ... partition/ = the ESP should be at least 1GB in size.

gm10
Level 7
Level 7
Posts: 1555
Joined: Thu Jun 21, 2018 5:11 pm

Re: First UEFI Install

Post by gm10 » Sun Aug 12, 2018 5:25 am

michael louwe wrote:
Sun Aug 12, 2018 5:00 am
The ESP should be at least 550MB in size if manually created ... https://www.rodsbooks.com/efi-bootloade ... iples.html .
....... In certain situations, eg those who multi-boot to test various Linux distros, a smallish ESP will be quickly filled up = bootloader installation problems ... https://www.reddit.com/r/linux4noobs/co ... partition/ = the ESP should be at least 1GB in size.
Say what? First of all, a single boot loader is enough to boot many Linux distros as you want, if you dual boot Windows you'll have two.
Even if you are so inclined to install a separate boot loader for every distro for no good reason, then what, the Ubuntu efi isn't even 5 MB in size, how many distros with boot loaders do you want to install to fill 500, let alone 1 GB?

I dare you to show me a single practical use case where 1 GB is required just to place boot loaders.

Now you can have fun with EFI and load more than boot loaders using that specification, entire shells, games, rescue environments, etc., but that's something else entirely.

HaveaMint
Level 4
Level 4
Posts: 226
Joined: Fri Feb 02, 2018 9:56 pm
Location: Somewhere in th USA
Contact:

Re: First UEFI Install

Post by HaveaMint » Sun Aug 12, 2018 5:30 am

Hmm...
Although the EFI specification is mute on the subject of the ESP's size, most OSes make it fairly small—Macs ship with 200MiB ESPs, and the Windows 7 installer creates one of just 100MiB. (That value has been raised to a bit over 200MiB on newer versions of Windows.) Some users, however, have found that some EFIs have bugs that cause problems with FAT32 ESPs that are under 512MiB (537MB) in size. One very common problem is files that can't be read by the EFI. The Linux mkdosfs command defaults to using FAT16 for partitions of up to 520MiB (546MB). Therefore, adding a margin of safety to protect against MiB/MB confusion and rounding errors, I recommend creating an ESP that's at least 550MiB in size. If you must use a smaller ESP and if you encounter mysterious problems, try converting it to FAT16; most ESPs will work fine with this, and it may eliminate your problems. On the other hand, this may cause the Windows installer to fail should you need to install this OS.

Each EFI boot loader is stored in its own subdirectory of the EFI directory on the ESP. These subdirectories are typically named after the OS that created them. For instance, Ubuntu places its EFI boot loader files in EFI/ubuntu, and Red Hat places its EFI boot files in EFI/redhat. (Fedora also used the EFI/redhat directory name through Fedora 17, but it's switched to EFI/fedora with version 18.) Once Linux is installed, the ESP is typically mounted at /boot/efi, so these directories would be /boot/efi/EFI/ubuntu and /boot/efi/EFI/redhat, respectively, on a working Linux installation.
"Tune for maximum Smoke and then read the Instructions".

HaveaMint
Level 4
Level 4
Posts: 226
Joined: Fri Feb 02, 2018 9:56 pm
Location: Somewhere in th USA
Contact:

Re: First UEFI Install

Post by HaveaMint » Sun Aug 12, 2018 5:35 am

Mine is just under 5 MB with 18.3 only no other OS's. How or where can you peek in that partition?
"Tune for maximum Smoke and then read the Instructions".

gm10
Level 7
Level 7
Posts: 1555
Joined: Thu Jun 21, 2018 5:11 pm

Re: First UEFI Install

Post by gm10 » Sun Aug 12, 2018 5:51 am

HaveaMint wrote:
Sun Aug 12, 2018 5:35 am
How or where can you peek in that partition?
What do you mean? You can just access it from terminal or via your file browser, it's mounted at /boot/efi. By default it gets mounted with umask=0077 for security reasons so only the owner (root) has access. So run elevated when you poke around in there. You can add your own files and folders, there's no risk, just don't modify the boot loader that's already there, in particular with secure boot enabled.

User avatar
michael louwe
Level 9
Level 9
Posts: 2585
Joined: Sun Sep 11, 2016 11:18 pm

Re: First UEFI Install

Post by michael louwe » Sun Aug 12, 2018 7:59 am

@ gm10, .......
.
https://www.ctrl.blog/entry/esp-size-guide
Microsoft recommends you set aside 100 MiB for Windows. Unless you decide to get away with the separate /boot partition on Linux, then I recommend you set aside 100 MiB of space per Linux system you intend to install. Keep in mind that you should allocate some space for failed and past installations, upgrade staging, and operating/file system debris as well. There is no reason to try and squeeze down the size of the ESP to a point where it might cause issues for you in the future.
.
gm10 wrote:Say what? First of all, a single boot loader is enough to boot many Linux distros as you want, if you dual boot Windows you'll have two.
In practice, that is not what happens when users multi-boot various Linux distros, ie many different types and versions of Linux bootloaders will be installed on the ESP. Similarly, if the users multi-boot UEFI Win 7, Win 8.1 and Win 10.

gm10
Level 7
Level 7
Posts: 1555
Joined: Thu Jun 21, 2018 5:11 pm

Re: First UEFI Install

Post by gm10 » Sun Aug 12, 2018 8:53 am

michael louwe wrote:
Sun Aug 12, 2018 7:59 am
In practice, that is not what happens when users multi-boot various Linux distros, ie many different types and versions of Linux bootloaders will be installed on the ESP. Similarly, if the users multi-boot UEFI Win 7, Win 8.1 and Win 10.
For Windows you can't avoid it, but most if not all distros can be booted with grub, so why would you install more than a single boot loader for that? Sure, you can chainload right into the next EFI but I don't see the advantage over booting the kernel directly. Anyway, even given your premise I feel it's a stretch to imagine you'd ever fill up 500 or 1000 MB like that. Unless you litter and leave the boot loaders behind after you remove the distro?

Anyway, it's not important, we can agree to disagree, and better safe than sorry was never the wrong approach I guess. Meanwhile I'll stick to my small EFI partitions that multiboot just fine until maybe one day they don't (been working fine for many years though). :)

User avatar
michael louwe
Level 9
Level 9
Posts: 2585
Joined: Sun Sep 11, 2016 11:18 pm

Re: First UEFI Install

Post by michael louwe » Sun Aug 12, 2018 10:04 am

gn10 wrote:.
.
The most important step here is to make the first partition (/dev/sda1) as an EFI System Partition (ESP). This is where the brains of the system booting will eventually go, the Refind boot manager.

In my first tests I made it less than 100 MB in size, but on my later partition setup I made it 1000 MB because I noticed some distros like Deepin need more than 100 MB for the EFI partition.
https://medium.com/@manujarvinen/settin ... a1fcf8d502 (Setting up a multi-boot of 5 Linux distributions with Windows on the side)

HaveaMint
Level 4
Level 4
Posts: 226
Joined: Fri Feb 02, 2018 9:56 pm
Location: Somewhere in th USA
Contact:

Re: First UEFI Install

Post by HaveaMint » Sun Aug 12, 2018 5:04 pm

On my desktop it is a UEFI mainboard but the graphics card isn't (GTX660TI) however since the mainboard is UEFI I now know I can use GPT if / when in the future I do a fresh install.

"GPT provides a more flexible mechanism for partitioning disks than the older Master Boot Record (MBR) partitioning scheme that was common to PCs. The GUID Partition Table (GPT) was introduced as part of the Unified Extensible Firmware Interface (UEFI) initiative. So to use GPT partitioning style the motherboard should support UEFI mechanism. As your motherboard does support UEFI, it is possible to use GPT partitioning style on the hard disk. "
"Tune for maximum Smoke and then read the Instructions".

rui no onna
Level 3
Level 3
Posts: 175
Joined: Thu Jul 19, 2018 4:18 pm

Re: First UEFI Install

Post by rui no onna » Sun Aug 12, 2018 5:22 pm

michael louwe wrote:
Sat Aug 11, 2018 6:04 am
.
UEFI requires GPT disks, 64bit OS and the Secure Boot feature. SB can be manually disabled in BIOS Setup.

GPT disks are limited to 128 Primary partitions = practically unlimited. So, there is no need to manually create Logical or Extended partitions for UEFI install mode, ie all the Linux partitions should be Primary partitions.
Note, I don't believe UEFI *requires* GPT although it's certainly preferred. GPT requires UEFI for boot, though.

gm10
Level 7
Level 7
Posts: 1555
Joined: Thu Jun 21, 2018 5:11 pm

Re: First UEFI Install

Post by gm10 » Mon Aug 13, 2018 1:45 am

rui no onna wrote:
Sun Aug 12, 2018 5:22 pm
michael louwe wrote:
Sat Aug 11, 2018 6:04 am
.
UEFI requires GPT disks, 64bit OS and the Secure Boot feature. SB can be manually disabled in BIOS Setup.

GPT disks are limited to 128 Primary partitions = practically unlimited. So, there is no need to manually create Logical or Extended partitions for UEFI install mode, ie all the Linux partitions should be Primary partitions.
Note, I don't believe UEFI *requires* GPT although it's certainly preferred. GPT requires UEFI for boot, though.
UEFI can boot MBR just fine and in fact BIOS can also boot from GPT. You may be thinking of restrictions like Windows which does in fact required EFI to allow a GPT boot. Linux, on the other hand, does not have this problem (some rare BIOSes aside maybe).

User avatar
michael louwe
Level 9
Level 9
Posts: 2585
Joined: Sun Sep 11, 2016 11:18 pm

Re: First UEFI Install

Post by michael louwe » Mon Aug 13, 2018 4:20 am

@ gm10, .......
gm10 wrote:UEFI can boot MBR just fine
.
Are you saying you have run Linux for some time just fine in UEFI mode on an MBR disk.?

It's not normal and not recommended by Linux experts ... https://askubuntu.com/questions/722263/ ... ead-of-gpt
https://superuser.com/questions/1067709 ... ode-at-all

Post Reply

Return to “Chat about Linux”