Skip to main content

Get the Reddit app

Scan this QR code to download the app now
Or check it out in the app stores

r/linuxfromscratch

members
online

is it safe to compile gcc on a macbook air m1? is it safe to compile gcc on a macbook air m1?

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?


Bear with me it might be a bit noobish Bear with me it might be a bit noobish

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


Chicken and Egg problem Chicken and Egg problem

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.





stuck with grub bootloader in busybox linux stuck with grub bootloader in busybox linux

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

}




Stuck at chapter 4.2 Stuck at chapter 4.2

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

  1. I am doing the build in a VM of an Arch live environment

  2. what is this command actually doing, because I'm curious

  3. 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


I want to try LFS. Help pls I want to try LFS. Help pls

Hello everyone! I want to try and get into LFS, but I have some questions.

  1. 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?

  2. How should I go about it? What partitions to make? What programs do I need? If I install a distro, which one?

  3. 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.

  4. 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?


Look ma, it works Look ma, it works

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.

https://preview.redd.it/look-ma-it-works-v0-zbtybdm6ye1d1.png

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.



Gaming Linux From Scratch - First Release Gaming Linux From Scratch - First Release

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 https://github.com/Zeckmathederg/glfs and it will walk you through on how to read the book or even make the HTML or PDF yourself!









Custom *fetch LFS ascii logo Custom *fetch LFS ascii logo

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