This guide tells you how to install a base LFS-6.0 system using nALFS the program from Automated Linux From Scratch. (but none of the BLFS program's are covered here)
Note: though this guide is made for LFS-6.0 I think it can still be applied to other versions of LFS as well.
Why use nALFS as opposed to doing it manually?
It's easier and quicker.
It's easier to reinstall (if you back up the files we'll download, create, and edit.)
You can't mess up the commands only the profile can do that.
What you'll need to know:
How to use a terminal.
How to extract files.
How to compile source packages.
How to partition your hard drive.
What you will need to get:
LFS-BOOK-6.0-HTML
nALFS-1.2.4
profile-LFS-6.0
LFS packages and patches + libxml2-2.6.16 --Read the book in "Chapter 3. Packages and Patches"
Verifying file integrity:
Don't forget to download the md5sums and see if the checksums match. Example:
Code:
md5sum -c filename.md5sum
Host System Requirements:
linux-2.6.8.1 compiled with GCC-3.0 or higher, and
libxml2-2.6.0 or higher.
Find out what you have by doing:
(This tells you what kernel you have and what version of gcc it was compiled with)
If you don't have "gcc-3.0 or higher", or "libxml2-2.6.0 or higher" I recommend getting your distributions package (binary). If you can't find one get the source (then compile it).
If you don't have linux-2.6.8.1, I recommend getting it from http://www.kernel.org/.
Also, read the "Kernel compiling guide for newbies..." at http://www.linuxquestions.org/questi...threadid=49035.
Step 1: Create partition with your host system's boot disk
Give half the hard-drive to your LFS partition.
Don't mount it yet!
If you have to, don't give it a file system until your host system is completely installed.
In such a case read chapter "2.3. Creating a File System on the Partition".
Step 2: Extract and install nALFS-1.2.4
Step 3: Extract profile-LFS-6.0
Step 4: Create /root/packages directory
Code:
cd /root
mkdir packages
Then put all the
LFS packages and patches +
libxml2-2.6.16 and the
.config file from your kernel in the
/root/packages directory.
Step 5: Edit the profile
Open
profile-LFS-6.0/config/general.ent
then read and make changes where necessary.
Step 6: Edit grub.xml
Open
profile-LFS-6.0/config/grub.xml
Remove the
<-- above
<textdump> and the
--> below
</textdump>.
Make sure to leave the
=. (Think of the
= as the edge of the page)
For more help on editing it read chapter "8.4. Making the LFS System Bootable".
Don't neglect to set up your host system in there as well!
Step 7: Open a terminal then cd to your profile and do:
Then press [s] then [n]
When finished press [q] then [y]
Finally reboot
(If you edited the grub.xml right grub should give you the options to boot either LFS or your host system.)
Congratulations you have installed LFS!
nALFS Errors:
If you get an error like this:
E: Expected digest : 5158ecb10e1988ebecc3cb85dd280523
E: Found digest : 5158ecb10e1988ebecc3cb85dd280524
E: Wrong md5 digest of archive: /root/packages/blfs-book-6.0-html.tar.bz2
And you checked the md5sum after downloading it.
Edit the profile with nALFS
Go down to Unpacking press [right arrow] then Unpack [right arrow] then digest [e] then [Delete] the parts you don't need. Copy the "Found digest" and press [F5]. Go up to the package and press [s] then [n] again.
Note: when I say [Delete] I don't mean [Backspace]. Also if you press [right arrow] after going to digest, pressing [e] will take you back.
If you get an error like this:
E: Checking for /root/packages/blfs-book-6.0-html.tar.gz failed:
E: No such file or directory
And you know the package is in that directory. Then it must be named slightly differently.
(ex: blfs-book-6.0-html.tar.gz instead of blfs-book-6.0-html.tar.bz2 or BLFS-book-60-html.tar.bz2)
Edit the profile with nALFS
Go down to Unpacking press [right arrow] then Unpack [right arrow] then archive [e] then [Delete] the parts you don't need. Go to another terminal.
cd to the package directory and type
to see a list of files you may have. Then back at the first terminal type the name you think it goes by and [F5]. Go up to the package and press [s] then [n] again.