Minimalist FreeBSD 4.8

John-Mark Gurney gurney_j at efn.org
Tue Aug 26 14:39:49 PDT 2003


Tyler Kellen wrote this message on Tue, Aug 26, 2003 at 13:28 -0500:
> I don't need all of the functionality that base system offers.  When and
> if I do, I'd like to put it on the system myself.

Ok, then start out with cleaning out all the subdirs in the various
src/*/Makefile's, and slowly add in what you need.  It's pretty obvious
on the various things you need, like libc, gcc, etc.  I would recommend
installing to a second partition, and then rebooting from that second
partition, that way it's easier to handle.

If you're going for absolute minimal, you'll want to eliminate the
etc install, and write your own /etc/rc start up scripts since most
of /etc will depend on things you've stated you don't want.

We can't do all the research for you on what is necessary on the system,
but things are similar enough to Linux that you should know what you
need, (like /sbin/init, /sbin/mount, /bin/ls, etc.)

[...]

> I find it much easier to learn when everything on my system was put
> there by me (within reason).  I'm a bit of a perfectionist and I feel
> like I can't get there with FreeBSD.  It bugs me to the point of turning
> back to Linux.

Then do what I suggest there.  From what I understand of most linux
distros is that you still get a big package of tons of files, so, unless
you hand unpack the files, you still don't understand.

[...]

> What I'd really like to know is how to strip down a working system.  If
> This hasn't been done, I guess I'm looking for someone with the
> knowledge and the time/generosity to help me figure it out.  Once I get
> there, I intend to post it on my website for other converts who may feel
> the same way.

I was going to suggest something like:
find / \! -name "*gcc*" -and \! -name "*vi*' | xargs rm
To your response about removing everything but vi and gcc.  It's a bit
more complex than that.

> This forum is most likely going to be my last resort, as I have looked
> pretty much everywhere I can think to look.  Is there anything else you
> can offer to get me moving in the desired direction?

If you're a good C/C++ programmer, and you're familar with Linux, then
look at the src.  FreeBSD is built from it, and is easier to find the
source for a program than most.  Look in src/(contrib/)?/(usr.)?s?bin/prog
for the source.  Some things are a bit more tricky, and might be in a
sub dir like bootpgw is in src/libexec/bootpd/bootpgw.  But it's all in
the source.

Use the Soruce Luke.

> -----Original Message-----
> From: owner-freebsd-hackers at freebsd.org
> [mailto:owner-freebsd-hackers at freebsd.org] On Behalf Of Tim Kientzle
> Sent: Tuesday, August 26, 2003 12:42 PM
> To: Tyler Kellen
> Cc: freebsd-hackers at freebsd.org
> Subject: Re: Minimalist FreeBSD 4.8
> 
> Tyler Kellen wrote:
> > I've got a 4.8 minimal install on an extra machine. As an LFS user
> > I find the FreeBSD 4.8 minimal install to be pretty far from minimal.
> 
> You've found one of the major differences between FreeBSD and Linux.
> In short, FreeBSD is a complete system.  It's designed, developed,
> and maintained as a single coherent project.  (There are a few
> components that are imported from outside sources, but the key approach
> is still the same:  the source code from those outside projects is
> integrated into FreeBSD's source code and then maintained as a
> part of the integrated FreeBSD project.)
> 
> In contrast, Linux distributions are assembled from the results
> of a number of independently-managed projects.
> 
> As a result, it is quite natural to remove (or not install)
> components of a Linux distribution.  This is a less natural
> thing to do with FreeBSD.  It is possible, and minimal FreeBSD
> systems are being used in a lot of embedded systems (such as
> routers, email appliances, and the like), but it does require
> a bit of expertise to get there.
> 
>  > I've checked
> > out the PicoBSD project, the MiniBSD project and the FreeBSD From
> > Scratch projects extensively. I'm not famillar enough with FreeBSD to
> > get any of them up and running the way I want.
> 
> Those projects are intended more for people knowledgable about FreeBSD
> who want to customize FreeBSD for specialized applications.
> They really aren't designed for people just getting started.
> 
>  > I'm looking for a way to strip down my 4.8 box to nothing but gcc and
>  > vi. Unfortunately I don't quite know how to get there.
> 
>  > I'm hoping to end up with an empty system that I can fool
>  > around with and learn from the bottom up.
> 
> My advice:  start deleting things and see what happens.
> You can always re-install from the CDROM and start over if
> necessary.
> 
> In the case of FreeBSD, though, a better way to start learning the
> system is probably to install a basic system, then learn how to compile
> and update the system from source code, and then start playing with
> the various customization options there (read "man make.conf" carefully,
> experiment with kernel configuration, etc.).  That will help you get
> a feel for how the various pieces interact and which ones are
> important for what uses.  You may want to set yourself a goal
> of building your own customized release CDs (e.g. "make release").
> By the time you get there, you'll have a pretty good feel for
> the FreeBSD system as a whole.  If you have programming skills,
> you can then start digging into the source code and seeing how
> it all works internally.  If not, you can still get a lot out
> of browsing through the source tree to see what's there and
> how it all fits together.
> 
> And, of course, read the mailing lists and ask questions.
> You've already got that part.
> 
> FreeBSD is a great system.  Welcome to the club!

-- 
  John-Mark Gurney				Voice: +1 415 225 5579

     "All that I will do, has been done, All that I have, has not."


More information about the freebsd-hackers mailing list