Skip to content
No description or website provided.
Shell
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
.config general update Feb 10, 2015
README general update Feb 10, 2015
chapter02.sh first commit May 18, 2012
chapter03.sh first commit May 18, 2012
chapter07-asroot.sh first commit Dec 5, 2012
chapter07-systemd.sh update for LFS-7.4 Feb 24, 2014
chapter07.sh general update Feb 10, 2015
createPart.sh update for systemd Aug 23, 2013
fstab update for LFS-7.4 Feb 24, 2014
hosts first commit May 18, 2012
lfsa update lfs Feb 23, 2016
pkguser.tar.xz Updates for LFS 7.7 Sep 3, 2015
resolv.conf first commit May 18, 2012
updategrub.sh update for LFS-7.4 Feb 24, 2014

README

Here is the recipe to use these scripts:
First ensure you have these installed on your host:
vim bison patch gawk dialog subversion, texinfo, xml2 xsltproc libxml2-utils, tidy, docbook-xml and docbook-xsl.
You can also change the dialog menus by using a .dialogrc in your root dir.
go to: bash.cyberciti.biz/guide/Dialog_customization_with_configuration_file
If you need the dialog source, it is here: ftp://invisible-island.net/dialog
- use the tar.gz version.

1. create your partitions. I suggest you do:
mkfs.ext4 /dev/sda(x) for all of them - plus mkswap /dev/sda(x) or you can edit createPart.sh and run that.

2. Edit chapter02.sh to match your partitions and run the script
3. Same with chapter03.sh

4. Copy the file pkguser.tar.xz to $LFS/sources
If you don't want to use this name for the package user data, you can change the name in the config set up. It should be a compressed tarball of some description though.

5. copy lfsa to $LFS. You can run lfsa from your host if you prefer. It makes no difference.

6. Create a lfs user as per the book. Don't forget to set up the lfs 
environment too. Do: echo $LFS_TGT and make sure something sensible is
returned.

7. Run lfsa as root.  Edit the config file to suit. If requested, the
sources will be downloaded, the requested LFS book svn'd and the following scripts created in $LFS - chapter05.sh, chapter06-asroot.sh, chapter06-chroot.sh, chapter06.sh and lastly chapter08.sh. Copy chapter07.sh to $LFS and edit to match your environment. Run the scripts in chapter order. Run chapter05.sh as user lfs; all the others as root.

The scripts have been tested with version 7.4 and current svn. Older versions may break - they haven't been tested.

chapter08.sh creates a placeholder to build the kernel. You can add your kernel .config file to $LFS/sources at the start and it will build your kernel without your intervention. You have to select this option in the config file when you run lfsa.

When the scripts have finished, follow chapter 8 from the book to
install the kernel. Do su kernel to enter the kernel dir. mkproper has already
been run.

I've given you an option to install everything as root rather than a package user. You might prefer to use a script to do that rather that jhalfs.

You can now install LFS with systemd instead of sysvinit. Select SYSTEMD=yes in the lfsa config file. Select SOURCES=download and it will include the required systemd source files in the downloaded files. Use the systemd version of the chapter07 script, when you get to that. I tested this with version 7.4 and svn, but earlier versions will probably break.

The updategrub.sh script will update your /boot/grub/grub.cfg file on your host in order to boot into LFS. If this is how you start LFS, edit the script to suit your host (run blkid to see the uuid values for your disks).

The package-user management system uses three main scripts:-

installpkg, listpkg and delpkg

To install a new package, do: installpkg pkg-name. By default the
package user directory is created under /usr/src/core. You can change
it - just edit installpkg in /usr/sbin/. You can also do: 
installpkg pkg-name install-dir to override the default dir.

Additionally, you can also do: installpkg pkg-name install-dir uid 
to specify the user id number. By default the uid starts at 10000 and
increments with each package added. You can override this by specifying the uid. 
This is useful for packages such as apache and avahi which have suggested uids
in the blfs book.

Before you delete a package with delpkg, use listpkg to see which files will go.
delpkg pkg-name will delete all files owned by pkg-name. You have been warned.

To do maintenance on a package do: su pkg-name. So to install the kernel, do 
su kernel and it will take you to /usr/src/core/kernel where the source file is
already untared and mkproper already run. Just add your .config file, make and
install the kernel.

If you decide to run the tests, you may well find that the gcc tests fail. I got
21 failures with libmudflap and this stopped the script running. You'll have to
restart the script with the tests set to no. Do this in the config file edit at
the start of the lfsa script.

I recently (08/12) added an option to install everything as root, instead of a package user.

Release2.9 - updated the scripts to be able to request systemd instead of sysvinit
Release2.8 - tested working with version 7.3
Release2.7 - updates from lfs-dev version of the book
Release2.6 - added a check that all sources have been downloaded
Release2.5 - some code tidying to remove backticks and replace with $(...)
Release2.4 - pkg-config now included in lfs current_development
Release2.3 - can give a config filename: ./lfsa <configfile> Results in no menu displayed.
Release2.2 - replaced adjusting and readjusting in version 7.1.
Something went wrong with that request. Please try again.