[lfs-support] What Is "The" LFS Partition?

dennisjperkins at comcast.net dennisjperkins at comcast.net
Mon Nov 5 12:32:15 PST 2012


Partitions and filesystems are not identical on Linux/Unix systems. You carve a drive up into partitions, and you are free to format each partition with whatever filesystem you want. Every other operating system I am aware of does not make this distinction. I suppose the reason is to avoid duplicating the code needed to create a partition whenever someone creates a new type of filesystem. 

Swap space does not have a filesystem because it does not store files. It stores memory pages. You do need to specify that it will be a swap partition when you create the partition. 

sda2 is not really a partition. It contains the extended partitions. In your case, sda5 and sda6. 

sda refers to the drive, not to the partitions that you have on the drive. You can make a partition the same size as the drive, but it is the partition that contains the filesystem, not the drive. 
----- Original Message -----
From: "Alan Feuerbacher" <AFeuerbacher at ALLEGROMICRO.com> 
To: "LFS Support List" <lfs-support at linuxfromscratch.org> 
Sent: Monday, November 5, 2012 1:11:04 PM 
Subject: Re: [lfs-support] What Is "The" LFS Partition? 

Thank you all very much for your advice! 

Here's what I propose to do now, given your inputs: 

Don't put LFS on the SSD -- use a regular hard drive. 

Set up the partitions like this, using an ext4 filesystem: 

/dev/sda1 /boot 100M 
/dev/sda2 Extended Linux partition ~100G 
/dev/sda5 Linux swap 2G 
/dev/sda6 / ~98G 

Use mke2fs -t ext4 to create filesystems on /dev/sda1 and /dev/sda6. 

I should NOT use mke2fs to create filesystems on /dev/sda2 and /dev/sda5. I don't fully understand why not, though. Can someone explain? 

Under the above scheme, the extended linux partition CONTAINS the swap and / logical partitions, so it seems reasonable that you would not use mke2fs both on it, and on the partitions it contains, right? On the other hand, why would swap not be considered a filesystem? And why would you not make a filesystem on sda2, thereby (in my naive brain, anyway) not having to make a filesystem on sda6? Further, why would you not make the whole drive -- /dev/sda -- one filesystem? 

Another thing is that there seem to be several notions of a filesystem. From http://www.ibm.com/developerworks/linux/library/l-linux-filesystem/ I get this general definition: 

<< What is a file system? 

I'll start with an answer to the most basic question, the definition of a file system. A file system is an organization of data and metadata on a storage device. 
>> 

The man page for mke2fs talks about making filesystems in disk partitions. So a filesystem in the general sense can contain one or more filesystems in the mke2fs sense, and it's not always clear to me (again, a newbie to this stuff) which one is being talked about. I suppose experience will take care of that. 

There were good and interesting answers from various people, and I'll comment further after I go home and try again. 

Alan 
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support 
FAQ: http://www.linuxfromscratch.org/lfs/faq.html 
Unsubscribe: See the above information page 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxfromscratch.org/pipermail/lfs-support/attachments/20121105/911a1971/attachment.html>


More information about the lfs-support mailing list