2 minute read

Yay!

Finally, my LFS worked! Named him Lufus, cuz like, “LuFuS”. It took me 2 days to set up everything lol. And I built this the same day I compiled Gentoo a year ago (12 December) :D

lfs

A Crazy Hybrid

My system isn’t that useful—the amount of errors my LFS has is horrendous, like:

  • I couldn’t suspend the system properly (on my G400s laptop and Gaming 3 laptop)
  • A file system error (not sure about it) during boot (both laptop)
  • My Wi-Fi card not working (on my Gaming 3 laptop)
  • …more

Plus, since it was compiled on my Gaming 3 laptop, using Lufus on my G400s makes a crazy hybrid mess. No, I didn’t optimize any code, but I probably missed some configuration flags. For now, I’m unable to compile programs with my G400s laptop. I probably have to set some flag during GCC configuration and then recompile it, but nah, who has time for that. This is enough, for now. At least I can ping a website xD

Day 1

Started on morning, everything was working pretty smoothly. The only twist was… I mistakenly compiled (the temporary one, luckily) glibc (I think) on my host system instead of my LFS. Good thing I didn’t break my host system.

Day 2

Stripping Cheat

On the stripping part, my second self was like, “back it up!!!” but I ignored it…

And when I was stripping my binaries I met this error:

strip: error while loading shared libraries: /usr/lib/libz.so.1: file too short

And turns out it’s because I didn’t pay attention to the book errata xd I mean yea I’ve checked it before but I didn’t pay attention again.

I’m supposed to replace the libz version to libz.so.1.2.13 like this:

online_usrbin="Bash find strip"
online_usrlib="libbfd-2.39.so
               libhistory.so.8.1
               libncursesw.so.6.3
               libm.so.6
               libreadline.so.8.1
               libz.so.1.2.13
......

The stripping failed and a lot of my programs broke because libz.so.1 became empty or something like that. I tried rebuilding zlib but I couldn’t because you need zlib to compile zlib. Ya. I then compiled zlib with my host system and then installed it with make DESTDIR=/mnt/LFS install and then recompile zlib through my LFS system again. It works and I don’t have to wait another 5 months to install LFS again! (I hate repeating something and I need to take a break first).

Booting

My first boot shows a blank screen. But of course I didn’t give up ;)

I suck at kernel stuff. I don’t understand 90% of the kernel configuration ToT and so I ended up copying Arch’s kernel configuration, modifying it a little, and then compile my kernel. I also made an initial ramdisk with my host system and recompile kmod to support zstd kernel module compression.

And yes it worked. Sort of. Many errors. But still works nevertheless.

Art

I’ve had a plan to create a LFS related art for a while, and I drew the concept at my class:

LFS! Concept

Some more behind the scenes:

LFS extra 1

LFS extra 2

LFS extra 3

No depth of field version:

LFS! - no DOF

Tags:

Updated: