2024-09-20 20:55:41 +02:00
2024-09-15 12:36:07 +02:00
2024-09-20 13:50:30 +02:00
2024-09-20 13:50:30 +02:00
2024-09-20 13:50:30 +02:00
2024-09-20 13:50:30 +02:00
2024-09-20 20:55:41 +02:00
2024-09-17 22:14:30 +02:00
2024-09-17 22:14:30 +02:00
2024-09-15 12:36:07 +02:00
2024-09-20 14:51:00 +02:00
2024-09-15 12:36:07 +02:00

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 options to suit the desired needs:

  • JOBS: parallel CPU threads used for compiling packages
  • NETWORKINTERFACE: the name of the network interface which will be configured with dhcp
  • HOSTNAME: the hostname used for the network configuration
  • DOMAIN: the domain name for the network configuration
  • KEYMAP: the keyboard layout
  • LOCALE: the system locale
  • TELNETD: if the telnet server service should to be installed
  • PAPERSIZE: the default paper size used by the groff package
  • MAKECHECK: to run the checks for each package in addition to the build and install process
  • TMPASTMPFS: if the mountpoint for /tmp should be set up as tmpfs by systemd

start 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 to /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 run chap7p1.sh from within the sources directory in the chroot environment

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

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

continue with the LFS chapters:

  • 10.2. Creating the /etc/fstab File
  • 10.3. Linux
  • 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

Description
Scripts to automate the installation of a LFS (Linux from scratch) system.
Readme 116 KiB
Languages
Shell 100%