i'm building linux from scratch on a ubuntu arm64 edition running on UTM in macbook air m1 2020, i gave ubuntu 4 cpu cores and 8gb ram, when i compiled gcc the first time it took 10 minutes but the macbook got really hot since it's fanless, when you install gcc in chapter 8 , it will take 42 SBU (with tests) which is probably more than 1h, i feel that the macbook will get (crazy hot) damaged if i continue compiling gcc in chapter 8, so did anyone built linux from scratch using an m1? am i doing it the wrong way?
I'm trying to make a Linux distro for productivity and self improvement with self control based features like app use time limiters and web blockers(if I can somehow block sites from the os) and usage time trackers for it also have anti cheat features etc also for it to be easy to use and have a built in feature for making app icons for appcodes something like that app used for Ubuntu to make icons also for it to be more light weight like Ubuntu too I have minimal knowledge about coding but I do know how to use Linux pretty well I have a bunch of free time so I will be dedicating it to learning coding how hard would it be to make a Linux distro like this? What would I need to know? How can I make it etc stuff like that
Compilers are dependant on glibc, so we need to compile glibc but we dont have a compiler to compiler glibc, (chicken and egg problem), what we do is create a downgraded compiler without glibc that will compile glibc for us.
But when we compile the downgraded compiler, isn't it also compiled by another compiler hence not from scratch? you need to compile something eventually to create your own compiler and whatever that is it will be by a compiler that you dont own.
in the first step of compilation you need to run this command
../configure --prefix=$LFS/tools \ --with-sysroot=$LFS \ --target=$LFS_TGT \ --disable-nls \ --enable-gprofng=no \ --disable-werror \ --enable-default-hash-style=gnu
the only place where i can see the script is inside the binutils tar package in $LFS/sources, if thats the file where should i extract it?
in the it said we need to create a cross compiler that will create a native compiler which will compile our distro.
but why not use the host compiler to directly create a native compiler?
Or why not compile all the distro using the cross compiler that we created, why the native compiler is needed?
would like to learn how to build a bootable ubuntu os, then I put it into the usb driver to install it later.
If ubuntu is not the best choice for newbie trying LFS, please advices.
Hi i tried to create LFS based on busybox, linux kernel and initramfs placed in boot partition. It works when i start with qemu without bios, but if try to use qemu with bios (OVMF) grub stopped after system select(just black screen) also i tried to boot from grub command line, but it's to don't worked.
my grub.cfg
set default=0
set timeout=10
menuentry "PRELUDE [BIOS MODE]" {
insmod all_video(without this line no suitable video mode found)
insmod gzio
linux /boot/vmlinuz ro quiet
initrd /boot/initramfs.gz
}
hello, im new to LFS and I want to build a a distro which is minimal and lightweight for some old hardware and I want to optimise it for programming and some basic video editing ..so where should I start from ?.. I only have some basic knowledge of linux ..
ive been trying to put a UI into my linux distro can anyone tell me how to do this?
A work friend suggested I try an LFS after I had gone through a successful Arch install and so I started working on one a few days ago. I will not say it has been smooth sailing but I have yet to find a problem a couldn't just google an answer to and keep working until now, and I think it's because I don't know what to ask.
I am just getting to section 4.2. "Creating a Limited Directory Layout in the LFS Filesystem" and had no issues running the command
mkdir -pv $LFS/{etc,var} $LFS/usr/{bin,lib,sbin}
but I do not understand the next command in the sequence;
for i in bin lib sbin; do ln -sv usr/$i $LFS/$i done
I guess I have 2 questions following the information that
-
I am doing the build in a VM of an Arch live environment
-
what is this command actually doing, because I'm curious
-
how do I type this out, I cant copy paste it into the VM, or at least I'm too stupid to be able to figure out how.
I tried typing it into the terminal as
for i in bin lib sbin; do \ ln -sv usr/$i $LFS/$i \ done
but that did not work, instead returning what I imagine is the input for a missing argument
\'for>
I don't understand what this is asking, or how I can make this command run in the VM. I would rather input the commands by hand than copy and paste. I couldn't find any resources to get around this problem
Hello everyone! I want to try and get into LFS, but I have some questions.
-
I can only use one disk, a HDD, because I have a very old computer. Should I install another distro, and work on it from there, or from a live iso? I think if I restart my computer and im on a live iso, my work is gone, no?
-
How should I go about it? What partitions to make? What programs do I need? If I install a distro, which one?
-
My computer has an Intel core 2, with 2gb of ram. Will LFS make it run better? I used to use Arch, ubuntu, debian, I tried mint, nobara and some other distros.
-
Which distro should I use? Btw arch iso doesnt work for some reason. I tried burning the iso to the stick and booting into it, but it doesnt let me. I get an error. I tried ventoy also, no luck. What should I do?
I went off book. Took me a few days of messing with build flags to find the right combination and chasing my own tail from bad assumptions more than once.
TBH Budgie isn't really that far off book, 95% of the deps are in BLFS and the missing ones are just small misc utility apps.
Flatpak is incredibly easy to install and should be included in the BLFS book IMO as I can now install almost anything I want without building from source.
What is the total amount of SBUs in linux from scratch?
My new book, Gaming Linux From Scratch, or GLFS, guides the user through dependencies, drivers, and multilib to get to the point where they can install Steam and Wine on an LFS platform. It's been a long time coming and I have been working hard on this. It still needs some work but the book is now functional. The GitHub repo is and it will walk you through on how to read the book or even make the HTML or PDF yourself!
Hi!
I'm trying to compile gcc and it appears a error in c++tools. In the config.log of the paste c++tools I get this error:
xg++: error: unrecognized command-line option '-funconfigured-libstdc++-v3'
How to solve this error?
I am in the process of a script parser for fun
It will skim the book for commands to build a stage 3 tarball it's far from done though
Curious what you think
I have a bunch of lfs-based VMs, work great in xen kvm etc
But then I try to take one with me on a laptop with vmware workstation and it cannot find any root device
I guess grub still runs so that is a good sign. But after that is complete choke. Any ideas or similar experiences?
I'm stumped , details:
Version 12.1 OpenSUSE Tumbleweed System requirements met Checksums all good. Checked permissions
The problem
5.4 Linux-6.7.4 API Headers
cp -rv usr/include $LFS /usr
Permission denied on all files
Everything else, no problem, no errors.
What am I missing? Any thoughts greatly appreciated.
Thank you.
Does such a thing exist? I'm considering trying linux from scratch but the fact that the instruction book is a pdf would make things harder, as I don't want to have to rely on my tiny smartphone screen and would like to follow along as I install it.
UPDATE: nvm, appearently most of the process is done on the host machine while I still have access to a browser
Normally I don't use Neofetch or any fetch application unless I take a screenshot just for the fun of it. I just open a terminal and do my business. Today though, I had an idea which I knew would be completely redundant: a custom Linux From Scratch *fetch logo. Will I use the logo from here on out? Probably not, but oh well, I wanted to share it.
cat >> fetch-lfs.txt << "EOF" ${c2} .:@:. ${c2} :@@@@@@@: ${c2} @@@@@@@@@- ${c2} .:%. @@@@@@@@@+. @% ${c2} *@@@%+: :@@@@@@@%=: .=%@@@@@@= ${c2} :@@@@@@##@@@@@@@@@%*+%@%+@@@@@@@+ ${c2} @@#${c1}####${c2}+@@@@@@@%:${c1}######${c2}=@@@@@@@@@- ${c2} *@%${c1}######${c2}.@@@@@#${c1}#########${c2}-@@@@@@@@#. ${c2} %@-${c1}#${c2}.@${c1}=${c2}:${c1}##${c2}+@@@@-${c1}###${c2}%@${c1}:${c2}=${c1}###${c2}*@#*+=-+#: ${c2} @@.${c1}#${c2}@@*${c1}=${c2}:${c1}#${c2}-%%**-${c1}##${c2}%@@%${c1}*${c2}*${c1}###${c2}#=- ${c2} @@-${c1}#${c2}@@@@+.-${c3}...${c2}:=.${c1}#${c2}%@@@@%${c1}###${c2}#- ${c2} %@%${c1}##${c2}*#:${c3}.o.....o...${c2}-%@+${c1}###${c2}#@+ -: ${c2} +@@*${c1}#${c3}....................${c2}+@@@@@@@@+ ${c2} @%:${c3}....................._:${c2}@@@@@@@=. ${c2} .=:${c3}...............__*-=`.${c2}=@@@@@@#=. ${c2} :+:${c3}....:==*__*-=`:..==-:${c2}#@@@@@%+: ${c2} .--=-: ${c3}+..::.....-: ${c2}=%@*=: ${c2} :........- ${c2} .:...--. EOF
Using neofetch, you can see what it looks like by running the following command:
neofetch --ascii fetch-lfs.txt
I had trouble downloading the packages and patches using wget.
It couldn't find a URL in command.
I downloaded all of them individually into my host Download directory.
Copied and pasted them into LFS/sources.
Is this going to be a problem for me?
Apologies if this has been answered already.
Thanks
So my high school professor (yes a high school professor) gave me a a challenge that if i make linux from scratch (LFS) i will finish his class with a 5+ (A+ for the rest of the world). I have very little knowledge of linux mainly graphics programming. Should i take up the challenge? And if i do how do i even start?