Score:2

How do I expand my Linux partition in a Windows/Linux Dualboot?

pk flag

I am currently dualbooting Windows 11 and Ubuntu on a 512GB NVME SSD on my laptop. Recently, I've pretty much stopped using Windows, so I want to shrink my Windows partition and expand my BTRFS Linux partition, however, I created a separate EFI partition to prevent Windows updates from messing up the boot files, and that EFI partition is between my Windows Partition and my Linux Partition:

Disk

How can I expand my Linux Partition?

Nmath avatar
ng flag
EFI was designed so that there should be one EFI for the whole system. You can have more than one, but the people who do that usually have them on different hard drives. I'm not sure it's a good idea in this situation. If you must put the additional EFI there then you won't be able to achieve what you are asking because you can only expand a partition to adjacent space. And even then, it's not easy to expand to preceding space.
Score:0
pl flag

Riskless option

  1. Buy a new NVME SSD
  2. Clone your Ubuntu OS partition with an EFI boot partition into a new SSD.
  3. Replace the NVME SSD and keep old one in your safe.

To make a clone Clonezilla or make a backup SystemRescue fsarchiver

Score:0
br flag

Be aware that all operation I suggest you are risky. You can lose all your data and operation systems! Do not follow steps until your create complete disk backup. If you have no experience with disk backup and restore (e.g. using Clonezilla live), you take risk you cannot restore disk from backup in case of partition reallocation operation fails.

Procedure description:

  1. Backup complete disk to another disk - external or temporary connected internal. Use either disk-->disk or disk-->image operation. Check your backup is readable and complete. Disconnect backup media.
  2. Boot PC from live Linux (e.g. Gparted live or Ubuntu installation media in "try only" mode). System must not booted by noral way from your system disk because your BTRFS system partition must remain unmounted.
  3. Start Gparted which is present on live media you booted.
  4. Resize your NTFS Windows partition to lower size by moving the partiton end mark to the left to lower size. This operation is relatively safe. Apply prepared change. The Windows NTFS partition resizing can be done using Windows disk manager too. But my experience is this tool is weak and often is not able to decrease partition size enough.
  5. Move your EFI partition to the left. Do not change the partition size, only move it to fit closely to the NTFS partiton. This is most risky operation. Apply prepared change.
  6. Resize your Linux BTRFS parttion. Use all free space created by the EFI partiton moving. Apply prepared change.
  7. If all is OK, shut down PC, disconnect live Linux media and boot by normal way. Verify normal boot process of Linux and Windows. In case Windows will ask you for disk check, do not interrupt disk checking and leave the process to finish its operation.
  8. If system cannot boot, try to repair booting/Grub. It is described in other place.
  9. Restore disk backup if all other attempts to repair system fails.
PonJar avatar
in flag
Not sure why you mention MBR with such emphasis. This is a UEFI setup, just ensure the backup is of the entire disk, not just individual partitions. The general consensus on here is to use Windows tools for Windows partitions and not GParted. GParted should work for Windows partitions but doesn’t always so why take the risk? GParted does support btrfs but check you have the required btrfs tools as shown here https://gparted.org/features.php
netbat avatar
br flag
Yes, my note about MBR was redundant. I removed it. Concerning NTFS: I never had problems with resizing NTFS partitions by Gparted. But Windows disk manager was not able to shrink partition more times in case partition was used for long time and requested resizing was substantial.
netbat avatar
br flag
Yes, you are right, additional BTRFS tool and kernel support can be needed to extend the Gparted capability.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.