Setting a read/write host for m0n0wall development. It's what I've done to install a developement box for m0n0wall on an old Pentium. There's 2 disk. First one is the build system, a full FreeBSD 5.x install, and the second is a small disk, used to run m0n0wall. Convention: ${DISK}: device of m0n0wall disk ${DESTDIR}: mount point of m0n0wall disk. ${WRKDIR}: where you work ;) On the host system: 1. Preparing the disk * Run sysinstall -> configure -> Fdisk select m0n0wall dedicated disk Use entire disk and choose Standard boot loader. * Quit sysintall and run: bsdlabel -w ${DISK}s1 auto newfs /dev/${DISK}s1a mount /dev/${DISK}s1a ${DESTDIR}/ 2. Populate base install: * fetch generic-pc images and rootfs from m0n0wall. * extract kernel and /boot from generic-pc image (gunzip it, mdconfig' it and mount it). Copy them to ${WRKDIR}. tar pxzvf ${WRKDIR}/rootfs-1.2b7.tar.gz -C ${DESTDIR}/ cp ${WRKDIR}/kernel ${DESTDIR}/boot/kernel/ cp -Rvf ${WRKDIR}/boot/* ${DESTDIR}/boot/ 3. Make it boot on non-mfs'd root * edit ${DESTDIR}/boot/loader.rc * remove ^load lines * add "set vfs.root.mountfrom=ufs:/dev/ad0s1a" * edit ${DESTDIR}/etc/rc add # remount / ROOTDEV=/dev/$(/sbin/sysctl -n kern.rootdev) mount $ROOTDEV / echo $ROOTDEV / ufs rw 1 1 > /etc/fstab to etc/rc before "# make some directories in /var" line mkdir ${DESTDIR}/cf/conf cp ${DESTDIR}/conf.default/config.xml ${DESTDIR}/cf/conf/ 4. Add editors and ssh stuff - installing ee/vi cp -p /lib/libncurses.so.5 ${DESTDIR}/lib/ cp -p /usr/bin/vi ${DESTDIR}/usr/bin/ cp -p /usr/bin/ee ${DESTDIR}/usr/bin/ mkdir ${DESTDIR}/usr/share/misc cp -p /etc/termap ${DESTDIR}/etc cp -p /usr/share/misc/termap.db /usr/share/misc/ - install ssh stuff fetch http://www.xs4all.nl/~fredmol/m0n0/m0n0-dropbear-ssh.tgz mkdir dropbear (still in ${WRKDIR}) tar xzf m0n0-dropbear-ssh.tgz -C dropbear/ ###cd ${DESTDIR} cp -p /usr/sbin/pw ${DESTDIR}/usr/sbin/ cd ${WRKDIR}/dropbear/install-root rm etc/rc.firmware usr/sbin/dropbear usr/bin/dropbearkey mkdir ${DESTDIR}/etc/dropbear mv etc/inc/ext/dropbear ${DESTDIR}/etc/inc cd ${WRKDIR} - compile dropbear for our system cd /usr/ports/security/dropbear make install clean install -s -m 0555 -o root -g wheel /usr/local/sbin/dropbear \ ${DESTDIR}/usr/sbin/ install -s -m 0555 -o root -g wheel /usr/local/bin/dropbearkey \ ${DESTDIR}/usr/bin/ Reboot to your new m0n0wall system. You can now log in via SSH and add modify files. to copy file I use : "cat | ssh "cat - > " on m0n0wall box "chmod +x " Enjoy...