Live data from Hacker News

Build yourself a Linux

github.com

31–40 of 91 posts

Re: Build yourself a Linux

#32
post #25

Have you even looked at the LFS project[1]? And what does your guide provide that LFS doesn't? [1] http://www.linuxfromscratch.org/

Actually LFS teaches you about the whole GNU Userland, getting a kernel up and running with busybox is much easier. This project does just that - teaching you the bare minimum.

The embedded version of CLFS (Cross-Compiled Linux From Scratch) covers building a musl + busybox system: http://clfs.org/view/clfs-embedded/x86/ But the more resources available on this kind of thing the better IMHO, there's not really a one size fits all :)

Re: Build yourself a Linux

#33
Building a Linux distro from scratch has been one of the most tasking projects I've attempted. There are two phases: the frustration phase, and the tedious phase. Bootstrapping it is an incredibly frustrating process - I restarted from scratch 5 times before any attempt ever got to the tedious phase. The tedious phase never ends. You have to make hundreds of packages to get to a usable desktop system. I've made 407 packages and I still don't have a desktop to show for it (I'm hoping to get sway working tomorrow, I think I have about 30 packages left).

Still, I've finally gotten to a somewhat practical self-hosting system. My laptop runs it on the metal and all of the infrastructure (website, bugzilla, git hosting, mirrors) is on a server running my distro too. It's taken almost a year of frustration, but it's very rewarding.

Re: Build yourself a Linux

#35
post #8

Earlier quoted context omitted.

Back in 2002 I ran LFS for a semester and a half. Then I got tired of saving all my ./configure flags and switch to Redhat and gained a respect for package management. :-P Eventually I started using Gentoo. Still, I'm really glad I built and ran an LFS for nearly a year. It helped me build a really in-dept knowledge of Linux that's helped me as I later moved into embedded development. Today I still use Gentoo (which…

I am of two minds about package managers after having used Gobolinux for some years. Because once i got familiar with Gobolinux and how it handles things, i can't shake the feel that most package managers introduce as many problems as they solve. The biggest is that while _nix have sonames to handle multiple lib versions installed at the same time, most package managers balk at there being more than one package of a…

Package managers are like vehicle transmissions. They are designed a certain way, and if you misuse them, they break. Some are more or less annoying, depending on the perspective of the user and how they use it.

Most package managers are some form of automatic transmission. Some provide paddle shifting, some are CVT, some have two clutches and 9 gears, and some just basic four speed boxes of swirling fluid. Almost all of them are a nightmare for a regular person to maintain.

That's part of why I use Slackware, which uses Pkgtool. It doesn't track dependencies. It doesn't resolve conflicts. It doesn't roll back changes. It doesn't do much of anything. And it's absolutely wonderful. The only time it ever gets in your way is if you intentionally break it. Of course, i'm on the extreme end of a "power user", but the damn thing is so simple that even a total newbie can grok how it works and the potential for catastrophe if they misuse it (like a manual in a car).

Of the ~8 package managers I've used, RPM is the closest to a simple, coherent, complete system. It's still not great, though.

Re: Build yourself a Linux

#36

Building a Linux distro from scratch has been one of the most tasking projects I've attempted. There are two phases: the frustration phase, and the tedious phase. Bootstrapping it is an incredibly frustrating process - I restarted from scratch 5 times before any attempt ever got to the tedious phase. The tedious phase never ends. You have to make hundreds of packages to get to a usable desktop system. I've made 407 p…

Good for you for sticking with it. I've started in that direction a few times, but it really is amazing just how necessary all those hacky distro-maintained build scripts and patches are. It's tempting to think that they're just tweaking things to fit their conventions and handling edge cases, but they're often just getting it to not explode by default.

Re: Build yourself a Linux

#37

Building a Linux distro from scratch has been one of the most tasking projects I've attempted. There are two phases: the frustration phase, and the tedious phase. Bootstrapping it is an incredibly frustrating process - I restarted from scratch 5 times before any attempt ever got to the tedious phase. The tedious phase never ends. You have to make hundreds of packages to get to a usable desktop system. I've made 407 p…

Good for you for sticking with it. I've started in that direction a few times, but it really is amazing just how necessary all those hacky distro-maintained build scripts and patches are. It's tempting to think that they're just tweaking things to fit their conventions and handling edge cases, but they're often just getting it to not explode by default.

I've made several compromises so far. I've been making a note of them with the expectation (or hope) that I'll get to them, or a bright eyed new contributor might (I have some of those :D).

Re: Build yourself a Linux

#38
post #8

Earlier quoted context omitted.

Back in 2002 I ran LFS for a semester and a half. Then I got tired of saving all my ./configure flags and switch to Redhat and gained a respect for package management. :-P Eventually I started using Gentoo. Still, I'm really glad I built and ran an LFS for nearly a year. It helped me build a really in-dept knowledge of Linux that's helped me as I later moved into embedded development. Today I still use Gentoo (which…

I did exactly the same in 2005. I even wrote my own init scripts, so I really understood a lot what's going on at startup time. Linux was quite simple at that time. I could write my own init, if I wanted. Unfortunately now this knowledge is obsolete. Systemd is a complex beast which uses a lot of arcane techniques, I'm hardly understanding it. chroot was a really simple concept, but nowadays people use containers, an…

I've had to learn apparmour, which isn't too bad and a lot easier than SELinux (maybe not as powerful).

Systemd is a religious argument at this point, but if you want simplicity check out Void. It uses runit and I love it. It's incredibly simple. Startup files are often less than 4 lines. I don't really like systemd either, but I will admit, as a package maintainer, it does make packaging a lot easier/universal. It'd be nice if there were drop in replacements for systemd that uses the target files for services and trashed everything else. UselessD was a cool project that attempted it, but it became to difficult to maintain. :(

I currently work at a docker shop and I will say, containers are pretty nice. They're better isolated chroots with a lot of cool versioning support. There are pluses and minuses, but overall, I think docker is a nice evolution from chroots. Now all the eco-systems around docker: kubernets, DC/OS/marathon, nomad .. all totally different, proprietary and over-complicated.

Re: Build yourself a Linux

#39

Earlier quoted context omitted.

I am of two minds about package managers after having used Gobolinux for some years. Because once i got familiar with Gobolinux and how it handles things, i can't shake the feel that most package managers introduce as many problems as they solve. The biggest is that while _nix have sonames to handle multiple lib versions installed at the same time, most package managers balk at there being more than one package of a…

Exherbo and Gentoo both solve this problem with something called "slots". Namely, you can install various slots of a package, you can depend on a slot, etc. In Exherbo you can tell optionally one package to runtime-depend on the slot of another package that you built it with.

I love slots. The Gentoo eselect system is way ahead of etc-alternatives or some of the other package select tools I've seen. Slotted binaries are easier though; slotted libraries can get complicated and get into some crazy dependency hell.

Re: Build yourself a Linux

#40
This is an awesome write-up. did not know losetup can do what kpartx does now with the option -P, I did similar things in the past but this is a good update for me.
Post reply on HN