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."

16 of 58 comments (clear)

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

    It's called 'make world'.

  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 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.

  3. 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
  4. 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.

  5. 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

  6. 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.
  7. *BSD is... by Tuxinatorium · · Score: 2, Funny

    ...living

    what were you expecting??

  8. 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.
  9. 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. :)

  10. 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

  11. 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
  12. 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
  13. 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.