Slashdot Mirror


FreeBSD From Scratch

geekmedia writes "Daemon News has an excellent article which describes a fully automated installation of a customized FreeBSD system compiled from source, including compilation of all your favorite ports and configured to match your idea of the perfect system. If you think make world is a wonderful concept, FreeBSD From Scratch extends it to make universe."

58 comments

  1. This has been around for a long time by Anonymous Coward · · Score: 3, Funny

    It's called 'make world'.

    1. Re:This has been around for a long time by Anonymous Coward · · Score: 0

      "If you think make world is a wonderful concept, FreeBSD From Scratch extends it to make universe."

  2. I Don't Get It by minusthink · · Score: 4, Interesting

    Can someone explain to me what's wrong with binary distributions? What's with the recent rise in all these source based, do it from source distributions?

    I'm not criticizing, I'm asking.

    Is there really a *significant* increase in speed to justify the hours in CPU time to recompile everything with unrolling loops and athlon-tbird or whatever specific code?

    futurama is on. I have to go!

    --
    "when life gets complicated, I like to take a nap in a tree and wait for dinner" - Hobbes.
    1. Re:I Don't Get It by farnsworth · · Score: 4, Informative
      Can someone explain to me what's wrong with binary distributions? What's with the recent rise in all these source based, do it from source distributions?

      Most of the applications I use are written in a way that they are source-code compatible with almost all OSs. Almost none of them are binary-compatible on different OSs/libs.

      Sure, I could probably run a compiled-for-red-hat-7.1 binary, but why would I, when I can emerge (or whatever) it?

      Compiling from scratch is simply easier if you have a semi-modern cpu with the cycles to spare.

      --

      There aint no pancake so thin it doesn't have two sides.

    2. Re:I Don't Get It by GimmeFuel · · Score: 4, Informative

      It's not just the GCC optimization flags, it's total customization. Gentoo (my distro of choice and the most popular source-based Linux distro) also has USE flags, which allow you to compile programs with or without support for various things. If some app supports both KDE and Gnome, normally support for both would be compiled in, even though most users would only use one or the other. In Gentoo you have USE flags for KDE and Gnome, as well as a myriad of others. If you don't want KDE support compiled into apps, stick -kde in USE. Likewise with -gnome. Or put both in if you only use a more minimalist WM. Or -X if you're putting together a headless server, etc etc.

    3. Re:I Don't Get It by minusthink · · Score: 1

      but if a distribution uses both flags (kde and gnome), and that's great, is there really such bloat and slowdown that you should recompile?

      I don't know, maybe I'm just a "use what works" kind of guy.

      --
      "when life gets complicated, I like to take a nap in a tree and wait for dinner" - Hobbes.
    4. Re:I Don't Get It by sanctimonius+hypocrt · · Score: 2, Funny

      "What's with the recent rise in all these source based, do it from source distributions?"

      Well, it's more fun than looking for work.

    5. Re:I Don't Get It by Arandir · · Score: 1

      is there really such bloat and slowdown that you should recompile?

      It's not that there's necessarily bloat, but it does create dependencies on both Gnome and KDE. Not everyone has 80+Gig harddrives. If you don't need Gnome for a GTK+ application, why should you suck in the incredibly complex Gnome dependency tree? In my case, the only "gnome" program I use is Dia. I certainly do not want 50Megs (if not more) of Gnome installed just to run Dia, especially when I don't have to.

      Besides which, my system belongs to me. I should be the one making decisions about it, not some anonymous integrator for a distribution. Your typical Windows installer gives you the choice of "custom". Binary packagers under Linux/BSD/UNIX do not give you this option. But source based ports do. If you fear that freedom, then you are free not to excercise it. FreeBSD allows you to use "anonymous integrator" binary packages if you don't want to hassle with source builds.

      --
      A Government Is a Body of People, Usually Notably Ungoverned
    6. Re:I Don't Get It by tokaok · · Score: 0

      Hmm just so you are aware the Gentoo sources add up to about 9-10 gigs currently, on average a gentoo systems only has downloaded 3 gigs of them, those mainly being attributed to KDE Gnome X Kernel Source OpenOffice Fortune

    7. Re:I Don't Get It by Anonymous Coward · · Score: 0

      How much binarie compatibility do you want? I haven't had that much trouble with userland/kernel conflicts or packages that demand so-and-so version of this or that library. Don't know about Linux. Slackware was kind of assinine about that. But the FreeBSD way of doing things just works. But the concept of installing your OS by bootstrapping an already supported architecture is taking a design paradigm past the point where it makes any sense, the sort of behavior I'd expect out of developers for NetBSD or some Linux distro.

    8. Re:I Don't Get It by jgkastra · · Score: 1

      Can someone explain to me what's wrong with binary distributions?

      I've never liked having a lot of unreleated binaries in /bin and /usr/bin. I also didn't like having XFree86 in /usr/X11R6.

      With my Linux from Scratch system, I have the core install in / and /usr, and I have everything else installed in /opt/$NAME-VERSION and $HOME/pro/$NAME-VERSION. It makes upgrading, package management, and backups easier for me.

      The customization is why I use from scratch systems.

    9. Re:I Don't Get It by thogard · · Score: 1

      Recent rise? Unix has alwasy been delivered in source forms. That will true till Sun and Dec and IBM started doing binary distros for their own hardware.

  3. Re:Why? by Anonymous Coward · · Score: 0

    bsd has better virtual memory handling - mainly because it grew up in the days when RAM was expensive and it was actually used, hence debugged. linux, otoh, grew up in the days of cheap RAM, meaning it hasnt used it's virtual memory code as much, and it's still a little buggy with it.

    btw- outdated and stale might also mean productive, reliable, and mature.

  4. Re: think 64 bit by ubiquitin · · Score: 4, Insightful

    The big emphasis on source-only distributions is likely being spurred on by 64 bit processors due out from IBM/Apple, AMD, and Intel later this year. In theory, you update your compiler to the 64-bit optimzed one, and build your system from there. My guess is that once the opterons and hammers become more common, we'll start seeing binary distros for them, but that could be a while. Having popular source-only distributions will dramatically assist adoption of 64 bit goodness.

    --
    http://tinyurl.com/4ny52
  5. Re:Why? by nathanh · · Score: 3, Informative
    Would you use BSD over something better like Linux? Is it just to be different or something?

    For some people, unfortunately, yes. There are some rare individuals who say "I use FreeBSD instead of Linux therefore I am better than you". These same people would have at one point said "I use Linux instead of Windows therefore I am better than you". These people can be safely ignored.

  6. similarity to OpenBSD by sawanv · · Score: 2, Interesting

    Can anyone please tell me how similar this is to a fresh OpenBSD install, as I am thinking of doing one. Sawan

  7. Re: think 64 bit by RLiegh · · Score: 1

    I have yet to figure out wether or not there's any benefit to the make world + cflags combo for those of us using older (i686) cpu's. I can say that in my personal experience things such as gnome and mozilla didn't seem to benefit from being compiled with --march=k6 (I'm sure there's a ton of flags I forgot, however).

    As far as for-certain-cpu distributions go; aren't most Linux cpu's still compiled for i386 computers?

  8. Re:Developer lashes out: What Killed FreeBSD by Anonymous Coward · · Score: 0

    It is sad to see that you keep pasting this same thing. Part of being a troll is being creative. You are not creative. Kuro5hin users could troll better than you.

  9. Re:Why? by syrinx · · Score: 4, Insightful

    besides the fact that you're trolling, why should I switch to something I don't know as well, when what I have does what I need very well?

    In general, I find that FreeBSD is more logically laid out than Linux is, but honestly that could just be because that's what I learned first. I tried Linux and never really did much with it, but once I tried FreeBSD I never looked back.

    "Outdated" and "stale" my ass.

    --
    Quidquid latine dictum sit, altum sonatur.
  10. *BSD is... by Tuxinatorium · · Score: 2, Funny

    ...living

    what were you expecting??

  11. Re:*BSD Is Dying by SN74S181 · · Score: 0, Offtopic

    Your Kreskin link is dead. Now, this probably doesn't matter to some readers, but there are those of us who can tell an authentic 'BSD is Dead' post by wether the Kreskin link is an href or just plain text, indicating the post is a cheap cut-and-paste job.

    A suggested new link for Kreskin is here.

    Thank you.

  12. Re: think 64 bit by Anonymous Coward · · Score: 0

    I have yet to figure out wether or not there's any benefit

    wether - A castrated ram.

  13. Some things from experience by Sevn · · Score: 5, Informative

    I found the article of little use at all for a few
    reasons:

    I think I've had an installworld fail ONCE in 7
    years, and I think it was because I hadn't noticed
    that the make buildworld failed.

    As far as cruft in the OS laying around, I had a
    system that went from 2.2.8 to 4.0 stable with no
    problems. Part of the love of freebsd is not having to wipe partitions.

    To sum things up, most of the people I know that
    have had weird problems with things laying around
    don't do two very important things:

    #1 Run mergemaster

    #2 Read /usr/src/UPDATING

    As far as I'm concerned, the article this story
    references is completely pointless. :)

    --
    For every annoying gentoo user, are three even more annoying anti-gentoo crybabies. Take Yosh from #Gimp for example.
  14. For Gentoo, though by jsse · · Score: 5, Interesting

    Is there really a *significant* increase in speed to justify the hours in CPU time to recompile everything with unrolling loops and athlon-tbird or whatever specific code?

    Yes if 19% is significant enough for you. :)

    Quote from the link:

    vendor_id : AuthenticAMD
    model name : AMD Athlon(TM) MP 2000+
    flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 mmx fxsr sse syscall mmxext 3dnowext 3dnow
    vendor_id : AuthenticAMD
    model name : AMD Athlon(TM) MP 2000+
    flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 mmx fxsr sse syscall mmxext 3dnowext 3dnow
    gcc version 3.2 (i686-pc-linux-gnu)

    Result: '-O3 -march=athlon-mp -fomit-frame-pointer -finline-functions -fforce-mem -s -funroll-loops -frerun-loop-opt -fdelete-null-pointer-checks -fprefetch-loop-arrays -ffast-math -maccumulate-outgoing-args -fschedule-insns'

    Performance gain(compare to -O3 only) ~ 19.6%

    Warning: read my warning in the post before using these flags

    Of course, you need to justify the time taken to benchmark individual optimization flag to yield such a result. It took me a day to obtain a optimal CFLAG and another week to fully optimize a system. :)

    Older processors gain less performance boost over source optimization. I've little problem boosting a newer box to 19% and beyond.(compare to normal -O3 compilation).

    There're few stability issues(if you'd take my warning down my post), but it's still good for desktop processing(games!). For servers I would not risk it and use some other binary-distro instead.

    Of course, it's up to you. If you think you need extra performance boost for your production servers and you've management justification and you've given enough resources to test, why not. :)

  15. Re:Why? by irc.goatse.cx+troll · · Score: 1

    Sadly, those are the people I end up dealing with a lot. The sheepish majority that think FreebSD is cool because their slightly-geeky friend said so, And because they assume that anything thats hard to use/configure must be cool because of pure elitism.
    Someone needs to teach these sheepkids that not everything should be hard and that working default configurations arnt a bad thing.

    (For the record, I prefer clean debian installs on the server, and knoppix hd install as a bootstrap to a working debian install on the home system. I'm not saying the world should be RedHat; I believe any sysadmin worth his privledges should read bash.1 like the bible.)

    --
    Pain lasts, kid. Its how you know you're alive. Sometimes I think this growing up thing is just pain management-TheMaxx
  16. Re:Why? by Baki · · Score: 1

    But now you suggest that this would be the main reason for people. However, for some people BSD is better than Linux. If there is no linux-only app and/or driver that ties you to Linux, I would run FreeBSD too. I have for many years, and I found it to be much less time consuming and easier to install and upgrade, especially you can stay current with FreeBSD without install from scratch for years. Also overall level of "official" documentation is better.

    Currently I run Linux because of some apps and drivers not available for FreeBSD.

    Which one is better cannot be answered in absolute terms. To state plainly that Linux is better is arrogant and wrong. Linux may be better for you, or BSD may be better for you, depending on what you need/want/know.

  17. Re:oh my..... by Anonymous Coward · · Score: 0

    ok, so some lame moderator missed the joke. gentoo is a relatively popular linux distro which is built from scratch - much like the os described in this article. *sigh* no wonder i've seen .sig's saying "Offtopic == moderator doesnt get it"

  18. Re:Why? by Anonymous Coward · · Score: 0

    Sadly, those are the people I end up dealing with a lot. The sheepish majority that think Linux is cool because their slightly- geeky friend said so, And because they assume that anything thats hard to use/configure must be cool because of pure elitism.
    Someone needs to teach these sheepkids that not everything should be hard and that working default configurations arnt a bad thing.

    (For the record, I prefer clean Win2000 installs on the server, and DOS-5 install as a bootstrap to a working Win98 install on the home system. I'm not saying the world should be WinXP; I believe any sysadmin worth his privledges should read support.microsoft.com like the bible.)

  19. Let's see, who could it be, could it be... by Judebert · · Score: 3, Funny

    Considering that "Scratch" is one of Satan's old monikers, I think we've finally found the real connection to their demon logo.

    Sure, FreeBSD from Scratch. It all makes sense now.

    --

    For geek dads: Contraction Timer

    1. Re:Let's see, who could it be, could it be... by Anonymous Coward · · Score: 1, Interesting

      I know you are trying to be funny, but it is not so funny when you try to deal with your pastor.
      Our pastor isn't crazy about Halloween let alone a devil mascot in his computer.

  20. Re:Why? by TheRaven64 · · Score: 4, Interesting
    but honestly that could just be because that's what I learned first.

    Having learned Linux first, then tried BSD, I can say that (at least in my experience) this is not true. I find FreeBSD a lot nicer to use. The documentation is also far superior to anything I've seen on Linux. It also lacks the fragmentation of the Linux community, where a Mandrake rpm may not work on a RedHat box etc. Installing software, upgrading the system, and keeping it current are much easier under BSD, and it hasn't (yet) defaulted to the 'install everything the user might possibly think about using' philosophy present in a lot of Linux distros.

    --
    I am TheRaven on Soylent News
  21. Re:oh my..... by saintlupus · · Score: 0, Flamebait

    gentoo is a relatively popular linux distro which is built from scratch

    Hey, thanks for filling us all in. The hundreds of goddamned Gentoo fanboys who seem to swarm over every comment page on this site didn't make it adequately clear.

    --saint

  22. Re:Why? by nathanh · · Score: 1
    But now you suggest that this would be the main reason for people.

    Actually I said;

    There are some rare individuals...

    I don't know how you managed to jump from "rare" to "main".

    To state plainly that Linux is better is arrogant and wrong.

    And I never said that. Perhaps you hit the reply button to the wrong person?

  23. Re:oh my..... by Arandir · · Score: 1

    Considering that Gentoo copied the concept from BSD, you could say instead that Gentoo is the BSD of Linux!

    --
    A Government Is a Body of People, Usually Notably Ungoverned
  24. Re:Why? by Arandir · · Score: 4, Insightful

    Would you use BSD over something better like Linux?

    Who says Linux is better? Well, Linus would, but he's biased.

    You know, it's funny that whenever there's a BSD story, all you guys stop bashing each other for a few minutes to bash us. But we know better. Tomorrow things will go back to Slashdot normalcy and you'll see folks asking why they should use Redhat when Debian is better, or some variation of that theme.

    --
    A Government Is a Body of People, Usually Notably Ungoverned
  25. Re:Why? by Anonymous Coward · · Score: 0
    There are some rare individuals who say "I use FreeBSD instead of Linux therefore I am better than you". These same people would have at one point said "I use Linux instead of Windows therefore I am better than you".

    This pretty well describes what I used to be like. But now I use Gentoo, so this time I really am better than you! :-)

  26. Re:Why? by Anonymous Coward · · Score: 0

    I'm thinking of switching to Linux because the Nvidia drivers refuse to work under 5.0-current. Originally when I wanted to move to the unix secene, I tried linux. But then I found that it is nothing more than just distros after distros, and each one perturbed the design and goals of unix more and more to the point that it feels "hackish". I had used solaris and I wanted something that feels more like it. Then I tried FreeBSD and I was immediately in love. I accomplished more (learning) on it in one month than spending 8 months of just burning and upgrading ISOs and going through the RPM hell. FreeBSD in my opinion is better in most ways except now that gentoo might have leveled the difference a bit. I have yet to try it out, but the installation is like 10 pages long.

  27. Integrated Source Tree == Rules by SecretAsianMan · · Score: 2, Insightful
    Of course, FreeBSD from Scratch is brought to you by the integrated source tree and build system that FreeBSD has. It really is a powerful thing. When I was working in the embedded industry a couple of years ago, I chose FreeBSD for most of my projects because it was so straightforward to build a flash disk image containing a custom "from scratch" distro. In fact, I learned how to do it in less than one day! Automating the process meant writing a couple hundred lines of sh script and a few config files. Simply beautiful.

    I have since switched to Gentoo Linux for my personal workstations. IMHO, Gentoo beats FreeBSD at its own game, in three ways:

    • The Gentoo base system is even more streamlined and minimal than FreeBSD's. For instance, the FreeBSD base includes sendmail, tcsh, a real sh, uucp, and inetd (among others). These are optional in Gentoo, and I prefer that, since I don't need those packages.
    • The Gentoo Portage system is like FreeBSD's /usr/ports, only better. They feel very similar, but Portage is simply more featureful. I like Portage's USE flags, though I wish they weren't limited to on/off boolean values. The way Portage integrates packages with the base OS is also rather clean, though I am also a big fan of the FreeBSD "ports go in /usr/local" method as well.
    • Gentoo is somewhat more cutting-edge than FreeBSD. If I want to use bash instead of sh, metalog instead of syslog, vcron instead of cron, postfix instead of sendmail, cups instead of lpd, etc., I can, and without munging up the base system. And a pet peeve: FreeBSD only recently moved from more(1) to less(1).

    I have seen Linux panic thrice (way back in 1997). I've only seen FreeBSD panic once. They are both wonderful OSes. If only I had the time to run them both. Right now Gentoo gets my time.

    --

    Washington, DC: It's like Hollywood for ugly people.

    1. Re:Integrated Source Tree == Rules by La+Temperanza · · Score: 1

      It would be nice if Gentoo let you have, say, GTK1 and GTK2 installed at the same time like FreeBSD does.

      --

      --
      est modus in rebus
    2. Re:Integrated Source Tree == Rules by Moloch666 · · Score: 1

      I just recently switched from FreeBSD to Gentoo. I still love FreeBSD, but I realized that I was using FreeBSD for something much better suited with linux. Orginally I installed FreeBSD on what was going to be a headless server, which is perfect for FreeBSD. It ended up growing to a workstation for my girlfriend to check her email. What really did it was putting FreeBSD on my p3 500 which was going to be a DVD player. It has an Aureal soundcard and a TNT2. Actually I had that hardware working great. I found that a lot of software tended to have problems in FreeBSD. Mplayer has a bug only in FreeBSD that caused it to crash on exit (it was recnetly fixed). Snes9x wouldn't compile the last I tried and zsnes doesn't have USB joystick support. When discovering openMosix and found that it only worked on the linux kernel I decided that Linux was much more suited for my computer use. FreeBSD was fun while it lasted.

      --
      Understanding is a three-edged sword. -- Kosh Naranek
    3. Re:Integrated Source Tree == Rules by SecretAsianMan · · Score: 1
      I agree. The software and activities you mention are not really within the focus of FreeBSD but are well supported under Linux. What's great about Gentoo is that it seems to have incorporated several neat ideas from the BSDs. So we can have the best of both worlds.

      The one thing I really miss about FreeBSD is the developer community, especially as manifested in its structure and unity. I like that better than the somewhat disorganized fragmentation of the various GNU/Linux projects. However, considering the other benefits, I can live with a little disorganization!

      --

      Washington, DC: It's like Hollywood for ugly people.

    4. Re:Integrated Source Tree == Rules by Moloch666 · · Score: 1

      Yes, definatley. Finding help was the best thing about FreeBSD. I had like 4 pages bookmarked for resources (including the wonderful handbook). Rarely had to google with those resources.

      --
      Understanding is a three-edged sword. -- Kosh Naranek
    5. Re:Integrated Source Tree == Rules by Anonymous Coward · · Score: 0

      [ebuild R ] x11-libs/gtk+-1.2.10-r10
      [ebuild R ] x11-libs/gtk+-2.2.1

      ??? what was that again?

  28. Re:Why? by Anonymous Coward · · Score: 0

    To rate an "Informative" mod I would expect to see some, you know, information to support the claim linux is 'better' than bsd. The truth, of course, is that 'better' only makes sense when connected to an application.