# Modifying My System



## iic2 (Jul 2, 2009)

Now that I got an fair ideal of how FreeBSD Base system and the mTree works I need some assistance with the process of elimination if that don't violate the norm of other users operation.

The flexibility that this OS has to offer is the reason most of us chose FreeBSD over MS products including Linux.  There are many ways to use FreeBSD.  I am only interested in a few .. web server, firewalls and testing.

This was my idea long before I came to try FreeBSD and I said something to that effect back in  April 2009 when I first join this forum.  Now I am ready to eliminate as many  un-need files as possible that will never be use by any of my processes in relations to web server, firewalls and testing, eventually, including an headless install, so there is no limit.

I will have a few more questions latter but for now the only programming tools I will be using in my Web Development with FreeBSD will be straight C and Python. There are many other programming tools integrate into the system that I will never use so my question is which of those can I delete from the mTree or the system itself including any other thing that comes to mind?  Trial and error takes too long as we all know but I'm still trying.

Thx in advance


----------



## vermaden (Jul 2, 2009)

Hi,

check *man src.conf* for options that can will slim your base system to about 30-40MB, you can also remove /usr/share/* and /usr/local/share/* parts that you do not need.

You should also use *ldd(1)* to check which exact libs you binaries require, an example:


```
% ldd `which httpd`
/usr/local/sbin/httpd: 
        libm.so.4 => /lib/libm.so.4 (0x280c7000) 
        libaprutil-1.so.3 => /usr/local/lib/libaprutil-1.so.3 (0x280dd000) 
        libdb41.so.1 => /usr/local/lib/libdb41.so.1 (0x280f7000) 
        libexpat.so.6 => /usr/local/lib/libexpat.so.6 (0x28194000) 
        libiconv.so.3 => /usr/local/lib/libiconv.so.3 (0x281b2000) 
        libapr-1.so.3 => /usr/local/lib/libapr-1.so.3 (0x2829f000) 
        libcrypt.so.3 => /lib/libcrypt.so.3 (0x282c1000) 
        libpthread.so.2 => /lib/libpthread.so.2 (0x282d9000) 
        libc.so.6 => /lib/libc.so.6 (0x282fe000)
```

Also check this one:
http://bsdguides.org/guides/netbsd/webserver/chrooting_apache_php.php


----------



## lme@ (Jul 2, 2009)

src.conf is very useful for your needs.
After adding some WITHOUT_ stuff, you can go to /usr/src and run
`# make delete-old` or if your're courageous: `# yes | make delete-old` and `# make delete-old-libs`.
With those commands you actually delete the parts of the system that you add to src.conf.


----------



## iic2 (Jul 4, 2009)

Could someone please look over the attached file and make repairs.  I know it may take a while.  I'll be happy just to see the proper setting with-in a few days.

Thanks vermaden, src.conf did it for me .  And Thanks lme@, I was very worried about the next step.  I looked up every detail.  35% FreeBSD and 65% Googling the world.  I know I read into at lease 500 web-sites since you guys gave me the heads up.  I am burn out.  In a couple of days I can move on to the hard part 

You taught me a lesson I'll never for get.

Good night


----------



## iic2 (Jul 4, 2009)

*What a good night sleep.*

WITHOUT_GROFF                                  #  Set not build groff(1)

Just like filling out tax forms.  I don't know what groff is and I don't want to search for it, read about it, than come back to find 50 more that I have to do the same process for over and over again.  So I'll complete the job by monday.

At the very lease, its going to be a good reference point.  It's about nothing more than adding needed comments to a working file.  But this round, I will not miss a beat.

All I need to know is are my setting correct so far in the file already posted.


----------



## DrJ (Jul 4, 2009)

iic2 said:
			
		

> I don't know what groff is and I don't want to search for it, read about it, ...



groff is the open-source version of the old Unix typesetter troff (or ditroff).  While some kooks like me use it to format complex documents, most people use it to make man pages.  If you won't do that, then take it off.  It also comes with macro packages, tmac.?, where ? can be s, e, n, or others.  You can take those off as well.

One thing, though.  If you do take it off, format all your man pages first.  Unformatted pages are piped through groff before they are displayed.


----------



## iic2 (Jul 5, 2009)

I just tried to do more searching to see what I missed or miss-printed.  It seems I went as far as I can go because there is not much more information to be had other than technical issue from millions of threads.

The only way to get a clear definition of how things work is through trials and errors cause not all issues has been solved nor documented.

So for now I'm going to apply the vermaden -lme@ thing to see how far I can get.  I'll be back shortly to show progress with success.



> by Doctor J:: One thing, though. If you do take it off, format all your man pages first. Unformatted pages are piped through groff before they are displayed.


Dang, I was afraid of that.  Just like surgery, move one thing and you may loss another.  So it is back to trial and error.

Thanks DrJ


----------



## iic2 (Jul 6, 2009)

Out of this list of boot files which are mandatory for booting FreeBSD 8.0.  I will not be using ZFS, boot manager or anything else special.  I just want to boot to the system as simple as possible with-out crashing the system.

beastie.4th
boot
boot0
boot0sio
boot1
boot2
cdboot
device.hints
frames.4th
gptboot
gptzfsboot
loader
loader.4th
loader.conf
loader.help
loader.rc
mbr
mfsroot.gz
pmbr
pxeboot
screen.4th
support.4th
zfsboot

Thanks


----------



## blah (Jul 6, 2009)

I think you can safely remove all boot block files, though I haven't tried.
boot
boot0
boot0sio
boot1
boot2
cdboot
gptboot
gptzfsboot
mbr
pmbr
pxeboot
zfsboot
The special file here is loader which is loaded (or sometimes not) by one of these **installed** boot blocks.


----------



## DrJ (Jul 6, 2009)

_I am ready to eliminate as many un-need files as possible that will never be use by any of my processes in relations to web server, firewalls and testing_

I'm going back to the original posting, and I'm going to ask "why do you want to do this?"  You will save a few pennies on disk storage, and maybe a few minutes when you upgrade the kernel and world (assuming you get rid of the stray drivers in the kernel).

Why bother?


----------



## iic2 (Jul 6, 2009)

I just made test #1 you must keep  beastie.4th or lose the Welcome to FreeBSD dialog which has "... boot to single mode" etc.

Thanks a bunch Blah.  Give me under a few hours to check the rest.  Near a dozen looks good!~


----------



## iic2 (Jul 6, 2009)

DrJ, What the world you mean WHY... Were you really next in line?
The problem is people always want to ask you WHY.  Why do you pay 8.00 for a pack of cigaretteS at one store when you can walk two blocks away and pay $3.95 for the same pack.  What you mean WHY?  Am I'm not to be questioned and ^5#&8 by you also cause I choose to explorer BSD, MY WAY.

From my BASE thread now closed for no reason now I guest this will be next.  What are you guys trying to hide that iic2 will find ANYWAY.


----------



## DrJ (Jul 6, 2009)

iic2 said:
			
		

> DrJ, What the world you mean WHY?



My goodness.  The things you are doing take time.  Disk space and compile times are very inexpensive.  Sally forth if you must, but the base system is pretty well chosen.  Leave out X11, don't start many services, and you will have a pretty small system.


----------



## iic2 (Jul 6, 2009)

My, my, my ... That was not the question.  

Question is what can you eliminate from the group?


----------



## phoenix (Jul 6, 2009)

This has already been done ...

Do some reading up on picobsd, nanobsd, and minibsd.  Theses are all slimmed-down versions of FreeBSD.  The build scripts for these will be most enlightening, and they will show you what can be stripped out without leaving you with an unbootable mess.


----------



## iic2 (Jul 6, 2009)

Thanks phoenix, but lme@ told us about that at the BASE thread and I'm down to true BASE and blah took care of the boot process to the skinny, so my mission is over. Now I can get into more important things like you and killasmurf86 Back-Up tutors.  They are sooo heavy.  I can hardly wait.  It is Plan III.  I got it in writing.
http://forums.freebsd.org/showthread.php?t=3264

boot		no guts - Maybe needed in single mode user when partitioning, dd, etc.
boot0
boot0sio
boot1rm
boot2
cdboot
gptboot
gptzfsboot
mbr		no guts - I keep it
pmbr
pxeboot
zfsboot

Ten out of a dozen.  Wow!  Now I got a better idea of how this OS works and I have no more fear.  Now I can move on to those wonderful programs waiting for me for this system.  I'm so proud of this entire forum cause I would be NO-WHERE right now.  But one thing, I have permanently converted to the 64bit world until Quantum.  Dedicated only to FreeBSD.  Not Linex .. Not Bindows.  Now I am free to learn C and write assembler if anyone like it or not... and if someone flame me you got a one way ticket back to your dads house ... ^()^  DEAMON hee hee

WARNING: Unless you enjoy spending YOUR OWN TIME to explorer something difference, I suggest that you remove nothing if you running any machine build before the year 2004.  I got three of them and a 1980 PC Junior that never did nothing, to date.

Thank you me KINGS and blah


----------

