Minimalist FreeBSD 4.8

John Birrell jb at cimlogic.com.au
Tue Aug 26 14:24:01 PDT 2003


On Tue, Aug 26, 2003 at 01:28:14PM -0500, Tyler Kellen wrote:
> 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.

One way to do this initially is to install a full FreeBSD system on one
disk partition and use a second partition for a trial install. FreeBSD's
boot manager will let you boot into each. Start with just a root file
system in the second partition, add /boot and /kernel (we're talking 4.8
here, so the kernel is in the root directory). Try booting the kernel
and watching what errors you get. The first one will be a missing 'init'.

When you find something is missing, reboot from the full system and copy
the missing component to the minimal system. It's trial and error, but
you will soon discover what you need and learn why you need it.

To give you some idea of just how many files you need to start a basic
4.8 system using the standard /etc/rc* scripts, here is a list that I
built up the other day while working on testing a flash file system driver
on 4.8. My goal was just a basic system (without any development tools)
that I could rlogin/telnet/nfs (on a private network). It contains vi, but
not gcc. Adding that is an exercise for the reader. 8-)

/bin/cat
/bin/chio
/bin/chmod
/bin/cp
/bin/date
/bin/dd
/bin/df
/bin/domainname
/bin/echo
/bin/expr
/bin/hostname
/bin/kill
/bin/link
/bin/ln
/bin/ls
/bin/mkdir
/bin/mv
/bin/ps
/bin/pwd
/bin/realpath
/bin/rm
/bin/rmdir
/bin/sh
/bin/sleep
/bin/stty
/bin/sync
/bin/test
/bin/unlink
/boot/boot0
/boot/boot1
/boot/boot2
/boot/cdboot
/boot/defaults/loader.conf
/boot/loader
/boot/loader.4th
/boot/loader.conf
/boot/loader.help
/boot/loader.rc
/boot/mbr
/boot/pxeboot
/boot/support.4th
/dev/MAKEDEV
/dev/MAKEDEV.local
/etc/auth.conf
/etc/defaults/pccard.conf
/etc/defaults/rc.conf
/etc/disktab
/etc/exports
/etc/fstab
/etc/gettytab
/etc/group
/etc/hosts.equiv
/etc/inetd.conf
/etc/login.conf
/etc/master.passwd
/etc/mtree/BSD.var.dist
/etc/newsyslog.conf
/etc/pam.conf
/etc/passwd
/etc/pccard.conf
/etc/pccard_ether
/etc/profile
/etc/protocols
/etc/rc
/etc/rc.conf
/etc/rc.network
/etc/rc.pccard
/etc/rc.serial
/etc/resolv.conf
/etc/rpc
/etc/services
/etc/shells
/etc/spwd.db
/etc/syslog.conf
/etc/ttys
/kernel
/root/.profile
/sbin/adjkerntz
/sbin/disklabel
/sbin/dmesg
/sbin/fdisk
/sbin/fsck
/sbin/halt
/sbin/ifconfig
/sbin/init
/sbin/mknod
/sbin/mount
/sbin/mount_mfs
/sbin/mount_msdos
/sbin/mount_nfs
/sbin/mountd
/sbin/newfs
/sbin/nfsd
/sbin/nfsiod
/sbin/ping
/sbin/reboot
/sbin/route
/sbin/shutdown
/sbin/swapon
/sbin/sysctl
/sbin/umount
/usr/bin/awk
/usr/bin/chflags
/usr/bin/cmp
/usr/bin/cpio
/usr/bin/diff
/usr/bin/find
/usr/bin/grep
/usr/bin/gzip
/usr/bin/login
/usr/bin/mktemp
/usr/bin/more
/usr/bin/sed
/usr/bin/su
/usr/bin/touch
/usr/bin/uname
/usr/bin/vi
/usr/bin/view
/usr/lib/libc.so.4
/usr/lib/libcrypt.so.2
/usr/lib/libcrypto.so.3
/usr/lib/libgnuregex.so.2
/usr/lib/libipsec.so.1
/usr/lib/libmd.so.2
/usr/lib/libmp.so.3
/usr/lib/libncurses.so.5
/usr/lib/libopie.so.2
/usr/lib/libpam.so.1
/usr/lib/librpcsvc.so.2
/usr/lib/libskey.so.2
/usr/lib/libutil.so.3
/usr/lib/libwrap.so.3
/usr/lib/libz.so.2
/usr/lib/pam_cleartext_pass_ok.so
/usr/lib/pam_deny.so
/usr/lib/pam_opie.so
/usr/lib/pam_opieaccess.so
/usr/lib/pam_permit.so
/usr/lib/pam_radius.so
/usr/lib/pam_skey.so
/usr/lib/pam_ssh.so
/usr/lib/pam_tacplus.so
/usr/lib/pam_unix.so
/usr/libexec/getty
/usr/libexec/ld-elf.so.1
/usr/libexec/rlogind
/usr/libexec/telnetd
/usr/sbin/arp
/usr/sbin/chown
/usr/sbin/cron
/usr/sbin/dev_mkdb
/usr/sbin/inetd
/usr/sbin/mtree
/usr/sbin/pccardc
/usr/sbin/pccardd
/usr/sbin/portmap
/usr/sbin/rpc.statd
/usr/sbin/rpc.umntall
/usr/sbin/syslogd
/usr/share/misc/termcap
/usr/share/misc/termcap.db

-- 
John Birrell


More information about the freebsd-hackers mailing list