Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
BSD Operating Systems

miniBSD - reducing FreeBSD 39

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."
This discussion has been archived. No new comments can be posted.

miniBSD - reducing FreeBSD

Comments Filter:
  • by RLiegh ( 247921 ) on Tuesday March 18, 2003 @07:53PM (#5540600) Homepage Journal
    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.
    • Who the fuck modded you up like your "emphasis" means anything? Perl is big. Everybody knows this. It's got a lot of "core" modules that help it do its job, a common base that other modules can build against safely. Its size is one reason that FreeBSD has been looking to remove any dependency on it in the base install, though it'll still be available as a port.

      Your "emphasis" seems like pointless perl bashing to me.
      • I think you'll find that it was incredulity that one program and it's associated libs takes up that amount of space. So? Replace it with python for example, and that'd take up the same space - it's not language bashing, just program-size bashing. get off your perl high-horse, perf.

  • Why not just use OpenBSD without any optional crypto crap? Or NetBSD?

    With no perl etc, the minimal install should be small, although i havent tried.
    • FreeBSD supports much more hardware than OpenBSD and OpenBSD *STILL* doesn't do SMP.
      • True enough, though I can't imagine what you'd want to do on an SMP machine with a minimal install.
      • by evilviper ( 135110 ) on Wednesday March 19, 2003 @12:20AM (#5541943) Journal
        FreeBSD's hardware advantage isn't all that significant. OpenBSD supports every network card I have ever tried (and that is a huge number of diverse types). So what exactly does FreeBSD support that is so important??? The only hardware I can recall OpenBSD not supporting is a few sound-cards I have, and that's a non-issue for this type of system.

        Sure, it doesn't support SMP, but I don't consider that to be much of a drawback. SMP isn't all that popular, and would likely be even less so in these types of machines.

        If you still want to site hardware/SMP support as a major issue, I can point out that Linux supports even more hardware, and (supposedly) has far better SMP support.

        As for the advantages of OpenBSD, it is smaller, far less complex to setup/configure/maintain, more secure, and has plenty of great programs that FreeBSD lacks (Systrace and PF kick ass).
        • As for the advantages of OpenBSD, it is smaller, far less complex to setup/configure/maintain, more secure, and has plenty of great programs that FreeBSD lacks (Systrace and PF kick ass).

          Hmm, how much smaller? Do you have number at hand or just think so?

          I don't see much complexity in FreeBSD setup/configure/maintain... If OpenBSD even less complex then it's missing some features?

          Do you have bigger list of "great programs that FreeBSD lacks"? BTW there is a systrace port for FreeBSD -http://www.citi.umi

          • by evilviper ( 135110 ) on Wednesday March 19, 2003 @09:22PM (#5549199) Journal
            Hmm, how much smaller? Do you have number at hand or just think so?

            Well, emBSD (small OpenBSD distro) fits on a 32MB flash card with room to spare, and that includes SSH, IPSec, pf, network card drivers, etc. No doubt it could be made much smaller.

            I don't see much complexity in FreeBSD setup/configure/maintain... If OpenBSD even less complex then it's missing some features?

            It's not missing any features, it's just a better, simpler, configuration system. Try it some time, rather than just complaining about what you don't know.

            instead of PF you could use IPFW or IPF or both simultaneously ;P

            No other firewall software out there has anything like PF-Auth. Then there is ALTQ which has been merged with PF to allow complex bandwidth limiting. PF also has SCRUB and MODULATE STATE directives, which clean up packets, and provide more security for the network. Then there is all of PF's advanced options.

            Do you have bigger list of "great programs that FreeBSD lacks"? BTW there is a systrace port for FreeBSD

            Those were just off the top of my head... There are certainly more. You are welcome to install OpenBSD and find out for yourself. And it's good to hear the systrace port is finished.

            Couple years ago I tried to run OpenBSD on 486. I remember it was definitely slower than FreeBSD on the same hardware..

            Well, the one place that FreeBSD has an advantage is kernel startup times on slow hardware. After startup, it should run jut as fast. Besides, it sounds like you haven't tried it in some time (or on very modern hardware)... It was around Release 2.8 that OpenBSD got a big speed boost.
    • FreeBSD 5.0 will not have perl as a part of the OS. I think the installation will install it, but it is not a part of the base system and you are free to remove it without worries.

  • PicoBSD (Score:2, Redundant)

    by coldcup ( 15234 )
    Yes, they do know PicoBSD [freebsd.org] exists.
  • A new possible BSD ? (Score:5, Interesting)

    by dnaumov ( 453672 ) on Tuesday March 18, 2003 @08:24PM (#5540768)
    There is a thread [bsdforums.org] on BSDForums [bsdforums.org], 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.
    • Check out the cdroot port. This port will make a bootable freebsd cdrom and you can install packages to it. When you boot, configuration files in /etc will load from a floppy.

      I've used this port to make a FreeBSD-specific boot disk like tomsrtbt, but with more horsepower.

      I think a few minor modifications to the cdroot port will do what you want.

      Good luck.
    • by josepha48 ( 13953 ) on Wednesday March 19, 2003 @02:25PM (#5545649) Journal
      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.

      • What I'd like to see, personally, is a *x clone (Linux or *BSD, doesn't matter) that
        • fits in its most basic state on a 1.44 MB floppy, with a little bit of breathing room, so I can download it onto a floppy, transfer it to my (DOS) HDD, and then blit it back out.
        • supports access over the COM: ports.
        • does PPP (both ways, incoming and outgoing), and possibly telnet, ftp, Berkeley Mail or somesuch, and maybe lynx (so I can use it to connect to the outside world).
        • contains something like nano for a text editor
  • by eht ( 8912 ) on Tuesday March 18, 2003 @09:25PM (#5541069)
    The Tentative PicoBSD FAQ [ucsc.edu] has useful information on how to built a PicoBSD build out of the current source tree and therefore isn't anywhere near two years old, nor does it build to two floppies, there are three differnet versions of it with a fourth in psuedo permanent beta testing

    miniBSD has a different aim of not so much tweaking, for example in PicoBSD SSH daemon and client are just two aspects of one program instead of two sperate programs because of all the shared code between them, it's more meant to run on compact flash and is easier to update since PicoBSD is a compressed bootable image
  • Packagizing "base" (Score:4, Interesting)

    by cperciva ( 102828 ) on Tuesday March 18, 2003 @09:58PM (#5541266) Homepage
    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.
  • Size? (Score:2, Funny)

    by JDWTopGuy ( 209256 )
    You know what they say about the size of a geek's BSD...
  • 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 ...
    • Well, check out NetBSD - they support 39 platforms('ports').
      http://www.netbsd.org/Ports/
      • Then you'd have to figure out how to scale down NetBSD to fit in uClinux space. Not sure what that is. But the miniFreeBSD would tell you pretty much what files you could keep at a minimum. It wouldn't help much with the /etc dir as NetBSD and FreeBSD /etc are slightly different.
      • He said non-MMU processor families such as the Coldfire, MIPS, or ARM.
        If you look at netbsd's ports page you'll note that it says, "NetBSD should be portable to just about any 32bit or larger machine with an MMU. Machines without an MMU would be more work."
        So while it is possible to port Netbsd to non-mmu machines it is a bit more work. It should be noted there are 7 Netbsd ports to arm, 11 ports to mips, and I think none to Coldfire's. They list further arm ports as being fairly trivial to do. They do n
  • Is something I would like to see. For example if I buldworld with NOUUCP in /etc/make.conf, I don't want the old binaries hanging around. A make deinstall UUCP option in /usr/src/Makefile would be handy :)

He has not acquired a fortune; the fortune has acquired him. -- Bion

Working...