repartitioning is probably a bad idea

jane7

New Member
Joined
Apr 11, 2023
Messages
2
Reaction score
0
Credits
18
how do I fix this error? i used fdisk/dev/sda. Thank you in advance
1681200879790.png
 


You should not /can not partition a disk that is being use to run the system. If you want to repartion it you will have to use a live disc and boot from that. I would use gparted to do it. But make sure you backup any important data first. If this is a windows system then use the windows partitioning tool to resize the partition. If it's linux do as I said above. Good luck.
 
Jane, you can whatever tool you want to for the task, fdisk, gparted, or whatever. The issue is that you're trying to modify the partition that Linux is installed on. Doing so would be like sitting in a tree on a branch and trying to saw it off while you're on it. You have to do as stated above and boot to a live disk, then modify it. Be sure though that you don't destroy it, or you'll have to reinstall Linux afterwards.
 
how do I fix this error? i used fdisk/dev/sda. Thank you in advance
View attachment 15551
I am not trying to repartition the disk. I am following the book LFS 11.3 and I am on chapter 2 2.5. I am also getting help from YouTube tutorials. I just followed the video (the YouTube video didn’t run into any issue and here I am stuck ) Should I try creating a new partition cause I deleted all the 3 partitions. Thank you for the help.
 
so you want to add a "new" partition, not re-partition.
You can do it, if you have enough room on the disk.

[root@comp ~]# fdisk -l /dev/nvme0n1
Disk /dev/nvme0n1: 1.86 TiB, 2048408248320 bytes, 4000797360 sectors
Disk model: INTEL SSDPEKNW020T8
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: 2D8D43A1-51FD-44AA-8079-D5065F6995DB

Device Start End Sectors Size Type
/dev/nvme0n1p1 2048 456703 454656 222M EFI System
/dev/nvme0n1p2 456704 6748159 6291456 3G Linux filesystem
/dev/nvme0n1p3 6748160 31913983 25165824 12G Linux swap
/dev/nvme0n1p4 31913984 4000796671 3968882688 1.8T Linux filesystem

Take however many partitions show up here, and add the sizes together.
If the size is equal to, or very close to the number at the top (the line immediately below the fdisk command)
Then that means you don't have enough free space on your disk to create another partition.

If you have at least 10 Gig or so free , then you can create a partition to build LFS on.
 
Last edited:
I don't have any help that's not already given. but...

Props on doing LFS. When I did it way back when, it was suggested that you follow the book and only the book, not using any outside information like videos. (To avoid misinformation, skipping steps, etc...)
 
@jane7 welcome to linux.org from DownUnder :)

I am wondering if you have any experience (Beginner, Intermediate, Advanced) with GNU/Linux distributions, and if so, which one/s and for how long?

Why I ask is that LFS, while a worthy project in themselves, can be daunting to beginners with little to no command line experience.

It might be worthwhile installing and running an arbitrary number of Distros for a while, getting acquainted both with the workings of them and what you want in a Distro, and then returning to the LFS curriculum.

That being said, you are the driver behind the wheel to the vehicle that is your computer, and you make the decisions.

HTH

Chris Turner
wizardfromoz
 
I am not trying to repartition the disk. I am following the book LFS 11.3 and I am on chapter 2 2.5. I am also getting help from YouTube tutorials. I just followed the video (the YouTube video didn’t run into any issue and here I am stuck ) Should I try creating a new partition cause I deleted all the 3 partitions. Thank you for the help.
Can you provide the link to the chapter your at?
 

Staff online

Members online


Top