krglaws / mylfs Goto Github PK
View Code? Open in Web Editor NEWA giant Bash script that builds Linux From Scratch
License: MIT License
A giant Bash script that builds Linux From Scratch
License: MIT License
First: need to fix a phrase sudo ./build.sh
to sudo ./mylfs.sh
Second: there is an error at the beginning when it not creating pkgs
folder.
Third: it would be perfect if there was a table with Phases and Instructions for some people. This will allow to analyse more on which phase do what.
when run 'sudo ./mylfs.sh --build-all' and input Y to delete the old image, there will be a new failed like:
losetup: /works/Tools/LFS/MyLFS/lfs.img: failed to set up loop device: Device or resource busy
and I debug it, found there some code during loopx has been used and will try to re-plug it, but time too short, so lead the issues maybe, and I and sleep during it, and found every is fine.
Attached here for your check.
Thanks.
The old zlib link (https://zlib.net/zlib-1.2.12.tar.xz) is 404, I attempted to replace it with the newer version in packages.sh but that leads to tar not begin able to find it, where else do I change the package?
Please refer to the issue on my repo
Issue
It has the logs.
When running the initial build.sh script, I get the following errors:
Checking system dependencies... ERROR: ld does not satisfy minimum version 2.13.1 ERROR: gcc does not satisfy minimum version 4.8 ERROR: g++ does not satisfy minimum version 4.8 ERROR: /usr/bin/yacc needs to be a link to /usr/bin/bison.yacc done.
But when I run version-check.sh from the official lfs book (https://linuxfromscratch.org/lfs/view/stable/chapter02/hostreqs.html), I don't get any errors:
bash, version 5.1.16(1)-release /bin/sh -> /usr/bin/bash Binutils: (GNU Binutils) 2.38 bison (GNU Bison) 3.8.2 yacc is bison (GNU Bison) 3.8.2 Coreutils: 9.0 diff (GNU diffutils) 3.8 find (GNU findutils) 4.9.0 GNU Awk 5.1.1, API: 3.1 (GNU MPFR 4.1.0-p13, GNU MP 6.2.1) /usr/bin/awk -> /usr/bin/gawk gcc (GCC) 11.2.0 g++ (GCC) 11.2.0 grep (GNU grep) 3.7 gzip 1.11 Linux version 5.17.1-arch1-1 (linux@archlinux) (gcc (GCC) 11.2.0, GNU ld (GNU Binutils) 2.38) #1 SMP PREEMPT Mon, 28 Mar 2022 20:55:33 +0000 m4 (GNU M4) 1.4.19 GNU Make 4.3 GNU patch 2.7.6 Perl version='5.34.1'; Python 3.10.4 sed (GNU sed) 4.8 tar (GNU tar) 1.34 texi2any (GNU texinfo) 6.8 xz (XZ Utils) 5.2.5 g++ compilation OK
This is running from a fresh install on endeavour os.
Getting to "Downloading packages to /mnt/lfs/sources...", sits there for a couple of minutes then returns me to the terminal prompt. No errors or warnings.
Checking system dependencies... done.
Creating image file... done.
Creating basic directory layout... done.
Downloading packages to /mnt/lfs/sources...
Ubuntu 21.10
If you're reading this you probably have issues with Expat when reaching stage 4 of the building process.
Fixing it is as easy as editing 1 file, that of course if you don't mind doing some bit of nano
.
edit file packages.sh
in line:17:export PKG_EXPAT=
normally it would have the link for version "2.5.0"
that version is slightly old by now, so i would recommend changing the link to something like 2.6.2 or newer if given the case.
other possible fix is to go to the LFS' Sources directory(./mnt/lfs/sources
) and using sudo wget [LINK_TO_NEW_EXPAT_VERSION]
then remove the old version and use mv
to rename it to 2.5.0
, this way it will untar the new version as the old one, and build it as normal.
(NOTE: this last one worked for me more out of the box, as well it was the most simple of these, if we don't count that editing one file is fairly simple already)
Hope someone out there finds this small note useful!.
OS Tested on: Debian GNU/Linux 12 x86_64 (Minimal Installation | NO-GUI.)
There is no "Discussion" section so typing here.
It is a preatty well made script for making a LFS image.
But i have some thoughts and ideas that can be done here.
additional phases
. What if script will have ability to build BLFS and even CLFS? And also person can deside what packages he want by providing something like config name
which will be a txt with packages from blfs/clfs he/she wants to install. How about that?static
and templates
will be easier for me. (If path detection is an issue, find
command is for help)Currently i'll create a separate branch for making BLFS posible and will fix some folder naming to make it easier. Maybe i'll edit function to be universal for this task...
Maybe you have some thoughts to make something for this to be usefull?
Hello,
Thanks for your great job.
I running your script without errors. The IMG file was generate with 10GB.
I used DD to generate ISO file from IMG file, but on the test on Virtual Box the message "Not bootable medium found..." appear.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.