Why are there no projects like Linux from Scratch for any of the BSDs? reddit / BSD ---------------------------------------------------------------------- kyleW_ne · 2023-10-22 06:52 I was reading some about Linux from scratch tonight and realized there is not equivalent to LFS for any BSD. Is it because the projects are cohesive and are not a hodge podge of random parts combined like in Linux? ---------------------------------------------------------------------- pithagobr · 2023-10-22 07:09 Most of The BSD's are only the bare minimum you need to start. ---------------------------------------------------------------------- NotHariasa · 2023-10-22 07:48 Really? OpenBSD comes with a web server, mail server, packet filter (for e.g. running a firewall), relay, file server, sshd and three different window managers and other client software (ftp, ssh client, etc) in the base install. ---------------------------------------------------------------------- pithagobr · 2023-10-22 08:08 If you choose to install them. ---------------------------------------------------------------------- chesheersmile · 2023-10-22 08:51 >Is it because the projects are cohesive and are not a hodge podge of random parts combined like in Linux? Basically, you are right. ---------------------------------------------------------------------- chesheersmile · 2023-10-22 08:55 Actually, not quite. In OpenBSD you can choose to not install, say, compiler collection, X11 or games, but web-server, pf, perl, openrsync, tmux and many more things are in base. ---------------------------------------------------------------------- pithagobr · 2023-10-22 09:03 Last time I used FreeBSD(aprox 10 years ago 😁) I could choose every "group" of packets I want to install. If I chose nothing then I would get a bare minimum OS with the kernel and the TCP stack and a few binaries like ee. ---------------------------------------------------------------------- _arthur_ · 2023-10-22 10:34 Yeah. You don’t need to go look for several different components to build a BSD from source. That’s what they always do. ---------------------------------------------------------------------- chesheersmile · 2023-10-22 11:03 We've been talking about OpenBSD. =) But as for FreeBSD, it's the same, but you have even less choice. You may skip installing 32-bit libraries, sources or ports, but that's about it. You can check it [here](https://docs.freebsd.org/en/books/ha ndbook/bsdinstall/#bsdinstall-fetching-distribution). ---------------------------------------------------------------------- whattteva · 2023-10-22 12:31 And because in the case of FreeBSD, you don't even need a separate project. The instructions how to build the kernel and ports tree from source are right in the handbook in chapter 10. ---------------------------------------------------------------------- whattteva · 2023-10-22 12:35 You mostly answered the question yourself, but I'd also like to add that in the case of FreeBSD, you don't even need a separate project. The instructions how to build the kernel and ports tree from source are right in the handbook in chapters 10 and 4.5 respectively. Essentially, FreeBSD IS LFS already. ---------------------------------------------------------------------- demetrioussharpe · 2023-10-22 14:22 Yes, that’s exactly why. ---------------------------------------------------------------------- jmcunx · 2023-10-22 14:37 In OpenBSD, building a custom kernel is frowned upon. But IIRC, both NetBSD and FreeBSD (maybe OpenBSD) has "make world", so I think BSD from Scratch is really not a thing since a full recompile is already built in. Also, NetBSD people can cross-compile a system for other machine types. ---------------------------------------------------------------------- zshguru · 2023-10-22 14:37 a "BSD from scratch" would defeat the point of a BSD where the team that writes the kernel writes the C library and writes the shell (and so on and so on). ---------------------------------------------------------------------- sdk-dev · 2023-10-22 15:06 I'm not sure what BSDs you've seen. In the BSDs I know, the minimum is a fully functional system with all the stuff most users need. In Linux you have only the kernel, and then you need to add a bootloader, init system, coreutils etc. in order to get to something that's remotely functional. This is why Linux "Distributions" exist. There's no need for that in the BSD-World, because the Kernel, Bootloader, init system, userland tools, and more... are coming right together from the same source code repository (and you're not supposed to rip anything out!). ---------------------------------------------------------------------- sdk-dev · 2023-10-22 15:13 Is it? There's even a manpage that describes how it works: release(8). The thing is, you'll end up with the same kernel that's on the mirror, so there's really no benefit in compiling one yourself. Except maybe your furnace is broken and you need to generate some heat with your computer. If you change something and then cry about it? That's frowned upon. Because custom kernels are not supported. ---------------------------------------------------------------------- whattteva · 2023-10-22 16:33 Yeah, that's why I said OpenBSD doesn't like you to do it. However, that was from years ago and I haven't checked on them recently, so I wasn't sure if Theo still has that policy. I suppose they still do. ---------------------------------------------------------------------- Diligent_Ad_9060 · 2023-10-22 16:44 I agree, and if you're on FreeBSD you have ipf, pf and ipfw. If that isn't enough you could setup TCP wrappers. If you need to connect to anything using telnet, rlogin or any other legacy you'll likely find that too. It's severely bloated to use just run one app, or provide some single feature. I'm yet to find convenient ways of building the bare minimum. It's possible, but not easy (see man pages for src.conf, make.conf and release for pointers). I don't think the community or the developers are particularly interested. Maybe it's all too tailored to the patchwork of Linux containerization and the ideas of "cattle not pets". ---------------------------------------------------------------------- bastardoperator · 2023-10-22 18:16 Because BSD is typically a full operating system with userland, not a reference to a kernel or specific tooling. ---------------------------------------------------------------------- kyleW_ne · 2023-10-22 23:47 Gotcha thanks! ---------------------------------------------------------------------- kyleW_ne · 2023-10-22 23:48 Thanks, just wanted to make sure my logic was straight! ---------------------------------------------------------------------- ben_bai · 2023-10-23 23:00 For OpenBSD the "from scratch" is easy and detailed in https://man.openbsd.org/release ---------------------------------------------------------------------- kyleW_ne · 2023-10-23 23:06 Thanks so much Ben! ---------------------------------------------------------------------- zenojis · 2023-10-27 03:35 i would argue that there is a missing piece in understanding this here: Linux is the name of a kernel. BSD is the name of a class of distributions. LFS is basically a source distribution. If we adopted stallmans 'gnu/linux' terminology, this conversation might begin to make more sense. Just like no one is taking the kernel from some BSD and starting with only that, no one is taking the ubuntu kernel and starting with only that. I think the most common linux distros: debian, ubuntu, redhat, suse, are pretty comparable to bsds. they all have their own unique software written for the distro, come with different kernels than the Linus kernel, work as a comprehensive set of programs, etc. ​ The main difference really seems to stem from BSDs having an actual kernel fork, whereas Linux has been open since day one and Linus is still around and accepted as the "dictator" so there has been no need to fork Linux. Plenty of BSD software comes from diverse sources, even if a local branch is kept for the distro. Of course, there is that history of the original BSDs where it really was all integrated and from the same company. ---------------------------------------------------------------------- muthuh · 2023-11-19 15:53 Thanks for this. So apparently, there's definitely a way to build an (Open)BSD from scratch, despite all the "it doesn't apply in the BSD world" *nonsense* in this thread. For reasons I don't fully understand nor appreciate, the fact Linux is an (extremely well, in *many* cases) assembly of software originating from many projects is being *frowned upon* in this and many other threads. An OpenBSD *and* Linux user myself I appreciate them both. *Good luck, have fun* whichever the UNIX or the UNIX-*like* system you prefer. ---------------------------------------------------------------------- ben_bai · 2023-11-25 23:45 Of course there is a way and it's even easier than on linux. The "don't do it attitude" just comes from "don't do it and ask stupid questions", like "I patched the kernel with some diffs i found on github and now nothing works, and my pr0n collection is corrupted, please help?!?!??!"