This code repository can help you create the LFS12-4 system with one click. This project is based on Linux From Scratch and helps beginners better understand the Linux system. For more details, visit https://www.linuxfromscratch.org/lfs.
bash check-env.sh.
bash run-all.sh /dev/sdb.
The run-all.sh script requires a parameter. You need to prepare a hard drive in advance, with a size of 10GB.
Adjust the compilation parameters according to your CPU.
sed -i 's/-j4/-jXXX/g' .bashrc.
sed -i 's/-j4/-jXXX/g' run-Cross-compilation-temporary-tool.sh.
sed -i 's/-j4/-jXXX/g' run-Install-the-basic-system-software.sh.
sed -i 's/-j4/-jXXX/g' run-System-boot.sh.
sed -i 's/-j4/-jXXX/g' run-System-config.sh.
If your LFS hard drive is not /dev/sdb, you will need to change the configuration.
sed -i 's/\/dev\/sdb/\/dev\/XXX/g' .bashrc
sed -i 's/\/dev\/sdb/\/dev\/XXX/g' 5.5-grub.sh
Open a new terminal and switch to the lfs user.
su lfs.
bash lfs-run.sh.
if you want to change network, Vim /mnt/lfs/etc/sysconfig/ifconfig.enp0s3
Modify the network-related configuration, and do not forget to change the file name to your network interface name.