I want to upgrade Ubuntu, but can't because my EFI boot partition is too small. I stupidly didn't think about unnecessary stuff cluttering it up and just went straight to trying to resize it using GParted from a live USB. GParted failed partially and now I have an enlarged Partition, but with unusable space inside of it. I cannot mount it and I also can't shrink it back down or use GParted "check" to fix it as it always fails. How else could I fix the partition? GParted spits out this
"Details" file:
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='C' lang='C'>
<head>
<meta http-equiv='Content-Type' content='text/html;charset=utf-8' />
<title>GParted Details</title>
<style type='text/css'>
table {border:0}
th {text-align:left}
.number_col {text-align:right}
</style>
</head>
<body>
<p>GParted 1.3.1</p>
<p>configuration --enable-libparted-dmraid --enable-online-resize</p>
<p>libparted 3.5</p>
<p>========================================</p>
<table>
<tr><th>Device:</th><td>/dev/nvme0n1</td></tr>
<tr><th>Model:</th><td>WDC PC SN730 SDBPNTY-1T00-1101</td></tr>
<tr><th>Serial:</th><td></td></tr>
<tr><th>Sector size:</th><td>512</td></tr>
<tr><th>Total sectors:</th><td>2000409264</td></tr>
<tr><td colspan='2'> </td></tr>
<tr><th>Heads:</th><td>255</td></tr>
<tr><th>Sectors/track:</th><td>2</td></tr>
<tr><th>Cylinders:</th><td>3922371</td></tr>
<tr><td colspan='2'> </td></tr>
<tr><th>Partition table:</th><td>gpt</td></tr>
<tr><td colspan='2'> </td></tr>
</table>
<table>
<tr><th>Partition</th><th>Type</th><th class='number_col'>Start</th><th class='number_col'>End</th><th>Flags</th><th>Partition Name</th><th>File System</th><th>Label</th><th>Mount Point</th></tr>
<tr><td>/dev/nvme0n1p1</td><td>Primary</td><td class='number_col'>2048</td><td class='number_col'>206847</td><td>boot, esp</td><td>EFI system partition</td><td>fat32</td><td></td><td></td></tr>
<tr><td>/dev/nvme0n1p2</td><td>Primary</td><td class='number_col'>206848</td><td class='number_col'>239615</td><td>msftres</td><td>Microsoft reserved partition</td><td>unknown</td><td></td><td></td></tr>
<tr><td>/dev/nvme0n1p3</td><td>Primary</td><td class='number_col'>239616</td><td class='number_col'>1999025230</td><td>msftdata</td><td>Basic data partition</td><td>ntfs</td><td>Dasda</td><td></td></tr>
<tr><td>/dev/nvme0n1p4</td><td>Primary</td><td class='number_col'>1999026176</td><td class='number_col'>2000404479</td><td>hidden, diag</td><td></td><td>ntfs</td><td></td><td></td></tr>
</table>
<p>========================================</p>
<table>
<tr><th>Device:</th><td>/dev/sda</td></tr>
<tr><th>Model:</th><td>Samsung PSSD T7</td></tr>
<tr><th>Serial:</th><td></td></tr>
<tr><th>Sector size:</th><td>512</td></tr>
<tr><th>Total sectors:</th><td>1953525168</td></tr>
<tr><td colspan='2'> </td></tr>
<tr><th>Heads:</th><td>255</td></tr>
<tr><th>Sectors/track:</th><td>2</td></tr>
<tr><th>Cylinders:</th><td>3830441</td></tr>
<tr><td colspan='2'> </td></tr>
<tr><th>Partition table:</th><td>gpt</td></tr>
<tr><td colspan='2'> </td></tr>
</table>
<table>
<tr><th>Partition</th><th>Type</th><th class='number_col'>Start</th><th class='number_col'>End</th><th>Flags</th><th>Partition Name</th><th>File System</th><th>Label</th><th>Mount Point</th></tr>
<tr><td>/dev/sda1</td><td>Primary</td><td class='number_col'>1953</td><td class='number_col'>3906</td><td>bios_grub</td><td>primary</td><td>grub2 core.img</td><td></td><td></td></tr>
<tr><td>/dev/sda2</td><td>Primary</td><td class='number_col'>3907</td><td class='number_col'>1009663</td><td>boot, esp</td><td>primary</td><td>fat32</td><td>usbboot</td><td></td></tr>
<tr><td>/dev/sda3</td><td>Primary</td><td class='number_col'>1009664</td><td class='number_col'>15689727</td><td></td><td></td><td>ext4</td><td>isodevice</td><td></td></tr>
<tr><td>/dev/sda5</td><td>Primary</td><td class='number_col'>15689728</td><td class='number_col'>1953505279</td><td></td><td></td><td>ext4</td><td>writable</td><td></td></tr>
</table>
<p>========================================</p>
<table>
<tr>
<td colspan='2'>
<b>Check and repair file system (fat32) on /dev/sda2</b> 00:00:01 ( ERROR )
</td>
</tr>
<tr>
<td> </td>
<td>
<table>
<tr>
<td colspan='2'>
calibrate /dev/sda2 00:00:00 ( SUCCESS )
</td>
</tr>
<tr>
<td> </td>
<td>
<table>
<tr>
<td colspan='2'>
<i>path: /dev/sda2 (partition)<br />start: 3907<br />end: 1009663<br />size: 1005757 (491.09 MiB)</i>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table>
<tr>
<td colspan='2'>
check file system on /dev/sda2 for errors and (if possible) fix them 00:00:01 ( SUCCESS )
</td>
</tr>
<tr>
<td> </td>
<td>
<table>
<tr>
<td colspan='2'>
<b><i>fsck.fat -a -w -v '/dev/sda2'</i></b> 00:00:01 ( SUCCESS )
</td>
</tr>
<tr>
<td> </td>
<td>
<table>
<tr>
<td colspan='2'>
<i>fsck.fat 4.2 (2021-01-31)<br />Checking we can access the last sector of the filesystem<br />Boot sector contents:<br />System ID "mkfs.fat"<br />Media byte 0xf8 (hard disk)<br /> 512 bytes per logical sector<br /> 512 bytes per cluster<br /> 32 reserved sectors<br />First FAT starts at byte 16384 (sector 32)<br /> 2 FATs, 32 bit entries<br /> 1969152 bytes per FAT (= 3846 sectors)<br />Root directory start at cluster 2 (arbitrary size)<br />Data area starts at byte 3954688 (sector 7724)<br /> 492276 data clusters (252045312 bytes)<br />32 sectors/track, 64 heads<br /> 3907 hidden sectors<br /> 500000 sectors total<br />Reclaiming unconnected clusters.<br />Checking free cluster summary.<br />/dev/sda2: 567 files, 26968/492276 clusters<br /></i>
</td>
</tr>
</table>
<table>
<tr>
<td colspan='2'>
<i></i>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table>
<tr>
<td colspan='2'>
grow file system to fill the partition 00:00:00 ( ERROR )
</td>
</tr>
<tr>
<td> </td>
<td>
<table>
<tr>
<td colspan='2'>
using libparted
</td>
</tr>
</table>
<table>
<tr>
<td colspan='2'>
libparted messages ( ERROR )
</td>
</tr>
<tr>
<td> </td>
<td>
<table>
<tr>
<td colspan='2'>
<i>GNU Parted cannot resize this partition to this size. We're working on it!</i>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
KDE's partition manager won't do either.
toram
andnopersistent
and unmount all partitions on the drive and after that install to the whole drive. But if you make a mistake you must make a new live system. If, instead, you have a persistent live system, boot it live-only, unmount the partitions, shrink the partition for persistence and leave enough drive space for the installled system. Then start the installer ... – sudodus Nov 04 '23 at 18:46