Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,364
Rep:
Hi jozmak,
In my opinion, 100MB is way too small for an ESP. If it were me, I would use GParted Live to grow it to *at least* 200MB or if you can spare it (your df -h output suggests this is the case), 500MB.
You can do a clean-up, but in my opinion you will run into the issue again if you don't increase the size of your ESP.
In my opinion, 100MB is way too small for an ESP. If it were me, I would use GParted Live to grow it to *at least* 200MB or if you can spare it (your df -h output suggests this is the case), 500MB.
You can do a clean-up, but in my opinion you will run into the issue again if you don't increase the size of your ESP.
Hope this helps - let us know if anything.
Cheers !
Hi Rickkkk,
Thanks for replying.
I thought of this, but as far as I know you can expand a partition only if there is space right next to it.
This is my partition table:
Code:
[mak@jmak-pc ~]$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 238.5G 0 disk
├─sda1 8:1 0 450M 0 part
├─sda2 8:2 0 100M 0 part /boot/efi
├─sda3 8:3 0 16M 0 part
├─sda4 8:4 0 59.9G 0 part
├─sda5 8:5 0 20G 0 part
├─sda6 8:6 0 20G 0 part
├─sda7 8:7 0 20G 0 part
├─sda8 8:8 0 20G 0 part /
├─sda9 8:9 0 20G 0 part
├─sda10 8:10 0 4G 0 part [SWAP]
└─sda11 8:11 0 74G 0 part /run/media/mak/b6eaebe0-022c-4add-9692-c54ad69c
[mak@jmak-pc ~]$
As you see there is a 16MB partition between the efi and the windows (sda4) partition from which I could recover the required disk space. I think the 16MB is either dell service partition or windows recovery partition.
So I don’t know how this would be possible.
As you see there is plenty of diskspace on (sda11) partition available but they are in a wrong sequence.
What do you think if I would create a second ESP partition right after the (sda11) that could work? This way I would have two ESP partitions, one for windows and one for linux.
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,364
Rep:
Hi again jozmak,
You are indeed correct that you must have contiguous free space adjacent to a partition in order to be able to expand it. You would be required to do a good bit of manipulation of several partitions (shrinking, moving ...) to grow your ESP.
I can't comment on whether your suggestion of a 2nd ESP is recommendable or not - I've never done it (perhaps other members may have an opinion ... ).
I personally would greatly simplify the partitioning scheme. 11 logical partitions on a 250GB disk is, in my opinion, not optimal. I would expect that you may run into other issues down the road. That said, you may have set it up that way for a good reason - could you perhaps elaborate on what motivated you to structure it that way ?
My scheme of choice for a client machine (i.e. non-server) is simple: one ESP, one root partition (which includes home) and one swap partition (even this is optional). On my servers I have a separate home partition.
You are indeed correct that you must have contiguous free space adjacent to a partition in order to be able to expand it. You would be required to do a good bit of manipulation of several partitions (shrinking, moving ...) to grow your ESP.
I can't comment on whether your suggestion of a 2nd ESP is recommendable or not - I've never done it (perhaps other members may have an opinion ... ).
I personally would greatly simplify the partitioning scheme. 11 logical partitions on a 250GB disk is, in my opinion, not optimal. I would expect that you may run into other issues down the road. That said, you may have set it up that way for a good reason - could you perhaps elaborate on what motivated you to structure it that way ?
My scheme of choice for a client machine (i.e. non-server) is simple: one ESP, one root partition (which includes home) and one swap partition (even this is optional). On my servers I have a separate home partition.
The reason is simple, I am a kind of distro hopper. I like to check out different linux flavors.
On my desktop machine with 1 TB space I had 16 partitions.
"Having two EFI System Partitions (ESPs) on one disk is explicitly permitted by the EFI spec; however, it's inadvisable because the Windows 7 installer flakes out when presented with such a configuration. Once installed, Windows 7 seems to work normally, although I don't know if everything works fine -- there might conceivably be problems with software updates that would access the ESP, for instance...."
"Another possibility is to use two ESPs, but adjust the Linux ESP's partition type code so that it's not a regular ESP should you ever need to re-install Windows or when you install system updates or otherwise do anything that might interact with the ESP."
In the second part, what does he mean by "adjust the Linux ESP's partition type code so that it's not a regular ESP"
As far as I know the efi partition code is "ef00". Is there other efi code?
From the 19 items only 4 exist, the rest are none-existent leftovers from my previous experiments.
Impressive - even I don't have listings like that. If you don't need all 4, just delete the appropriate directory(s) - that'll give you a "quick fix" maybe. Likewise the empty dirs. If you also want to clean up the boot list (in NVRAM), use efibootmgr from Intel; should be in one of your repos. Else check your EFI setup menu for a delete option.
As for the partition, no magic there - it's just a [V]FAT partition. Reallocate a bigger one and copy everything over. I've never allowed more than one EFI partition (change the original one after the copy), but the move to a new partition has worked fine when I've needed to do it.
Impressive - even I don't have listings like that. If you don't need all 4, just delete the appropriate directory(s) - that'll give you a "quick fix" maybe. Likewise the empty dirs. If you also want to clean up the boot list (in NVRAM), use efibootmgr from Intel; should be in one of your repos. Else check your EFI setup menu for a delete option.
As for the partition, no magic there - it's just a [V]FAT partition. Reallocate a bigger one and copy everything over. I've never allowed more than one EFI partition (change the original one after the copy), but the move to a new partition has worked fine when I've needed to do it.
It doesn't show the old entries because when I rearanged the boot order I left only the active ones on the list. This is a new machine, I've never had experince with efi systems before because my old machine had legacy board. When I experimented with the efibootmgr I've never knew that I will later face issues like this.
Could you instruct me how to delete those entries from the esp partition? How could I make efibootmgr to show all the boot entries?
I do distro hopping too and that, since my MBR days. It is something else to actually install the systems and experiment. But whenever I installed a new distro I didn't let it install its bootloader. Instead, I have a Slackware Linux which I use as my main distro and it holds all my configs for GRUB. I would just update the /boot/grub/grub.cfg each time I installed something new.
Yes, 100MB is a bit small, but a second EFI partition can mess up multi-booting, especially with Windows there. I don't recommend this.
For your current problem, if you need to delete entries from the UEFI registered list of bootloaders, take this example:
Code:
BootCurrent: 0001
Timeout: 6 seconds
BootOrder: 0001,0000,0002,0003,0004,0005,0006,0007
Boot0000* Windows Boot Manager
Boot0001* manjaro
Boot0002* ArchLabs
Boot0003* antergos_grub_vl0n
Boot0004* antergos_grub_dh05
Boot0005* UEFI:CD/DVD Drive
Boot0006* UEFI:Removable Device
Boot0007* UEFI:Network Device
Boot0009* UEFI:Network Device
### I would like to remove bootloader "antergos_grub_dh05", that is Boot0004: ###
> efibootmgr -b 0004 -B
You can read the man pages of efibootmgr for more information.
Concerning all the other bootloaders which are present on the EFI partition but not listed in the output of efibootmgr, they are simply not being used at all. You can safely delete them from the EFI partition.
I will advise that in the future you boot a single instance of GRUB and just add an entry for any newly installed distro to the grub.cfg. Or if you really want to install the "new" bootloader, then you just have to think a bit more and manage the EFI space. With 11 partitions only on the hard disk I don't think you need that many as 19 bootloaders on the EFI partition, so I seriously think the 100MB can be managed.
Last edited by aragorn2101; 07-15-2017 at 01:19 AM.
I do distro hopping too and that, since my MBR days. It is something else to actually install the systems and experiment. But whenever I installed a new distro I didn't let it install its bootloader. Instead, I have a Slackware Linux which I use as my main distro and it holds all my configs for GRUB. I would just update the /boot/grub/grub.cfg each time I installed something new.
Yes, 100MB is a bit small, but a second EFI partition can mess up multi-booting, especially with Windows there. I don't recommend this.
For your current problem, if you need to delete entries from the UEFI registered list of bootloaders, take this example:
Code:
BootCurrent: 0001
Timeout: 6 seconds
BootOrder: 0001,0000,0002,0003,0004,0005,0006,0007
Boot0000* Windows Boot Manager
Boot0001* manjaro
Boot0002* ArchLabs
Boot0003* antergos_grub_vl0n
Boot0004* antergos_grub_dh05
Boot0005* UEFI:CD/DVD Drive
Boot0006* UEFI:Removable Device
Boot0007* UEFI:Network Device
Boot0009* UEFI:Network Device
### I would like to remove bootloader "antergos_grub_dh05", that is Boot0004: ###
> efibootmgr -b 0004 -B
You can read the man pages of efibootmgr for more information.
Concerning all the other bootloaders which are present on the EFI partition but not listed in the output of efibootmgr, they are simply not being used at all. You can safely delete them from the EFI partition.
I will advise that in the future you boot a single instance of GRUB and just add an entry for any newly installed distro to the grub.cfg. Or if you really want to install the "new" bootloader, then you just have to think a bit more and manage the EFI space. With 11 partitions only on the hard disk I don't think you need that many as 19 bootloaders on the EFI partition, so I seriously think the 100MB can be managed.
Thanks for the idea.
So I guess I just have to live with this 100M for a while. This is a new machine and it still has 1 year warranty on it. When the warranty expires I plan to remove windows completely, repartition the harddrive creating a large enough efi partition, which I guess will solve these problems.
I tried several times before creating 40_custom boot file in grub.d but I always ended up in failure. Some time ago, I even posted a help request on archlinux forum but they couldn't figure out what was wrong with the 40_custom file. I copied it exactely from the arch wiki page and it still didn't work.
If you install Windows from an OEM CDROM and partition the hard drive manually, a 100 MiB EFI partition should be enough. On my home built desktop computer, I installed Windows 8 (subsequently upgraded to windows 10) from an OEM CDROM. Microsoft takes up about 24M on the EFI partition. Most Linux distros only use about 120K on the EFI partition. The exceptions are Fedora and CentOS which use about 8M and Ubuntu which uses about 3-6M. My 100MiB EFI partition is only 48% full. It contains Windows and 7 Linux distros.
Things are different on a laptop. My HP laptop has a 260M EFI partition that was already set up by the manufacturer. Microsoft uses 66M and HP 44M. The 7 or so Linux distros that I have on it do not take up much space. It is 53% full, mostly junk from Microsoft and HP.
From a Linux perspective, you can have more than one EFI partition per hard drive. The problem is when you try to update Windows, the process may hang if you have more than one EFI partition.
If I were you, I would back up the EFI partition using Clonezilla or some other product, and do an internet search on how to remove unnecessary Microsoft and laptop manufacturer files from the EFI. If the laptop then becomes unbootable, you can always restore the original ESP.
I tried several times before creating 40_custom boot file in grub.d but I always ended up in failure. Some time ago, I even posted a help request on archlinux forum but they couldn't figure out what was wrong with the 40_custom file. I copied it exactely from the arch wiki page and it still didn't work.
Editing 40_custom to add distro menu entries is a bad idea.
Let's say you have a main distro, then from within your main distro you update grub like this:
Code:
grub-mkconfig -o /boot/grub/grub.cfg
It should detect all the distros you have on your machine and add an entry for them in the config file.
If you install Windows from an OEM CDROM and partition the hard drive manually, a 100 MiB EFI partition should be enough. On my home built desktop computer, I installed Windows 8 (subsequently upgraded to windows 10) from an OEM CDROM. Microsoft takes up about 24M on the EFI partition. Most Linux distros only use about 120K on the EFI partition. The exceptions are Fedora and CentOS which use about 8M and Ubuntu which uses about 3-6M. My 100MiB EFI partition is only 48% full. It contains Windows and 7 Linux distros.
Things are different on a laptop. My HP laptop has a 260M EFI partition that was already set up by the manufacturer. Microsoft uses 66M and HP 44M. The 7 or so Linux distros that I have on it do not take up much space. It is 53% full, mostly junk from Microsoft and HP.
From a Linux perspective, you can have more than one EFI partition per hard drive. The problem is when you try to update Windows, the process may hang if you have more than one EFI partition.
If I were you, I would back up the EFI partition using Clonezilla or some other product, and do an internet search on how to remove unnecessary Microsoft and laptop manufacturer files from the EFI. If the laptop then becomes unbootable, you can always restore the original ESP.
Hi plasmonics,
Here is the EFI partition content:
Code:
[mak@jmak-pc EFI]$ ls
antergos_grub_vl0n ArchLabs archLXQT_2 Boot Dell grub Manjaro Microsoft
[mak@jmak-pc EFI]$
In the Dell directory there is only two items a bios recovery file and a small log file. That's all.
The Microsoft directory on the other hand, full of language files and directories. Those are the ones that take up most of the space.
But I don't dare to touch any of those because I have no good understanding what are their functions.
This is the content of the Microsoft/Boot directory:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.