LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook
User Name
Password
Linux - Laptop and Netbook Having a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind).

Notices


Reply
  Search this Thread
Old 11-17-2020, 08:54 AM   #1
kosmo333
LQ Newbie
 
Registered: Nov 2020
Posts: 20

Rep: Reputation: Disabled
Configuring UEFI boot mode


I'm going to replace hard disk on my laptop and install Ubuntu Mate on new disk (only one OS). Do I need move to UEFI boot option, or use Legacy BIOS mode? Originally laptop computer come with Ubuntu and legacy BIOS mode. Then propably during Ubuntu updates BIOS was updated for UEFI support. The boot menu picture. Is it better move to UEFI mode or stay with Legacy BIOS mode? Is there advantages to use UEFI boot mode in my case?
Hot to configure /boot when partitioning?

Last edited by kosmo333; 11-17-2020 at 08:55 AM.
 
Old 11-17-2020, 09:58 AM   #2
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,396

Rep: Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594
What happen to the old disk?
If you only install one os, IMHO I don't think it really matters if you use legacy or uefi, that being said, uefi maybe the better option. Unless you have special partitioning needs, select "use whole disk" during the installation and the installer will setup the disk/partitions for you.

Last edited by colorpurple21859; 11-17-2020 at 10:02 AM.
 
Old 11-17-2020, 09:59 AM   #3
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,682
Blog Entries: 19

Rep: Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492
If you want to use UEFI (or even have the option of using it), you will need to set up your new drive as a gpt drive. That way, it will boot in either mode and you can choose which one you prefer. You will need to have an efi system partition (ESP) but it doesn't need to be the first partition on the drive. In fact, for maximum flexibility, I would recommend that your first partition be a "bios boot" partition, allowing you to boot grub in legacy mode if you want. You don't put a filesystem on that one. Then have the ESP as partition 2 and put a vfat filesystem on it. Above that you can have as many primary partitions as you like for distros and data, compared with the four that DOS disks allow you.

I don't know which boot mode is better. You'll probably find some strong views here. I use UEFI on mine, but when I set it up, several people asked why I was bothering when I could just as easily use legacy mode. And I said I wanted to learn something new . Also you have to be prepared for legacy mode to be switched off at some point, so learning the new way makes sense.
 
Old 11-17-2020, 12:58 PM   #4
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
Legacy mode uses the MBR on the disk for booting. UEFI uses an efi partition specified as ESP (efi system partition) as the boot partition, and as has already been said, requires the disk be GPT partitioned. GPT reserves a protected MBR space at the beginning of the disk that can be used for legacy booting. AFAIK MBR also limits the maximum partition size that can be used for the initial OS boot.

Limiting yourself to the space limitations of MBR booting seems to me pointless since the standards are rapidly moving away from legacy boot and switching would require a full new install anyway. With booting multiple OSes it is mandatory that ALL be installed in the same boot mode and AFAIK all modern OSes are capable of (if not limited to) UEFI boot.

I choose to use UEFI on all my systems for the last several years.

Last edited by computersavvy; 11-17-2020 at 01:01 PM.
 
Old 11-17-2020, 02:50 PM   #5
jefro
Moderator
 
Registered: Mar 2008
Posts: 22,020

Rep: Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630
"replace hard disk on my laptop and install Ubuntu Mate on new disk"

There are many advantages to UEFI and almost every bios has options that are never used. One option may be hardware. A UEFI may need to be set in order to fully use the hardware. Like legacy bios the newer uefi coders stink. Most basic stuff works but advanced options may not be present.

The main reason people like uefi may be that it can assign more partitions

If it were me and I was doing a new clean install, I'd use uefi.
 
Old 11-17-2020, 02:52 PM   #6
kosmo333
LQ Newbie
 
Registered: Nov 2020
Posts: 20

Original Poster
Rep: Reputation: Disabled
My 500gb sata hard disk died, after ~ 4 years. Ubuntu crashes during boot with multiple errors. The system was unable to fix anything automatically, so asked run fsck manually. I did, but this didn't resolve the situation (no output on display at all now).
I'm tending to buy 500Gb sata. The laptop originally came with Ubuntu preinstalled.
So, if use UEFI, does installer automatically prepare efi partition if I set up new drive as a gpt drive?
What actions I need to be take starting instllation?
I want make separate /usr, /home, /var and /tmp partitions

Code:
swap      8 GB logical extended
(/) root  2O-25 GB
/home              logical extended
/usr 
/var 
/tmp
what could be approx. size of above partitions?

Last edited by kosmo333; 11-17-2020 at 02:56 PM.
 
Old 11-17-2020, 03:53 PM   #7
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,396

Rep: Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594
Quote:
So, if use UEFI, does installer automatically prepare efi partition
Only if you select "use whole drive". I think it will create an efi partition, root partition, swap partition, and maybe home partiiton if you select "use whole drive". For customized partitioning like you want, you can use gparted in live session to create the partitions you want before starting the installer, then select custom at the partition stage of the installation. You will have to create the efi partition beforehand if you use the custom option, Everyone has there idea of what size to make the efi partition, I usually suggest 300mb for the efi partition, it needs to be formatted fat32 and the esp flag set.

Last edited by colorpurple21859; 11-17-2020 at 03:55 PM.
 
Old 11-17-2020, 03:57 PM   #8
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
Quote:
Originally Posted by kosmo333 View Post
My 500gb sata hard disk died, after ~ 4 years. Ubuntu crashes during boot with multiple errors. The system was unable to fix anything automatically, so asked run fsck manually. I did, but this didn't resolve the situation (no output on display at all now).
I'm tending to buy 500Gb sata. The laptop originally came with Ubuntu preinstalled.
So, if use UEFI, does installer automatically prepare efi partition if I set up new drive as a gpt drive?
What actions I need to be take starting instllation?
I want make separate /usr, /home, /var and /tmp partitions

Code:
swap      8 GB logical extended
(/) root  2O-25 GB
/home              logical extended
/usr 
/var 
/tmp
what could be approx. size of above partitions?
I would not use /usr nor /var for modern installs. In the past, when HDDs were small those were often placed in separate partitions so if the dynamic nature of those filesystems (logs, mail, new apps, etc.) filled up the space it did not cause OS crashes. On large servers they may still be needed, but are not usually necessary for a home system.

Using UEFI I would create the following for my use.
/boot ext4 500M
/boot/efi esp (vfat formatted) 250M
Some systems use /boot as the efi partition and for those I would use a 1G partition.
swap your choice depending on the system design/needs
/ ext4 100G (Probably more than twice what is needed. Small installs can live with ~30G)
/home ext4 The remaining space.

With GPT partitioning the primary and extended partition designation is a relic of the past. They are all just partitions.

Last edited by computersavvy; 11-17-2020 at 04:14 PM.
 
Old 11-17-2020, 05:29 PM   #9
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,396

Rep: Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594
Code:
Some systems use /boot as the efi partition
Ubuntu uses /boot/efi for the efi partition mount point so 250mb will be large enough.
 
Old 11-17-2020, 09:00 PM   #10
jefro
Moderator
 
Registered: Mar 2008
Posts: 22,020

Rep: Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630
I suggest you consider letting the distro do what it wants for partitions maybe?
The only reason /boot may get filled is too many old kernel and files.

There could be some tricky issues with making a uefi usb but a install DVD may have boot options to boot to uefi or legacy. Some boot options may be worded oddly.

Something else I was going to mention.

Last edited by jefro; 11-17-2020 at 09:02 PM.
 
Old 11-18-2020, 05:59 AM   #11
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,396

Rep: Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594
did a check in a vm, it is called "erase disk" and will only create the efi partition and root partition.

Last edited by colorpurple21859; 11-18-2020 at 06:18 AM.
 
Old 11-18-2020, 08:26 AM   #12
kosmo333
LQ Newbie
 
Registered: Nov 2020
Posts: 20

Original Poster
Rep: Reputation: Disabled
The laptop support UEFI boot mode, so I only need create a bootable media with distro, and installer will make all job, I only should specify custom partitions?
 
Old 11-18-2020, 08:44 AM   #13
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,682
Blog Entries: 19

Rep: Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492
Everything depends on how that particular distro's installer works. Most major distros have an installation image that can boot in both uefi and legacy mode. When they boot in uefi native mode, a directory called /sys/firmware/efi is created by the kernel, just as it would be when booting from the hard drive. The installer can check whether this directory is present, so it knows what mode you booted in. If you install across the whole disk, it will create an ESP as part of the installation. If you install into empty space, it will know that you already have an ESP in place; otherwise the boot wouldn't have worked.
 
Old 11-18-2020, 08:53 AM   #14
beachboy2
Senior Member
 
Registered: Jan 2007
Location: Wild West Wales, UK
Distribution: Linux Mint 21 MATE, EndeavourOS, antiX, MX Linux
Posts: 4,005
Blog Entries: 33

Rep: Reputation: 1471Reputation: 1471Reputation: 1471Reputation: 1471Reputation: 1471Reputation: 1471Reputation: 1471Reputation: 1471Reputation: 1471Reputation: 1471
kosmo333,

Here is what I do for UEFI booting on a new drive from scratch.

1. Download and then burn the ISO image for Gparted to a USB drive:
https://gparted.org/

2. Go to BIOS and make sure that you are using UEFI boot and not Legacy/CSM.

3. Then boot the laptop using GParted and format the main drive as GPT.

4. Create a fat32 esp (efi system partition) partition (sda1 with 500MB), click on Apply. Leave the remainder of the drive as unallocated.

5. ***Next and most importantly, right-click on the fat32 partition > Manage flags > Select boot and esp.

6. Close GParted, shut down the computer, remove the GParted Live media.

7. Boot from the installation media and use the Mint (or other Linux OS) installer to create the other 3 primary partitions after selecting Something else.

Make sure to select Beginning for the location of each partition.

Highlight the free space and click on Change.

First create sda2:
sda2....formatted (X in the box) as ext4 as the root partition (/)......Size: 25000MB
Click on OK.

Highlight the free space and click on Change.

sda3.....not formatted (no X in the box) as the swap partition.............Size: 2000MB.
Click on OK.

Highlight the free space and click on Change.

sda4......formatted (X in the box) as ext4 as the Home partition (/home)......Size: Remainder of hard drive.
Click on OK.

Install on sda.
 
Old 11-18-2020, 02:46 PM   #15
kosmo333
LQ Newbie
 
Registered: Nov 2020
Posts: 20

Original Poster
Rep: Reputation: Disabled
@beachboy2, thanks for detailed tips. For swap partition size, it should be twice the size of RAM, right?
When specify size of partitions, for example, 8GB size: should it be specified as 8000 MB or 8192 MB? (x1024)
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Trying to boot Ubuntu in UEFI mode, UEFI doesn't recognize boot devices Sarcutus Ubuntu 11 01-11-2019 07:14 PM
[SOLVED] BIOS - disabling Secure Boot when UEFI Boot Mode is active abga Slackware 2 02-28-2018 05:46 PM
Mobo only supports uefi boot - how do I boot off a non-uefi cd? Ulysses_ Linux - Hardware 3 02-25-2016 08:06 PM
Can't get dual boot, win 7 uefi and elementary freya os uefi working shywolf Linux - Newbie 4 12-10-2015 06:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook

All times are GMT -5. The time now is 07:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration