Posted by: duskfire | May 6, 2012

Linux From Scratch Part Two

This is part two of a multi-part series about my experiences creating a LFS system for the first time.

Part One is here.

Well, I decided to start over, because I thought that I made a mistake by creating my LFS partition outside of the host system installation. The book implied that you want to create the partition using your host system’s disk partitioning tools, but no – I had to be clever and use the live installation CD to make it first, and install Mint Debian separately. Everything was going great, and I got as far as Chapter 4 in the book. However, the area to which I had downloaded all the files had a long complex label on it, and was not the same as “/mnt/lfs” on my Debian Mint host system. It was mounted in the /media directory, as a “lfs” subdirectory. I became a little confused, honestly, and only figured out what I should have done at that point AFTER I began the whole process again.

This was a little risky, using the live Debian Mint DVD to re-size my newly re-installed Debian Mint OS. But it appears to have worked. Now to continue onward.

I’m fairly sure that I could have used the original setup with no bad results. But sometimes you only understand things after you have tried to fix them.

So back in my host system, I followed the directions for Chapter 2 Preparing a New Partition.

So far, so good. The next step, Chapter 3, was downloading packages and patches. I had to make a /sources directory inside the /lfs directory, and chmod it. Since I had done this before, I knew that the file “wget-list” includes every file and patch you will need, so all I had to do is save it as a file, and use it in the command wget -i wget-list -P $LFS/sources. That took just over 5 minutes, for 78 files:

Okay – All done. I skipped the next step, verifying with md5sum that all the packages are available. The LFS book mentions it but doesn’t say that you need to do it.

Chapter 4 – Final Preparations. All right, I was nearly ready to make the temporary system. Here’s the next commands that I ran, at the end of Chapter 4:

Now it was time to login as user “lfs”. You can logout and back in under “lfs”, or just do as the book suggests and execute su – lfs. I then finished the last few paragraphs of Chapter 4.

In the next part of the series, I will be following the instructions in Chapter 5,  Constructing a Temporary System.



  1. thanks for this post. I’m planning on using a spare PC to experiment with LFS and I was confused about how I should setup my host distro install (gonna go with arch i think) if I should be clever at setup and prepartition everything, but it seems like that’s not the way to go and you should do the re-partitioning after the host install…is that correct?

    • The LFS manual does not make that completely clear; I tried it the “clever” way first, and it resulted in confusion for me. I think for a first time LFS user, re-partitioning after the host install will be best.

      I’m actually planning an Arch Linux installation myself sometime in June – not just a review, but a month or two of working on it and blogging about it. Perhaps we can share tips?

      • lol, i’m not sure if I have any tips to share with you as I’m surely more of a linux noob. i’ve never used arch before, just decided i’d try it out for the host distro for my LFS experiment…maybe too many variables lol, but i thought it’d be fun.

  2. hey buddy you help me a lot, from the book I can’t figure out how to partition and set up file system, I tried to do that via terminal so it made me very tedious but then I tried Ubuntu as you use Mint-Debian, and completed it successfully. Thanks again . . .

  3. I was able to install lfs 7.3 with the arch 2013.03.01 live cd. I used the live cd to partition the drive, then I used pacman to install “base-devel” while still in the arch live cd enviroment. Then followed the 7.3 instructions to get it up and running. It worked great.

  4. followed your tutorial but i am consuded on some issues ,please help:

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s


%d bloggers like this: