0

I have changed to Fedora Linux and shrunk my windows partition. I have unallocated space which I want Fedora to take up. I have looked other answers to questions like this and cannot find instructions for my use case. I have a picture of my drive right now. I also have a live USB ready.

From what I have read so far, I shouldn't touch the boot partition. Can someone give me instructions on how to get around the /boot? I will need to move it later as well to give more space to Fedora.

In short, how do I move the Fedora partition to before the boot ext4 partition and resize it?enter image description here

0

how do I move the Fedora partition to before the boot ext4 partition and resize it?

The answer may be surprising: You don't have to do that.

Since you are using LVM and are not aiming to extend a non-LVM partition (i.e. /boot), you don't have to extend the existing PV. Instead, you can make a new partition out of the unallocated space, use pvcreate to make it a second LVM PV, then vgextend to add it into your existing volume group.

With LVM, your volume group may consist of one PV, or many PVs, on one or more disks; LVM does not care about that. All the PVs in a single VG will act together as a single pool of disk space. You can then extend or create new LVs freely, without needing to care where one PV ends and another begins. It will all be handled transparently by LVM.

First, use gparted or any tool you like to make that unallocated space into an usable partition. You should set its type ("flags" in gparted) as lvm2 pv, but strictly speaking you don't have to. I'll assume that it will be named /dev/nvme0n1p7.

Verify that the new partition is visible in /proc/partitions, indicating that the kernel has accepted the new partition table. If that did not happen, you may need to run partprobe /dev/nvme0n1 and check again. If the partition is still not recognized by the kernel, you may need to reboot at this point.

Once the partition is visible, you can proceed. Use pvs to see if gparted already initialized the partition as a LVM PV; if not, run pvcreate /dev/nvme0n1p7 to initialize it.

Then, assuming that your LVM volume group uses the default name fedora, run vgextend fedora /dev/nvme0n1p7.

Now the previously-unallocated space has been added to the volume group, and you can use it to extend existing LVs and/or create new ones as you wish.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.