$Id: doc.xml,v 1.13 2006/12/17 10:02:46 ftigeot Exp $
Abstract
This manual aims to document how to create a ThinBSD system. If you just want to configure and run one, go read the Administrator Guide.Table of Contents
ThinBSD is a small FreeBSD-based boot image that allows a standard PC to act as a diskless thin client for a Microsoft Windows RDP server.
- FreeBSD 5.x
- rdesktop-1.3.1
All software is available either in the base system or in ports. We simply copied the necessary files on the filesystem image.
See make.conf for compilation and misc options.
The following instructions install a basic FreeBSD system in a temporary directory /itx :
cd /usr/src make buildworld make installworld DESTDIR=/itx cp /usr/src/sys/i386/conf/GENERIC.hints /itx/boot/device.hints make kernel KERNCONF=THINBSD DESTDIR=/itx cd /usr/src/etc make distribution DESTDIR=/itx
The files in the resulting directory tree will serve as a base for the creation of the ramdisk image in /mnt.
This creates a 16 megabyte disk image without a disklabel and with only a small number of inodes to conserve space.
dd if=/dev/zero of=mfsroot bs=1k count=16k mdconfig -a -t vnode -f mfsroot -u 4 newfs -n -m 0 -o space -i 32768 /dev/md4 mount /dev/md4 /mnt
Use the Makefile in diskimage/ to populate the ramdisk filesystem.
This Makefile manipulates the ramdisk file system to
- create the final directory structure with mtree
- copies needed files from the previously created FreeBSD world directory to the ramdisk fs
- patches some files in the disk image /etc for autologin
TODO: see if some /etc/mtree FreeBSD files can
be re-used
TODO: use crunchgen
Re-generate the password database
pwd_mkdb -p -d /mnt/etc /mnt/etc/master.passwd
Edit /home/rdesktop/.xinitrc
/usr/local/bin/rdesktop -f -a 16 192.168.2.2
The parameters which can be configured on the dhcp server are known in
advance by the ramdisk. They are requested in the file
/etc/dhclient.conf.
When an IP address is bound to the terminal's network interface, the script
/etc/dhclient-enter-hooks is executed and the ThinBSD
dhcp options are written in /etc/thinbsd.conf.
The Xorg-thinbsd port is installed in /mnt/usr/X11R6.
X is first started with the -configure option to generate a
temporary configuration file by
/usr/local/etc/rc.d/xorg.sh.
The autodetected values are then used in combination
with /etc/X11/xorg.conf.sample and
/etc/thinbsd.conf to generate the
final /etc/X11/xorg.conf Xorg configuration
file.
By default, the port installs itself in /var/tmp. This helps testing when the local machine has also a straight Xorg installation. To produce a production binary tree, PREFIX must be defined to /usr/X11R6.
make install PREFIX=/usr/X11R6