8 ms·
I can't recommend Linux From Scratch enough. If you want to understand the composition of the Linux user space, this is one of the best exercises to follow.
by darren0 6y ago
I can't recommend Linux From Scratch enough. If you want to understand the composition of the Linux user space, this is one of the best exercises to follow.
- MuffinFlavored 6y agoi feel like linux from scratch is kind of overkill 1. format a disk a bootable active partition with ext4 1. download the kernel, make defconfig && make 1. copy the kernel to the partition with syslinux mbr.bin and probably extlinux.conf (probably copy modules too) 1. copy busybox over 1. voila
- Nbox9 6y agoI think the purpose of LFS is to serve as an educational tool. In that way having more verbose steps teaches more.
- Bnshsysjab 6y agoYeah but that doesn’t teach much about core components in real systems, such as systemd, the init process, how dependencies work etc. I’m not saying you won’t learn, but I learnt a heap by avoiding systemd using gentoo. I eventually gave in when it became clear that it was no longer a viable option for various reasons, but the knowledge I learnt was mostly relevant. That being said, every time I try and do something remotely advanced with network manager I fail. I can no longer have static ips, or customise DNS on a DHCP controlled connection without google
- core-questions 6y agoYeah, the basic use case of simple wired network connectivity has gotten extremely complicated, especially in Ubuntu 18+, where you configure Netplan with YAML to render templates or...something.. that configures NetworkManager or not NetworkManager to do whatever to finally run `ip` to set the address. I miss just editing /etc/network/interfaces and /etc/resolv.conf by hand. I get that that sucks for laptops, but why can't the rest of us just have an exceedingly simple and pleasant setup?
- akersten 6y agoUgh, this resonates with me so much. I recently tried to fix some kind of mundane network issue (had a Fedora machine configured for a static IP and wanted to use DHCP instead), and the absolute mess of tooling that is the Linux networking landscape baffled me. How could it get this bad? As far as I could tell, there were at least 4 competing ecosystems (NetworkManager, the 'ip' tool, /etc/network/interfaces, /etc/sysconfig/network-scripts) all extant at the same time. Does 'ip' tool update one of those files? How do I tell systemd to re-load the configuration? Is NetworkManager running or not? Does it matter? Does NM update these files, or do something magical to the interface? Are these even the right files? The best answer at which I could arrive is "who knows?" Every time I attempted to change the network interface settings, it only stuck around until the machine rebooted. Something was resetting it back to a static IP, and I had no tools to tell me what. Why did distro maintainers ever allow things to become this confusing? Why do we have so many tools and config files for the same thing? In the end I reinstalled a fresh copy of Fedora on the machine and set the DHCP configuration in the setup wizard. It's that bad. My experience tells me to anticipate a comment along the lines of "Hey, those programs and config files are all actually the same tool, and you must have just been configuring it wrong." If that's the case - it's an even stronger point that this chaos has reached a critical mass, where parts of the same networking configuration tool are so disjoint that they don't visibly interoperate at all.
- throwaway8941 6y agoI'm almost positive your problems were caused by NetworkManager. I usually disable and blacklist it everywhere (or wipe entirely if the distribution dependency tree allows it), and my systems never behave in this unpredictable way. It tries to be helpful and rewrites network configuration files to align them with its own configuration.
- ac29 6y ago/etc/network/interfaces & /etc/sysconfig/network-scripts aren't part of NetworkManager (the directories don't even exist on my machine). You should probably check out `systemctl list-units` to see what is actually enabled and running on your machine.
- yjftsjthsd-h 6y agoThat doesn't teach you how to handle libraries and the magical pain of dependencies. It's an excellent start, and I would happily encourage doing that first before LFS, but it builds an extremely restricted system to the point of not really resembling any real system that you're going to find in the wild. In particular, a pure busybox system can't be self-hosting.
- pwdisswordfish2 6y agoWhat sort of system and resources do you need to compile the kernel? For example, "disk" space and memory? How long does compilation take (depends on system resources)?
- Jaruzel 6y agoIs this documented properly somewhere, so that I can give it a go? I've tried and failed with LFS so many times, I can't count - I tend to just run out of time, and by the time i go back to it, I've totally lost where in the process I was.
- InitEnabler 6y agoYes it does, can confirm at least the toolchain (Major step 1), and gcc for major step 2. I'm actually working on getting aarch64 working as of right now. If it successful I'd prolly like to submit a lfs hint.
- MuffinFlavored 6y agoI don't like giving my real name out online but I have a GitHub repo that does this automatically as a CI/CD job and a single shell script. It's really neat. Reach out to me (my username @ gmail.com) and I'll share it with you/
- amiga_500 6y agoAgreed. This got me started on a love affair that is still going strong, around 20 years later.
- lathiat 6y agoAgreed. I learnt a lot doing this in the 2000s.