I want to expand a partition on my boot SSD, but there is a Recovery Partition and EFI System Partition in the way. How can I get around this?
Solution 1:
Okay, I took the plunge and decided to try and fix it anyway, even if it involved deleting my Microsoft Reserved Partition. As Rod Smith said, the EFI System Partition is in a non-standard location as I had manually created the NTFS partition at the start of the SSD prior to installing Windows, so it placed the partition in the only place it could. Following are steps I followed to fix my problem and make room to expand the drive.
You will need the installation media, or some Windows recovery environment with DISKPART
.
Using GParted, move the EFI System Partition and Recovery partition out of the way, to make room for the Boot partition to move around, and apply changes.
Move the Boot partition to the right, leaving enough space. The Recovery Partition is 450 MB, the EFI System Partition is 100 MB, and the Microsoft Reserved Partition is 128 MB. This gives 678 MB in total. To leave room for Windows to create more of its stupid extra partitions in the future I added 1024 MB onto this, meaning I moved the Boot partition to the right by a total of 1702 MB. Apply changes (and have a cup of tea in the meantime as this takes a while).
Delete the Microsoft Reserved Partition in GParted, and apply changes.
Right-click and copy the EFI System Partition in the GUI, and then paste it into the free space preceding the Boot partition - I put the EFI system Partition at the very start of the disk, as that's the standard place. Right-click the new partition, and apply the exact same flags as the old one (
boot
,esp
). Repeat this procedure for the Recovery partition and apply the same flags as the original again, but put it at the end of the free space (next to the Boot partition) rather than at the start. Apply changes. The drive layout should now look like this:EFI System Partition | Free space | Recovery Partition | Boot partition | ...
Delete the original EFI System Partition and Recovery Partition, and apply changes. The Boot partition is now free to grow, so I resized it to the right to fill the free space there.
Boot into the Windows installation media, and press SHIFT+F10 to open the command prompt. Type
diskpart
. Typelist disk
, and thenselect disk X
whereX
is the number of the physical drive containing the Boot partition. Typelist partition
to give you the partition list. I had the EFI System Partition at the start of the disk now which is 100 MB in size, and the partition list says that it began at an offset of 1024 kB. Windows considers a megabyte to be 1024 kB so the free space begins at an offset of 1024 + (100*1024) = 103424 kB. Type the commandcreate partition msr size=128 offset=103424
. If you have the sizes and offsets right, this should work, and in my case, it indeed did.Reboot into Windows to ensure it works fine.
I live on the edge so I didn't make a backup before I did all this, and it was fine - however I'd recommend you backup any important information on the Boot partition before doing this.
Solution 2:
The EFI System Partition (ESP) normally goes before most other partitions. Thus, either you (or a previous owner or helper) have done something unusual on your computer (re-partitioning or re-installing) or your computer's manufacturer has done something very strange. If the latter, you might want to complain to them, and perhaps even to Microsoft.
In any event, both of those partitions should be movable. I'm less familiar with the capabilities of Windows tools, but GParted normally won't move a partition if it doesn't understand its filesystem type or if the partition is mounted. Because both FAT and NTFS are known to GParted (depending on installed support packages), my guess is that your Linux emergency disk has mounted those partitions. You may be able to unmount them by right-clicking the partitions in GParted and selecting the option to unmount the partitions. (You'll do this one at a time.) Remember that moving partitions is never risk-free, though, so you should back them up before moving them. The ESP in particular is used when booting the computer, so you should be doubly careful in backing it up.
As an alternative, you might consider simply creating a new partition in the available space. Depending on how you like to arrange your files, you might be able to get this to work by storing an appropriate class of files on the resulting new partition.
Solution 3:
I bought an Asus transformer trio (2015) which I opened only after 4 years (2019), so a Windows 10 upgrade was in order. After the update, partition setup was like this:
Recovery | EFI Boot | MS Reserved | OS
I wanted to recover disk space by deleting RECOVERY partition from the new SSD I had cloned it into and merge it with the OS partition, here was my solution:
Delete RECOVERY partition with mini partition tool.
Image the resulting partition setup sans RECOVERY, UNALLOCATED SPACE in lieu on a USB disk.
Recover image to my SSD via macrium reflect, with method of dragging one partition at a time to destination disk in this order: EFI Boot | MS Reserve | OS.
What will remain at the left/end is the UNALLOCATED SPACE which I was able to merge back to the OS partition with ease using mini partition tool.
Hope that Helps!