[lfs-support] Chapter 2.3

Ken Moffat zarniwhoop at ntlworld.com
Mon Sep 24 17:53:04 PDT 2012

On Mon, Sep 24, 2012 at 07:07:11PM -0500, Garrett Gaston wrote:
> On chapter 2.3. Creating a File System I'M told to issue the command "mkswap /dev/<xyz> for initialization purposes.
> The thing is I created and set up my three partitions before starting LFS. sda1 will be my LFS, sda2 is swap, and sda3 is my host system.

 For people intending to keep using LFS, a separate /home is useful
so that you don't lose your own data when you update.  Too late for
your partitioning, but perhaps someone will benefit.

> So how important is this command because when I type it now I'M getting this?:
> "No such file or directory", for sda2. I also tried hda2 and got "/dev/hda2: Device or resource busy"

 You have two problems here:

1. You haven't learned that an existing swap partition is perfectly
usable by all installed linux systems on that machine.

2. More seriously, you haven't understood that things change over
time, and therefore I worry about your ability to configure your
kernel.  On x86 (i?86 and x86_64), ATA disks used to use /dev/hdX.
Sometime in the 2.6.2X kernel timeframe, probably after 2.6.24,
libata became the default and these drives are now at /dev/sdX.
So, you appear to be running a very old host system.

 Once swap is available, the device is in use.  Nobody has reported
problems here, I think, but perhaps out explanation is deficient -
if you have a lack of system memory, swap is a good idea.  If you
have adequate memory, you don't need swap.  For 'adequate' the
quantity varies, depending on what you are doing - newer versions of
g++ always use more than the previous version, but I would suggest
4GB as a ballpark figure, so always use swap on non-PAE 32-bit :)

> I've already completed the LFS project once but my instructor is insisting that I do it again but use my previous LFS as my host system. For future reference some of you might remember me getting stuck on the LFS project when 

 If your previous LFS build is using /dev/hda2 then it seems to be
extremely old (unless you misconfigured the kernel to use the old
ATA drivers) and a lot of people here think there is no point in
supporting anything before the current (7.2) release.

 I don't particularly care *why* people build LFS, and I've known
several people who built it as part of learning about linux, and
then moved on to a distro where things were done for them.  But if
the person driving this build is your instructor, then he or she can
give you guidance.  If you're doing it for your own interest, then
ask away - but try to learn from what you are told.  And I hope this
build will be enjoyable as well as informative.

das eine Mal als Tragödie, das andere Mal als Farce

More information about the lfs-support mailing list