Skip to content

zajca/LFS---by-bash-scripts

Repository files navigation

Linux From Scratch by BASH script

info

This is set of bash scripts for build Linux From Scratch distribution.

Prepare:

  • You must firts read LFS book 6.8 http://www.linuxfromscratch.org/lfs/download.html

  • Do all steps until chapter 5

  • copy files from directory lfsuser to lfs user home folder

  • log as lfs user

  • create folder scripts and copy all files into scripts directory in your LFS drive

  • check sources/include/prepare for changing variables and paths. You could change sources/include/chroot_prepare script too

  • run script onlyunpackscript with variable set to UNPACK=0 WAIT=0 it will download all package. Each script can download package too but in toolchain isn't wget so it didn't work

Important:

My scripts are little different from LFS. Tarballs with packages are in folder sources but they are unpacked to folder build. And by my mistake at begining I made folder /mnt/LFS instead of /mnt/lfs so if you want have folder /mnt/lfs you must change variable root in /include/prepare, onlyunpackscript, chap6/start6 and .bashrc of lfs user (I hope I didn't forget somethink). And last one folders for separate build are with -BUILD sufix instead of -build :D

DO IT:

start makeall script "sh scripts/makeall" and scripts told you what do next.

In short: script makeall will create toolchain, than you start script chroot_makeall that compile packages (all in chapter 6) chroot makeall will stop many times becouse of test check. Last script is makeall_rest that will do all steps in chapter 7 and 8.

Basic information about scripts:

Scripts are not autogenerated from LFS XML like jhlfs. And for now supports only LFS 6.8.

###basic directory tree:

chap{5,..,8} are folders with scripts for LFS build. Order of scripts is in makeall files.

chrootIN is folder with scripts for chroot in different parts of book

lfsuser is folder with user lfs files

important scripts

###include: ####chroot_prepare is script with variables in chroot and its making basic directories ####functions is script with all used BASH functions ####l10n-EN file with language variables, only part of variables are used. Probable this file will be deleted ####prepare is script with variables for chapter5 and its making basic directories ####ver is file with arrays that defines packages packagename = ( name dlink archivename foldername extension md5) ###chap6: -there are two important files ####start6 this script mount VFS on start chapter6 ####restart this script is mounting VFS too. It's for case that you must reboot host system. (now i don't what different is on that two files :D ) ####chroot_makeall script for chapter 6 ####makeall script for chapter 5 ####makeall_rest script for chapter 7 and 8 ####onlyunpackscript description lower ####version-check.sh script from LFS to check host system

onlyunpackscript

Very usefull script for download and unpack packages

###variables: ####ROOT=/mnt/LFS mountpoint of LFS HDD ####WAIT=1 useless variable if 1 it wait every step but if you unpacking you must wait elsewhere and if you only downloading you want every step pres enter ####UNPACK=1 if 1 it will download and unpack packages step by step like is in LFS Book. If you want read book and paste commands by your self it's great way. If 0 script only download and check MD5 sum at all packages.

If you unpacking, script will after each unpack stop and wait. If you type somethink in this time to terminal and press enter last unpack will be erased and unpacked again. It for case of error in compilation.

TODO:

Contact:

If you have any questions you can try contact me at my email zajcaa@gmail.com

About

set of bash scripts to build Linux From Scratch

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages