I currently have a dual boot of Windows 11 and Fedora 43 KDE.
I want to add 500GB to the Fedora partition and I already have the unallocated space (I have shrinked the Windows partition using Windows’s Disk Manager).
I read some topics here at the forum, but I want to understand a thing about moving the partitions.
This is a screenshot of KDE Partition Manager in my PC.
As you can see, the unallocated space is before p4, p5 and p6 partitions.
In the discussions I read here, people were saying to move p5 to the beginning of the unallocated space, positioning it before the newly freed space, but didn’t mention about the p4 and p6 partitions.
What I did understand is that the unallocated space must be at the right side of the Fedora partition, but moving only p5 won’t accomplish that. I think it would necessary to move p4, p5, and p6 to the left side, so all partitions would be before the freed space. Is that right?
The topics I read are these:
For the sake of it, the question in the last topic shows a screenshot with partitions equal and in the same order as mine.
Not necessarily correct. The partitions are probably not located in the order they are numbered.
You can see the orientation by running sudo fdisk -l /dev/nvme0n1 and look carefully at the start & end columns. That will tell the actual sequence on the drive where each partition is located. I suspect that p4 is at the end of the drive since that is usually where windows places it, and if so then it would not need relocated. It is difficult to tell exactly the sequence of the partitions on the image you show.
That leaves p5, which is the /boot partition and might easily be moved to the beginning of the free space (and enlarged to the now default 2GB size at the same time)
However p6 is your linux OS and /home in btrfs. It would be very simple to create a new btrfs volume and add it into the existing OS file system without relocating any other partition.
The kde partition manager seems not nearly as useful in that action as is gparted (which also could be installed on your kde machine)
Sorry for taking too long to respond.
Having two partitions working as one doesn’t degrade performance or anything like that? I’m asking because I’m not tech savvy, but I imagine having only 1 partition would be the perfect way, or not?
But as long as you and Mark said I wouldn’t need to move partitions, I got to ask: to add the free space to the Fedora partition, I just need to format it in the same filesystem type (btrfs in this case) and merge them? Does it need to create a new partition?
I ask that because I’m a perfectionist. I imagine the “perfect way” would be having only one partition, like if everything was done right since the beginning xD.
Windows installations usually put p4 (the windows recovery partition) at the very end of the drive and after shrinking the windows os partition (p3) the additional partitions for linux are usually physically located between p3 and p4.
This is what my laptop shows and what was expected
$ sudo fdisk -l
Disk /dev/nvme0n1: 476.94 GiB, 512110190592 bytes, 1000215216 sectors
Disk model: INTEL SSDPEKNW512G8
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 406E2318-D071-4F12-A55C-75C1711D624E
Device Start End Sectors Size Type
/dev/nvme0n1p1 2048 534527 532480 260M EFI System
/dev/nvme0n1p2 534528 567295 32768 16M Microsoft reserved
/dev/nvme0n1p3 567296 302152334 301585039 143.8G Microsoft basic data
/dev/nvme0n1p4 998473728 1000214527 1740800 850M Windows recovery environment
/dev/nvme0n1p5 361992192 366186495 4194304 2G Linux filesystem
/dev/nvme0n1p6 366186496 980852735 614666240 293.1G Linux LVM
Partition table entries are not in disk order.
Maybe Microsoft have changed that in Windows 11 and now it orders the partitions. I’m just learning about this kind of thing, so I couldn’t have done it manually.
Nope. I just installed W11 first and Fedora after it normally. The only different thing I did was to create the EFI partition manually using in the Windows installer. I’ve read in various sites that the EFI partition should be at least 100MB because of the dual boot. Maybe that have altered Windows’ installer behavior (but I don’t think so).
Then the unallocated space really is before p4, p5 and p6. Looking at the sectors, there is a huge gap between p3 and p4, and p6 (Fedora partition) comes last. In this case, Fedora partition still must be adjacent to the freed space, right? should I move the partitions then?
That is very old information.
Windows 8 created a 120MB efi partition and windows 10 created my 260MB efi partition seen above on a new drive. A new fedora installation on new hardware will create a 600MB efi partition.
You should not need to worry too much about that though since fedora only uses about 20MB of that efi space and even on my dual boot laptop windows and fedora together only use about 50MB.
the recovery partition is created next to the win main partition c:. If the initial win install didn’t use the whole disk but did end at sector 1613529087 then the recovery partition would start adjacent to it.
no need to. you can remove and recreate or move the win recovery partition if you like. In case MS once again require a bigger recovery partition. They usually remove the recovery partition and shrink C drive by some amount and re-create the recovery partition. You’ll find a procedure how to do this manually somewhere on MS site.
No.
Since you are using btrfs just follow the instructions given above to add the space to your system. No need to move anything, just create the partition in that space then add it to the OS.
On a SSD, you have a partition table which tells the OS where the actual data is. The data is spread out in the microcircuit cells - and it essentially the same distance between the I/O and any given cell - unlike on the tape drive where the tape would have to wind forward or back.
Btrfs is cool because in its partition table, it can make the partition refer to any cells it wants, and to the user and OS it looks like one continuous block.
Im not sure about this recently microsoft changed boot record location related data or something moving it to the furthest edge of the drive to prevent partitioning with other OSes so I wonder if expanding your parititioning may cause windows issues. Idk
So, in the command bellow, how would I refer to the unallocated space? I mean in the “sdaX” part. In my case, it would be “/dev/nvme0nX”, but its unallocated, so it doesn’t have a number to refer to. Should I use a live boot and create a partition using Gparted?
The simplest way is to format the unallocated space as Btrfs and add it to Fedora file system.
Example:
`sudo btrfs device add -f /dev/sdaX /`
You should now see the increase in available space:
`sudo btrfs filesystem usage -T /`
`sudo btrfs filesystem df --si /`
For what I did understand, it could be done with and without a new partition.
The only thing remaining now is to implement the solution.