0

So I'm not much of an expert and I'm trying out linux now to get more of an understanding. What I am trying to do is create a partition, however, there is no free space on my hard drive. Everything is already allocated to a partition. Here's a couple pictures to hopefully help explain:

Disk /dev/nvme0n1: 256GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number Start End Size File system Name Flags 1 1049kB 538MB 537MB fat32 EFI System Partition boot, esp 2 538MB 256GB 256GB ext4

Now, when I run fdisk on /dev/nvme0n1 I get this:

Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

This disk is currently in use - repartitioning is probably a bad idea. It's recommended to umount all file systems, and swapoff all swap partitions on this disk.

So what I am wanting to do is build a Linux From Scratch system. I believe the knowledge would help me in the future so don't try to push me away from doing that. I'm simply just looking for a solution. I need to create a partition that I can build my LFS system on. Thank you y'all!

  • 1
    Only Ubuntu and official flavors of Ubuntu (https://ubuntu.com/download/flavours) are on-topic here, refer to https://askubuntu.com/help/on-topic where you'll find other SE sites where you question will be welcome Ubuntu is one of the easier Distributions to use, best to start off with something easy & build from that. You can only edit partitions that are unmounted or you cannot edit a partition you are using. You can use live Ubuntu which has gparted or gparted live systems. Or parted, fdisk or gdisk from terminal in live installer. – oldfred Jan 07 '23 at 15:41
  • Be aware that you need to shrink the filesystem before shrinking the (unmounted) partition (resize2fs). Some partition tools do this for you, some don't. – ubfan1 Jan 07 '23 at 17:52
  • Before you can create a partition you need space to create it in. Your disk has no free space for a new partition but you can probably reduce the second partition in size to create space for a new partition. As @oldfred says you need to start this change from a live disk so that your second partition is not in use when you shrink it. – PonJar Jan 07 '23 at 17:55
  • Read ahead and make sure you have enough space for the new partition and potentially other new partitions. – PonJar Jan 07 '23 at 17:58

0 Answers0