Scripts to automate the installation of a LFS (Linux from scratch) system.
Go to file
tux 933b9f571f fixed if 2023-05-20 18:44:55 +02:00
README.md add switch for checks 2023-05-19 23:08:07 +02:00
bash-setup.sh added script for post-lfs bash setup 2023-05-18 21:27:07 +02:00
chap5-6.sh added timestamps for logging 2023-05-18 13:54:48 +02:00
chap7p1.sh restructured chapters and names 2023-05-17 14:44:18 +02:00
chap7p2.sh added timestamps for logging 2023-05-18 13:54:48 +02:00
chap8p1.sh minor corrections 2023-05-20 18:40:33 +02:00
chap8p2.sh fixed if 2023-05-20 18:44:55 +02:00
chroot.sh seperate first time chroot and later chroot 2023-05-17 15:05:12 +02:00
re-chroot.sh seperate first time chroot and later chroot 2023-05-17 15:05:12 +02:00
vars.sh add switch for checks 2023-05-19 23:08:07 +02:00
version-check.sh first steps 2023-05-07 14:47:59 +02:00

README.md

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