lfs-auto/README.md

2.3 KiB

Instructions and scripts to automate the process of building a LFS system

Linux from Scratch

  • install host requirements

on debian based systems:

sudo apt -y install m4 bison texinfo build-essential &&
sudo dpkg-reconfigure dash

on rhel based systems:

sudo dnf -y install gcc g++ make m4 bison byacc patch texinfo
  • check host requirements
bash version-check.sh

edit vars.sh and change the following options to suit the desired needs:

  • JOBS: parallel threads used for compiling packages
  • PAPERSIZE: the default paper size used by the groff package
  • NETWORKINTERFACE: the name of the hosts network interface which will be configured with dhcp
  • HOSTNAME: the hostname of the system which will be used for the network configuration
  • DOMAIN: the domain name which will be used for the network configuration
  • KEYMAP: the keboard layout which will be set
  • LOCALE: the system locale which will be set
  • TELNETD: if the telnet server service is desired to be installed; if not, set this option to anything but TRUE
  • MAKECHECK: if in addition to the build and install of all packages the checks should be run too, set this to TRUE

proceed with the LFS chapters:

  • 2.4. Creating a New Partition
  • 2.5. Creating a File System on the Partition
  • 2.6. Setting The $LFS Variable
  • 2.7. Mounting the New Partition
  • 3.1. Introduction
  • 4.2. Creating a Limited Directory Layout in the LFS Filesystem
  • 4.3. Adding the LFS User
  • 4.4. Setting Up the Environment

copy the scripts into /mnt/lfs/sources

  • as the lfs user from within the sources directory run chap5-6.sh

  • when prompted logout the lfs user and as the root user from within the sources directory run chroot.sh

  • when prompted from within the sources directory from within the chroot environment run chap7p1.sh

  • when prompted run chap7p2.sh, chap8p1.sh and chap8p2.sh

  • optionally run bash-setup.sh for a base configuration of the bash shell

when prompted continue with the LFS chapters:

  • 10.2. Creating the /etc/fstab File
  • 10.3. Linux-6.1.11
  • 10.4. Using LFS_GRUB to Set Up the Boot Process
  • 11.1. The End

if the chroot environment has been exited and needs to be re-entered, use re-chroot.sh