Score:0

Issues creating partition

mx flag

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!

oldfred avatar
cn flag
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.
cc flag
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.
PonJar avatar
in flag
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 avatar
in flag
Read ahead and make sure you have enough space for the new partition and potentially other new partitions.
I sit in a Tesla and translated this thread with Ai:

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.