- Shell 100%
᛫ Changed the readme slightly. Signed-off-by: Victor-ray, S. <git@zendai.net.eu.org> |
||
|---|---|---|
| .gitignore | ||
| 10-create_iso.sh | ||
| 20-mount.sh | ||
| 22-unmount.sh | ||
| 30-download_packages.sh | ||
| 40-build_user.sh | ||
| 42-build_user_script.sh | ||
| 50-chroot.sh | ||
| 51-enter_chroot.sh | ||
| 52-chroot_shutdown.sh | ||
| 60-build_system.sh | ||
| 70-system_configuration.sh | ||
| 80-bootable.sh | ||
| 90-finalize.sh | ||
| lib | ||
| LICENSE.txt | ||
| README.md | ||
| ready_to_build.sh | ||
| variables | ||
| version-check.sh | ||
| wget-list-systemd | ||
Linux From Scratch
This is a personal project of mine where I learned from Linux From Scratch and created these build scripts to build a linux distribution.
I have changed it somewhat though and I'm instead building within a disk image (img/iso).
🚨 🚧 Important 🚧 🚨
- ⛑️ Run
version-check.shto check for the necessary development tools. - ❗ Turn off/disable automatic mounting, i.e udiskie.
- ❗ Always run
52-chroot_shutdown.shafter you exit chroot or exit with CTRL + C.- 💥 If you reboot or shutdown your computer while
{dev,proc,sys,run}are mounted the system may become unbootable.
- 💥 If you reboot or shutdown your computer while
Project overview
├── version-check.sh Use to check for the required build dependencies of LFS.
├── variables Set configurations here.
├── ready_to_build.sh This script will go through the steps to complete a build.
├── wget-list-systemd This file contains all the package URL's to download with wget.
├── lib Bash library file containing helper functions.
├── 10-create_iso.sh Creates the ISO disk image file that will become the build environment.
├── 20-mount.sh Creates and mounts the disk image to designated mountpoints.
├── 22-unmount.sh Can be used to unmount the disk image.
├── 30-download_packages.sh Downloads the packages using the URL's listed in the wget-list-systemd file.
├── 40-build_user.sh Creates the build user.
├── 42-build_user_script.sh The build script that the build user runs to compile necessary build tools and packages.
├── 50-chroot.sh Prepares the chroot environment then enters it.
├── 51-enter_chroot.sh Can be used to enter the chroot environment of an existing ISO disk image build.
├── 52-chroot_shutdown.sh Must be used after exiting the chroot environment to safely disconnect. IMPORTANT!
├── 60-build_system.sh Builds the system packages and tools.
├── 70-system_configuration.sh Configures the system.
├── 80-bootable.sh Makes the system bootable. (EFI/UEFI)
└── 90-finalize.sh The final steps.
Build disk image (IMG)
This repository is for creating a base linux system with a disk image file.
Run the following as root user.
bash ready_to_build.sh
This will start the build process and create a disk image file, build all the necessary tools, download packages to the chroot environment, enter the chroot enironment and then complete the system build within chroot.
Root password: builderpass
During the installation a new password is required to be set for the new OS's root user inside chroot as the shadow package is being installed.
You can change this in 60-build_system.sh.
Once you have a disk image locally you can use the helper scripts to enter or exit the image.
51-enter_chroot.sh will take you into the chroot environment of an existing ISO disk image.
52-chroot_shutdown.sh will unmount the disk image after you exit chroot including disconnecting the loop devices, the device tree from your local kernel ({dev,proc,sys,run}), and the regular mountpoints.
Chapters progression
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11 🎉