From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 26 14:24:01 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8C52D16A4C0 for ; Tue, 26 Aug 2003 14:24:01 -0700 (PDT) Received: from cimlogic.com.au (cimlog.lnk.telstra.net [139.130.51.31]) by mx1.FreeBSD.org (Postfix) with ESMTP id 23B1743F75 for ; Tue, 26 Aug 2003 14:23:56 -0700 (PDT) (envelope-from jb@cimlogic.com.au) Received: from freebsd1.cimlogic.com.au (localhost.cimlogic.com.au [127.0.0.1]) by cimlogic.com.au (8.12.9/8.12.9) with ESMTP id h7QLQCUQ057314; Wed, 27 Aug 2003 07:26:12 +1000 (EST) (envelope-from jb@cimlogic.com.au) Received: (from jb@localhost) by freebsd1.cimlogic.com.au (8.12.9/8.12.9/Submit) id h7QLQBJe057313; Wed, 27 Aug 2003 07:26:11 +1000 (EST) Date: Wed, 27 Aug 2003 07:26:10 +1000 From: John Birrell To: Tyler Kellen Message-ID: <20030827072610.F249@freebsd1.cimlogic.com.au> References: <3F4B9BE0.5010209@acm.org> <001a01c36bff$cff9e840$a700000a@TYBOX> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <001a01c36bff$cff9e840$a700000a@TYBOX>; from tyler@statuo.com on Tue, Aug 26, 2003 at 01:28:14PM -0500 cc: freebsd-hackers@freebsd.org cc: kientzle@acm.org Subject: Re: Minimalist FreeBSD 4.8 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Aug 2003 21:24:01 -0000 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