Live data from Hacker News

I Built Linux from Scratch

thesloth.me

81–90 of 105 posts

Re: I Built Linux from Scratch

#81
post #5

For something that's more of a prepackaged build-your-own-Linux kit, there's also KISS Linux[0]. It's kind of a microdistro with minimal abstraction over the raw guts, and "packages" are just pre-downloaded source code repos that you compile yourself. The "package manager" is just a shell script. The installation process[1] is entirely manual, so you control every step as you bootstrap up to building your own kernel…

There's also TinyCoreLinux which is amazing when being bundled with busybox, for both embedded and VM use cases. [1]

Though these days I would probably recommend to go with Yocto [2] for the sake of stability and updates.

[1] http://tinycorelinux.net/

[2] https://www.yoctoproject.org/

Re: I Built Linux from Scratch

#82
I did one based around LFS a year or two back, but I used the Heirloom pkgtools stuff to publish packages in SVR4 format just for a laugh. I even packaged up and built CDE for it, it was a real fun parody of Solaris and other SVR4 systems. I called it HeadRat Linux. It really did add a nice spicy SVR4 style coating over Linux which I thought was kind of hilarious.

Re: I Built Linux from Scratch

#83
post #51

I did LFS back when I was a pre-teen/teen. So late 90s, early 00s. And while I agree to an extent that it doesn't give you much day-to-day stuff, it really makes you more comfortable with operating systems and linux especially. Nowadays, I am a devops/infrastructure engineer, and I can say LFS is a core foundational experience that has let me be better at my job. I know deeper inner workings of a Linux distro and tha…

Same, though a bit later, circa 2007. It's great for software developers too. It's a good quick intro to many different build systems & philosophies, and shows you how the different pieces of software connect together by standard paths and package management tools like pkgconfig. Being able to quickly dive into a new project, understand how to build it and hook other software into it, debug build problems, and make q…

Yep me as well sometime in that era. It was very interesting and informative. I'd never use it for an everyday system obviously but was a good excercise. And I did this on my real machine before VMs were really a thing :-)

Re: I Built Linux from Scratch

#84
I built an LFS system during one weekend my first semester of freshman year of college. I had too much free time I guess...

At the time I made it a 32-bit system since LFS didn't (doesn't?) support multilib and I knew I would need some 32-bit libraries.

I used that as my main system for quite a long time, upgrading software or installing based on BLFS or my own intuition as necessary. It worked pretty well! It was an invaluable experience in the development of my Linux expertise.

After about 5 years I got frustrated with the 32-bit system so I did an in-place upgrade to 64-bit. It was thrilling to come out the other end of that, to say the least (seriously). The training wheels were definitely off, but LFS had educated me enough to be confident in doing it. Also I kept around all the 32-bit stuff of course, so I could incrementally upgrade things.

After a few more years (maybe 2018ish?) I grew weary and changed to Arch (now I use void) :)

All that being said, I highly recommend LFS!

Re: I Built Linux from Scratch

#85
post #75

Earlier quoted context omitted.

It is dramatically easier to hide malware in a compiled artifact than in public source code, not to imply that the latter does not happen. In security focused orgs though you review all code yourself with the exception of things with extensive third party signed review such as the Linux kernel itself. Even then I review codepaths in the kernel critical for my use case such as random.c From there, if I -alone- compile…

Typo in your homepage: "Continuious Integration" Interesting thread!

Good catch!

Re: I Built Linux from Scratch

#86
post #34

I did LFS back when I was a pre-teen/teen. So late 90s, early 00s. And while I agree to an extent that it doesn't give you much day-to-day stuff, it really makes you more comfortable with operating systems and linux especially. Nowadays, I am a devops/infrastructure engineer, and I can say LFS is a core foundational experience that has let me be better at my job. I know deeper inner workings of a Linux distro and tha…

IMO a secure server is an immutable appliance. I still build Linux from scratch most weeks as a core part of my job. Bare bones hardened kernel + shim init + target application are all you need, and will be your highest security/reliability systems. And yeah, threadrippers are a must.

> And yeah, threadrippers are a must.

I mean, they give a wonderfully higher quality of life for compiling but they are $2,500-6,000 just for the CPU. Of course this can be done on much lower-cost CPUs! A 12-core Ryzen is already at the "I have lots of money to spend" end of what I'd suggest for something like this.

Re: I Built Linux from Scratch

#87

Earlier quoted context omitted.

I had the same experience around the same time (though I'm a bit older). LFS really helped me understand the relationship between the bootloader, kernel, init system, and all of the various daemons and tools that make up a complete system. From there I moved to Gentoo, and then eventually to Ubuntu and other batteries-included distros. But the knowledge I gained from LFS is still a foundational part of my skillset, e…

Until I moved to FreeBSD in the mid 2000s I ran Gentoo primarily. Even though it had a bit more hand holding than LFS, it still taught me a lot and getting to choose implementations allowed consideration of design choices (cron, mail, syslog, etc.). I’ve tried to return a few times but it’s a bit different now and I’m happy enough with FreeBSD that I don’t have much place for it. I do wish more embedded distros would…

I think one of the advantages of Gentoo or LFS is you get an “introduction” to a bunch of the various parts, so that when you need to change something in the future you know where to start looking.

Re: I Built Linux from Scratch

#88
I built LFS in the early 2000s and I must say that I felt pretty much the same way. Compile times were pretty high for some of the items and it was fun to bootstrap the entire system. I learned a lot but I don't intend to do it again. I don't really need the knowledge these days.

Re: I Built Linux from Scratch

#89
I like LFS, and I think it's a good teaching tool, but probably most people on HN won't get much out of it. It's like building a car from a kit: You don't know why you're connecting the belt between generic oddly-shaped box A and generic oddly-shaped box B. I've thought about making an LFS where you use a bare kernel image and write a simple init process, with busybox as a backup.

Re: I Built Linux from Scratch

#90

If you have children, a much better investment is to have them install LFS and forbid them from using Windows/Mac, compared to going to college. I did not learn a damn thing in college because I'd been using Linux since age 12.

True. Building Linux from scratch will teach you everything in a modern CS curriculum, including the `cut' operator in Prolog, Boyce-Codd Normal Form, and alpha-beta pruning. \end{snark}

Could someone explain to me USian school schema pls ? Especially what difference collage vs university. For comparision in Poland we have schema (+- 1 year):

- 0 - 6 preschool

- 7 - 15 basic school (mandatory)

- 16 - 19 middle school

- 20+ university or polytechnique

And middle school generally divides into: a) 3 year of craft school, workforce after; or b) 4 years of general learning school, no craft knowledge after, expected to go to university after or be clerk, or ..., unspecified; or c) ~4 years technical school in specific craft with "qualified technik" diploma quasi low level "engineer" (have some knowledge to be responsible for things), maybe polytechnique after or uni

At unis typical degrees: master, phd, professor.

So where in such schema collage is located ?

Post reply on HN