LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 06-29-2017, 09:28 PM   #1
RoqueOne
LQ Newbie
 
Registered: Jun 2017
Location: Under the thumb of the Lee Dynasty
Distribution: Debian Sid, Antergos, VoidLinux
Posts: 14

Rep: Reputation: Disabled
Resizing the ESP /boot/efi partition


I have an existing Debian 9 installation on a 2 TB GPT formatted internal SSD/SATA hybrid hard disk on a brand new Acer laptop. The entire Debian install takes up a mere 600 GB of the hard drive. No other distro nor OSes are on the remaining 1.4 TB space. During the initial Debian installation, I set aside only 250 MB for /boot/efi FAT32 formatted partition which resides on the last partition of my Debian install i.e. /dev/sda7.

On top of Debian, I am thinking of installing several other distros to fill up the remainder 1.4 TB currently empty space*as well as on an external 2 TB portable drive. I understand that different distros and OSes can share a common, bootbable ESP ala /boot/efi. However going through several*of the Installation guides for Manjaro, Solus among others, I discovered that they mostly seem to recommend a 512 MB /boot/efi. My question is can I simply and safely resize my /dev/sda7 from the existing 250 MB /boot/efi to 512 MB in say, the Manjaro's Calamares (or any other distro's partitioning portion of their installer) installer? Will doing so render my Debian unbootable? What precautions do I need to exercise if any?

TIA

Last edited by RoqueOne; 06-29-2017 at 09:32 PM.
 
Old 06-29-2017, 10:19 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 18,077

Rep: Reputation: 2899Reputation: 2899Reputation: 2899Reputation: 2899Reputation: 2899Reputation: 2899Reputation: 2899Reputation: 2899Reputation: 2899Reputation: 2899Reputation: 2899
Quote:
Originally Posted by RoqueOne View Post
My question is
Which of your 3 questions would you like answered ?.

It's just a partition - do as you wish with it, but ensure it retains the correct type. A simple resize shouldn't affect that, although I personally wouldn't leave the task to an installer. As for precautions, see my sigline.
The only time I've had issues was when I had "full-disk" encryption with LUKS. That got way too messy with initrd hooks and grub parameters, so I eventually just trashed it and started again.
 
1 members found this post helpful.
Old 06-29-2017, 11:20 PM   #3
RoqueOne
LQ Newbie
 
Registered: Jun 2017
Location: Under the thumb of the Lee Dynasty
Distribution: Debian Sid, Antergos, VoidLinux
Posts: 14

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by syg00 View Post
Which of your 3 questions would you like answered ?.

It's just a partition - do as you wish with it, but ensure it retains the correct type. A simple resize shouldn't affect that, although I personally wouldn't leave the task to an installer. As for precautions, see my sigline.
The only time I've had issues was when I had "full-disk" encryption with LUKS. That got way too messy with initrd hooks and grub parameters, so I eventually just trashed it and started again.
Thank you syg00 for the prompt reply . Noted about the warning on reliance on a distro's installer for the aforementioned task. Thank you.

I am considering whether I should resize my existing /boot/efi (on /dev/sda7) from 250 MB to 512 MB with cfdisk, gparted or some other similar tool from System Rescue CD or similar. My current existing partition scheme is here if you or others are interested in having a look: https://bpaste.net/show/3793079494e8

I don't have any encrypted partitions. And I'm aware of the need to backup important data. I suppose the current Debian /boot/efi is considered important enough to back up. Otherwise being a brand new laptop, I have little else of value on my Debian install other than some mentally and visually stimulating Adult-rated material that is.

That said, I do want to have whatever other distros I may put on the remaining 1.3-1.4 TB of free hard disk space to be able to multi-boot with my Debian using this common, resized, enlarged /boot/efi.
 
Old 06-29-2017, 11:46 PM   #4
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,513

Rep: Reputation: 1004Reputation: 1004Reputation: 1004Reputation: 1004Reputation: 1004Reputation: 1004Reputation: 1004Reputation: 1004
I might suggest installing "virtualbox" and then making virtual machines for the other distros you wish to install.
 
Old 06-30-2017, 12:00 AM   #5
RoqueOne
LQ Newbie
 
Registered: Jun 2017
Location: Under the thumb of the Lee Dynasty
Distribution: Debian Sid, Antergos, VoidLinux
Posts: 14

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by AwesomeMachine View Post
I might suggest installing "virtualbox" and then making virtual machines for the other distros you wish to install.
Thank you AweSomeMachine for your suggestion but I want the actual distros to be physically installed on my HDD.
 
Old 06-30-2017, 12:01 AM   #6
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 19.1 MATE
Posts: 8,016
Blog Entries: 5

Rep: Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859
Make a backup image of the ESP partition (using Macrium Reflect, Clonezilla, or similar), preferably all partitions if you have enough backup space on an external media and can spare the time, and then resize the ESP by booting from a GParted Live media.

That way, if anything goes awry, you can roll back your partitions to how they were before.

By the way, if you use GParted, then you will be looking at 512MiB, not 512MB, as GParted works by default in MiB, GiB etc. It's worth thinking of multiples of 1024 when dealing with computer storage, rather than the misleading SI-based MB, GB etc. used by those who sell us computer equipment.
 
1 members found this post helpful.
Old 06-30-2017, 12:11 AM   #7
RoqueOne
LQ Newbie
 
Registered: Jun 2017
Location: Under the thumb of the Lee Dynasty
Distribution: Debian Sid, Antergos, VoidLinux
Posts: 14

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by hydrurga View Post
Make a backup image of the ESP partition (using Macrium Reflect, Clonezilla, or similar), preferably all partitions if you have enough backup space on an external media and can spare the time, and then resize the ESP by booting from a GParted Live media.

That way, if anything goes awry, you can roll back your partitions to how they were before.

By the way, if you use GParted, then you will be looking at 512MiB, not 512MB, as GParted works by default in MiB, GiB etc. It's worth thinking of multiples of 1024 when dealing with computer storage, rather than the misleading SI-based MB, GB etc. used by those who sell us computer equipment.
I may indeed now go ahead and clone my sda onto my external, portable drive /dev/sdc. I'll of course, wiped whatever that is currently on my /dev/sdc - actually nothing there but formatted otherwise empty partitions. hydruga, any idea as to how long the copying/clong process might take?

Noted about the MiB vs MB bits. Thank you.
 
Old 06-30-2017, 12:20 AM   #8
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 18,077

Rep: Reputation: 2899Reputation: 2899Reputation: 2899Reputation: 2899Reputation: 2899Reputation: 2899Reputation: 2899Reputation: 2899Reputation: 2899Reputation: 2899Reputation: 2899
The ESP is simply a FAT partition - it is not location dependant like other systems. The EFI looks for the partition type and opens it. I back it up using cp, just like any other filesystem.
Resize and go. Much simpler than the old days - one of the reasons I like UEFI.
 
1 members found this post helpful.
Old 06-30-2017, 12:23 AM   #9
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 19.1 MATE
Posts: 8,016
Blog Entries: 5

Rep: Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859
Quote:
Originally Posted by RoqueOne View Post
I may indeed now go ahead and clone my sda onto my external, portable drive /dev/sdc. I'll of course, wiped whatever that is currently on my /dev/sdc - actually nothing there but formatted otherwise empty partitions. hydruga, any idea as to how long the copying/clong process might take?

Noted about the MiB vs MB bits. Thank you.
It might take a wee while (several hours even, depending on data size and transfer speed - use a USB3 port for your external device), but it will be worth it for peace of mind.

The way you describe your current partitioning layout would indicate that you would probably only need to image your ESP as it will be taking space from the unformatted space at the end of your disk, and thus not affecting any other existing partitions. However, partitioning *may* go awry so to decide which partitions you want to image, you have to make a call depending on the value of the data in your existing partitions and whether they are already backed up somewhere.

Note that imaging will use less destination space than cloning due to the use of compression.

Make a list of things you've been meaning to get around to for ages, and get them done while the imaging is taking place.
 
1 members found this post helpful.
Old 06-30-2017, 12:27 AM   #10
RoqueOne
LQ Newbie
 
Registered: Jun 2017
Location: Under the thumb of the Lee Dynasty
Distribution: Debian Sid, Antergos, VoidLinux
Posts: 14

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by syg00 View Post
The ESP is simply a FAT partition - it is not location dependant like other systems. The EFI looks for the partition type and opens it. I back it up using cp, just like any other filesystem.
Resize and go. Much simpler than the old days - one of the reasons I like UEFI.
syg00, someone suggested that it'll be fine for me to extend sda7 to 512M by stealing it from sda6. But assuming that I do go ahead and exercise the resizing option, I plan on using the 1.4 or more TB of free space following /dev/sda7 (see my fdisk layout: https://bpaste.net/show/3793079494e8) to expand my /boot/efi to 512 MB instead. This should be possible and won't render my Debian unbootable am I correct?
 
Old 06-30-2017, 12:37 AM   #11
RoqueOne
LQ Newbie
 
Registered: Jun 2017
Location: Under the thumb of the Lee Dynasty
Distribution: Debian Sid, Antergos, VoidLinux
Posts: 14

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by hydrurga View Post
It might take a wee while (several hours even, depending on data size and transfer speed - use a USB3 port for your external device), but it will be worth it for peace of mind.
Good to hear .

Quote:
The way you describe your current partitioning layout would indicate that you would probably only need to image your ESP as it will be taking space from the unformatted space at the end of your disk, and thus not affecting any other existing partitions.
Sure is reassuring to hear. I guess this actually answers my last follow-up question i.e. if I should resize by "stealing" disk space from sda6 i.e. my /home partition on Debian as suggested by someone or by using the the unformatted, free space following /dev/sda7 to syg00. I'll just proceed ahead and use the ~1.5 TB unformatted space then.

Quote:
Note that imaging will use less destination space than cloning due to the use of compression.
Noted. Thanks !

Quote:
Make a list of things you've been meaning to get around to for ages, and get them done while the imaging is taking place.
Ahh. So imaging it'll be then. Once again, many thanks hydrurga.
 
Old 06-30-2017, 12:44 AM   #12
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 19.1 MATE
Posts: 8,016
Blog Entries: 5

Rep: Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859
Quote:
Originally Posted by RoqueOne View Post
Sure is reassuring to hear. I guess this actually answers my last follow-up question i.e. if I should resize by "stealing" disk space from sda6 i.e. my /home partition on Debian as suggested by someone or by using the the unformatted, free space following /dev/sda7 to syg00. I'll just proceed ahead and use the ~1.5 TB unformatted space then.
Absolutely. Everything depends on how your partitions are laid out, but if the disk space after the ESP is unallocated then it is the safer option to expand the ESP into that space.
 
1 members found this post helpful.
Old 06-30-2017, 12:52 AM   #13
RoqueOne
LQ Newbie
 
Registered: Jun 2017
Location: Under the thumb of the Lee Dynasty
Distribution: Debian Sid, Antergos, VoidLinux
Posts: 14

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by hydrurga View Post
Absolutely. Everything depends on how your partitions are laid out, but if the disk space after the ESP is unallocated then it is the safer option to expand the ESP into that space.
Thank whoever is up there that I made my /dev/sda7 ala my /boot/efi ESP partition to be the last partition on my Debian install . If only I had made that ESP partition to be 512 MiB when I was installing Debian perhaps it wouldn't have come to this. Regardless, sure is comforting and reassuring that resizing ain't difficult nor impossible . I'll marked this thread as solved then.
 
Old 06-30-2017, 12:57 AM   #14
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 19.1 MATE
Posts: 8,016
Blog Entries: 5

Rep: Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859
Quote:
Originally Posted by RoqueOne View Post
If only I had made that ESP partition to be 512 MiB when I was installing Debian perhaps it wouldn't have come to this.
Yes, you wouldn't have had the joy of learning what you are now.

Let us know how it goes!
 
Old 06-30-2017, 01:07 AM   #15
RoqueOne
LQ Newbie
 
Registered: Jun 2017
Location: Under the thumb of the Lee Dynasty
Distribution: Debian Sid, Antergos, VoidLinux
Posts: 14

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by hydrurga View Post
Yes, you wouldn't have had the joy of learning what you are now.

Let us know how it goes!
Heh. Have to agree on the learning experience though.

Sure thing! Once again, hydrurga, my heartfelt appreciation and thanks to both you and syg00 for helping me out with this. I am used (maybe too used) to the old BIOS/MBR Legacy setup (despite the limitations of the 4 Primary partitions) but post-Windows 8/Secure Boot/Fast Boot and the advent of GPT, and UEFI in particular the different OEMs apparently non-standardized and perhaps flawed implementation of UEFI has meant that old folks like myself have to learn and adapt. I guess this such is but simply the nature of life.

Cheerio !
 
  


Reply

Tags
gpt, installation, partitioning, uefi, uefi booting


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
resize efi question [/boot/efi] with boot flag gparted mtdew3q Fedora 4 03-19-2017 10:02 PM
Is it good idea to have EFI partition mounted as /boot ? froff Linux - General 3 05-08-2015 07:20 PM
[SOLVED] Can't find /boot/efi/EFI/Slackware/vmlinuz kernel configuration ironQiu Slackware 4 02-09-2015 06:21 AM
[SOLVED] How to recreate EFI boot partition? smokn Linux - Software 10 07-21-2013 02:21 AM
[SOLVED] Windows boot partition got unallocated after resizing partition mike54 Linux - Newbie 5 10-28-2011 02:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:09 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration