Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[O/S] [SOLVED] Resize ESP partition with gparted

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
User avatar
PsySc0rpi0n
Posts: 322
Joined: 2012-10-24 13:54
Location: Bitcoin World
Has thanked: 8 times
Been thanked: 1 time

[O/S] [SOLVED] Resize ESP partition with gparted

#1 Post by PsySc0rpi0n »

Hello.

When I installed my Debian, quite some time ago, I don't remember but I chose to have different partitions for ESP and boot. And worse was that I didn't give the boot partition enough space and gave too much of it to ESP.

Now, I am trying to shrink down ESP so that I can make some room to increase boot partition size.

I tried using a live distro pen drive to boot and then install gparted and try to resize the ESP partition, however, gparted doesn't let me make any changes in this partition. It is not mounted as we can see here:
https://paste.debian.net/1295041

and this is what gparted tells me:
Image

Why can I resize ESP? What could be the reasons?

mrmazda
Posts: 339
Joined: 2023-06-02 02:22
Has thanked: 9 times
Been thanked: 44 times

Re: [O/S] [SOLVED] Resize ESP partition with gparted

#2 Post by mrmazda »

Solved how?

mfleetwo
Posts: 1
Joined: 2024-02-29 16:55

Re: [O/S] [SOLVED] Resize ESP partition with gparted

#3 Post by mfleetwo »

Possible options the poster could have used to resolve the issue:

1. Install mtools package so that GParted can query the fat32 file system usage and therefore know how small it can allow the partition to be shrunk.

2. Backup files, delete partition, recreate partition smaller, restore files, set ESP flag.

Mike Fleetwood (GParted Developer)

mrmazda
Posts: 339
Joined: 2023-06-02 02:22
Has thanked: 9 times
Been thanked: 44 times

Re: [O/S] [SOLVED] Resize ESP partition with gparted

#4 Post by mrmazda »

In general, most people installing Linux create an ESP partition of a size far in excess of need. Few who have merely two operating systems installed will require as much as 10% of available space on the 100MiB ESP that Windows has often created already, thus less than 2% of a 500MiB or larger ESP. Some distros require much more than others, but Debian isn't one of them.

As implied by post #3, ESP partitions are readily deleted and then recreated to a smaller size at the same starting location, if care is taken to save the UUID of it and apply it prior to attempting to use the new ESP for booting. Simply copying the files from it and copying them back after recreation is then sufficient. Once that's done, the EXTx partition can be moved into the vacated space and then enlarged. If the UUID is not preserved, then bootloader and UEFI reconfiguration is required to account for the change in UUID.

Post Reply