Slashdot Mirror


miniBSD - reducing FreeBSD

dnaumov writes "miniBSD - reducing FreeBSD is a great guide, which explains in great detail, how you can create a truly small installation of FreeBSD on your system, completely by yourself. There is also the PicoBSD project, which has similar goals, but it's based on an outdated version of FreeBSD and is considered to be way too minimalistic (2 floppies) by many. The guide will walk you through things like creating the directory tree inside a chroot jail, rebuilding the bootloader and everything else needed to create a FreeBSD install that takes just around 20 MB of space."

5 of 39 comments (clear)

  1. Amazingly, almost half of that is perl! by RLiegh · · Score: 4, Interesting
    From the article:

    I did another minimal FreeBSD install and started looking for things I could remove in order to save space. After much tinkering, my "miniBSD" only weighed 22 MB (all binaries linked dynamically) and still had all the functionality I wanted (including ssh, FTP, perl and all the basic commands one expects on a reasonable UNIX system). Without perl, it fits in about 12 MB.

    emphasis mine.
  2. A new possible BSD ? by dnaumov · · Score: 4, Interesting

    There is a thread on BSDForums, where people are discussing the possibility of either creating a script that would automate the creation of a "MiniBSD installation" or possibly creating a new BSD altogether, using the MiniBSD philosophy and FreeBSD base.

    1. Re:A new possible BSD ? by josepha48 · · Score: 3, Interesting
      I think that one thing people are missing is that in a real FreeBSD system the /bin and /sbin contain static executables. Thus they are larger because all the code in 'in there'. In miniBSD all the programs are shared executables.

      This thread, if you read all of it, suggests that a new BSD would be a little to much and that it may be better for it to be part of FreeBSD as either an option or a seperate script.

      If you read the miniBSD there are scripts that do the coping for files from the real system to the directory that is going to be the compact flash directory. He starts out by telling the user to make world, which essentially tells people to build the system from the gound up. Also making sure to make NO static binaries. On most systems you may want static binaries, in case the system had an improper shutdown.If sh is shared and the shared libs are in /usr/lib (where they are on FreeBSD) then you would not be able to run sh if you could not mount /usr. In his scenerio it is a compact flash card that is being used and it is mounted read only ALL the time. If you do this to your system then you could cut down the size of the system.

      Also there is pam to think about. My FreeBSD 4.7 system has pam on by default. He does not mention this. So when I used his mklibs.pl script it did not get the pam libs and the system was pretty hosed.

      Oh and I have managed to cut FreeBSD down to about 72Megs with sshd running and bind 9, ipsec, and ipfw2, natd, and console access. Still I am looking at how to cut down more and still not loose functionality.

      I think the real solution would be a project in the ports that would allow an automated minibsd system to be built. i.e. run script x and make a few choices and it builds the system for you. Options could be include sshd, include bind 8 or 9, include perl or not and get your customizish system that way.

      --

      Only 'flamers' flame!

  3. Packagizing "base" by cperciva · · Score: 3, Interesting

    Every time someone asks about dropping Sendmail or Bind from the base system, discussion on the FreeBSD lists ends up with the following: If you go ahead and work out how to packagize "base", we'll probably end up doing it.

    I think starting with this "miniBSD" and adding everything else back in might be the right way to do it.

  4. Are there any miniBSD's akin to uClinux? by torpor · · Score: 2, Interesting

    i.e. portable to non-MMU, cheap processor families such as the Coldfire, MIPS, or ARM?

    It's been a while since I bothered checking to see if such a thing as an 'embedded BSD distro' existed, guess it's time to suss it out ...

    --
    ; -- the corruption of government starts with its secrets. a truly free people keep no secrets. --