<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://freebsdwiki.net/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://freebsdwiki.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=165.228.0.35</id>
		<title>FreeBSDwiki - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://freebsdwiki.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=165.228.0.35"/>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/Special:Contributions/165.228.0.35"/>
		<updated>2026-04-05T23:57:13Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.18.0</generator>

	<entry>
		<id>http://freebsdwiki.net/index.php/Updating_the_system</id>
		<title>Updating the system</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/Updating_the_system"/>
				<updated>2008-10-24T02:37:06Z</updated>
		
		<summary type="html">&lt;p&gt;165.228.0.35: /* FreeBSD Binary Upgrade 6.3 to 7.0 Notes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Note''': If you only want to install security updates, it's enough to subscribe to [http://lists.freebsd.org/mailman/listinfo/freebsd-security-notifications FreeBSD security notifications] and follow the instructions in each advisory. Otherwise, read on.&lt;br /&gt;
&lt;br /&gt;
In FreeBSD, the base system and ports can be updated independently if desired. Here's how to do it.&lt;br /&gt;
&lt;br /&gt;
== Basic Security updates ==&lt;br /&gt;
From FreeBSD 6.X you can simply keep up to date using freebsd-update&lt;br /&gt;
&lt;br /&gt;
First time use:&lt;br /&gt;
 # freebsd-update fetch&lt;br /&gt;
 # freebsd-update install&lt;br /&gt;
&lt;br /&gt;
You can rollback in-case of problems&lt;br /&gt;
 # freebsd-update rollback&lt;br /&gt;
&lt;br /&gt;
Use the following line in your /etc/crontab to keep your machine up to date:&lt;br /&gt;
30  3   *   *   *   root /usr/sbin/freebsd-update cron -t &amp;lt;email address&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will email you when updates are available and to install them type&lt;br /&gt;
 # freebsd-update install&lt;br /&gt;
&lt;br /&gt;
== Updating the base system ==&lt;br /&gt;
&lt;br /&gt;
To upgrade to a RELEASE version of FreeBSD, you can do one of three things:&lt;br /&gt;
#Do a binary Upgrade to a release version&lt;br /&gt;
#Do a binary Upgrade using the method described (FreeBSD 5.4 to 6.0 [http://www.daemonology.net/freebsd-upgrade-5.4-to-6.0/ here]) Refer to the bottom of this page for upgrading 6.3 to 7.0 notes&lt;br /&gt;
#Do a source upgrade as described [[upgrading the base system | here]]&lt;br /&gt;
&lt;br /&gt;
A binary upgrade to a release version can be done by running '''sysinstall''' from the installation medium (e.g. CDROM). See the [http://www.freebsd.org/releases/ release notes] of the release for details. Note that this will wipe out a lot of customizations.&lt;br /&gt;
&lt;br /&gt;
== Updating applications ==&lt;br /&gt;
&lt;br /&gt;
Many open-source apps are under active development, so this is something you'll probably want to do quite regularly to ensure that you have the latest versions of everything.&lt;br /&gt;
&lt;br /&gt;
First update the ports tree (/usr/ports/). This can be done via [[cvsup]], [[ctm]] or [[portsnap]]. The ports can then be automatically updated using [[portupgrade]] or [[portmanager]], which are capable of dealing with dependencies.&lt;br /&gt;
&lt;br /&gt;
== How do I download updates? ==&lt;br /&gt;
&lt;br /&gt;
The most common method used is [[cvsup]] (see [[updating the ports tree]]). However, you might not be able to use it if you're behind a restrictive firewall (blocking tcp port 5999) or on a weak connection. In that case you can use [[ctm]] to obtain differential updates by email or ftp.&lt;br /&gt;
&lt;br /&gt;
For updating the ports tree, a third option is available. [[Portsnap]] is an automated tool which offers many advantages over both the other methods:&lt;br /&gt;
&lt;br /&gt;
* secure (uses cryptographic signing)&lt;br /&gt;
* very efficient in terms of bandwidth consumption and server load&lt;br /&gt;
* uses http only&lt;br /&gt;
* easy to use&lt;br /&gt;
&lt;br /&gt;
== FreeBSD Binary Upgrade 6.3 to 7.0 Notes ==&lt;br /&gt;
It's best to upgrade to 6.3 first and this is straight forward, follow: http://www.freebsd.org/releases/6.3R/announce.html&lt;br /&gt;
&lt;br /&gt;
Note: &lt;br /&gt;
  * You might have to install gpg which is in the 'gnupg' port.&lt;br /&gt;
  * If you have a problem 'Can't check signature: No public key' # fetch http://www.freebsd.org/doc/pgpkeyring.txt&lt;br /&gt;
&lt;br /&gt;
Follow the steps on http://www.freebsd.org/releases/7.0R/announce.html until you get to portupgrade -faP.  &lt;br /&gt;
&lt;br /&gt;
I've done the upgrade now on two machines and have come across the same problem when doing the portupgrade -faP command.  You get a failure with ruby.  Please refer to my post at for the solution: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here are the commands to fix the ruby problem.&lt;br /&gt;
&lt;br /&gt;
The first group of commands may or may not do anything (optional)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/sbin/reboot&lt;br /&gt;
boot -s (Boot into single user mode, you can also just select '4' from the menu)&lt;br /&gt;
/sbin/fsck&lt;br /&gt;
/sbin/mount -u /&lt;br /&gt;
/sbin/mount -a -t ufs&lt;br /&gt;
cd /usr/src&lt;br /&gt;
make clean&lt;br /&gt;
/sbin/reboot&lt;br /&gt;
&lt;br /&gt;
csup -L 2 /.../src-supfile&lt;br /&gt;
csup -L 2 /.../ports-supfile&lt;br /&gt;
less /usr/ports/UPDATING&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These commands are recommended.\\&lt;br /&gt;
Upgrade ruby:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
portupgrade -fu ruby&lt;br /&gt;
rm /var/db/pkg/pkgdb.db&lt;br /&gt;
portupgrade -fu ruby18-bdb&lt;br /&gt;
(Ignore the error at the end of this command)&lt;br /&gt;
&lt;br /&gt;
rm /var/db/pkg/pkgdb.db /usr/ports/INDEX-*.db&lt;br /&gt;
portupgrade -fu portupgrade&lt;br /&gt;
portupgrade -fu libtool&lt;br /&gt;
&lt;br /&gt;
portinstall misc/compat6x&lt;br /&gt;
portinstall sysutils/bsdadminscripts&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Optional) May not work.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd /usr/src&lt;br /&gt;
yes | make -B delete-old&lt;br /&gt;
yes | make -B delete-old-libs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check, fix, relink, cleanup the ports collection:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
pkg_libchk -qo | grep -vE 'jdk*|openoffice*' | xargs -o portupgrade -fuP&lt;br /&gt;
&lt;br /&gt;
pkgdb -F&lt;br /&gt;
pkgdb -L&lt;br /&gt;
portsclean -CLDP&lt;br /&gt;
portaudit -Fda&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now you should be able to return to the update command&lt;br /&gt;
  # portupgrade -faP&lt;br /&gt;
&lt;br /&gt;
This will take time and you most likely will have to play around with some ports to get them to install properly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Common Tasks]]&lt;/div&gt;</summary>
		<author><name>165.228.0.35</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/Updating_the_system</id>
		<title>Updating the system</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/Updating_the_system"/>
				<updated>2008-10-20T00:24:38Z</updated>
		
		<summary type="html">&lt;p&gt;165.228.0.35: /* FreeBSD Binary Upgrade 6.3 to 7.0 Notes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Note''': If you only want to install security updates, it's enough to subscribe to [http://lists.freebsd.org/mailman/listinfo/freebsd-security-notifications FreeBSD security notifications] and follow the instructions in each advisory. Otherwise, read on.&lt;br /&gt;
&lt;br /&gt;
In FreeBSD, the base system and ports can be updated independently if desired. Here's how to do it.&lt;br /&gt;
&lt;br /&gt;
== Basic Security updates ==&lt;br /&gt;
From FreeBSD 6.X you can simply keep up to date using freebsd-update&lt;br /&gt;
&lt;br /&gt;
First time use:&lt;br /&gt;
 # freebsd-update fetch&lt;br /&gt;
 # freebsd-update install&lt;br /&gt;
&lt;br /&gt;
You can rollback in-case of problems&lt;br /&gt;
 # freebsd-update rollback&lt;br /&gt;
&lt;br /&gt;
Use the following line in your /etc/crontab to keep your machine up to date:&lt;br /&gt;
30  3   *   *   *   root /usr/sbin/freebsd-update cron -t &amp;lt;email address&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will email you when updates are available and to install them type&lt;br /&gt;
 # freebsd-update install&lt;br /&gt;
&lt;br /&gt;
== Updating the base system ==&lt;br /&gt;
&lt;br /&gt;
To upgrade to a RELEASE version of FreeBSD, you can do one of three things:&lt;br /&gt;
#Do a binary Upgrade to a release version&lt;br /&gt;
#Do a binary Upgrade using the method described (FreeBSD 5.4 to 6.0 [http://www.daemonology.net/freebsd-upgrade-5.4-to-6.0/ here]) Refer to the bottom of this page for upgrading 6.3 to 7.0 notes&lt;br /&gt;
#Do a source upgrade as described [[upgrading the base system | here]]&lt;br /&gt;
&lt;br /&gt;
A binary upgrade to a release version can be done by running '''sysinstall''' from the installation medium (e.g. CDROM). See the [http://www.freebsd.org/releases/ release notes] of the release for details. Note that this will wipe out a lot of customizations.&lt;br /&gt;
&lt;br /&gt;
== Updating applications ==&lt;br /&gt;
&lt;br /&gt;
Many open-source apps are under active development, so this is something you'll probably want to do quite regularly to ensure that you have the latest versions of everything.&lt;br /&gt;
&lt;br /&gt;
First update the ports tree (/usr/ports/). This can be done via [[cvsup]], [[ctm]] or [[portsnap]]. The ports can then be automatically updated using [[portupgrade]] or [[portmanager]], which are capable of dealing with dependencies.&lt;br /&gt;
&lt;br /&gt;
== How do I download updates? ==&lt;br /&gt;
&lt;br /&gt;
The most common method used is [[cvsup]] (see [[updating the ports tree]]). However, you might not be able to use it if you're behind a restrictive firewall (blocking tcp port 5999) or on a weak connection. In that case you can use [[ctm]] to obtain differential updates by email or ftp.&lt;br /&gt;
&lt;br /&gt;
For updating the ports tree, a third option is available. [[Portsnap]] is an automated tool which offers many advantages over both the other methods:&lt;br /&gt;
&lt;br /&gt;
* secure (uses cryptographic signing)&lt;br /&gt;
* very efficient in terms of bandwidth consumption and server load&lt;br /&gt;
* uses http only&lt;br /&gt;
* easy to use&lt;br /&gt;
&lt;br /&gt;
== FreeBSD Binary Upgrade 6.3 to 7.0 Notes ==&lt;br /&gt;
It's best to upgrade to 6.3 first and this is straight forward, follow: http://www.freebsd.org/releases/6.3R/announce.html&lt;br /&gt;
&lt;br /&gt;
Follow the steps on http://www.freebsd.org/releases/7.0R/announce.html until you get to portupgrade -faP.  &lt;br /&gt;
&lt;br /&gt;
I've done the upgrade now on two machines and have come across the same problem when doing the portupgrade -faP command.  You get a failure with ruby.  Please refer to my post at for the solution: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here are the commands to fix the ruby problem.&lt;br /&gt;
&lt;br /&gt;
The first group of commands may or may not do anything (optional)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/sbin/reboot&lt;br /&gt;
boot -s (Boot into single user mode, you can also just select '4' from the menu)&lt;br /&gt;
/sbin/fsck&lt;br /&gt;
/sbin/mount -u /&lt;br /&gt;
/sbin/mount -a -t ufs&lt;br /&gt;
cd /usr/src&lt;br /&gt;
make clean&lt;br /&gt;
/sbin/reboot&lt;br /&gt;
&lt;br /&gt;
csup -L 2 /.../src-supfile&lt;br /&gt;
csup -L 2 /.../ports-supfile&lt;br /&gt;
less /usr/ports/UPDATING&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These commands are recommended.\\&lt;br /&gt;
Upgrade ruby:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
portupgrade -fu ruby&lt;br /&gt;
rm /var/db/pkg/pkgdb.db&lt;br /&gt;
portupgrade -fu ruby18-bdb&lt;br /&gt;
(Ignore the error at the end of this command)&lt;br /&gt;
&lt;br /&gt;
rm /var/db/pkg/pkgdb.db /usr/ports/INDEX-*.db&lt;br /&gt;
portupgrade -fu portupgrade&lt;br /&gt;
portupgrade -fu libtool&lt;br /&gt;
&lt;br /&gt;
portinstall misc/compat6x&lt;br /&gt;
portinstall sysutils/bsdadminscripts&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Optional) May not work.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd /usr/src&lt;br /&gt;
yes | make -B delete-old&lt;br /&gt;
yes | make -B delete-old-libs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check, fix, relink, cleanup the ports collection:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
pkg_libchk -qo | grep -vE 'jdk*|openoffice*' | xargs -o portupgrade -fuP&lt;br /&gt;
&lt;br /&gt;
pkgdb -F&lt;br /&gt;
pkgdb -L&lt;br /&gt;
portsclean -CLDP&lt;br /&gt;
portaudit -Fda&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now you should be able to return to the update command&lt;br /&gt;
  # portupgrade -faP&lt;br /&gt;
&lt;br /&gt;
This will take time and you most likely will have to play around with some ports to get them to install properly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Common Tasks]]&lt;/div&gt;</summary>
		<author><name>165.228.0.35</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/Updating_the_system</id>
		<title>Updating the system</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/Updating_the_system"/>
				<updated>2008-10-19T23:18:53Z</updated>
		
		<summary type="html">&lt;p&gt;165.228.0.35: /* FreeBSD Binary Upgrade 6.3 to 7.0 Notes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Note''': If you only want to install security updates, it's enough to subscribe to [http://lists.freebsd.org/mailman/listinfo/freebsd-security-notifications FreeBSD security notifications] and follow the instructions in each advisory. Otherwise, read on.&lt;br /&gt;
&lt;br /&gt;
In FreeBSD, the base system and ports can be updated independently if desired. Here's how to do it.&lt;br /&gt;
&lt;br /&gt;
== Basic Security updates ==&lt;br /&gt;
From FreeBSD 6.X you can simply keep up to date using freebsd-update&lt;br /&gt;
&lt;br /&gt;
First time use:&lt;br /&gt;
 # freebsd-update fetch&lt;br /&gt;
 # freebsd-update install&lt;br /&gt;
&lt;br /&gt;
You can rollback in-case of problems&lt;br /&gt;
 # freebsd-update rollback&lt;br /&gt;
&lt;br /&gt;
Use the following line in your /etc/crontab to keep your machine up to date:&lt;br /&gt;
30  3   *   *   *   root /usr/sbin/freebsd-update cron -t &amp;lt;email address&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will email you when updates are available and to install them type&lt;br /&gt;
 # freebsd-update install&lt;br /&gt;
&lt;br /&gt;
== Updating the base system ==&lt;br /&gt;
&lt;br /&gt;
To upgrade to a RELEASE version of FreeBSD, you can do one of three things:&lt;br /&gt;
#Do a binary Upgrade to a release version&lt;br /&gt;
#Do a binary Upgrade using the method described (FreeBSD 5.4 to 6.0 [http://www.daemonology.net/freebsd-upgrade-5.4-to-6.0/ here]) Refer to the bottom of this page for upgrading 6.3 to 7.0 notes&lt;br /&gt;
#Do a source upgrade as described [[upgrading the base system | here]]&lt;br /&gt;
&lt;br /&gt;
A binary upgrade to a release version can be done by running '''sysinstall''' from the installation medium (e.g. CDROM). See the [http://www.freebsd.org/releases/ release notes] of the release for details. Note that this will wipe out a lot of customizations.&lt;br /&gt;
&lt;br /&gt;
== Updating applications ==&lt;br /&gt;
&lt;br /&gt;
Many open-source apps are under active development, so this is something you'll probably want to do quite regularly to ensure that you have the latest versions of everything.&lt;br /&gt;
&lt;br /&gt;
First update the ports tree (/usr/ports/). This can be done via [[cvsup]], [[ctm]] or [[portsnap]]. The ports can then be automatically updated using [[portupgrade]] or [[portmanager]], which are capable of dealing with dependencies.&lt;br /&gt;
&lt;br /&gt;
== How do I download updates? ==&lt;br /&gt;
&lt;br /&gt;
The most common method used is [[cvsup]] (see [[updating the ports tree]]). However, you might not be able to use it if you're behind a restrictive firewall (blocking tcp port 5999) or on a weak connection. In that case you can use [[ctm]] to obtain differential updates by email or ftp.&lt;br /&gt;
&lt;br /&gt;
For updating the ports tree, a third option is available. [[Portsnap]] is an automated tool which offers many advantages over both the other methods:&lt;br /&gt;
&lt;br /&gt;
* secure (uses cryptographic signing)&lt;br /&gt;
* very efficient in terms of bandwidth consumption and server load&lt;br /&gt;
* uses http only&lt;br /&gt;
* easy to use&lt;br /&gt;
&lt;br /&gt;
== FreeBSD Binary Upgrade 6.3 to 7.0 Notes ==&lt;br /&gt;
It's best to upgrade to 6.3 first and this is straight forward, follow: http://www.freebsd.org/releases/6.3R/announce.html&lt;br /&gt;
&lt;br /&gt;
Follow the steps on http://www.freebsd.org/releases/7.0R/announce.html until you get to portupgrade -faP.  &lt;br /&gt;
&lt;br /&gt;
I've done the upgrade now on two machines and have come across the same problem when doing the portupgrade -faP command.  You get a failure with ruby.  Please refer to my post at for the solution: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here are the commands to fix the ruby problem.&lt;br /&gt;
&lt;br /&gt;
The first group of commands may or may not do anything (optional)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/sbin/reboot&lt;br /&gt;
boot -s (Boot into single user mode, you can also just select '4' from the menu)&lt;br /&gt;
/sbin/fsck&lt;br /&gt;
/sbin/mount -u /&lt;br /&gt;
/sbin/mount -a -t ufs&lt;br /&gt;
cd /usr/src&lt;br /&gt;
make clean&lt;br /&gt;
/sbin/reboot&lt;br /&gt;
&lt;br /&gt;
csup -L 2 /.../src-supfile&lt;br /&gt;
csup -L 2 /.../ports-supfile&lt;br /&gt;
less /usr/ports/UPDATING&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These commands are recommended.\\&lt;br /&gt;
Upgrade ruby:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
portupgrade -fu ruby&lt;br /&gt;
rm /var/db/pkg/pkgdb.db&lt;br /&gt;
portupgrade -fu ruby18-bdb&lt;br /&gt;
(Ignore the error at the end of this command)&lt;br /&gt;
&lt;br /&gt;
rm /var/db/pkg/pkgdb.db /usr/ports/INDEX-*.db&lt;br /&gt;
portupgrade -fu portupgrade&lt;br /&gt;
portupgrade -fu libtool&lt;br /&gt;
&lt;br /&gt;
portinstall misc/compat6x&lt;br /&gt;
portinstall sysutils/bsdadminscripts&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Optional) May not work.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd /usr/src&lt;br /&gt;
yes | make -B delete-old&lt;br /&gt;
yes | make -B delete-old-libs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check, fix, relink, cleanup the ports collection:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
pkg_libchk -qo | grep -vE 'jdk*|openoffice*' | xargs -o portupgrade -fuP&lt;br /&gt;
&lt;br /&gt;
pkgdb -F&lt;br /&gt;
pkgdb -L&lt;br /&gt;
portsclean -CLDP&lt;br /&gt;
portaudit -Fda&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Common Tasks]]&lt;/div&gt;</summary>
		<author><name>165.228.0.35</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/Updating_the_system</id>
		<title>Updating the system</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/Updating_the_system"/>
				<updated>2008-10-19T22:49:29Z</updated>
		
		<summary type="html">&lt;p&gt;165.228.0.35: /* FreeBSD Binary Upgrade 6.3 to 7.0 Notes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Note''': If you only want to install security updates, it's enough to subscribe to [http://lists.freebsd.org/mailman/listinfo/freebsd-security-notifications FreeBSD security notifications] and follow the instructions in each advisory. Otherwise, read on.&lt;br /&gt;
&lt;br /&gt;
In FreeBSD, the base system and ports can be updated independently if desired. Here's how to do it.&lt;br /&gt;
&lt;br /&gt;
== Basic Security updates ==&lt;br /&gt;
From FreeBSD 6.X you can simply keep up to date using freebsd-update&lt;br /&gt;
&lt;br /&gt;
First time use:&lt;br /&gt;
 # freebsd-update fetch&lt;br /&gt;
 # freebsd-update install&lt;br /&gt;
&lt;br /&gt;
You can rollback in-case of problems&lt;br /&gt;
 # freebsd-update rollback&lt;br /&gt;
&lt;br /&gt;
Use the following line in your /etc/crontab to keep your machine up to date:&lt;br /&gt;
30  3   *   *   *   root /usr/sbin/freebsd-update cron -t &amp;lt;email address&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will email you when updates are available and to install them type&lt;br /&gt;
 # freebsd-update install&lt;br /&gt;
&lt;br /&gt;
== Updating the base system ==&lt;br /&gt;
&lt;br /&gt;
To upgrade to a RELEASE version of FreeBSD, you can do one of three things:&lt;br /&gt;
#Do a binary Upgrade to a release version&lt;br /&gt;
#Do a binary Upgrade using the method described (FreeBSD 5.4 to 6.0 [http://www.daemonology.net/freebsd-upgrade-5.4-to-6.0/ here]) Refer to the bottom of this page for upgrading 6.3 to 7.0 notes&lt;br /&gt;
#Do a source upgrade as described [[upgrading the base system | here]]&lt;br /&gt;
&lt;br /&gt;
A binary upgrade to a release version can be done by running '''sysinstall''' from the installation medium (e.g. CDROM). See the [http://www.freebsd.org/releases/ release notes] of the release for details. Note that this will wipe out a lot of customizations.&lt;br /&gt;
&lt;br /&gt;
== Updating applications ==&lt;br /&gt;
&lt;br /&gt;
Many open-source apps are under active development, so this is something you'll probably want to do quite regularly to ensure that you have the latest versions of everything.&lt;br /&gt;
&lt;br /&gt;
First update the ports tree (/usr/ports/). This can be done via [[cvsup]], [[ctm]] or [[portsnap]]. The ports can then be automatically updated using [[portupgrade]] or [[portmanager]], which are capable of dealing with dependencies.&lt;br /&gt;
&lt;br /&gt;
== How do I download updates? ==&lt;br /&gt;
&lt;br /&gt;
The most common method used is [[cvsup]] (see [[updating the ports tree]]). However, you might not be able to use it if you're behind a restrictive firewall (blocking tcp port 5999) or on a weak connection. In that case you can use [[ctm]] to obtain differential updates by email or ftp.&lt;br /&gt;
&lt;br /&gt;
For updating the ports tree, a third option is available. [[Portsnap]] is an automated tool which offers many advantages over both the other methods:&lt;br /&gt;
&lt;br /&gt;
* secure (uses cryptographic signing)&lt;br /&gt;
* very efficient in terms of bandwidth consumption and server load&lt;br /&gt;
* uses http only&lt;br /&gt;
* easy to use&lt;br /&gt;
&lt;br /&gt;
== FreeBSD Binary Upgrade 6.3 to 7.0 Notes ==&lt;br /&gt;
It's best to upgrade to 6.3 first and this is straight forward, follow: http://www.freebsd.org/releases/6.3R/announce.html&lt;br /&gt;
&lt;br /&gt;
Follow the steps on http://www.freebsd.org/releases/7.0R/announce.html until you get to portupgrade -faP.  &lt;br /&gt;
&lt;br /&gt;
I've done the upgrade now on two machines and have come across the same problem when doing the portupgrade -faP command.  You get a failure with ruby.  Please refer to my post at for the solution: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here are the commands to fix the ruby problem.&lt;br /&gt;
&lt;br /&gt;
The first group of commands may or may not do anything (optional)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/sbin/reboot&lt;br /&gt;
boot -s (Boot into single user mode, you can also just select '4' from the menu)&lt;br /&gt;
/sbin/fsck&lt;br /&gt;
/sbin/mount -u /&lt;br /&gt;
/sbin/mount -a -t ufs&lt;br /&gt;
cd /usr/src&lt;br /&gt;
make clean&lt;br /&gt;
/sbin/reboot&lt;br /&gt;
&lt;br /&gt;
csup -L 2 /.../src-supfile&lt;br /&gt;
csup -L 2 /.../ports-supfile&lt;br /&gt;
less /usr/ports/UPDATING&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These commands are recommended.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
portupgrade -fu ruby&lt;br /&gt;
rm /var/db/pkg/pkgdb.db&lt;br /&gt;
portupgrade -fu ruby18-bdb&lt;br /&gt;
(Ignore the error at the end of this command)&lt;br /&gt;
&lt;br /&gt;
rm /var/db/pkg/pkgdb.db /usr/ports/INDEX-*.db&lt;br /&gt;
portupgrade -fu portupgrade&lt;br /&gt;
portupgrade -fu libtool&lt;br /&gt;
&lt;br /&gt;
portinstall misc/compat6x&lt;br /&gt;
portinstall sysutils/bsdadminscripts&lt;br /&gt;
&lt;br /&gt;
cd /usr/src&lt;br /&gt;
yes | make -B delete-old&lt;br /&gt;
yes | make -B delete-old-libs&lt;br /&gt;
&lt;br /&gt;
pkg_libchk -qo | grep -vE 'jdk*|openoffice*' | xargs -o portupgrade -fuP&lt;br /&gt;
&lt;br /&gt;
pkgdb -F&lt;br /&gt;
pkgdb -L&lt;br /&gt;
portsclean -CLDP&lt;br /&gt;
portaudit -Fda&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Common Tasks]]&lt;/div&gt;</summary>
		<author><name>165.228.0.35</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/Updating_the_system</id>
		<title>Updating the system</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/Updating_the_system"/>
				<updated>2008-10-19T22:41:59Z</updated>
		
		<summary type="html">&lt;p&gt;165.228.0.35: /* FreeBSD Binary Upgrade 6.3 to 7.0 Notes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Note''': If you only want to install security updates, it's enough to subscribe to [http://lists.freebsd.org/mailman/listinfo/freebsd-security-notifications FreeBSD security notifications] and follow the instructions in each advisory. Otherwise, read on.&lt;br /&gt;
&lt;br /&gt;
In FreeBSD, the base system and ports can be updated independently if desired. Here's how to do it.&lt;br /&gt;
&lt;br /&gt;
== Basic Security updates ==&lt;br /&gt;
From FreeBSD 6.X you can simply keep up to date using freebsd-update&lt;br /&gt;
&lt;br /&gt;
First time use:&lt;br /&gt;
 # freebsd-update fetch&lt;br /&gt;
 # freebsd-update install&lt;br /&gt;
&lt;br /&gt;
You can rollback in-case of problems&lt;br /&gt;
 # freebsd-update rollback&lt;br /&gt;
&lt;br /&gt;
Use the following line in your /etc/crontab to keep your machine up to date:&lt;br /&gt;
30  3   *   *   *   root /usr/sbin/freebsd-update cron -t &amp;lt;email address&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will email you when updates are available and to install them type&lt;br /&gt;
 # freebsd-update install&lt;br /&gt;
&lt;br /&gt;
== Updating the base system ==&lt;br /&gt;
&lt;br /&gt;
To upgrade to a RELEASE version of FreeBSD, you can do one of three things:&lt;br /&gt;
#Do a binary Upgrade to a release version&lt;br /&gt;
#Do a binary Upgrade using the method described (FreeBSD 5.4 to 6.0 [http://www.daemonology.net/freebsd-upgrade-5.4-to-6.0/ here]) Refer to the bottom of this page for upgrading 6.3 to 7.0 notes&lt;br /&gt;
#Do a source upgrade as described [[upgrading the base system | here]]&lt;br /&gt;
&lt;br /&gt;
A binary upgrade to a release version can be done by running '''sysinstall''' from the installation medium (e.g. CDROM). See the [http://www.freebsd.org/releases/ release notes] of the release for details. Note that this will wipe out a lot of customizations.&lt;br /&gt;
&lt;br /&gt;
== Updating applications ==&lt;br /&gt;
&lt;br /&gt;
Many open-source apps are under active development, so this is something you'll probably want to do quite regularly to ensure that you have the latest versions of everything.&lt;br /&gt;
&lt;br /&gt;
First update the ports tree (/usr/ports/). This can be done via [[cvsup]], [[ctm]] or [[portsnap]]. The ports can then be automatically updated using [[portupgrade]] or [[portmanager]], which are capable of dealing with dependencies.&lt;br /&gt;
&lt;br /&gt;
== How do I download updates? ==&lt;br /&gt;
&lt;br /&gt;
The most common method used is [[cvsup]] (see [[updating the ports tree]]). However, you might not be able to use it if you're behind a restrictive firewall (blocking tcp port 5999) or on a weak connection. In that case you can use [[ctm]] to obtain differential updates by email or ftp.&lt;br /&gt;
&lt;br /&gt;
For updating the ports tree, a third option is available. [[Portsnap]] is an automated tool which offers many advantages over both the other methods:&lt;br /&gt;
&lt;br /&gt;
* secure (uses cryptographic signing)&lt;br /&gt;
* very efficient in terms of bandwidth consumption and server load&lt;br /&gt;
* uses http only&lt;br /&gt;
* easy to use&lt;br /&gt;
&lt;br /&gt;
== FreeBSD Binary Upgrade 6.3 to 7.0 Notes ==&lt;br /&gt;
It's best to upgrade to 6.3 first and this is straight forward, follow: http://www.freebsd.org/releases/6.3R/announce.html&lt;br /&gt;
&lt;br /&gt;
Follow the steps on http://www.freebsd.org/releases/7.0R/announce.html until you get to portupgrade -faP.  &lt;br /&gt;
&lt;br /&gt;
I've done the upgrade now on two machines and have come across the same problem when doing the portupgrade -faP command.  You get a failure with ruby.  Please refer to my post at for the solution: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here are the commands to fix the ruby problem.&lt;br /&gt;
&lt;br /&gt;
The first group of commands may or may not do anything (optional)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/sbin/reboot&lt;br /&gt;
boot -s (Boot into single user mode, you can also just select '4' from the menu)&lt;br /&gt;
/sbin/fsck&lt;br /&gt;
/sbin/mount -u /&lt;br /&gt;
/sbin/mount -a -t ufs&lt;br /&gt;
cd /usr/src&lt;br /&gt;
make clean&lt;br /&gt;
/sbin/reboot&lt;br /&gt;
&lt;br /&gt;
csup -L 2 /.../src-supfile&lt;br /&gt;
csup -L 2 /.../ports-supfile&lt;br /&gt;
less /usr/ports/UPDATING&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These commands are recommended.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
portupgrade -fu ruby&lt;br /&gt;
rm /var/db/pkg/pkgdb.db&lt;br /&gt;
portupgrade -fu ruby18-bdb&lt;br /&gt;
rm /var/db/pkg/pkgdb.db /usr/ports/INDEX-*.db&lt;br /&gt;
portupgrade -fu portupgrade&lt;br /&gt;
portupgrade -fu libtool&lt;br /&gt;
&lt;br /&gt;
portinstall misc/compat6x&lt;br /&gt;
portinstall sysutils/bsdadminscripts&lt;br /&gt;
&lt;br /&gt;
cd /usr/src&lt;br /&gt;
yes | make -B delete-old&lt;br /&gt;
yes | make -B delete-old-libs&lt;br /&gt;
&lt;br /&gt;
pkg_libchk -qo | grep -vE 'jdk*|openoffice*' | xargs -o portupgrade -fuP&lt;br /&gt;
&lt;br /&gt;
pkgdb -F&lt;br /&gt;
pkgdb -L&lt;br /&gt;
portsclean -CLDP&lt;br /&gt;
portaudit -Fda&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Common Tasks]]&lt;/div&gt;</summary>
		<author><name>165.228.0.35</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/Updating_the_system</id>
		<title>Updating the system</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/Updating_the_system"/>
				<updated>2008-10-19T22:35:34Z</updated>
		
		<summary type="html">&lt;p&gt;165.228.0.35: /* FreeBSD Binary Upgrade 6.3 to 7.0 Notes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Note''': If you only want to install security updates, it's enough to subscribe to [http://lists.freebsd.org/mailman/listinfo/freebsd-security-notifications FreeBSD security notifications] and follow the instructions in each advisory. Otherwise, read on.&lt;br /&gt;
&lt;br /&gt;
In FreeBSD, the base system and ports can be updated independently if desired. Here's how to do it.&lt;br /&gt;
&lt;br /&gt;
== Basic Security updates ==&lt;br /&gt;
From FreeBSD 6.X you can simply keep up to date using freebsd-update&lt;br /&gt;
&lt;br /&gt;
First time use:&lt;br /&gt;
 # freebsd-update fetch&lt;br /&gt;
 # freebsd-update install&lt;br /&gt;
&lt;br /&gt;
You can rollback in-case of problems&lt;br /&gt;
 # freebsd-update rollback&lt;br /&gt;
&lt;br /&gt;
Use the following line in your /etc/crontab to keep your machine up to date:&lt;br /&gt;
30  3   *   *   *   root /usr/sbin/freebsd-update cron -t &amp;lt;email address&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will email you when updates are available and to install them type&lt;br /&gt;
 # freebsd-update install&lt;br /&gt;
&lt;br /&gt;
== Updating the base system ==&lt;br /&gt;
&lt;br /&gt;
To upgrade to a RELEASE version of FreeBSD, you can do one of three things:&lt;br /&gt;
#Do a binary Upgrade to a release version&lt;br /&gt;
#Do a binary Upgrade using the method described (FreeBSD 5.4 to 6.0 [http://www.daemonology.net/freebsd-upgrade-5.4-to-6.0/ here]) Refer to the bottom of this page for upgrading 6.3 to 7.0 notes&lt;br /&gt;
#Do a source upgrade as described [[upgrading the base system | here]]&lt;br /&gt;
&lt;br /&gt;
A binary upgrade to a release version can be done by running '''sysinstall''' from the installation medium (e.g. CDROM). See the [http://www.freebsd.org/releases/ release notes] of the release for details. Note that this will wipe out a lot of customizations.&lt;br /&gt;
&lt;br /&gt;
== Updating applications ==&lt;br /&gt;
&lt;br /&gt;
Many open-source apps are under active development, so this is something you'll probably want to do quite regularly to ensure that you have the latest versions of everything.&lt;br /&gt;
&lt;br /&gt;
First update the ports tree (/usr/ports/). This can be done via [[cvsup]], [[ctm]] or [[portsnap]]. The ports can then be automatically updated using [[portupgrade]] or [[portmanager]], which are capable of dealing with dependencies.&lt;br /&gt;
&lt;br /&gt;
== How do I download updates? ==&lt;br /&gt;
&lt;br /&gt;
The most common method used is [[cvsup]] (see [[updating the ports tree]]). However, you might not be able to use it if you're behind a restrictive firewall (blocking tcp port 5999) or on a weak connection. In that case you can use [[ctm]] to obtain differential updates by email or ftp.&lt;br /&gt;
&lt;br /&gt;
For updating the ports tree, a third option is available. [[Portsnap]] is an automated tool which offers many advantages over both the other methods:&lt;br /&gt;
&lt;br /&gt;
* secure (uses cryptographic signing)&lt;br /&gt;
* very efficient in terms of bandwidth consumption and server load&lt;br /&gt;
* uses http only&lt;br /&gt;
* easy to use&lt;br /&gt;
&lt;br /&gt;
== FreeBSD Binary Upgrade 6.3 to 7.0 Notes ==&lt;br /&gt;
It's best to upgrade to 6.3 first and this is straight forward, follow: http://www.freebsd.org/releases/6.3R/announce.html&lt;br /&gt;
&lt;br /&gt;
Follow the steps on http://www.freebsd.org/releases/7.0R/announce.html until you get to portupgrade -faP.  &lt;br /&gt;
&lt;br /&gt;
I've done the upgrade now on two machines and have come across the same problem when doing the portupgrade -faP command.  You get a failure with ruby.  Please refer to my post at for the solution: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here are the commands to fix the ruby problem.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/sbin/reboot&lt;br /&gt;
boot -s (Boot into single user mode, you can also just select '4' from the menu)&lt;br /&gt;
/sbin/fsck&lt;br /&gt;
/sbin/mount -u /&lt;br /&gt;
/sbin/mount -a -t ufs&lt;br /&gt;
cd /usr/src&lt;br /&gt;
make clean&lt;br /&gt;
/sbin/reboot&lt;br /&gt;
&lt;br /&gt;
csup -L 2 /.../src-supfile&lt;br /&gt;
csup -L 2 /.../ports-supfile&lt;br /&gt;
less /usr/ports/UPDATING&lt;br /&gt;
portupgrade -fu ruby&lt;br /&gt;
rm /var/db/pkg/pkgdb.db&lt;br /&gt;
portupgrade -fu ruby18-bdb&lt;br /&gt;
rm /var/db/pkg/pkgdb.db /usr/ports/INDEX-*.db&lt;br /&gt;
portupgrade -fu portupgrade&lt;br /&gt;
portupgrade -fu libtool&lt;br /&gt;
&lt;br /&gt;
portinstall misc/compat6x&lt;br /&gt;
portinstall sysutils/bsdadminscripts&lt;br /&gt;
&lt;br /&gt;
cd /usr/src&lt;br /&gt;
yes | make -B delete-old&lt;br /&gt;
yes | make -B delete-old-libs&lt;br /&gt;
&lt;br /&gt;
pkg_libchk -qo | grep -vE 'jdk*|openoffice*' | xargs -o portupgrade -fuP&lt;br /&gt;
&lt;br /&gt;
pkgdb -F&lt;br /&gt;
pkgdb -L&lt;br /&gt;
portsclean -CLDP&lt;br /&gt;
portaudit -Fda&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Common Tasks]]&lt;/div&gt;</summary>
		<author><name>165.228.0.35</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/Updating_the_system</id>
		<title>Updating the system</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/Updating_the_system"/>
				<updated>2008-10-19T22:22:27Z</updated>
		
		<summary type="html">&lt;p&gt;165.228.0.35: /* FreeBSD Binary Upgrade 6.3 to 7.0 Notes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Note''': If you only want to install security updates, it's enough to subscribe to [http://lists.freebsd.org/mailman/listinfo/freebsd-security-notifications FreeBSD security notifications] and follow the instructions in each advisory. Otherwise, read on.&lt;br /&gt;
&lt;br /&gt;
In FreeBSD, the base system and ports can be updated independently if desired. Here's how to do it.&lt;br /&gt;
&lt;br /&gt;
== Basic Security updates ==&lt;br /&gt;
From FreeBSD 6.X you can simply keep up to date using freebsd-update&lt;br /&gt;
&lt;br /&gt;
First time use:&lt;br /&gt;
 # freebsd-update fetch&lt;br /&gt;
 # freebsd-update install&lt;br /&gt;
&lt;br /&gt;
You can rollback in-case of problems&lt;br /&gt;
 # freebsd-update rollback&lt;br /&gt;
&lt;br /&gt;
Use the following line in your /etc/crontab to keep your machine up to date:&lt;br /&gt;
30  3   *   *   *   root /usr/sbin/freebsd-update cron -t &amp;lt;email address&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will email you when updates are available and to install them type&lt;br /&gt;
 # freebsd-update install&lt;br /&gt;
&lt;br /&gt;
== Updating the base system ==&lt;br /&gt;
&lt;br /&gt;
To upgrade to a RELEASE version of FreeBSD, you can do one of three things:&lt;br /&gt;
#Do a binary Upgrade to a release version&lt;br /&gt;
#Do a binary Upgrade using the method described (FreeBSD 5.4 to 6.0 [http://www.daemonology.net/freebsd-upgrade-5.4-to-6.0/ here]) Refer to the bottom of this page for upgrading 6.3 to 7.0 notes&lt;br /&gt;
#Do a source upgrade as described [[upgrading the base system | here]]&lt;br /&gt;
&lt;br /&gt;
A binary upgrade to a release version can be done by running '''sysinstall''' from the installation medium (e.g. CDROM). See the [http://www.freebsd.org/releases/ release notes] of the release for details. Note that this will wipe out a lot of customizations.&lt;br /&gt;
&lt;br /&gt;
== Updating applications ==&lt;br /&gt;
&lt;br /&gt;
Many open-source apps are under active development, so this is something you'll probably want to do quite regularly to ensure that you have the latest versions of everything.&lt;br /&gt;
&lt;br /&gt;
First update the ports tree (/usr/ports/). This can be done via [[cvsup]], [[ctm]] or [[portsnap]]. The ports can then be automatically updated using [[portupgrade]] or [[portmanager]], which are capable of dealing with dependencies.&lt;br /&gt;
&lt;br /&gt;
== How do I download updates? ==&lt;br /&gt;
&lt;br /&gt;
The most common method used is [[cvsup]] (see [[updating the ports tree]]). However, you might not be able to use it if you're behind a restrictive firewall (blocking tcp port 5999) or on a weak connection. In that case you can use [[ctm]] to obtain differential updates by email or ftp.&lt;br /&gt;
&lt;br /&gt;
For updating the ports tree, a third option is available. [[Portsnap]] is an automated tool which offers many advantages over both the other methods:&lt;br /&gt;
&lt;br /&gt;
* secure (uses cryptographic signing)&lt;br /&gt;
* very efficient in terms of bandwidth consumption and server load&lt;br /&gt;
* uses http only&lt;br /&gt;
* easy to use&lt;br /&gt;
&lt;br /&gt;
== FreeBSD Binary Upgrade 6.3 to 7.0 Notes ==&lt;br /&gt;
It's best to upgrade to 6.3 first and this is straight forward, follow: http://www.freebsd.org/releases/6.3R/announce.html&lt;br /&gt;
&lt;br /&gt;
Follow the steps on http://www.freebsd.org/releases/7.0R/announce.html until you get to portupgrade -faP.  &lt;br /&gt;
&lt;br /&gt;
I've done the upgrade now on two machines and have come across the same problem when doing the portupgrade -faP command.  You get a failure with ruby.  Please refer to my post at for the solution: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here are the commands to fix the ruby problem.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/sbin/reboot&lt;br /&gt;
boot -s&lt;br /&gt;
/sbin/fsck&lt;br /&gt;
/sbin/mount -u /&lt;br /&gt;
/sbin/mount -a -t ufs&lt;br /&gt;
cd /usr/src&lt;br /&gt;
make clean&lt;br /&gt;
/sbin/reboot&lt;br /&gt;
&lt;br /&gt;
csup -L 2 /.../src-supfile&lt;br /&gt;
csup -L 2 /.../ports-supfile&lt;br /&gt;
less /usr/ports/UPDATING&lt;br /&gt;
portupgrade -fu ruby&lt;br /&gt;
rm /var/db/pkg/pkgdb.db&lt;br /&gt;
portupgrade -fu ruby18-bdb&lt;br /&gt;
rm /var/db/pkg/pkgdb.db /usr/ports/INDEX-*.db&lt;br /&gt;
portupgrade -fu portupgrade&lt;br /&gt;
portupgrade -fu libtool&lt;br /&gt;
&lt;br /&gt;
portinstall misc/compat6x&lt;br /&gt;
portinstall sysutils/bsdadminscripts&lt;br /&gt;
&lt;br /&gt;
cd /usr/src&lt;br /&gt;
yes | make -B delete-old&lt;br /&gt;
yes | make -B delete-old-libs&lt;br /&gt;
&lt;br /&gt;
pkg_libchk -qo | grep -vE 'jdk*|openoffice*' | xargs -o portupgrade -fuP&lt;br /&gt;
&lt;br /&gt;
pkgdb -F&lt;br /&gt;
pkgdb -L&lt;br /&gt;
portsclean -CLDP&lt;br /&gt;
portaudit -Fda&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Common Tasks]]&lt;/div&gt;</summary>
		<author><name>165.228.0.35</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/Updating_the_system</id>
		<title>Updating the system</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/Updating_the_system"/>
				<updated>2008-10-19T22:22:01Z</updated>
		
		<summary type="html">&lt;p&gt;165.228.0.35: /* FreeBSD Binary Upgrade 6.3 to 7.0 Notes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Note''': If you only want to install security updates, it's enough to subscribe to [http://lists.freebsd.org/mailman/listinfo/freebsd-security-notifications FreeBSD security notifications] and follow the instructions in each advisory. Otherwise, read on.&lt;br /&gt;
&lt;br /&gt;
In FreeBSD, the base system and ports can be updated independently if desired. Here's how to do it.&lt;br /&gt;
&lt;br /&gt;
== Basic Security updates ==&lt;br /&gt;
From FreeBSD 6.X you can simply keep up to date using freebsd-update&lt;br /&gt;
&lt;br /&gt;
First time use:&lt;br /&gt;
 # freebsd-update fetch&lt;br /&gt;
 # freebsd-update install&lt;br /&gt;
&lt;br /&gt;
You can rollback in-case of problems&lt;br /&gt;
 # freebsd-update rollback&lt;br /&gt;
&lt;br /&gt;
Use the following line in your /etc/crontab to keep your machine up to date:&lt;br /&gt;
30  3   *   *   *   root /usr/sbin/freebsd-update cron -t &amp;lt;email address&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will email you when updates are available and to install them type&lt;br /&gt;
 # freebsd-update install&lt;br /&gt;
&lt;br /&gt;
== Updating the base system ==&lt;br /&gt;
&lt;br /&gt;
To upgrade to a RELEASE version of FreeBSD, you can do one of three things:&lt;br /&gt;
#Do a binary Upgrade to a release version&lt;br /&gt;
#Do a binary Upgrade using the method described (FreeBSD 5.4 to 6.0 [http://www.daemonology.net/freebsd-upgrade-5.4-to-6.0/ here]) Refer to the bottom of this page for upgrading 6.3 to 7.0 notes&lt;br /&gt;
#Do a source upgrade as described [[upgrading the base system | here]]&lt;br /&gt;
&lt;br /&gt;
A binary upgrade to a release version can be done by running '''sysinstall''' from the installation medium (e.g. CDROM). See the [http://www.freebsd.org/releases/ release notes] of the release for details. Note that this will wipe out a lot of customizations.&lt;br /&gt;
&lt;br /&gt;
== Updating applications ==&lt;br /&gt;
&lt;br /&gt;
Many open-source apps are under active development, so this is something you'll probably want to do quite regularly to ensure that you have the latest versions of everything.&lt;br /&gt;
&lt;br /&gt;
First update the ports tree (/usr/ports/). This can be done via [[cvsup]], [[ctm]] or [[portsnap]]. The ports can then be automatically updated using [[portupgrade]] or [[portmanager]], which are capable of dealing with dependencies.&lt;br /&gt;
&lt;br /&gt;
== How do I download updates? ==&lt;br /&gt;
&lt;br /&gt;
The most common method used is [[cvsup]] (see [[updating the ports tree]]). However, you might not be able to use it if you're behind a restrictive firewall (blocking tcp port 5999) or on a weak connection. In that case you can use [[ctm]] to obtain differential updates by email or ftp.&lt;br /&gt;
&lt;br /&gt;
For updating the ports tree, a third option is available. [[Portsnap]] is an automated tool which offers many advantages over both the other methods:&lt;br /&gt;
&lt;br /&gt;
* secure (uses cryptographic signing)&lt;br /&gt;
* very efficient in terms of bandwidth consumption and server load&lt;br /&gt;
* uses http only&lt;br /&gt;
* easy to use&lt;br /&gt;
&lt;br /&gt;
== FreeBSD Binary Upgrade 6.3 to 7.0 Notes ==&lt;br /&gt;
It's best to upgrade to 6.3 first and this is straight forward, follow: http://www.freebsd.org/releases/6.3R/announce.html&lt;br /&gt;
&lt;br /&gt;
Follow the steps on http://www.freebsd.org/releases/7.0R/announce.html until you get to portupgrade -faP.  &lt;br /&gt;
&lt;br /&gt;
I've done the upgrade now on two machines and have come across the same problem when doing the portupgrade -faP command.  You get a failure with ruby.  Please refer to my post at for the solution: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here are the commands to fix the ruby problem.&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/sbin/reboot&lt;br /&gt;
boot -s&lt;br /&gt;
/sbin/fsck&lt;br /&gt;
/sbin/mount -u /&lt;br /&gt;
/sbin/mount -a -t ufs&lt;br /&gt;
cd /usr/src&lt;br /&gt;
make clean&lt;br /&gt;
/sbin/reboot&lt;br /&gt;
&lt;br /&gt;
csup -L 2 /.../src-supfile&lt;br /&gt;
csup -L 2 /.../ports-supfile&lt;br /&gt;
less /usr/ports/UPDATING&lt;br /&gt;
portupgrade -fu ruby&lt;br /&gt;
rm /var/db/pkg/pkgdb.db&lt;br /&gt;
portupgrade -fu ruby18-bdb&lt;br /&gt;
rm /var/db/pkg/pkgdb.db /usr/ports/INDEX-*.db&lt;br /&gt;
portupgrade -fu portupgrade&lt;br /&gt;
portupgrade -fu libtool&lt;br /&gt;
&lt;br /&gt;
portinstall misc/compat6x&lt;br /&gt;
portinstall sysutils/bsdadminscripts&lt;br /&gt;
&lt;br /&gt;
cd /usr/src&lt;br /&gt;
yes | make -B delete-old&lt;br /&gt;
yes | make -B delete-old-libs&lt;br /&gt;
&lt;br /&gt;
pkg_libchk -qo | grep -vE 'jdk*|openoffice*' | xargs -o portupgrade -fuP&lt;br /&gt;
&lt;br /&gt;
pkgdb -F&lt;br /&gt;
pkgdb -L&lt;br /&gt;
portsclean -CLDP&lt;br /&gt;
portaudit -Fda&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Common Tasks]]&lt;/div&gt;</summary>
		<author><name>165.228.0.35</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/Updating_the_system</id>
		<title>Updating the system</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/Updating_the_system"/>
				<updated>2008-10-19T22:21:16Z</updated>
		
		<summary type="html">&lt;p&gt;165.228.0.35: /* FreeBSD Binary Upgrade 6.3 to 7.0 Notes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Note''': If you only want to install security updates, it's enough to subscribe to [http://lists.freebsd.org/mailman/listinfo/freebsd-security-notifications FreeBSD security notifications] and follow the instructions in each advisory. Otherwise, read on.&lt;br /&gt;
&lt;br /&gt;
In FreeBSD, the base system and ports can be updated independently if desired. Here's how to do it.&lt;br /&gt;
&lt;br /&gt;
== Basic Security updates ==&lt;br /&gt;
From FreeBSD 6.X you can simply keep up to date using freebsd-update&lt;br /&gt;
&lt;br /&gt;
First time use:&lt;br /&gt;
 # freebsd-update fetch&lt;br /&gt;
 # freebsd-update install&lt;br /&gt;
&lt;br /&gt;
You can rollback in-case of problems&lt;br /&gt;
 # freebsd-update rollback&lt;br /&gt;
&lt;br /&gt;
Use the following line in your /etc/crontab to keep your machine up to date:&lt;br /&gt;
30  3   *   *   *   root /usr/sbin/freebsd-update cron -t &amp;lt;email address&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will email you when updates are available and to install them type&lt;br /&gt;
 # freebsd-update install&lt;br /&gt;
&lt;br /&gt;
== Updating the base system ==&lt;br /&gt;
&lt;br /&gt;
To upgrade to a RELEASE version of FreeBSD, you can do one of three things:&lt;br /&gt;
#Do a binary Upgrade to a release version&lt;br /&gt;
#Do a binary Upgrade using the method described (FreeBSD 5.4 to 6.0 [http://www.daemonology.net/freebsd-upgrade-5.4-to-6.0/ here]) Refer to the bottom of this page for upgrading 6.3 to 7.0 notes&lt;br /&gt;
#Do a source upgrade as described [[upgrading the base system | here]]&lt;br /&gt;
&lt;br /&gt;
A binary upgrade to a release version can be done by running '''sysinstall''' from the installation medium (e.g. CDROM). See the [http://www.freebsd.org/releases/ release notes] of the release for details. Note that this will wipe out a lot of customizations.&lt;br /&gt;
&lt;br /&gt;
== Updating applications ==&lt;br /&gt;
&lt;br /&gt;
Many open-source apps are under active development, so this is something you'll probably want to do quite regularly to ensure that you have the latest versions of everything.&lt;br /&gt;
&lt;br /&gt;
First update the ports tree (/usr/ports/). This can be done via [[cvsup]], [[ctm]] or [[portsnap]]. The ports can then be automatically updated using [[portupgrade]] or [[portmanager]], which are capable of dealing with dependencies.&lt;br /&gt;
&lt;br /&gt;
== How do I download updates? ==&lt;br /&gt;
&lt;br /&gt;
The most common method used is [[cvsup]] (see [[updating the ports tree]]). However, you might not be able to use it if you're behind a restrictive firewall (blocking tcp port 5999) or on a weak connection. In that case you can use [[ctm]] to obtain differential updates by email or ftp.&lt;br /&gt;
&lt;br /&gt;
For updating the ports tree, a third option is available. [[Portsnap]] is an automated tool which offers many advantages over both the other methods:&lt;br /&gt;
&lt;br /&gt;
* secure (uses cryptographic signing)&lt;br /&gt;
* very efficient in terms of bandwidth consumption and server load&lt;br /&gt;
* uses http only&lt;br /&gt;
* easy to use&lt;br /&gt;
&lt;br /&gt;
== FreeBSD Binary Upgrade 6.3 to 7.0 Notes ==&lt;br /&gt;
It's best to upgrade to 6.3 first and this is straight forward, follow: http://www.freebsd.org/releases/6.3R/announce.html&lt;br /&gt;
&lt;br /&gt;
Follow the steps on http://www.freebsd.org/releases/7.0R/announce.html until you get to portupgrade -faP.  &lt;br /&gt;
&lt;br /&gt;
I've done the upgrade now on two machines and have come across the same problem when doing the portupgrade -faP command.  You get a failure with ruby.  Please refer to my post at for the solution: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here are the commands to fix the ruby problem.&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&lt;br /&gt;
/sbin/reboot&lt;br /&gt;
boot -s&lt;br /&gt;
/sbin/fsck&lt;br /&gt;
/sbin/mount -u /&lt;br /&gt;
/sbin/mount -a -t ufs&lt;br /&gt;
cd /usr/src&lt;br /&gt;
make clean&lt;br /&gt;
/sbin/reboot&lt;br /&gt;
&lt;br /&gt;
csup -L 2 /.../src-supfile&lt;br /&gt;
csup -L 2 /.../ports-supfile&lt;br /&gt;
less /usr/ports/UPDATING&lt;br /&gt;
portupgrade -fu ruby&lt;br /&gt;
rm /var/db/pkg/pkgdb.db&lt;br /&gt;
portupgrade -fu ruby18-bdb&lt;br /&gt;
rm /var/db/pkg/pkgdb.db /usr/ports/INDEX-*.db&lt;br /&gt;
portupgrade -fu portupgrade&lt;br /&gt;
portupgrade -fu libtool&lt;br /&gt;
&lt;br /&gt;
portinstall misc/compat6x&lt;br /&gt;
portinstall sysutils/bsdadminscripts&lt;br /&gt;
&lt;br /&gt;
cd /usr/src&lt;br /&gt;
yes | make -B delete-old&lt;br /&gt;
yes | make -B delete-old-libs&lt;br /&gt;
&lt;br /&gt;
pkg_libchk -qo | grep -vE 'jdk*|openoffice*' | xargs -o portupgrade -fuP&lt;br /&gt;
&lt;br /&gt;
pkgdb -F&lt;br /&gt;
pkgdb -L&lt;br /&gt;
portsclean -CLDP&lt;br /&gt;
portaudit -Fda&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Common Tasks]]&lt;/div&gt;</summary>
		<author><name>165.228.0.35</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/Updating_the_system</id>
		<title>Updating the system</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/Updating_the_system"/>
				<updated>2008-03-11T03:21:24Z</updated>
		
		<summary type="html">&lt;p&gt;165.228.0.35: /* Updating the base system */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Note''': If you only want to install security updates, it's enough to subscribe to [http://lists.freebsd.org/mailman/listinfo/freebsd-security-notifications FreeBSD security notifications] and follow the instructions in each advisory. Otherwise, read on.&lt;br /&gt;
&lt;br /&gt;
In FreeBSD, the base system and ports can be updated independently if desired. Here's how to do it.&lt;br /&gt;
&lt;br /&gt;
== Basic Security updates ==&lt;br /&gt;
From FreeBSD 6.X you can simply keep up to date using freebsd-update&lt;br /&gt;
&lt;br /&gt;
First time use:&lt;br /&gt;
 # freebsd-update fetch&lt;br /&gt;
 # freebsd-update install&lt;br /&gt;
&lt;br /&gt;
You can rollback in-case of problems&lt;br /&gt;
 # freebsd-update rollback&lt;br /&gt;
&lt;br /&gt;
Use the following line in your /etc/crontab to keep your machine up to date:&lt;br /&gt;
30  3   *   *   *   root /usr/sbin/freebsd-update cron -t &amp;lt;email address&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will email you when updates are available and to install them type&lt;br /&gt;
 # freebsd-update install&lt;br /&gt;
&lt;br /&gt;
== Updating the base system ==&lt;br /&gt;
&lt;br /&gt;
To upgrade to a RELEASE version of FreeBSD, you can do one of three things:&lt;br /&gt;
#Do a binary Upgrade to a release version&lt;br /&gt;
#Do a binary Upgrade using the method described (FreeBSD 5.4 to 6.0 [http://www.daemonology.net/freebsd-upgrade-5.4-to-6.0/ here]) Refer to the bottom of this page for upgrading 6.3 to 7.0 notes&lt;br /&gt;
#Do a source upgrade as described [[upgrading the base system | here]]&lt;br /&gt;
&lt;br /&gt;
A binary upgrade to a release version can be done by running '''sysinstall''' from the installation medium (e.g. CDROM). See the [http://www.freebsd.org/releases/ release notes] of the release for details. Note that this will wipe out a lot of customizations.&lt;br /&gt;
&lt;br /&gt;
== Updating applications ==&lt;br /&gt;
&lt;br /&gt;
Many open-source apps are under active development, so this is something you'll probably want to do quite regularly to ensure that you have the latest versions of everything.&lt;br /&gt;
&lt;br /&gt;
First update the ports tree (/usr/ports/). This can be done via [[cvsup]], [[ctm]] or [[portsnap]]. The ports can then be automatically updated using [[portupgrade]] or [[portmanager]], which are capable of dealing with dependencies.&lt;br /&gt;
&lt;br /&gt;
== How do I download updates? ==&lt;br /&gt;
&lt;br /&gt;
The most common method used is [[cvsup]] (see [[updating the ports tree]]). However, you might not be able to use it if you're behind a restrictive firewall (blocking tcp port 5999) or on a weak connection. In that case you can use [[ctm]] to obtain differential updates by email or ftp.&lt;br /&gt;
&lt;br /&gt;
For updating the ports tree, a third option is available. [[Portsnap]] is an automated tool which offers many advantages over both the other methods:&lt;br /&gt;
&lt;br /&gt;
* secure (uses cryptographic signing)&lt;br /&gt;
* very efficient in terms of bandwidth consumption and server load&lt;br /&gt;
* uses http only&lt;br /&gt;
* easy to use&lt;br /&gt;
&lt;br /&gt;
== FreeBSD Binary Upgrade 6.3 to 7.0 Notes ==&lt;br /&gt;
It's best to upgrade to 6.3 first and this is straight forward, follow: http://www.freebsd.org/releases/6.3R/announce.html&lt;br /&gt;
&lt;br /&gt;
Follow the steps on http://www.freebsd.org/releases/7.0R/announce.html until you get to portupgrade -faP.  &lt;br /&gt;
&lt;br /&gt;
I've done the upgrade now on two machines and have come across the same problem when doing the portupgrade -faP command.  You get a failure with ruby.  Please refer to my post at for the solution: http://www.bsdforums.org/forums/showthread.php?p=290929#post290929&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Common Tasks]]&lt;/div&gt;</summary>
		<author><name>165.228.0.35</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/Updating_the_system</id>
		<title>Updating the system</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/Updating_the_system"/>
				<updated>2008-03-11T03:20:04Z</updated>
		
		<summary type="html">&lt;p&gt;165.228.0.35: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Note''': If you only want to install security updates, it's enough to subscribe to [http://lists.freebsd.org/mailman/listinfo/freebsd-security-notifications FreeBSD security notifications] and follow the instructions in each advisory. Otherwise, read on.&lt;br /&gt;
&lt;br /&gt;
In FreeBSD, the base system and ports can be updated independently if desired. Here's how to do it.&lt;br /&gt;
&lt;br /&gt;
== Basic Security updates ==&lt;br /&gt;
From FreeBSD 6.X you can simply keep up to date using freebsd-update&lt;br /&gt;
&lt;br /&gt;
First time use:&lt;br /&gt;
 # freebsd-update fetch&lt;br /&gt;
 # freebsd-update install&lt;br /&gt;
&lt;br /&gt;
You can rollback in-case of problems&lt;br /&gt;
 # freebsd-update rollback&lt;br /&gt;
&lt;br /&gt;
Use the following line in your /etc/crontab to keep your machine up to date:&lt;br /&gt;
30  3   *   *   *   root /usr/sbin/freebsd-update cron -t &amp;lt;email address&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will email you when updates are available and to install them type&lt;br /&gt;
 # freebsd-update install&lt;br /&gt;
&lt;br /&gt;
== Updating the base system ==&lt;br /&gt;
&lt;br /&gt;
To upgrade to a RELEASE version of FreeBSD, you can do one of three things:&lt;br /&gt;
#Do a binary Upgrade to a release version&lt;br /&gt;
#Do a binary Upgrade using the method described &lt;br /&gt;
FreeBSD 5.4 to 6.0 [http://www.daemonology.net/freebsd-upgrade-5.4-to-6.0/ here]&lt;br /&gt;
&lt;br /&gt;
#Do a source upgrade as described [[upgrading the base system | here]]&lt;br /&gt;
&lt;br /&gt;
A binary upgrade to a release version can be done by running '''sysinstall''' from the installation medium (e.g. CDROM). See the [http://www.freebsd.org/releases/ release notes] of the release for details. Note that this will wipe out a lot of customizations.&lt;br /&gt;
&lt;br /&gt;
== Updating applications ==&lt;br /&gt;
&lt;br /&gt;
Many open-source apps are under active development, so this is something you'll probably want to do quite regularly to ensure that you have the latest versions of everything.&lt;br /&gt;
&lt;br /&gt;
First update the ports tree (/usr/ports/). This can be done via [[cvsup]], [[ctm]] or [[portsnap]]. The ports can then be automatically updated using [[portupgrade]] or [[portmanager]], which are capable of dealing with dependencies.&lt;br /&gt;
&lt;br /&gt;
== How do I download updates? ==&lt;br /&gt;
&lt;br /&gt;
The most common method used is [[cvsup]] (see [[updating the ports tree]]). However, you might not be able to use it if you're behind a restrictive firewall (blocking tcp port 5999) or on a weak connection. In that case you can use [[ctm]] to obtain differential updates by email or ftp.&lt;br /&gt;
&lt;br /&gt;
For updating the ports tree, a third option is available. [[Portsnap]] is an automated tool which offers many advantages over both the other methods:&lt;br /&gt;
&lt;br /&gt;
* secure (uses cryptographic signing)&lt;br /&gt;
* very efficient in terms of bandwidth consumption and server load&lt;br /&gt;
* uses http only&lt;br /&gt;
* easy to use&lt;br /&gt;
&lt;br /&gt;
== FreeBSD Binary Upgrade 6.3 to 7.0 Notes ==&lt;br /&gt;
It's best to upgrade to 6.3 first and this is straight forward, follow: http://www.freebsd.org/releases/6.3R/announce.html&lt;br /&gt;
&lt;br /&gt;
Follow the steps on http://www.freebsd.org/releases/7.0R/announce.html until you get to portupgrade -faP.  &lt;br /&gt;
&lt;br /&gt;
I've done the upgrade now on two machines and have come across the same problem when doing the portupgrade -faP command.  You get a failure with ruby.  Please refer to my post at for the solution: http://www.bsdforums.org/forums/showthread.php?p=290929#post290929&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Common Tasks]]&lt;/div&gt;</summary>
		<author><name>165.228.0.35</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/X_Windows_Terminal</id>
		<title>X Windows Terminal</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/X_Windows_Terminal"/>
				<updated>2007-08-31T03:16:55Z</updated>
		
		<summary type="html">&lt;p&gt;165.228.0.35: /* links */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Advantages==&lt;br /&gt;
X Windows can be used in a Server-Client relationship.  By setting up your X Windows Server you allow the use of all the programs on that computer to all the client PC's.  &lt;br /&gt;
&lt;br /&gt;
There are many advantages of running client computers in this manner:&lt;br /&gt;
* They don't even need a hard drive.  &lt;br /&gt;
* It's silent as there are no moving parts&lt;br /&gt;
* The solution saves power as your computers are very thin.&lt;br /&gt;
* Everything can be backed up centrally.&lt;br /&gt;
* Boot times for client PC's are the fastest around.&lt;br /&gt;
* Clients don't need much CPU speed, memory, etc.  Because of this they would be very cheap.  You could get away with using a Pentium 100Mhz with 32MB ram, no hard drive, no CD-ROM, no Floppy and a fanless power supply.  You just need a ethernet card with a PXEBOOT ROM. (XDM mode)&lt;br /&gt;
* Central management of applications, users, config&lt;br /&gt;
&lt;br /&gt;
==From the Beginning==&lt;br /&gt;
I've based this document on FreeBSD 6.1.&lt;br /&gt;
&lt;br /&gt;
Install FreeBSD 6.1 as per usual.&lt;br /&gt;
I've setup my mount points as this:&lt;br /&gt;
  '''Part    Mount        Size'''&lt;br /&gt;
  ad0s1b  Swap         (equal to how much memory I have in my machine)&lt;br /&gt;
  ad0s1a  /            512MB&lt;br /&gt;
  ad0s1d  /var         1G&lt;br /&gt;
  ad0s1e  /tmp         512MB&lt;br /&gt;
  ad0s1f  /usr         2GB    min.&lt;br /&gt;
          /diskless_ro 512MB&lt;br /&gt;
          /diskless_rw 1GB    min.&lt;br /&gt;
&lt;br /&gt;
I selected 'A' for auto and then deleted /usr and created /usr as 2g.&lt;br /&gt;
&lt;br /&gt;
Select User-X install. Yes to Ports if you have the room.&lt;br /&gt;
&lt;br /&gt;
Select SSH Server and NFS Server in the installation process, for the rest of the options go with the default.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
NOTE: If you forget to add any of the labels above, you will have to reboot as you cannot add labels to your boot drive when you have booted off it. So boot of the installation CD and use the configure -&amp;gt; label option in the sysinstall screen to add these labels to your boot drive.  You may need to retype the mount points for /, /var, /tmp and /usr by hitting 'm' on each label.  Once you have created these labels in the 'Disklabel Editor' then you can hit 'w' to write them to the disk.  answer 'yes' to the next question, hit 'ok' to the warning message.  Now quit and reboot. Add them to fstab (/dev/ad0s1g   /diskless_ro) &amp;amp; (/dev/ad0s1h   /diskless_rw) and mount.&lt;br /&gt;
&lt;br /&gt;
I find the best way to get this working is to break it down in to small steps and get each step working independantly.  IE: Setup NFS and see if you can mount it from another FreeBSD machine, don't just assume it will work and boot your PXE-Boot machine.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Throughout my documentation&lt;br /&gt;
&lt;br /&gt;
192.168.1.1 = the Server&lt;br /&gt;
&lt;br /&gt;
192.168.1.2 = the client (may be a full freebsd system or pxeboot)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At this point I normally install fluxbox with the following line:&lt;br /&gt;
&lt;br /&gt;
 shell# pkg_add -r fluxbox-devel&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
change your ~/.xinitrc file to the following:&lt;br /&gt;
&lt;br /&gt;
 startfluxbox&lt;br /&gt;
&lt;br /&gt;
Copy to .xsession&lt;br /&gt;
 $ ln -s ~/.xinitrc ~/.xsession&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Use the following command to update your fluxbox menus:&lt;br /&gt;
&lt;br /&gt;
 shell$ fluxbox-generate_menu&lt;br /&gt;
&lt;br /&gt;
==Running a single application==&lt;br /&gt;
&lt;br /&gt;
To get started I have my server setup running FreeBSD, with X-Windows and a few applications.  Nothing too special.  Then I have my client PC, which to start off I used the frenzy 1.0 boot CD to perform these initial tests.  You can get this from [http://frenzy.org.ua/eng/ frenzy website].  I entered into fluxbox, but you could equally use any X session.&lt;br /&gt;
You must allow incoming connections this is done with two commands&lt;br /&gt;
&lt;br /&gt;
 client$ startx -listen_tcp&lt;br /&gt;
 client$ xhost +&lt;br /&gt;
&lt;br /&gt;
This allows all computers to start applications on your client PC.  It's dangerous but good for testing everything is setup correctly.&lt;br /&gt;
&lt;br /&gt;
 client$ ssh &amp;lt;server user@server ip&amp;gt;&lt;br /&gt;
 eg: ssh mick@192.168.1.1&lt;br /&gt;
&lt;br /&gt;
 ssh$ export DISPLAY='192.168.1.2:0'&lt;br /&gt;
&lt;br /&gt;
Or if your running bash:&lt;br /&gt;
 ssh$ DISPLAY=&amp;lt;client ip&amp;gt;:&amp;lt;client display&amp;gt;; export DISPLAY&lt;br /&gt;
 eg: DISPLAY=192.168.1.2:0; export DISPLAY&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 ssh$ xcalc &amp;amp;&lt;br /&gt;
&lt;br /&gt;
This should display on your client&lt;br /&gt;
&lt;br /&gt;
==Running a whole X Windows Session (XDM)==&lt;br /&gt;
This sets up a server so that you can share your X session with any clients which want to connect.  (Simular to Terminal Services under windows)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===server===&lt;br /&gt;
edit:&lt;br /&gt;
 /usr/X11R6/lib/X11/xdm/xdm-config&lt;br /&gt;
&lt;br /&gt;
comment out with a '!' the request line&amp;lt;br&amp;gt;&lt;br /&gt;
 DisplayManager.requestPort: 0&lt;br /&gt;
&lt;br /&gt;
edit:&amp;lt;br&amp;gt;&lt;br /&gt;
 /usr/X11R6/lib/X11/xdm/Xaccess&lt;br /&gt;
&lt;br /&gt;
Enter a single asterisk any where in the file, so the contents should be one asterisk and the rest commented out.  There should be an asterisk on line 49 which you can uncomment.&lt;br /&gt;
&lt;br /&gt;
Whilst in the /usr/X11R6/lib/X11/xdm directory do these commands:&lt;br /&gt;
 shell# vi Xstartup&lt;br /&gt;
&lt;br /&gt;
Add into this file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
#&lt;br /&gt;
# Xstartup&lt;br /&gt;
#&lt;br /&gt;
# This program is run as root after the user is verified&lt;br /&gt;
#&lt;br /&gt;
if [ -f /etc/nologin ]; then&lt;br /&gt;
   xmessage -file /etc/nologin -timeout 30 -center&lt;br /&gt;
   exit 1&lt;br /&gt;
fi&lt;br /&gt;
sessreg -a -l $DISPLAY -x /usr/X11R6/lib/xdm/Xservers $LOGNAME&lt;br /&gt;
/usr/X11R6/lib/xdm/GiveConsole&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
shell# chmod +x Xstartup&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Make sure your firewall has all traffic for you lan.  (Need to know which exact ports to allow).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;run xdm on server as root&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 shell# xdm&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can put this xdm into the /etc/ttys so that it starts automatically on boot up.&lt;br /&gt;
&lt;br /&gt;
===client===&lt;br /&gt;
make sure your not in X&lt;br /&gt;
&lt;br /&gt;
type this command:&lt;br /&gt;
&lt;br /&gt;
 shell# X -broadcast&lt;br /&gt;
&lt;br /&gt;
This assumes that you are running only one server.&lt;br /&gt;
Otherwise use:&lt;br /&gt;
&lt;br /&gt;
 shell# X -query 192.168.1.1&lt;br /&gt;
&lt;br /&gt;
==DHCP - Install and setup==&lt;br /&gt;
Server setup.&lt;br /&gt;
&lt;br /&gt;
install through package&lt;br /&gt;
 # pkg_add -r isc-dhcp3-server&lt;br /&gt;
&lt;br /&gt;
We do this so we can define the root path for the diskless system.&lt;br /&gt;
&lt;br /&gt;
copy /usr/local/etc/dhcpd.conf.sample to /usr/local/etc/dhcpd.conf&lt;br /&gt;
&lt;br /&gt;
edit /usr/local/etc/dhcpd.conf and make sure it has these lines in it.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# dhcpd.conf&lt;br /&gt;
#&lt;br /&gt;
# Sample configuration file for ISC dhcpd&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
# option definitions common to all supported networks...&lt;br /&gt;
#option domain-name &amp;quot;example.org&amp;quot;;&lt;br /&gt;
#option domain-name-servers ns1.example.org, ns2.example.org;&lt;br /&gt;
&lt;br /&gt;
default-lease-time 3600;&lt;br /&gt;
max-lease-time 86400;&lt;br /&gt;
&lt;br /&gt;
# If this DHCP server is the official DHCP server for the local&lt;br /&gt;
# network, the authoritative directive should be uncommented.&lt;br /&gt;
authoritative;&lt;br /&gt;
&lt;br /&gt;
# ad-hoc DNS update scheme - set to &amp;quot;none&amp;quot; to disable dynamic DNS updates.&lt;br /&gt;
ddns-update-style none;&lt;br /&gt;
&lt;br /&gt;
option root-path &amp;quot;192.168.1.1:/diskless_ro&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
# lines added for pxeboot client&lt;br /&gt;
use-host-decl-names on;&lt;br /&gt;
next-server 192.168.1.1;&lt;br /&gt;
filename &amp;quot;pxeboot&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
# Use this to send dhcp log messages to a different log file (you also&lt;br /&gt;
# have to hack syslog.conf to complete the redirection).&lt;br /&gt;
log-facility local7;&lt;br /&gt;
&lt;br /&gt;
# No service will be given on this subnet, but declaring it helps the&lt;br /&gt;
# DHCP server to understand the network topology.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# This is a very basic subnet declaration.&lt;br /&gt;
&lt;br /&gt;
subnet 192.168.1.0 netmask 255.255.255.0 {&lt;br /&gt;
  range 192.168.1.10 192.168.1.20;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create the leases file&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# touch /var/db/dhcpd.leases&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Restart the daemon&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# killall dhcpd&lt;br /&gt;
# dhcpd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add to /etc/rc.conf&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dhcpd_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using a seperate DHCP server===&lt;br /&gt;
If you already have a DHCP server and you want to use that instead then you have to do these steps.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====On your DHCP Server====&lt;br /&gt;
1. edit /usr/local/etc/dhcpd.conf and add the following&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
authoritative;&lt;br /&gt;
ddns-update-style none;&lt;br /&gt;
&lt;br /&gt;
option root-path &amp;quot;&amp;lt;X Server IP&amp;gt;:/diskless_ro&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
# lines added for pxeboot client&lt;br /&gt;
use-host-decl-names on;&lt;br /&gt;
next-server &amp;lt;X Server IP&amp;gt;;&lt;br /&gt;
filename &amp;quot;pxeboot&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
restart dhcpd&lt;br /&gt;
 # /usr/local/etc/rc.d/isc-dhcpd.sh restart&lt;br /&gt;
&lt;br /&gt;
====Client====&lt;br /&gt;
Your client should boot now just remember that you may get a different IP now that you are talking to a different DHCP server so you have to change your exports file and copy accross a directory in /diskless_rw for the new IP.  All this is done on the X Server.&lt;br /&gt;
&lt;br /&gt;
==TFTP Setup==&lt;br /&gt;
TFTP helps us transport the kernel to the PXE-Boot machines.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# mkdir /tftpboot&lt;br /&gt;
# cp /boot/pxeboot /tftpboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Uncomment the following line in /etc/inetd.conf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tftp    dgram   udp     wait    root    /usr/libexec/tftpd      tftpd -l -s /tftpboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart the inetd service&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# killall -HUP inetd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If inetd has not started automatically do the following:&lt;br /&gt;
&lt;br /&gt;
Add the following to /etc/rc.conf&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
inetd_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now start inetd manually.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# inetd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test===&lt;br /&gt;
To test that tftp has loaded type the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# sockstat -4l | grep 69 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and you should see this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
root      inetd       13719 5   udp4    *:69                 *:*&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==NFS Setup==&lt;br /&gt;
Network File System.  Here we share all the directories from the server so that the diskless clients see these drives as if those directories were the diskless client's.&lt;br /&gt;
&lt;br /&gt;
===Server Setup===&lt;br /&gt;
If you forgot to select 'Yes' to NFS server setup in the FreeBSD installation then you have to setup the server manually like so:&lt;br /&gt;
&lt;br /&gt;
Enable NFS /etc/rc.conf&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rpcbind_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
nfs_server_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test===&lt;br /&gt;
A quick test to see if your NFS server is acting normal:&lt;br /&gt;
&lt;br /&gt;
Edit the /etc/exports and add the following&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/usr       -alldirs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This allows anyone to connect to your /usr mount.&lt;br /&gt;
&lt;br /&gt;
Now run these commands to restart and view your mounts&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# kill -HUP `cat /var/run/mountd.pid`&lt;br /&gt;
# showmount -e&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now try and mount it from a client running BSD&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# mount -t nfs 192.168.1.1:/usr /mnt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Server exports setup===&lt;br /&gt;
&lt;br /&gt;
Make directories for each IP for your clients&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /diskless_rw&lt;br /&gt;
# mkdir 192.168.1.2&lt;br /&gt;
# cd 192.168.1.2&lt;br /&gt;
# mkdir etc var&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Configure /etc/exports&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# file systems accessible only for reading:&lt;br /&gt;
# Original way of linking up the /usr&lt;br /&gt;
#/usr -ro -maproot=0 -network 192.168.1.0 -mask 255.255.255.0&lt;br /&gt;
&lt;br /&gt;
/usr -network 192.168.1.0 -mask 255.255.255.0&lt;br /&gt;
/diskless_ro -ro -maproot=0 -network 192.168.1.0 -mask 255.255.255.0&lt;br /&gt;
/diskless_rw/192.168.1.2/etc /diskless_rw/192.168.1.2/var -maproot=root 192.168.1.2&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restarting NFS&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# kill -HUP `cat /var/run/mountd.pid`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If NFS is not started yet do the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
data# rpcbind&lt;br /&gt;
data# nfsd -u -t -n 20 -h 192.168.1.1&lt;br /&gt;
data# mountd -r&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Testing to see if the exports are correct&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
data# showmount -e&lt;br /&gt;
Exports list on localhost:&lt;br /&gt;
/usr                              192.168.1.0&lt;br /&gt;
/diskless_rw/192.168.1.2/var      192.168.1.2&lt;br /&gt;
/diskless_rw/192.168.1.2/etc      192.168.1.2&lt;br /&gt;
/diskless_ro                      192.168.1.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Setup diskless_rw==&lt;br /&gt;
Create directories&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /diskless_rw/192.168.1.2/etc&lt;br /&gt;
# mkdir pam.d X11&lt;br /&gt;
&lt;br /&gt;
# cd /diskless_rw/192.168.1.2/var&lt;br /&gt;
# mkdir home log run tmp&lt;br /&gt;
# chmod 1777 tmp&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a swap file in the var directory for the client&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# dd if=/dev/zero of=/diskless_rw/192.168.1.2/var/swap bs=1k count=32000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in the /diskless_rw/&amp;lt;ip&amp;gt;/var/log directory I created the following log files so that syslogd would have files to write to:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /diskless_rw/192.168.1.2/var/log&lt;br /&gt;
# touch messages security auth.log maillog lpd-errs xferlog cron debug.log slip.log ppp.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy the following files from the systems /etc directory to /diskless_rw/&amp;lt;client ip&amp;gt;/etc&lt;br /&gt;
 # cp -Rv &amp;lt;files&amp;gt; /diskless_rw/&amp;lt;ip&amp;gt;/etc&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
auth.conf&lt;br /&gt;
disktab&lt;br /&gt;
gettytab&lt;br /&gt;
group&lt;br /&gt;
hosts&lt;br /&gt;
login.access&lt;br /&gt;
login.conf&lt;br /&gt;
login.conf.db&lt;br /&gt;
motd&lt;br /&gt;
master.passwd&lt;br /&gt;
netconfig&lt;br /&gt;
protocols&lt;br /&gt;
pam.d&lt;br /&gt;
pwd.db&lt;br /&gt;
services8&lt;br /&gt;
spwd.db&lt;br /&gt;
syslog.conf&lt;br /&gt;
termcap -&amp;gt; /usr/share/misc/termcap&lt;br /&gt;
ttys&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is a shortcut which you can just copy and paste in an xterm window.&lt;br /&gt;
 # cd /etc&lt;br /&gt;
 # cp -Rv auth.conf disktab gettytab group hosts login.access login.conf login.conf.db master.passwd motd netconfig protocols pam.d pwd.db services spwd.db syslog.conf termcap ttys /diskless_rw/&amp;lt;ip&amp;gt;/etc&lt;br /&gt;
It's very important that you copy all the files in pam.d across otherwise you will not have a password prompt on your login.&lt;br /&gt;
&lt;br /&gt;
Create a fstab in /diskless_rw/&amp;lt;ip&amp;gt;/etc&lt;br /&gt;
 # touch /diskless_rw/&amp;lt;ip&amp;gt;/etc/fstab&lt;br /&gt;
&lt;br /&gt;
==Setup diskless_ro==&lt;br /&gt;
This is the common root mount for all pxe-boot clients.&lt;br /&gt;
&lt;br /&gt;
Copy accross important directories and kernel from boot to diskless_ro&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cp -rv /bin /lib /libexec /sbin /boot /diskless_ro&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For some client machines you may have to disable the ACPI (Power management) in the /diskless_ro/boot/device.hints&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
hint.acpi.0.disabled=&amp;quot;1&amp;quot; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So we can use the systems /var/tmp and /usr/home directory make soft links to them &lt;br /&gt;
 # cd /diskless_ro&lt;br /&gt;
 # ln -s /var/tmp /usr/home&lt;br /&gt;
&lt;br /&gt;
In the /diskless_ro directory make the following directories:&lt;br /&gt;
-dev so that clients can boot without freezing&lt;br /&gt;
-var so we can mount from the /diskless_rw/&amp;lt;client ip&amp;gt;/var into the var directory&lt;br /&gt;
-etc to store some common files&lt;br /&gt;
 # mkdir usr dev var etc&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We require a few files from the systems /etc directory to be copied into the /diskless_ro/etc for common use between the thin clients.&lt;br /&gt;
 # cd /etc;&lt;br /&gt;
 # cp services netconfig login.conf /diskless_ro/etc&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===rc file===&lt;br /&gt;
The /diskless_ro/etc/rc file is the first file which is ran after the kernel has loaded.  Here we mount a the labels from the server.&lt;br /&gt;
&lt;br /&gt;
Create the /diskless_ro/etc/rc&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin; export PATH&lt;br /&gt;
TMPDIR=~/tmp;export TMPDIR&lt;br /&gt;
TMP=~/tmp;export TMP&lt;br /&gt;
&lt;br /&gt;
mount -t nfs 192.168.1.1:/usr /usr&lt;br /&gt;
&lt;br /&gt;
boot_ip=`/sbin/ifconfig | /usr/bin/grep &amp;quot;inet &amp;quot; | /usr/bin/grep -v 127.0.0.1 |&lt;br /&gt;
/usr/bin/awk '{print $2}'`&lt;br /&gt;
mount_nfs -L 192.168.1.1:/diskless_rw/${boot_ip}/etc /etc&lt;br /&gt;
mount_nfs -L 192.168.1.1:/diskless_rw/${boot_ip}/var /var&lt;br /&gt;
&lt;br /&gt;
swapon /var/swap&lt;br /&gt;
&lt;br /&gt;
#rm -rf /var/tmp/*&lt;br /&gt;
#rm -rf /var/tmp/.*&lt;br /&gt;
&lt;br /&gt;
# Option if you choose XDM terminals&lt;br /&gt;
#X -query 192.168.1.1&lt;br /&gt;
&lt;br /&gt;
. /etc/rc2&lt;br /&gt;
exit 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Remember to change 192.168.1.1 to your X server's IP&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The -L on the mount_nfs is there so we don't get flock errors.&lt;br /&gt;
&lt;br /&gt;
===rc2 file===&lt;br /&gt;
This sets up some links for libraries and the logging daemon.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
mount -a&lt;br /&gt;
/sbin/ldconfig -elf /usr/lib/compat /usr/X11R6/lib /usr/local/lib&lt;br /&gt;
&lt;br /&gt;
syslogd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now change permissions so rc can run.&lt;br /&gt;
 # chmod +x rc*&lt;br /&gt;
&lt;br /&gt;
Copy /diskless_ro/etc/rc and rc2 to /diskless_rw/&amp;lt;client ip&amp;gt;/etc&lt;br /&gt;
 # cp /diskless_ro/etc/rc* /diskless_rw/192.168.1.2/etc&lt;br /&gt;
&lt;br /&gt;
==GRUB Floppy boot (optional)==&lt;br /&gt;
&lt;br /&gt;
(would like to compile this ourselves later)&lt;br /&gt;
To get started we downloaded the image from www.hp.uab.edu/~ed/grub-net&lt;br /&gt;
&lt;br /&gt;
 shell# dd if=/data/grub-net.img of=/dev/fd0&lt;br /&gt;
&lt;br /&gt;
Then we mounted it as msdos&lt;br /&gt;
Remove/rename menu.1st from the grub directory as it was doing something funny with it.  We think that it was looking for a tftp server through our dhcp and we don't have a the dhcp setup correctly here, so we wanted to do it manually.&lt;br /&gt;
&lt;br /&gt;
Reboot off the floppy now..&lt;br /&gt;
&lt;br /&gt;
 grub&amp;gt; ifconfig --address=192.168.1.2 --mask=255.255.255.0 --gateway=192.168.1.1&lt;br /&gt;
 --server=192.168.1.2&lt;br /&gt;
&lt;br /&gt;
OR you can use dhcp&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 grub&amp;gt; dhcp&amp;lt;br&amp;gt; &lt;br /&gt;
 grub&amp;gt; tftpserver 192.168.1.2&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Setup tftp on your server, we created a directory /tftpboot. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Starting diskless system through GRUB===&lt;br /&gt;
This is an alternative boot loader.  You can use this for testing, if you don't have a pxeboot chip, otherwise skip this section.&lt;br /&gt;
&lt;br /&gt;
These commands are half working...&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 grub&amp;gt; root (nd)&amp;lt;br&amp;gt;&lt;br /&gt;
 grub&amp;gt; kernel /kernel root=ad0s1a&amp;lt;br&amp;gt;&lt;br /&gt;
 grub&amp;gt; pxeboot&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Completely Diskless System (PXEBOOT ROM) (optional)==&lt;br /&gt;
&lt;br /&gt;
Running completely diskless by booting from a Network ROM Chip.&lt;br /&gt;
&lt;br /&gt;
We have now got a Intel GD82559 Etherexpress pro/100 Card.&lt;br /&gt;
&lt;br /&gt;
When we boot up on the client machine with that card it displays:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Intel UNDI, PXE-2.0 (build 067)&amp;lt;br /&amp;gt;&lt;br /&gt;
Copyright (C) 1997-1998 Intel Corporation&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Which we cannot get working so we have read that you have to update this version to Build 82.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
copy /boot/pxeboot to /tftpboot directory we made before&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
- Downloaded proboot.exe from support.intel.com and unpacked into a windows box.&amp;lt;br /&amp;gt;&lt;br /&gt;
- Copied ibautil.exe onto a windows 98 boot disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
- Rebooted the test box after disabling network boot on the nic (otherwise it'll kick in before the floppy).&amp;lt;br /&amp;gt;&lt;br /&gt;
- Ran ibautil -iv to see what embedded image versions were available:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Intel(R) Boot Agent XG v1.0.09&amp;lt;br /&amp;gt;&lt;br /&gt;
Intel(R) Boot Agent GE v1.2.36&amp;lt;br /&amp;gt;&lt;br /&gt;
Intel(R) Boot Agent FE v4.1.19&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
- Ran ibautil -up to perform the image upgrade.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
It's interesting to note that no version showed up for out intel nic when initially running ibautil. After the upgrade, however, the version corectly showed as 4.1.19.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I made sure that I had simular features to this in my dhcpd.conf file:&amp;lt;br /&amp;gt;&lt;br /&gt;
option broadcast-address 192.168.254.255;&amp;lt;br /&amp;gt;&lt;br /&gt;
option domain-name-servers 192.168.254.3;&amp;lt;br /&amp;gt;&lt;br /&gt;
option domain-name &amp;quot;simerson.net&amp;quot;;&amp;lt;br /&amp;gt;&lt;br /&gt;
option routers 192.168.254.1;&amp;lt;br /&amp;gt;&lt;br /&gt;
option subnet-mask 255.255.255.0;&amp;lt;br /&amp;gt;&lt;br /&gt;
server-name &amp;quot;pxe-gw&amp;quot;;&amp;lt;br /&amp;gt;&lt;br /&gt;
server-identifier 192.168.254.3;&amp;lt;br /&amp;gt;&lt;br /&gt;
next-server 192.168.254.3;&amp;lt;br /&amp;gt;&lt;br /&gt;
default-lease-time -1;&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
subnet 192.168.254.0 netmask 255.255.255.0 {&amp;lt;br /&amp;gt;&lt;br /&gt;
range 192.168.254.32 192.168.254.99;&amp;lt;br /&amp;gt;&lt;br /&gt;
option root-path &amp;quot;/usr/local/export/pxe&amp;quot;;&amp;lt;br /&amp;gt;&lt;br /&gt;
filename &amp;quot;pxeboot&amp;quot;;&amp;lt;br /&amp;gt;&lt;br /&gt;
}&amp;lt;br /&amp;gt;&lt;br /&gt;
host cm.simerson.net {&amp;lt;br /&amp;gt;&lt;br /&gt;
hardware ethernet 00:e0:18:98:f0:cc;&amp;lt;br /&amp;gt;&lt;br /&gt;
fixed-address 192.168.254.126;&amp;lt;br /&amp;gt;&lt;br /&gt;
}&amp;lt;br /&amp;gt;&lt;br /&gt;
host c1.simerson.net {&amp;lt;br /&amp;gt;&lt;br /&gt;
hardware ethernet 00:60:97:0e:bb:a7;&amp;lt;br /&amp;gt;&lt;br /&gt;
fixed-address 192.168.254.131;&amp;lt;br /&amp;gt;&lt;br /&gt;
}&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==X config notes==&lt;br /&gt;
On the X server the /etc/X11/xorg.conf file is only used for the X server not the clients.&lt;br /&gt;
&lt;br /&gt;
To use this same configuration for your X Terminal Clients copy this file to /diskless_rw/&amp;lt;Client IP&amp;gt;/etc/X11 and it will use it.&lt;br /&gt;
&lt;br /&gt;
==Starting X on the client==&lt;br /&gt;
There are two ways of doing this and it depends on your hardware mainly.  &lt;br /&gt;
&lt;br /&gt;
1. run all programs on the server using the servers CPU and Memory this we will call the 'XDM Method'&lt;br /&gt;
2. run all programs from the NFS mounts using the clients CPU and Memory but the HD of the server, this we will call the 'NFS Method'&lt;br /&gt;
&lt;br /&gt;
Both methods will boot from PXE-Boot and can be diskless.&lt;br /&gt;
&lt;br /&gt;
===XDM Method===&lt;br /&gt;
Recommended for machines less than 1Ghz 256MB&lt;br /&gt;
&lt;br /&gt;
This is quite simple to setup.  Change your rc file in the /diskless_ro/etc directory to have this line at the end:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
X -query &amp;lt;server ip&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make sure on the server you setup xdm to start on system startup&lt;br /&gt;
 # vi /etc/ttys&lt;br /&gt;
&lt;br /&gt;
Search for this line:&lt;br /&gt;
 ttyv8   &amp;quot;/usr/X11R6/bin/xdm -nodaemon&amp;quot;  xterm   off secure&lt;br /&gt;
&lt;br /&gt;
and change it to:&lt;br /&gt;
 ttyv8   &amp;quot;/usr/X11R6/bin/xdm -nodaemon&amp;quot;  xterm   on secure&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also type this command at the command line on the client to test before hand.&lt;br /&gt;
&lt;br /&gt;
===NFS Method===&lt;br /&gt;
Recommended for machines over 1Ghz 256MB or if you want to utilise any of the clients devices such as local HD, USB, CD/DVD burners, etc.&lt;br /&gt;
&lt;br /&gt;
This is much trickier.&lt;br /&gt;
&lt;br /&gt;
Log in&lt;br /&gt;
Now type 'startx' at the command line.&lt;br /&gt;
&lt;br /&gt;
==Custom Kernels==&lt;br /&gt;
If you want to create custom kernels for your clients then do this:&lt;br /&gt;
&lt;br /&gt;
Create your custom kernel&lt;br /&gt;
 # cd /sys/i386/conf&lt;br /&gt;
 # cp GENERIC DISKLESS&lt;br /&gt;
 # vi DISKLESS&lt;br /&gt;
&lt;br /&gt;
Make changes and build and install&lt;br /&gt;
&lt;br /&gt;
 # cd /usr/src&lt;br /&gt;
 # make buildkernel KERNCONF=DISKLESS&lt;br /&gt;
 # make installkernel KERNCONF=DISKLESS DESTDIR=/diskless_ro&lt;br /&gt;
&lt;br /&gt;
==Convert an Existing system with standard mount points==&lt;br /&gt;
If you cannot afford to create /diskless_ro and /diskless_rw then you can use /var/diskless_ro and /usr/diskless_rw instead.  &lt;br /&gt;
&lt;br /&gt;
Use the same notes and replace /diskless_ro with /var/diskless_ro and /diskless_rw with /usr/diskless_rw.  Make sure you create these directories first.&lt;br /&gt;
&lt;br /&gt;
==todo==&lt;br /&gt;
Here are some of the jobs left to do to make this secure or generally better:&lt;br /&gt;
&lt;br /&gt;
- There must be a simplier way to set this up if your going to use XDM in the end.  IE: do we need to do half of this tutorial if we are going to run XDM.&lt;br /&gt;
&lt;br /&gt;
- When the same user logs onto two seperate machines they cannot start firefox or thunderbird as it complains about being open somewhere else.  This assumes you have firefox and thunderbird already open on both machines that you logged onto.&lt;br /&gt;
&lt;br /&gt;
===Known Issues===&lt;br /&gt;
&lt;br /&gt;
- Doesn't work with HP-COMPAQ-T5525 thin client as it doesn't want to boot, it says it's missing libfreetype.so.9 which we do have it just cannot find it for some reason.  It's trying to use the VIA chipset for graphics which is different to all the other clients I've loaded successfully so far.&lt;br /&gt;
&lt;br /&gt;
- USB mice not working instead use PS/2.  If we got this working it may help get the HP T5525 working&lt;br /&gt;
&lt;br /&gt;
===Keyboard repeating on notebooks===&lt;br /&gt;
- typing on some keyboards (like my notebook) causes double characters to display if you type too fast. - This is the notebook, if you go and set the KDE Accessabiltiy options and set the keyboard rate to 50ms, this fixes the problem.&lt;br /&gt;
&lt;br /&gt;
===USB mouse===&lt;br /&gt;
&lt;br /&gt;
Editing /etc/devd.conf file and searched for ums&lt;br /&gt;
remarked out the action line.&lt;br /&gt;
 &lt;br /&gt;
rebooted.&lt;br /&gt;
 &lt;br /&gt;
Someone off IRC suggested that I build a GENERIC xorg.conf file which has vesa, usb mouse and ps/2 mouse configurations through it.&lt;br /&gt;
 &lt;br /&gt;
I reverted everything back to normal ps/2 mouse config, copying my usb config files to the following:&lt;br /&gt;
/etc/devd.conf_usb&lt;br /&gt;
/etc/rc.conf_usb&lt;br /&gt;
/etc/X11/xorg.conf_usb&lt;br /&gt;
 &lt;br /&gt;
I think we need a seperate configuration for the HP, it uses a weird display driver.&lt;br /&gt;
&lt;br /&gt;
==links==&lt;br /&gt;
&lt;br /&gt;
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/network-diskless.html&lt;br /&gt;
&lt;br /&gt;
http://www.the-labs.com/FreeBSD/Diskless/&lt;br /&gt;
&lt;br /&gt;
http://www.nber.org/sys-admin/FreeBSD-diskless.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://wikitest.freebsd.org/MarkusBoelter&lt;br /&gt;
&lt;br /&gt;
http://www.daemonsecurity.com/pub/pxeboot/&lt;br /&gt;
&lt;br /&gt;
http://www.kano.org.uk/projects/pxe/&lt;br /&gt;
&lt;br /&gt;
File Examples:&lt;br /&gt;
&lt;br /&gt;
http://www.watson.org/~robert/freebsd/pxe/&lt;br /&gt;
&lt;br /&gt;
PXE Information&lt;br /&gt;
http://www.computerworld.com/action/article.do?command=viewArticleBasic&amp;amp;articleId=108551&lt;br /&gt;
&lt;br /&gt;
[[Category:FreeBSD_for_Workstations]]&lt;/div&gt;</summary>
		<author><name>165.228.0.35</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/Firefox</id>
		<title>Firefox</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/Firefox"/>
				<updated>2007-03-21T02:47:35Z</updated>
		
		<summary type="html">&lt;p&gt;165.228.0.35: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Firefox is a great browser and this documentation relates to version 2.01&lt;br /&gt;
&lt;br /&gt;
==Installing video plugin==&lt;br /&gt;
Install the mplayer-plugin for mozilla&lt;br /&gt;
&lt;br /&gt;
 # cd /usr/ports/www/mplayer-plugin&lt;br /&gt;
 # make install&lt;br /&gt;
&lt;br /&gt;
mplayer plugin will support:&lt;br /&gt;
&lt;br /&gt;
Window Media  wmv, avi, asf, wav and asx&lt;br /&gt;
  QuickTime  mov and smil&lt;br /&gt;
  MPEG Video and Audio  mpeg and mp3&lt;br /&gt;
  Ogg Vorbis  ogg&lt;br /&gt;
  AutoDesk FLI  fli and flc&lt;br /&gt;
  Vivo  vivo&lt;br /&gt;
  Real Player  ram and rm&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Installing Java VM plugin==&lt;br /&gt;
Install the jdk1.4.2 native port (/usr/ports/java/jdk14)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Then to add the plugin go to the directory:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /usr/X11R6/lib/browser_plugins&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
and type the following:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ln -s /usr/local/jdk1.4.2/jre/plugin/i386/ns610/libjavaplugin_oji.so&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Now you should have java VM working.  To test go to this site and wait a while for the Java VM to load:&amp;lt;br&amp;gt;&lt;br /&gt;
http://www.java.com/en/download/help/testvm.xml&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Installing flash on native firefox==&lt;br /&gt;
http://www.freebsdwiki.net/index.php/Flash#Native_Firefox&lt;br /&gt;
&lt;br /&gt;
[[Category:Ports_and_Packages]]&lt;/div&gt;</summary>
		<author><name>165.228.0.35</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/Firefox</id>
		<title>Firefox</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/Firefox"/>
				<updated>2007-03-21T02:46:28Z</updated>
		
		<summary type="html">&lt;p&gt;165.228.0.35: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Firefox is a great browser and this documentation relates to version 1.50.&lt;br /&gt;
&lt;br /&gt;
==Installing video plugin==&lt;br /&gt;
Install the mplayer-plugin for mozilla&lt;br /&gt;
&lt;br /&gt;
 # cd /usr/ports/www/mplayer-plugin&lt;br /&gt;
 # make install&lt;br /&gt;
&lt;br /&gt;
mplayer plugin will support:&lt;br /&gt;
&lt;br /&gt;
Window Media  wmv, avi, asf, wav and asx&lt;br /&gt;
  QuickTime  mov and smil&lt;br /&gt;
  MPEG Video and Audio  mpeg and mp3&lt;br /&gt;
  Ogg Vorbis  ogg&lt;br /&gt;
  AutoDesk FLI  fli and flc&lt;br /&gt;
  Vivo  vivo&lt;br /&gt;
  Real Player  ram and rm&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Installing Java VM plugin==&lt;br /&gt;
Install the jdk1.4.2 native port (/usr/ports/java/jdk14)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Then to add the plugin go to the directory:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /usr/X11R6/lib/browser_plugins&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
and type the following:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ln -s /usr/local/jdk1.4.2/jre/plugin/i386/ns610/libjavaplugin_oji.so&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Now you should have java VM working.  To test go to this site and wait a while for the Java VM to load:&amp;lt;br&amp;gt;&lt;br /&gt;
http://www.java.com/en/download/help/testvm.xml&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Ports_and_Packages]]&lt;/div&gt;</summary>
		<author><name>165.228.0.35</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/Talk:Installing_FreeBSD_with_netboot</id>
		<title>Talk:Installing FreeBSD with netboot</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/Talk:Installing_FreeBSD_with_netboot"/>
				<updated>2007-03-20T23:31:02Z</updated>
		
		<summary type="html">&lt;p&gt;165.228.0.35: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>165.228.0.35</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/Talk:Installing_FreeBSD_with_netboot</id>
		<title>Talk:Installing FreeBSD with netboot</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/Talk:Installing_FreeBSD_with_netboot"/>
				<updated>2007-03-20T23:30:24Z</updated>
		
		<summary type="html">&lt;p&gt;165.228.0.35: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Is this the same as http://www.freebsdwiki.net/index.php/X_Windows_Terminal ?&lt;/div&gt;</summary>
		<author><name>165.228.0.35</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/X_Windows_Terminal</id>
		<title>X Windows Terminal</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/X_Windows_Terminal"/>
				<updated>2006-11-01T01:12:28Z</updated>
		
		<summary type="html">&lt;p&gt;165.228.0.35: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Advantages==&lt;br /&gt;
X Windows can be used in a Server-Client relationship.  By setting up your X Windows Server you allow the use of all the programs on that computer to all the client PC's.  &lt;br /&gt;
&lt;br /&gt;
There are many advantages of running client computers in this manner:&lt;br /&gt;
* They don't even need a hard drive.  &lt;br /&gt;
* It's silent as there are no moving parts&lt;br /&gt;
* The solution saves power as your computers are very thin.&lt;br /&gt;
* Everything can be backed up centrally.&lt;br /&gt;
* Boot times for client PC's are the fastest around.&lt;br /&gt;
* Clients don't need much CPU speed, memory, etc.  Because of this they would be very cheap.  You could get away with using a Pentium 100Mhz with 32MB ram, no hard drive, no CD-ROM, no Floppy and a fanless power supply.  You just need a ethernet card with a PXEBOOT ROM. (XDM mode)&lt;br /&gt;
* Central management of applications, users, config&lt;br /&gt;
&lt;br /&gt;
==From the Beginning==&lt;br /&gt;
I've based this document on FreeBSD 6.1.&lt;br /&gt;
&lt;br /&gt;
Install FreeBSD 6.1 as per usual.&lt;br /&gt;
I've setup my mount points as this:&lt;br /&gt;
  '''Part    Mount        Size'''&lt;br /&gt;
  ad0s1b  Swap         (equal to how much memory I have in my machine)&lt;br /&gt;
  ad0s1a  /            512MB&lt;br /&gt;
  ad0s1d  /var         1G&lt;br /&gt;
  ad0s1e  /tmp         512MB&lt;br /&gt;
  ad0s1f  /usr         2GB    min.&lt;br /&gt;
          /diskless_ro 512MB&lt;br /&gt;
          /diskless_rw 1GB    min.&lt;br /&gt;
&lt;br /&gt;
I selected 'A' for auto and then deleted /usr and created /usr as 2g.&lt;br /&gt;
&lt;br /&gt;
Select User-X install. Yes to Ports if you have the room.&lt;br /&gt;
&lt;br /&gt;
Select SSH Server and NFS Server in the installation process, for the rest of the options go with the default.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
NOTE: If you forget to add any of the labels above, you will have to reboot as you cannot add labels to your boot drive when you have booted off it. So boot of the installation CD and use the configure -&amp;gt; label option in the sysinstall screen to add these labels to your boot drive.  You may need to retype the mount points for /, /var, /tmp and /usr by hitting 'm' on each label.  Once you have created these labels in the 'Disklabel Editor' then you can hit 'w' to write them to the disk.  answer 'yes' to the next question, hit 'ok' to the warning message.  Now quit and reboot. Add them to fstab (/dev/ad0s1g   /diskless_ro) &amp;amp; (/dev/ad0s1h   /diskless_rw) and mount.&lt;br /&gt;
&lt;br /&gt;
I find the best way to get this working is to break it down in to small steps and get each step working independantly.  IE: Setup NFS and see if you can mount it from another FreeBSD machine, don't just assume it will work and boot your PXE-Boot machine.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Throughout my documentation&lt;br /&gt;
&lt;br /&gt;
192.168.1.1 = the Server&lt;br /&gt;
&lt;br /&gt;
192.168.1.2 = the client (may be a full freebsd system or pxeboot)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At this point I normally install fluxbox with the following line:&lt;br /&gt;
&lt;br /&gt;
 shell# pkg_add -r fluxbox-devel&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
change your ~/.xinitrc file to the following:&lt;br /&gt;
&lt;br /&gt;
 startfluxbox&lt;br /&gt;
&lt;br /&gt;
Copy to .xsession&lt;br /&gt;
 $ ln -s ~/.xinitrc ~/.xsession&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Use the following command to update your fluxbox menus:&lt;br /&gt;
&lt;br /&gt;
 shell$ fluxbox-generate_menu&lt;br /&gt;
&lt;br /&gt;
==Running a single application==&lt;br /&gt;
&lt;br /&gt;
To get started I have my server setup running FreeBSD, with X-Windows and a few applications.  Nothing too special.  Then I have my client PC, which to start off I used the frenzy 1.0 boot CD to perform these initial tests.  You can get this from [http://frenzy.org.ua/eng/ frenzy website].  I entered into fluxbox, but you could equally use any X session.&lt;br /&gt;
You must allow incoming connections this is done with two commands&lt;br /&gt;
&lt;br /&gt;
 client$ startx -listen_tcp&lt;br /&gt;
 client$ xhost +&lt;br /&gt;
&lt;br /&gt;
This allows all computers to start applications on your client PC.  It's dangerous but good for testing everything is setup correctly.&lt;br /&gt;
&lt;br /&gt;
 client$ ssh &amp;lt;server user@server ip&amp;gt;&lt;br /&gt;
 eg: ssh mick@192.168.1.1&lt;br /&gt;
&lt;br /&gt;
 ssh$ export DISPLAY='192.168.1.2:0'&lt;br /&gt;
&lt;br /&gt;
Or if your running bash:&lt;br /&gt;
 ssh$ DISPLAY=&amp;lt;client ip&amp;gt;:&amp;lt;client display&amp;gt;; export DISPLAY&lt;br /&gt;
 eg: DISPLAY=192.168.1.2:0; export DISPLAY&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 ssh$ xcalc &amp;amp;&lt;br /&gt;
&lt;br /&gt;
This should display on your client&lt;br /&gt;
&lt;br /&gt;
==Running a whole X Windows Session (XDM)==&lt;br /&gt;
This sets up a server so that you can share your X session with any clients which want to connect.  (Simular to Terminal Services under windows)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===server===&lt;br /&gt;
edit:&lt;br /&gt;
 /usr/X11R6/lib/X11/xdm/xdm-config&lt;br /&gt;
&lt;br /&gt;
comment out with a '!' the request line&amp;lt;br&amp;gt;&lt;br /&gt;
 DisplayManager.requestPort: 0&lt;br /&gt;
&lt;br /&gt;
edit:&amp;lt;br&amp;gt;&lt;br /&gt;
 /usr/X11R6/lib/X11/xdm/Xaccess&lt;br /&gt;
&lt;br /&gt;
Enter a single asterisk any where in the file, so the contents should be one asterisk and the rest commented out.  There should be an asterisk on line 49 which you can uncomment.&lt;br /&gt;
&lt;br /&gt;
Whilst in the /usr/X11R6/lib/X11/xdm directory do these commands:&lt;br /&gt;
 shell# vi Xstartup&lt;br /&gt;
&lt;br /&gt;
Add into this file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
#&lt;br /&gt;
# Xstartup&lt;br /&gt;
#&lt;br /&gt;
# This program is run as root after the user is verified&lt;br /&gt;
#&lt;br /&gt;
if [ -f /etc/nologin ]; then&lt;br /&gt;
   xmessage -file /etc/nologin -timeout 30 -center&lt;br /&gt;
   exit 1&lt;br /&gt;
fi&lt;br /&gt;
sessreg -a -l $DISPLAY -x /usr/X11R6/lib/xdm/Xservers $LOGNAME&lt;br /&gt;
/usr/X11R6/lib/xdm/GiveConsole&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
shell# chmod +x Xstartup&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Make sure your firewall has all traffic for you lan.  (Need to know which exact ports to allow).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;run xdm on server as root&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 shell# xdm&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can put this xdm into the /etc/ttys so that it starts automatically on boot up.&lt;br /&gt;
&lt;br /&gt;
===client===&lt;br /&gt;
make sure your not in X&lt;br /&gt;
&lt;br /&gt;
type this command:&lt;br /&gt;
&lt;br /&gt;
 shell# X -broadcast&lt;br /&gt;
&lt;br /&gt;
This assumes that you are running only one server.&lt;br /&gt;
Otherwise use:&lt;br /&gt;
&lt;br /&gt;
 shell# X -query 192.168.1.1&lt;br /&gt;
&lt;br /&gt;
==DHCP - Install and setup==&lt;br /&gt;
Server setup.&lt;br /&gt;
&lt;br /&gt;
install through package&lt;br /&gt;
 # pkg_add -r isc-dhcp3-server&lt;br /&gt;
&lt;br /&gt;
We do this so we can define the root path for the diskless system.&lt;br /&gt;
&lt;br /&gt;
copy /usr/local/etc/dhcpd.conf.sample to /usr/local/etc/dhcpd.conf&lt;br /&gt;
&lt;br /&gt;
edit /usr/local/etc/dhcpd.conf and make sure it has these lines in it.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# dhcpd.conf&lt;br /&gt;
#&lt;br /&gt;
# Sample configuration file for ISC dhcpd&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
# option definitions common to all supported networks...&lt;br /&gt;
#option domain-name &amp;quot;example.org&amp;quot;;&lt;br /&gt;
#option domain-name-servers ns1.example.org, ns2.example.org;&lt;br /&gt;
&lt;br /&gt;
default-lease-time 3600;&lt;br /&gt;
max-lease-time 86400;&lt;br /&gt;
&lt;br /&gt;
# If this DHCP server is the official DHCP server for the local&lt;br /&gt;
# network, the authoritative directive should be uncommented.&lt;br /&gt;
authoritative;&lt;br /&gt;
&lt;br /&gt;
# ad-hoc DNS update scheme - set to &amp;quot;none&amp;quot; to disable dynamic DNS updates.&lt;br /&gt;
ddns-update-style none;&lt;br /&gt;
&lt;br /&gt;
option root-path &amp;quot;192.168.1.1:/diskless_ro&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
# lines added for pxeboot client&lt;br /&gt;
use-host-decl-names on;&lt;br /&gt;
next-server 192.168.1.1;&lt;br /&gt;
filename &amp;quot;pxeboot&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
# Use this to send dhcp log messages to a different log file (you also&lt;br /&gt;
# have to hack syslog.conf to complete the redirection).&lt;br /&gt;
log-facility local7;&lt;br /&gt;
&lt;br /&gt;
# No service will be given on this subnet, but declaring it helps the&lt;br /&gt;
# DHCP server to understand the network topology.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# This is a very basic subnet declaration.&lt;br /&gt;
&lt;br /&gt;
subnet 192.168.1.0 netmask 255.255.255.0 {&lt;br /&gt;
  range 192.168.1.10 192.168.1.20;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create the leases file&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# touch /var/db/dhcpd.leases&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Restart the daemon&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# killall dhcpd&lt;br /&gt;
# dhcpd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add to /etc/rc.conf&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dhcpd_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using a seperate DHCP server===&lt;br /&gt;
If you already have a DHCP server and you want to use that instead then you have to do these steps.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====On your DHCP Server====&lt;br /&gt;
1. edit /usr/local/etc/dhcpd.conf and add the following&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
authoritative;&lt;br /&gt;
ddns-update-style none;&lt;br /&gt;
&lt;br /&gt;
option root-path &amp;quot;&amp;lt;X Server IP&amp;gt;:/diskless_ro&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
# lines added for pxeboot client&lt;br /&gt;
use-host-decl-names on;&lt;br /&gt;
next-server &amp;lt;X Server IP&amp;gt;;&lt;br /&gt;
filename &amp;quot;pxeboot&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
restart dhcpd&lt;br /&gt;
 # /usr/local/etc/rc.d/isc-dhcpd.sh restart&lt;br /&gt;
&lt;br /&gt;
====Client====&lt;br /&gt;
Your client should boot now just remember that you may get a different IP now that you are talking to a different DHCP server so you have to change your exports file and copy accross a directory in /diskless_rw for the new IP.  All this is done on the X Server.&lt;br /&gt;
&lt;br /&gt;
==TFTP Setup==&lt;br /&gt;
TFTP helps us transport the kernel to the PXE-Boot machines.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# mkdir /tftpboot&lt;br /&gt;
# cp /boot/pxeboot /tftpboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Uncomment the following line in /etc/inetd.conf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tftp    dgram   udp     wait    root    /usr/libexec/tftpd      tftpd -l -s /tftpboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart the inetd service&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# killall -HUP inetd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If inetd has not started automatically do the following:&lt;br /&gt;
&lt;br /&gt;
Add the following to /etc/rc.conf&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
inetd_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now start inetd manually.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# inetd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test===&lt;br /&gt;
To test that tftp has loaded type the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# sockstat -4l | grep 69 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and you should see this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
root      inetd       13719 5   udp4    *:69                 *:*&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==NFS Setup==&lt;br /&gt;
Network File System.  Here we share all the directories from the server so that the diskless clients see these drives as if those directories were the diskless client's.&lt;br /&gt;
&lt;br /&gt;
===Server Setup===&lt;br /&gt;
If you forgot to select 'Yes' to NFS server setup in the FreeBSD installation then you have to setup the server manually like so:&lt;br /&gt;
&lt;br /&gt;
Enable NFS /etc/rc.conf&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rpcbind_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
nfs_server_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test===&lt;br /&gt;
A quick test to see if your NFS server is acting normal:&lt;br /&gt;
&lt;br /&gt;
Edit the /etc/exports and add the following&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/usr       -alldirs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This allows anyone to connect to your /usr mount.&lt;br /&gt;
&lt;br /&gt;
Now run these commands to restart and view your mounts&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# kill -HUP `cat /var/run/mountd.pid`&lt;br /&gt;
# showmount -e&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now try and mount it from a client running BSD&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# mount -t nfs 192.168.1.1:/usr /mnt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Server exports setup===&lt;br /&gt;
&lt;br /&gt;
Make directories for each IP for your clients&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /diskless_rw&lt;br /&gt;
# mkdir 192.168.1.2&lt;br /&gt;
# cd 192.168.1.2&lt;br /&gt;
# mkdir etc var&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Configure /etc/exports&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# file systems accessible only for reading:&lt;br /&gt;
# Original way of linking up the /usr&lt;br /&gt;
#/usr -ro -maproot=0 -network 192.168.1.0 -mask 255.255.255.0&lt;br /&gt;
&lt;br /&gt;
/usr -network 192.168.1.0 -mask 255.255.255.0&lt;br /&gt;
/diskless_ro -ro -maproot=0 -network 192.168.1.0 -mask 255.255.255.0&lt;br /&gt;
/diskless_rw/192.168.1.2/etc /diskless_rw/192.168.1.2/var -maproot=root 192.168.1.2&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restarting NFS&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# kill -HUP `cat /var/run/mountd.pid`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If NFS is not started yet do the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
data# rpcbind&lt;br /&gt;
data# nfsd -u -t -n 20 -h 192.168.1.1&lt;br /&gt;
data# mountd -r&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Testing to see if the exports are correct&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
data# showmount -e&lt;br /&gt;
Exports list on localhost:&lt;br /&gt;
/usr                              192.168.1.0&lt;br /&gt;
/diskless_rw/192.168.1.2/var      192.168.1.2&lt;br /&gt;
/diskless_rw/192.168.1.2/etc      192.168.1.2&lt;br /&gt;
/diskless_ro                      192.168.1.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Setup diskless_rw==&lt;br /&gt;
Create directories&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /diskless_rw/192.168.1.2/etc&lt;br /&gt;
# mkdir pam.d X11&lt;br /&gt;
&lt;br /&gt;
# cd /diskless_rw/192.168.1.2/var&lt;br /&gt;
# mkdir home log run tmp&lt;br /&gt;
# chmod 1777 tmp&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a swap file in the var directory for the client&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# dd if=/dev/zero of=/diskless_rw/192.168.1.2/var/swap bs=1k count=32000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in the /diskless_rw/&amp;lt;ip&amp;gt;/var/log directory I created the following log files so that syslogd would have files to write to:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /diskless_rw/192.168.1.2/var/log&lt;br /&gt;
# touch messages security auth.log maillog lpd-errs xferlog cron debug.log slip.log ppp.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy the following files from the systems /etc directory to /diskless_rw/&amp;lt;client ip&amp;gt;/etc&lt;br /&gt;
 # cp -Rv &amp;lt;files&amp;gt; /diskless_rw/&amp;lt;ip&amp;gt;/etc&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
auth.conf&lt;br /&gt;
disktab&lt;br /&gt;
gettytab&lt;br /&gt;
group&lt;br /&gt;
hosts&lt;br /&gt;
login.access&lt;br /&gt;
login.conf&lt;br /&gt;
login.conf.db&lt;br /&gt;
motd&lt;br /&gt;
master.passwd&lt;br /&gt;
netconfig&lt;br /&gt;
protocols&lt;br /&gt;
pam.d&lt;br /&gt;
pwd.db&lt;br /&gt;
services8&lt;br /&gt;
spwd.db&lt;br /&gt;
syslog.conf&lt;br /&gt;
termcap -&amp;gt; /usr/share/misc/termcap&lt;br /&gt;
ttys&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is a shortcut which you can just copy and paste in an xterm window.&lt;br /&gt;
 # cd /etc&lt;br /&gt;
 # cp -Rv auth.conf disktab gettytab group hosts login.access login.conf login.conf.db master.passwd motd netconfig protocols pam.d pwd.db services spwd.db syslog.conf termcap ttys /diskless_rw/&amp;lt;ip&amp;gt;/etc&lt;br /&gt;
It's very important that you copy all the files in pam.d across otherwise you will not have a password prompt on your login.&lt;br /&gt;
&lt;br /&gt;
Create a fstab in /diskless_rw/&amp;lt;ip&amp;gt;/etc&lt;br /&gt;
 # touch /diskless_rw/&amp;lt;ip&amp;gt;/etc/fstab&lt;br /&gt;
&lt;br /&gt;
==Setup diskless_ro==&lt;br /&gt;
This is the common root mount for all pxe-boot clients.&lt;br /&gt;
&lt;br /&gt;
Copy accross important directories and kernel from boot to diskless_ro&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cp -rv /bin /lib /libexec /sbin /boot /diskless_ro&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For some client machines you may have to disable the ACPI (Power management) in the /diskless_ro/boot/device.hints&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
hint.acpi.0.disabled=&amp;quot;1&amp;quot; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So we can use the systems /var/tmp and /usr/home directory make soft links to them &lt;br /&gt;
 # cd /diskless_ro&lt;br /&gt;
 # ln -s /var/tmp /usr/home&lt;br /&gt;
&lt;br /&gt;
In the /diskless_ro directory make the following directories:&lt;br /&gt;
-dev so that clients can boot without freezing&lt;br /&gt;
-var so we can mount from the /diskless_rw/&amp;lt;client ip&amp;gt;/var into the var directory&lt;br /&gt;
-etc to store some common files&lt;br /&gt;
 # mkdir usr dev var etc&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We require a few files from the systems /etc directory to be copied into the /diskless_ro/etc for common use between the thin clients.&lt;br /&gt;
 # cd /etc;&lt;br /&gt;
 # cp services netconfig login.conf /diskless_ro/etc&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===rc file===&lt;br /&gt;
The /diskless_ro/etc/rc file is the first file which is ran after the kernel has loaded.  Here we mount a the labels from the server.&lt;br /&gt;
&lt;br /&gt;
Create the /diskless_ro/etc/rc&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin; export PATH&lt;br /&gt;
TMPDIR=~/tmp;export TMPDIR&lt;br /&gt;
TMP=~/tmp;export TMP&lt;br /&gt;
&lt;br /&gt;
mount -t nfs 192.168.1.1:/usr /usr&lt;br /&gt;
&lt;br /&gt;
boot_ip=`/sbin/ifconfig | /usr/bin/grep &amp;quot;inet &amp;quot; | /usr/bin/grep -v 127.0.0.1 |&lt;br /&gt;
/usr/bin/awk '{print $2}'`&lt;br /&gt;
mount_nfs -L 192.168.1.1:/diskless_rw/${boot_ip}/etc /etc&lt;br /&gt;
mount_nfs -L 192.168.1.1:/diskless_rw/${boot_ip}/var /var&lt;br /&gt;
&lt;br /&gt;
swapon /var/swap&lt;br /&gt;
&lt;br /&gt;
#rm -rf /var/tmp/*&lt;br /&gt;
#rm -rf /var/tmp/.*&lt;br /&gt;
&lt;br /&gt;
# Option if you choose XDM terminals&lt;br /&gt;
#X -query 192.168.1.1&lt;br /&gt;
&lt;br /&gt;
. /etc/rc2&lt;br /&gt;
exit 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Remember to change 192.168.1.1 to your X server's IP&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The -L on the mount_nfs is there so we don't get flock errors.&lt;br /&gt;
&lt;br /&gt;
===rc2 file===&lt;br /&gt;
This sets up some links for libraries and the logging daemon.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
mount -a&lt;br /&gt;
/sbin/ldconfig -elf /usr/lib/compat /usr/X11R6/lib /usr/local/lib&lt;br /&gt;
&lt;br /&gt;
syslogd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now change permissions so rc can run.&lt;br /&gt;
 # chmod +x rc*&lt;br /&gt;
&lt;br /&gt;
Copy /diskless_ro/etc/rc and rc2 to /diskless_rw/&amp;lt;client ip&amp;gt;/etc&lt;br /&gt;
 # cp /diskless_ro/etc/rc* /diskless_rw/192.168.1.2/etc&lt;br /&gt;
&lt;br /&gt;
==GRUB Floppy boot (optional)==&lt;br /&gt;
&lt;br /&gt;
(would like to compile this ourselves later)&lt;br /&gt;
To get started we downloaded the image from www.hp.uab.edu/~ed/grub-net&lt;br /&gt;
&lt;br /&gt;
 shell# dd if=/data/grub-net.img of=/dev/fd0&lt;br /&gt;
&lt;br /&gt;
Then we mounted it as msdos&lt;br /&gt;
Remove/rename menu.1st from the grub directory as it was doing something funny with it.  We think that it was looking for a tftp server through our dhcp and we don't have a the dhcp setup correctly here, so we wanted to do it manually.&lt;br /&gt;
&lt;br /&gt;
Reboot off the floppy now..&lt;br /&gt;
&lt;br /&gt;
 grub&amp;gt; ifconfig --address=192.168.1.2 --mask=255.255.255.0 --gateway=192.168.1.1&lt;br /&gt;
 --server=192.168.1.2&lt;br /&gt;
&lt;br /&gt;
OR you can use dhcp&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 grub&amp;gt; dhcp&amp;lt;br&amp;gt; &lt;br /&gt;
 grub&amp;gt; tftpserver 192.168.1.2&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Setup tftp on your server, we created a directory /tftpboot. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Starting diskless system through GRUB===&lt;br /&gt;
This is an alternative boot loader.  You can use this for testing, if you don't have a pxeboot chip, otherwise skip this section.&lt;br /&gt;
&lt;br /&gt;
These commands are half working...&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 grub&amp;gt; root (nd)&amp;lt;br&amp;gt;&lt;br /&gt;
 grub&amp;gt; kernel /kernel root=ad0s1a&amp;lt;br&amp;gt;&lt;br /&gt;
 grub&amp;gt; pxeboot&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Completely Diskless System (PXEBOOT ROM) (optional)==&lt;br /&gt;
&lt;br /&gt;
Running completely diskless by booting from a Network ROM Chip.&lt;br /&gt;
&lt;br /&gt;
We have now got a Intel GD82559 Etherexpress pro/100 Card.&lt;br /&gt;
&lt;br /&gt;
When we boot up on the client machine with that card it displays:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Intel UNDI, PXE-2.0 (build 067)&amp;lt;br /&amp;gt;&lt;br /&gt;
Copyright (C) 1997-1998 Intel Corporation&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Which we cannot get working so we have read that you have to update this version to Build 82.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
copy /boot/pxeboot to /tftpboot directory we made before&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
- Downloaded proboot.exe from support.intel.com and unpacked into a windows box.&amp;lt;br /&amp;gt;&lt;br /&gt;
- Copied ibautil.exe onto a windows 98 boot disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
- Rebooted the test box after disabling network boot on the nic (otherwise it'll kick in before the floppy).&amp;lt;br /&amp;gt;&lt;br /&gt;
- Ran ibautil -iv to see what embedded image versions were available:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Intel(R) Boot Agent XG v1.0.09&amp;lt;br /&amp;gt;&lt;br /&gt;
Intel(R) Boot Agent GE v1.2.36&amp;lt;br /&amp;gt;&lt;br /&gt;
Intel(R) Boot Agent FE v4.1.19&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
- Ran ibautil -up to perform the image upgrade.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
It's interesting to note that no version showed up for out intel nic when initially running ibautil. After the upgrade, however, the version corectly showed as 4.1.19.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I made sure that I had simular features to this in my dhcpd.conf file:&amp;lt;br /&amp;gt;&lt;br /&gt;
option broadcast-address 192.168.254.255;&amp;lt;br /&amp;gt;&lt;br /&gt;
option domain-name-servers 192.168.254.3;&amp;lt;br /&amp;gt;&lt;br /&gt;
option domain-name &amp;quot;simerson.net&amp;quot;;&amp;lt;br /&amp;gt;&lt;br /&gt;
option routers 192.168.254.1;&amp;lt;br /&amp;gt;&lt;br /&gt;
option subnet-mask 255.255.255.0;&amp;lt;br /&amp;gt;&lt;br /&gt;
server-name &amp;quot;pxe-gw&amp;quot;;&amp;lt;br /&amp;gt;&lt;br /&gt;
server-identifier 192.168.254.3;&amp;lt;br /&amp;gt;&lt;br /&gt;
next-server 192.168.254.3;&amp;lt;br /&amp;gt;&lt;br /&gt;
default-lease-time -1;&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
subnet 192.168.254.0 netmask 255.255.255.0 {&amp;lt;br /&amp;gt;&lt;br /&gt;
range 192.168.254.32 192.168.254.99;&amp;lt;br /&amp;gt;&lt;br /&gt;
option root-path &amp;quot;/usr/local/export/pxe&amp;quot;;&amp;lt;br /&amp;gt;&lt;br /&gt;
filename &amp;quot;pxeboot&amp;quot;;&amp;lt;br /&amp;gt;&lt;br /&gt;
}&amp;lt;br /&amp;gt;&lt;br /&gt;
host cm.simerson.net {&amp;lt;br /&amp;gt;&lt;br /&gt;
hardware ethernet 00:e0:18:98:f0:cc;&amp;lt;br /&amp;gt;&lt;br /&gt;
fixed-address 192.168.254.126;&amp;lt;br /&amp;gt;&lt;br /&gt;
}&amp;lt;br /&amp;gt;&lt;br /&gt;
host c1.simerson.net {&amp;lt;br /&amp;gt;&lt;br /&gt;
hardware ethernet 00:60:97:0e:bb:a7;&amp;lt;br /&amp;gt;&lt;br /&gt;
fixed-address 192.168.254.131;&amp;lt;br /&amp;gt;&lt;br /&gt;
}&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==X config notes==&lt;br /&gt;
On the X server the /etc/X11/xorg.conf file is only used for the X server not the clients.&lt;br /&gt;
&lt;br /&gt;
To use this same configuration for your X Terminal Clients copy this file to /diskless_rw/&amp;lt;Client IP&amp;gt;/etc/X11 and it will use it.&lt;br /&gt;
&lt;br /&gt;
==Starting X on the client==&lt;br /&gt;
There are two ways of doing this and it depends on your hardware mainly.  &lt;br /&gt;
&lt;br /&gt;
1. run all programs on the server using the servers CPU and Memory this we will call the 'XDM Method'&lt;br /&gt;
2. run all programs from the NFS mounts using the clients CPU and Memory but the HD of the server, this we will call the 'NFS Method'&lt;br /&gt;
&lt;br /&gt;
Both methods will boot from PXE-Boot and can be diskless.&lt;br /&gt;
&lt;br /&gt;
===XDM Method===&lt;br /&gt;
Recommended for machines less than 1Ghz 256MB&lt;br /&gt;
&lt;br /&gt;
This is quite simple to setup.  Change your rc file in the /diskless_ro/etc directory to have this line at the end:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
X -query &amp;lt;server ip&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make sure on the server you setup xdm to start on system startup&lt;br /&gt;
 # vi /etc/ttys&lt;br /&gt;
&lt;br /&gt;
Search for this line:&lt;br /&gt;
 ttyv8   &amp;quot;/usr/X11R6/bin/xdm -nodaemon&amp;quot;  xterm   off secure&lt;br /&gt;
&lt;br /&gt;
and change it to:&lt;br /&gt;
 ttyv8   &amp;quot;/usr/X11R6/bin/xdm -nodaemon&amp;quot;  xterm   on secure&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also type this command at the command line on the client to test before hand.&lt;br /&gt;
&lt;br /&gt;
===NFS Method===&lt;br /&gt;
Recommended for machines over 1Ghz 256MB or if you want to utilise any of the clients devices such as local HD, USB, CD/DVD burners, etc.&lt;br /&gt;
&lt;br /&gt;
This is much trickier.&lt;br /&gt;
&lt;br /&gt;
Log in&lt;br /&gt;
Now type 'startx' at the command line.&lt;br /&gt;
&lt;br /&gt;
==Custom Kernels==&lt;br /&gt;
If you want to create custom kernels for your clients then do this:&lt;br /&gt;
&lt;br /&gt;
Create your custom kernel&lt;br /&gt;
 # cd /sys/i386/conf&lt;br /&gt;
 # cp GENERIC DISKLESS&lt;br /&gt;
 # vi DISKLESS&lt;br /&gt;
&lt;br /&gt;
Make changes and build and install&lt;br /&gt;
&lt;br /&gt;
 # cd /usr/src&lt;br /&gt;
 # make buildkernel KERNCONF=DISKLESS&lt;br /&gt;
 # make installkernel KERNCONF=DISKLESS DESTDIR=/diskless_ro&lt;br /&gt;
&lt;br /&gt;
==Convert an Existing system with standard mount points==&lt;br /&gt;
If you cannot afford to create /diskless_ro and /diskless_rw then you can use /var/diskless_ro and /usr/diskless_rw instead.  &lt;br /&gt;
&lt;br /&gt;
Use the same notes and replace /diskless_ro with /var/diskless_ro and /diskless_rw with /usr/diskless_rw.  Make sure you create these directories first.&lt;br /&gt;
&lt;br /&gt;
==todo==&lt;br /&gt;
Here are some of the jobs left to do to make this secure or generally better:&lt;br /&gt;
&lt;br /&gt;
- There must be a simplier way to set this up if your going to use XDM in the end.  IE: do we need to do half of this tutorial if we are going to run XDM.&lt;br /&gt;
&lt;br /&gt;
- When the same user logs onto two seperate machines they cannot start firefox or thunderbird as it complains about being open somewhere else.  This assumes you have firefox and thunderbird already open on both machines that you logged onto.&lt;br /&gt;
&lt;br /&gt;
===Known Issues===&lt;br /&gt;
&lt;br /&gt;
- Doesn't work with HP-COMPAQ-T5525 thin client as it doesn't want to boot, it says it's missing libfreetype.so.9 which we do have it just cannot find it for some reason.  It's trying to use the VIA chipset for graphics which is different to all the other clients I've loaded successfully so far.&lt;br /&gt;
&lt;br /&gt;
- USB mice not working instead use PS/2.  If we got this working it may help get the HP T5525 working&lt;br /&gt;
&lt;br /&gt;
===Keyboard repeating on notebooks===&lt;br /&gt;
- typing on some keyboards (like my notebook) causes double characters to display if you type too fast. - This is the notebook, if you go and set the KDE Accessabiltiy options and set the keyboard rate to 50ms, this fixes the problem.&lt;br /&gt;
&lt;br /&gt;
===USB mouse===&lt;br /&gt;
&lt;br /&gt;
Editing /etc/devd.conf file and searched for ums&lt;br /&gt;
remarked out the action line.&lt;br /&gt;
 &lt;br /&gt;
rebooted.&lt;br /&gt;
 &lt;br /&gt;
Someone off IRC suggested that I build a GENERIC xorg.conf file which has vesa, usb mouse and ps/2 mouse configurations through it.&lt;br /&gt;
 &lt;br /&gt;
I reverted everything back to normal ps/2 mouse config, copying my usb config files to the following:&lt;br /&gt;
/etc/devd.conf_usb&lt;br /&gt;
/etc/rc.conf_usb&lt;br /&gt;
/etc/X11/xorg.conf_usb&lt;br /&gt;
 &lt;br /&gt;
I think we need a seperate configuration for the HP, it uses a weird display driver.&lt;br /&gt;
&lt;br /&gt;
==links==&lt;br /&gt;
&lt;br /&gt;
http://www.onlamp.com/pub/a/bsd/2004/09/09/diskless_server.html&lt;br /&gt;
&lt;br /&gt;
http://www.onlamp.com/pub/a/bsd/2004/09/30/diskless_clients.html&lt;br /&gt;
&lt;br /&gt;
http://people.freebsd.org/~alfred/pxe/en_US.ISO8859-1/articles/pxe/article.html&lt;br /&gt;
&lt;br /&gt;
http://www.the-labs.com/FreeBSD/Diskless/&lt;br /&gt;
&lt;br /&gt;
http://www.nber.org/sys-admin/FreeBSD-diskless.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://wikitest.freebsd.org/MarkusBoelter&lt;br /&gt;
&lt;br /&gt;
http://www.daemonsecurity.com/pub/pxeboot/&lt;br /&gt;
&lt;br /&gt;
http://www.kano.org.uk/projects/pxe/&lt;br /&gt;
&lt;br /&gt;
File Examples:&lt;br /&gt;
&lt;br /&gt;
http://www.watson.org/~robert/freebsd/pxe/&lt;br /&gt;
&lt;br /&gt;
PXE Information&lt;br /&gt;
http://www.computerworld.com/action/article.do?command=viewArticleBasic&amp;amp;articleId=108551&lt;br /&gt;
&lt;br /&gt;
[[Category:FreeBSD_for_Workstations]]&lt;/div&gt;</summary>
		<author><name>165.228.0.35</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/X_Windows_Terminal</id>
		<title>X Windows Terminal</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/X_Windows_Terminal"/>
				<updated>2006-11-01T01:02:57Z</updated>
		
		<summary type="html">&lt;p&gt;165.228.0.35: /* Setup diskless_rw */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Advantages==&lt;br /&gt;
X Windows can be used in a Server-Client relationship.  By setting up your X Windows Server you allow the use of all the programs on that computer to all the client PC's.  &lt;br /&gt;
&lt;br /&gt;
There are many advantages of running client computers in this manner:&lt;br /&gt;
* They don't even need a hard drive.  &lt;br /&gt;
* It's silent as there are no moving parts&lt;br /&gt;
* The solution saves power as your computers are very thin.&lt;br /&gt;
* Everything can be backed up centrally.&lt;br /&gt;
* Boot times for client PC's are the fastest around.&lt;br /&gt;
* Clients don't need much CPU speed, memory, etc.  Because of this they would be very cheap.  You could get away with using a Pentium 100Mhz with 32MB ram, no hard drive, no CD-ROM, no Floppy and a fanless power supply.  You just need a ethernet card with a PXEBOOT ROM. (XDM mode)&lt;br /&gt;
* Central management of applications, users, config&lt;br /&gt;
&lt;br /&gt;
==From the Beginning==&lt;br /&gt;
I've based this document on FreeBSD 6.1.&lt;br /&gt;
&lt;br /&gt;
Install FreeBSD 6.1 as per usual.&lt;br /&gt;
I've setup my mount points as this:&lt;br /&gt;
  '''Part    Mount        Size'''&lt;br /&gt;
  ad0s1b  Swap         (equal to how much memory I have in my machine)&lt;br /&gt;
  ad0s1a  /            512MB&lt;br /&gt;
  ad0s1d  /var         1G&lt;br /&gt;
  ad0s1e  /tmp         512MB&lt;br /&gt;
  ad0s1f  /usr         2GB    min.&lt;br /&gt;
          /diskless_ro 512MB&lt;br /&gt;
          /diskless_rw 1GB    min.&lt;br /&gt;
&lt;br /&gt;
I selected 'A' for auto and then deleted /usr and created /usr as 2g.&lt;br /&gt;
&lt;br /&gt;
Select User-X install. Yes to Ports if you have the room.&lt;br /&gt;
&lt;br /&gt;
Select SSH Server and NFS Server in the installation process, for the rest of the options go with the default.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
NOTE: If you forget to add any of the labels above, you will have to reboot as you cannot add labels to your boot drive when you have booted off it. So boot of the installation CD and use the configure -&amp;gt; label option in the sysinstall screen to add these labels to your boot drive.  You may need to retype the mount points for /, /var, /tmp and /usr by hitting 'm' on each label.  Once you have created these labels in the 'Disklabel Editor' then you can hit 'w' to write them to the disk.  answer 'yes' to the next question, hit 'ok' to the warning message.  Now quit and reboot. Add them to fstab (/dev/ad0s1g   /diskless_ro) &amp;amp; (/dev/ad0s1h   /diskless_rw) and mount.&lt;br /&gt;
&lt;br /&gt;
I find the best way to get this working is to break it down in to small steps and get each step working independantly.  IE: Setup NFS and see if you can mount it from another FreeBSD machine, don't just assume it will work and boot your PXE-Boot machine.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Throughout my documentation&lt;br /&gt;
&lt;br /&gt;
192.168.1.1 = the Server&lt;br /&gt;
&lt;br /&gt;
192.168.1.2 = the client (may be a full freebsd system or pxeboot)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At this point I normally install fluxbox with the following line:&lt;br /&gt;
&lt;br /&gt;
 shell# pkg_add -r fluxbox-devel&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
change your ~/.xinitrc file to the following:&lt;br /&gt;
&lt;br /&gt;
 startfluxbox&lt;br /&gt;
&lt;br /&gt;
Copy to .xsession&lt;br /&gt;
 $ ln -s ~/.xinitrc ~/.xsession&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Use the following command to update your fluxbox menus:&lt;br /&gt;
&lt;br /&gt;
 shell$ fluxbox-generate_menu&lt;br /&gt;
&lt;br /&gt;
==Running a single application==&lt;br /&gt;
&lt;br /&gt;
To get started I have my server setup running FreeBSD, with X-Windows and a few applications.  Nothing too special.  Then I have my client PC, which to start off I used the frenzy 1.0 boot CD to perform these initial tests.  You can get this from [http://frenzy.org.ua/eng/ frenzy website].  I entered into fluxbox, but you could equally use any X session.&lt;br /&gt;
You must allow incoming connections this is done with two commands&lt;br /&gt;
&lt;br /&gt;
 client$ startx -listen_tcp&lt;br /&gt;
 client$ xhost +&lt;br /&gt;
&lt;br /&gt;
This allows all computers to start applications on your client PC.  It's dangerous but good for testing everything is setup correctly.&lt;br /&gt;
&lt;br /&gt;
 client$ ssh &amp;lt;server user@server ip&amp;gt;&lt;br /&gt;
 eg: ssh mick@192.168.1.1&lt;br /&gt;
&lt;br /&gt;
 ssh$ export DISPLAY='192.168.1.2:0'&lt;br /&gt;
&lt;br /&gt;
Or if your running bash:&lt;br /&gt;
 ssh$ DISPLAY=&amp;lt;client ip&amp;gt;:&amp;lt;client display&amp;gt;; export DISPLAY&lt;br /&gt;
 eg: DISPLAY=192.168.1.2:0; export DISPLAY&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 ssh$ xcalc &amp;amp;&lt;br /&gt;
&lt;br /&gt;
This should display on your client&lt;br /&gt;
&lt;br /&gt;
==Running a whole X Windows Session (XDM)==&lt;br /&gt;
This sets up a server so that you can share your X session with any clients which want to connect.  (Simular to Terminal Services under windows)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===server===&lt;br /&gt;
edit:&lt;br /&gt;
 /usr/X11R6/lib/X11/xdm/xdm-config&lt;br /&gt;
&lt;br /&gt;
comment out with a '!' the request line&amp;lt;br&amp;gt;&lt;br /&gt;
 DisplayManager.requestPort: 0&lt;br /&gt;
&lt;br /&gt;
edit:&amp;lt;br&amp;gt;&lt;br /&gt;
 /usr/X11R6/lib/X11/xdm/Xaccess&lt;br /&gt;
&lt;br /&gt;
Enter a single asterisk any where in the file, so the contents should be one asterisk and the rest commented out.  There should be an asterisk on line 49 which you can uncomment.&lt;br /&gt;
&lt;br /&gt;
Whilst in the /usr/X11R6/lib/X11/xdm directory do these commands:&lt;br /&gt;
 shell# vi Xstartup&lt;br /&gt;
&lt;br /&gt;
Add into this file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
#&lt;br /&gt;
# Xstartup&lt;br /&gt;
#&lt;br /&gt;
# This program is run as root after the user is verified&lt;br /&gt;
#&lt;br /&gt;
if [ -f /etc/nologin ]; then&lt;br /&gt;
   xmessage -file /etc/nologin -timeout 30 -center&lt;br /&gt;
   exit 1&lt;br /&gt;
fi&lt;br /&gt;
sessreg -a -l $DISPLAY -x /usr/X11R6/lib/xdm/Xservers $LOGNAME&lt;br /&gt;
/usr/X11R6/lib/xdm/GiveConsole&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
shell# chmod +x Xstartup&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Make sure your firewall has all traffic for you lan.  (Need to know which exact ports to allow).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;run xdm on server as root&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 shell# xdm&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can put this xdm into the /etc/ttys so that it starts automatically on boot up.&lt;br /&gt;
&lt;br /&gt;
===client===&lt;br /&gt;
make sure your not in X&lt;br /&gt;
&lt;br /&gt;
type this command:&lt;br /&gt;
&lt;br /&gt;
 shell# X -broadcast&lt;br /&gt;
&lt;br /&gt;
This assumes that you are running only one server.&lt;br /&gt;
Otherwise use:&lt;br /&gt;
&lt;br /&gt;
 shell# X -query 192.168.1.1&lt;br /&gt;
&lt;br /&gt;
==DHCP - Install and setup==&lt;br /&gt;
Server setup.&lt;br /&gt;
&lt;br /&gt;
install through package&lt;br /&gt;
 # pkg_add -r isc-dhcp3-server&lt;br /&gt;
&lt;br /&gt;
We do this so we can define the root path for the diskless system.&lt;br /&gt;
&lt;br /&gt;
copy /usr/local/etc/dhcpd.conf.sample to /usr/local/etc/dhcpd.conf&lt;br /&gt;
&lt;br /&gt;
edit /usr/local/etc/dhcpd.conf and make sure it has these lines in it.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# dhcpd.conf&lt;br /&gt;
#&lt;br /&gt;
# Sample configuration file for ISC dhcpd&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
# option definitions common to all supported networks...&lt;br /&gt;
#option domain-name &amp;quot;example.org&amp;quot;;&lt;br /&gt;
#option domain-name-servers ns1.example.org, ns2.example.org;&lt;br /&gt;
&lt;br /&gt;
default-lease-time 3600;&lt;br /&gt;
max-lease-time 86400;&lt;br /&gt;
&lt;br /&gt;
# If this DHCP server is the official DHCP server for the local&lt;br /&gt;
# network, the authoritative directive should be uncommented.&lt;br /&gt;
authoritative;&lt;br /&gt;
&lt;br /&gt;
# ad-hoc DNS update scheme - set to &amp;quot;none&amp;quot; to disable dynamic DNS updates.&lt;br /&gt;
ddns-update-style none;&lt;br /&gt;
&lt;br /&gt;
option root-path &amp;quot;192.168.1.1:/diskless_ro&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
# lines added for pxeboot client&lt;br /&gt;
use-host-decl-names on;&lt;br /&gt;
next-server 192.168.1.1;&lt;br /&gt;
filename &amp;quot;pxeboot&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
# Use this to send dhcp log messages to a different log file (you also&lt;br /&gt;
# have to hack syslog.conf to complete the redirection).&lt;br /&gt;
log-facility local7;&lt;br /&gt;
&lt;br /&gt;
# No service will be given on this subnet, but declaring it helps the&lt;br /&gt;
# DHCP server to understand the network topology.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# This is a very basic subnet declaration.&lt;br /&gt;
&lt;br /&gt;
subnet 192.168.1.0 netmask 255.255.255.0 {&lt;br /&gt;
  range 192.168.1.10 192.168.1.20;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create the leases file&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# touch /var/db/dhcpd.leases&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Restart the daemon&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# killall dhcpd&lt;br /&gt;
# dhcpd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add to /etc/rc.conf&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dhcpd_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using a seperate DHCP server===&lt;br /&gt;
If you already have a DHCP server and you want to use that instead then you have to do these steps.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====On your DHCP Server====&lt;br /&gt;
1. edit /usr/local/etc/dhcpd.conf and add the following&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
authoritative;&lt;br /&gt;
ddns-update-style none;&lt;br /&gt;
&lt;br /&gt;
option root-path &amp;quot;&amp;lt;X Server IP&amp;gt;:/diskless_ro&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
# lines added for pxeboot client&lt;br /&gt;
use-host-decl-names on;&lt;br /&gt;
next-server &amp;lt;X Server IP&amp;gt;;&lt;br /&gt;
filename &amp;quot;pxeboot&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
restart dhcpd&lt;br /&gt;
 # /usr/local/etc/rc.d/isc-dhcpd.sh restart&lt;br /&gt;
&lt;br /&gt;
====Client====&lt;br /&gt;
Your client should boot now just remember that you may get a different IP now that you are talking to a different DHCP server so you have to change your exports file and copy accross a directory in /diskless_rw for the new IP.  All this is done on the X Server.&lt;br /&gt;
&lt;br /&gt;
==TFTP Setup==&lt;br /&gt;
TFTP helps us transport the kernel to the PXE-Boot machines.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# mkdir /tftpboot&lt;br /&gt;
# cp /boot/pxeboot /tftpboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Uncomment the following line in /etc/inetd.conf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tftp    dgram   udp     wait    root    /usr/libexec/tftpd      tftpd -l -s /tftpboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart the inetd service&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# killall -HUP inetd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If inetd has not started automatically do the following:&lt;br /&gt;
&lt;br /&gt;
Add the following to /etc/rc.conf&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
inetd_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now start inetd manually.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# inetd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test===&lt;br /&gt;
To test that tftp has loaded type the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# sockstat -4l | grep 69 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and you should see this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
root      inetd       13719 5   udp4    *:69                 *:*&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==NFS Setup==&lt;br /&gt;
Network File System.  Here we share all the directories from the server so that the diskless clients see these drives as if those directories were the diskless client's.&lt;br /&gt;
&lt;br /&gt;
===Server Setup===&lt;br /&gt;
If you forgot to select 'Yes' to NFS server setup in the FreeBSD installation then you have to setup the server manually like so:&lt;br /&gt;
&lt;br /&gt;
Enable NFS /etc/rc.conf&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rpcbind_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
nfs_server_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test===&lt;br /&gt;
A quick test to see if your NFS server is acting normal:&lt;br /&gt;
&lt;br /&gt;
Edit the /etc/exports and add the following&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/usr       -alldirs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This allows anyone to connect to your /usr mount.&lt;br /&gt;
&lt;br /&gt;
Now run these commands to restart and view your mounts&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# kill -HUP `cat /var/run/mountd.pid`&lt;br /&gt;
# showmount -e&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now try and mount it from a client running BSD&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# mount -t nfs 192.168.1.1:/usr /mnt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Server exports setup===&lt;br /&gt;
&lt;br /&gt;
Make directories for each IP for your clients&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /diskless_rw&lt;br /&gt;
# mkdir 192.168.1.2&lt;br /&gt;
# cd 192.168.1.2&lt;br /&gt;
# mkdir etc var&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Configure /etc/exports&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# file systems accessible only for reading:&lt;br /&gt;
# Original way of linking up the /usr&lt;br /&gt;
#/usr -ro -maproot=0 -network 192.168.1.0 -mask 255.255.255.0&lt;br /&gt;
&lt;br /&gt;
/usr -network 192.168.1.0 -mask 255.255.255.0&lt;br /&gt;
/diskless_ro -ro -maproot=0 -network 192.168.1.0 -mask 255.255.255.0&lt;br /&gt;
/diskless_rw/192.168.1.2/etc /diskless_rw/192.168.1.2/var -maproot=root 192.168.1.2&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restarting NFS&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# kill -HUP `cat /var/run/mountd.pid`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If NFS is not started yet do the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
data# rpcbind&lt;br /&gt;
data# nfsd -u -t -n 20 -h 192.168.1.1&lt;br /&gt;
data# mountd -r&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Testing to see if the exports are correct&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
data# showmount -e&lt;br /&gt;
Exports list on localhost:&lt;br /&gt;
/usr                              192.168.1.0&lt;br /&gt;
/diskless_rw/192.168.1.2/var      192.168.1.2&lt;br /&gt;
/diskless_rw/192.168.1.2/etc      192.168.1.2&lt;br /&gt;
/diskless_ro                      192.168.1.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Setup diskless_rw==&lt;br /&gt;
Create directories&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /diskless_rw/192.168.1.2/etc&lt;br /&gt;
# mkdir pam.d X11&lt;br /&gt;
&lt;br /&gt;
# cd /diskless_rw/192.168.1.2/var&lt;br /&gt;
# mkdir home log run tmp&lt;br /&gt;
# chmod 1777 tmp&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a swap file in the var directory for the client&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# dd if=/dev/zero of=/diskless_rw/192.168.1.2/var/swap bs=1k count=32000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in the /diskless_rw/&amp;lt;ip&amp;gt;/var/log directory I created the following log files so that syslogd would have files to write to:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /diskless_rw/192.168.1.2/var/log&lt;br /&gt;
# touch messages security auth.log maillog lpd-errs xferlog cron debug.log slip.log ppp.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy the following files from the systems /etc directory to /diskless_rw/&amp;lt;client ip&amp;gt;/etc&lt;br /&gt;
 # cp -Rv &amp;lt;files&amp;gt; /diskless_rw/&amp;lt;ip&amp;gt;/etc&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
auth.conf&lt;br /&gt;
disktab&lt;br /&gt;
gettytab&lt;br /&gt;
group&lt;br /&gt;
hosts&lt;br /&gt;
login.access&lt;br /&gt;
login.conf&lt;br /&gt;
login.conf.db&lt;br /&gt;
motd&lt;br /&gt;
master.passwd&lt;br /&gt;
netconfig&lt;br /&gt;
protocols&lt;br /&gt;
pam.d&lt;br /&gt;
pwd.db&lt;br /&gt;
services8&lt;br /&gt;
spwd.db&lt;br /&gt;
syslog.conf&lt;br /&gt;
termcap -&amp;gt; /usr/share/misc/termcap&lt;br /&gt;
ttys&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is a shortcut which you can just copy and paste in an xterm window.&lt;br /&gt;
 # cd /etc&lt;br /&gt;
 # cp -Rv auth.conf disktab gettytab group hosts login.access login.conf login.conf.db master.passwd motd netconfig protocols pam.d pwd.db services spwd.db syslog.conf termcap ttys /diskless_rw/&amp;lt;ip&amp;gt;/etc&lt;br /&gt;
It's very important that you copy all the files in pam.d across otherwise you will not have a password prompt on your login.&lt;br /&gt;
&lt;br /&gt;
Create a fstab in /diskless_rw/&amp;lt;ip&amp;gt;/etc&lt;br /&gt;
 # touch /diskless_rw/&amp;lt;ip&amp;gt;/etc/fstab&lt;br /&gt;
&lt;br /&gt;
==Setup diskless_ro==&lt;br /&gt;
This is the common root mount for all pxe-boot clients.&lt;br /&gt;
&lt;br /&gt;
Copy accross important directories and kernel from boot to diskless_ro&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cp -rv /bin /lib /libexec /sbin /boot /diskless_ro&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For some client machines you may have to disable the ACPI (Power management) in the /diskless_ro/boot/device.hints&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
hint.acpi.0.disabled=&amp;quot;1&amp;quot; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So we can use the systems /var/tmp and /usr/home directory make soft links to them &lt;br /&gt;
 # cd /diskless_ro&lt;br /&gt;
 # ln -s /var/tmp /usr/home&lt;br /&gt;
&lt;br /&gt;
In the /diskless_ro directory make the following directories:&lt;br /&gt;
-dev so that clients can boot without freezing&lt;br /&gt;
-var so we can mount from the /diskless_rw/&amp;lt;client ip&amp;gt;/var into the var directory&lt;br /&gt;
-etc to store some common files&lt;br /&gt;
 # mkdir usr dev var etc&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We require a few files from the systems /etc directory to be copied into the /diskless_ro/etc for common use between the thin clients.&lt;br /&gt;
 # cd /etc;&lt;br /&gt;
 # cp services netconfig login.conf /diskless_ro/etc&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===rc file===&lt;br /&gt;
The /diskless_ro/etc/rc file is the first file which is ran after the kernel has loaded.  Here we mount a the labels from the server.&lt;br /&gt;
&lt;br /&gt;
Create the /diskless_ro/etc/rc&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin; export PATH&lt;br /&gt;
TMPDIR=~/tmp;export TMPDIR&lt;br /&gt;
TMP=~/tmp;export TMP&lt;br /&gt;
&lt;br /&gt;
mount -t nfs 192.168.1.1:/usr /usr&lt;br /&gt;
&lt;br /&gt;
boot_ip=`/sbin/ifconfig | /usr/bin/grep &amp;quot;inet &amp;quot; | /usr/bin/grep -v 127.0.0.1 |&lt;br /&gt;
/usr/bin/awk '{print $2}'`&lt;br /&gt;
mount_nfs -L 192.168.1.1:/diskless_rw/${boot_ip}/etc /etc&lt;br /&gt;
mount_nfs -L 192.168.1.1:/diskless_rw/${boot_ip}/var /var&lt;br /&gt;
&lt;br /&gt;
swapon /var/swap&lt;br /&gt;
&lt;br /&gt;
#rm -rf /var/tmp/*&lt;br /&gt;
#rm -rf /var/tmp/.*&lt;br /&gt;
&lt;br /&gt;
# Option if you choose XDM terminals&lt;br /&gt;
#X -query 192.168.1.1&lt;br /&gt;
&lt;br /&gt;
. /etc/rc2&lt;br /&gt;
exit 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Remember to change 192.168.1.1 to your X server's IP&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The -L on the mount_nfs is there so we don't get flock errors.&lt;br /&gt;
&lt;br /&gt;
===rc2 file===&lt;br /&gt;
This sets up some links for libraries and the logging daemon.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
mount -a&lt;br /&gt;
/sbin/ldconfig -elf /usr/lib/compat /usr/X11R6/lib /usr/local/lib&lt;br /&gt;
&lt;br /&gt;
syslogd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now change permissions so rc can run.&lt;br /&gt;
 # chmod +x rc*&lt;br /&gt;
&lt;br /&gt;
Copy /diskless_ro/etc/rc and rc2 to /diskless_rw/&amp;lt;client ip&amp;gt;/etc&lt;br /&gt;
 # cp /diskless_ro/etc/rc* /diskless_rw/192.168.1.2/etc&lt;br /&gt;
&lt;br /&gt;
==GRUB Floppy boot (optional)==&lt;br /&gt;
&lt;br /&gt;
(would like to compile this ourselves later)&lt;br /&gt;
To get started we downloaded the image from www.hp.uab.edu/~ed/grub-net&lt;br /&gt;
&lt;br /&gt;
 shell# dd if=/data/grub-net.img of=/dev/fd0&lt;br /&gt;
&lt;br /&gt;
Then we mounted it as msdos&lt;br /&gt;
Remove/rename menu.1st from the grub directory as it was doing something funny with it.  We think that it was looking for a tftp server through our dhcp and we don't have a the dhcp setup correctly here, so we wanted to do it manually.&lt;br /&gt;
&lt;br /&gt;
Reboot off the floppy now..&lt;br /&gt;
&lt;br /&gt;
 grub&amp;gt; ifconfig --address=192.168.1.2 --mask=255.255.255.0 --gateway=192.168.1.1&lt;br /&gt;
 --server=192.168.1.2&lt;br /&gt;
&lt;br /&gt;
OR you can use dhcp&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 grub&amp;gt; dhcp&amp;lt;br&amp;gt; &lt;br /&gt;
 grub&amp;gt; tftpserver 192.168.1.2&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Setup tftp on your server, we created a directory /tftpboot. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Starting diskless system through GRUB===&lt;br /&gt;
This is an alternative boot loader.  You can use this for testing, if you don't have a pxeboot chip, otherwise skip this section.&lt;br /&gt;
&lt;br /&gt;
These commands are half working...&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 grub&amp;gt; root (nd)&amp;lt;br&amp;gt;&lt;br /&gt;
 grub&amp;gt; kernel /kernel root=ad0s1a&amp;lt;br&amp;gt;&lt;br /&gt;
 grub&amp;gt; pxeboot&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Completely Diskless System (PXEBOOT ROM) (optional)==&lt;br /&gt;
&lt;br /&gt;
Running completely diskless by booting from a Network ROM Chip.&lt;br /&gt;
&lt;br /&gt;
We have now got a Intel GD82559 Etherexpress pro/100 Card.&lt;br /&gt;
&lt;br /&gt;
When we boot up on the client machine with that card it displays:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Intel UNDI, PXE-2.0 (build 067)&amp;lt;br /&amp;gt;&lt;br /&gt;
Copyright (C) 1997-1998 Intel Corporation&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Which we cannot get working so we have read that you have to update this version to Build 82.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
copy /boot/pxeboot to /tftpboot directory we made before&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
- Downloaded proboot.exe from support.intel.com and unpacked into a windows box.&amp;lt;br /&amp;gt;&lt;br /&gt;
- Copied ibautil.exe onto a windows 98 boot disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
- Rebooted the test box after disabling network boot on the nic (otherwise it'll kick in before the floppy).&amp;lt;br /&amp;gt;&lt;br /&gt;
- Ran ibautil -iv to see what embedded image versions were available:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Intel(R) Boot Agent XG v1.0.09&amp;lt;br /&amp;gt;&lt;br /&gt;
Intel(R) Boot Agent GE v1.2.36&amp;lt;br /&amp;gt;&lt;br /&gt;
Intel(R) Boot Agent FE v4.1.19&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
- Ran ibautil -up to perform the image upgrade.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
It's interesting to note that no version showed up for out intel nic when initially running ibautil. After the upgrade, however, the version corectly showed as 4.1.19.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I made sure that I had simular features to this in my dhcpd.conf file:&amp;lt;br /&amp;gt;&lt;br /&gt;
option broadcast-address 192.168.254.255;&amp;lt;br /&amp;gt;&lt;br /&gt;
option domain-name-servers 192.168.254.3;&amp;lt;br /&amp;gt;&lt;br /&gt;
option domain-name &amp;quot;simerson.net&amp;quot;;&amp;lt;br /&amp;gt;&lt;br /&gt;
option routers 192.168.254.1;&amp;lt;br /&amp;gt;&lt;br /&gt;
option subnet-mask 255.255.255.0;&amp;lt;br /&amp;gt;&lt;br /&gt;
server-name &amp;quot;pxe-gw&amp;quot;;&amp;lt;br /&amp;gt;&lt;br /&gt;
server-identifier 192.168.254.3;&amp;lt;br /&amp;gt;&lt;br /&gt;
next-server 192.168.254.3;&amp;lt;br /&amp;gt;&lt;br /&gt;
default-lease-time -1;&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
subnet 192.168.254.0 netmask 255.255.255.0 {&amp;lt;br /&amp;gt;&lt;br /&gt;
range 192.168.254.32 192.168.254.99;&amp;lt;br /&amp;gt;&lt;br /&gt;
option root-path &amp;quot;/usr/local/export/pxe&amp;quot;;&amp;lt;br /&amp;gt;&lt;br /&gt;
filename &amp;quot;pxeboot&amp;quot;;&amp;lt;br /&amp;gt;&lt;br /&gt;
}&amp;lt;br /&amp;gt;&lt;br /&gt;
host cm.simerson.net {&amp;lt;br /&amp;gt;&lt;br /&gt;
hardware ethernet 00:e0:18:98:f0:cc;&amp;lt;br /&amp;gt;&lt;br /&gt;
fixed-address 192.168.254.126;&amp;lt;br /&amp;gt;&lt;br /&gt;
}&amp;lt;br /&amp;gt;&lt;br /&gt;
host c1.simerson.net {&amp;lt;br /&amp;gt;&lt;br /&gt;
hardware ethernet 00:60:97:0e:bb:a7;&amp;lt;br /&amp;gt;&lt;br /&gt;
fixed-address 192.168.254.131;&amp;lt;br /&amp;gt;&lt;br /&gt;
}&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==X config notes==&lt;br /&gt;
On the X server the /etc/X11/xorg.conf file is only used for the X server not the clients.&lt;br /&gt;
&lt;br /&gt;
To use this same configuration for your X Terminal Clients copy this file to /diskless_rw/&amp;lt;Client IP&amp;gt;/etc/X11 and it will use it.&lt;br /&gt;
&lt;br /&gt;
==Starting X on the client==&lt;br /&gt;
There are two ways of doing this and it depends on your hardware mainly.  &lt;br /&gt;
&lt;br /&gt;
1. run all programs on the server using the servers CPU and Memory this we will call the 'XDM Method'&lt;br /&gt;
2. run all programs from the NFS mounts using the clients CPU and Memory but the HD of the server, this we will call the 'NFS Method'&lt;br /&gt;
&lt;br /&gt;
Both methods will boot from PXE-Boot and can be diskless.&lt;br /&gt;
&lt;br /&gt;
===XDM Method===&lt;br /&gt;
Recommended for machines less than 1Ghz 256MB&lt;br /&gt;
&lt;br /&gt;
This is quite simple to setup.  Change your rc file in the /diskless_ro/etc directory to have this line at the end:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
X -query &amp;lt;server ip&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make sure on the server you setup xdm to start on system startup&lt;br /&gt;
 # vi /etc/ttys&lt;br /&gt;
&lt;br /&gt;
Search for this line:&lt;br /&gt;
 ttyv8   &amp;quot;/usr/X11R6/bin/xdm -nodaemon&amp;quot;  xterm   off secure&lt;br /&gt;
&lt;br /&gt;
and change it to:&lt;br /&gt;
 ttyv8   &amp;quot;/usr/X11R6/bin/xdm -nodaemon&amp;quot;  xterm   on secure&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also type this command at the command line on the client to test before hand.&lt;br /&gt;
&lt;br /&gt;
===NFS Method===&lt;br /&gt;
Recommended for machines over 1Ghz 256MB or if you want to utilise any of the clients devices such as local HD, USB, CD/DVD burners, etc.&lt;br /&gt;
&lt;br /&gt;
This is much trickier.&lt;br /&gt;
&lt;br /&gt;
Log in&lt;br /&gt;
Now type 'startx' at the command line.&lt;br /&gt;
&lt;br /&gt;
==Custom Kernels==&lt;br /&gt;
If you want to create custom kernels for your clients then do this:&lt;br /&gt;
&lt;br /&gt;
Create your custom kernel&lt;br /&gt;
 # cd /sys/i386/conf&lt;br /&gt;
 # cp GENERIC DISKLESS&lt;br /&gt;
 # vi DISKLESS&lt;br /&gt;
&lt;br /&gt;
Make changes and build and install&lt;br /&gt;
&lt;br /&gt;
 # cd /usr/src&lt;br /&gt;
 # make buildkernel KERNCONF=DISKLESS&lt;br /&gt;
 # make installkernel KERNCONF=DISKLESS DESTDIR=/diskless_ro&lt;br /&gt;
&lt;br /&gt;
==todo==&lt;br /&gt;
Here are some of the jobs left to do to make this secure or generally better:&lt;br /&gt;
&lt;br /&gt;
- There must be a simplier way to set this up if your going to use XDM in the end.  IE: do we need to do half of this tutorial if we are going to run XDM.&lt;br /&gt;
&lt;br /&gt;
- When the same user logs onto two seperate machines they cannot start firefox or thunderbird as it complains about being open somewhere else.  This assumes you have firefox and thunderbird already open on both machines that you logged onto.&lt;br /&gt;
&lt;br /&gt;
===Known Issues===&lt;br /&gt;
&lt;br /&gt;
- Doesn't work with HP-COMPAQ-T5525 thin client as it doesn't want to boot, it says it's missing libfreetype.so.9 which we do have it just cannot find it for some reason.  It's trying to use the VIA chipset for graphics which is different to all the other clients I've loaded successfully so far.&lt;br /&gt;
&lt;br /&gt;
- USB mice not working instead use PS/2.  If we got this working it may help get the HP T5525 working&lt;br /&gt;
&lt;br /&gt;
===Keyboard repeating on notebooks===&lt;br /&gt;
- typing on some keyboards (like my notebook) causes double characters to display if you type too fast. - This is the notebook, if you go and set the KDE Accessabiltiy options and set the keyboard rate to 50ms, this fixes the problem.&lt;br /&gt;
&lt;br /&gt;
===USB mouse===&lt;br /&gt;
&lt;br /&gt;
Editing /etc/devd.conf file and searched for ums&lt;br /&gt;
remarked out the action line.&lt;br /&gt;
 &lt;br /&gt;
rebooted.&lt;br /&gt;
 &lt;br /&gt;
Someone off IRC suggested that I build a GENERIC xorg.conf file which has vesa, usb mouse and ps/2 mouse configurations through it.&lt;br /&gt;
 &lt;br /&gt;
I reverted everything back to normal ps/2 mouse config, copying my usb config files to the following:&lt;br /&gt;
/etc/devd.conf_usb&lt;br /&gt;
/etc/rc.conf_usb&lt;br /&gt;
/etc/X11/xorg.conf_usb&lt;br /&gt;
 &lt;br /&gt;
I think we need a seperate configuration for the HP, it uses a weird display driver.&lt;br /&gt;
&lt;br /&gt;
==links==&lt;br /&gt;
&lt;br /&gt;
http://www.onlamp.com/pub/a/bsd/2004/09/09/diskless_server.html&lt;br /&gt;
&lt;br /&gt;
http://www.onlamp.com/pub/a/bsd/2004/09/30/diskless_clients.html&lt;br /&gt;
&lt;br /&gt;
http://people.freebsd.org/~alfred/pxe/en_US.ISO8859-1/articles/pxe/article.html&lt;br /&gt;
&lt;br /&gt;
http://www.the-labs.com/FreeBSD/Diskless/&lt;br /&gt;
&lt;br /&gt;
http://www.nber.org/sys-admin/FreeBSD-diskless.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://wikitest.freebsd.org/MarkusBoelter&lt;br /&gt;
&lt;br /&gt;
http://www.daemonsecurity.com/pub/pxeboot/&lt;br /&gt;
&lt;br /&gt;
http://www.kano.org.uk/projects/pxe/&lt;br /&gt;
&lt;br /&gt;
File Examples:&lt;br /&gt;
&lt;br /&gt;
http://www.watson.org/~robert/freebsd/pxe/&lt;br /&gt;
&lt;br /&gt;
PXE Information&lt;br /&gt;
http://www.computerworld.com/action/article.do?command=viewArticleBasic&amp;amp;articleId=108551&lt;br /&gt;
&lt;br /&gt;
[[Category:FreeBSD_for_Workstations]]&lt;/div&gt;</summary>
		<author><name>165.228.0.35</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/X_Windows_Terminal</id>
		<title>X Windows Terminal</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/X_Windows_Terminal"/>
				<updated>2006-11-01T00:35:56Z</updated>
		
		<summary type="html">&lt;p&gt;165.228.0.35: /* On your DHCP Server */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Advantages==&lt;br /&gt;
X Windows can be used in a Server-Client relationship.  By setting up your X Windows Server you allow the use of all the programs on that computer to all the client PC's.  &lt;br /&gt;
&lt;br /&gt;
There are many advantages of running client computers in this manner:&lt;br /&gt;
* They don't even need a hard drive.  &lt;br /&gt;
* It's silent as there are no moving parts&lt;br /&gt;
* The solution saves power as your computers are very thin.&lt;br /&gt;
* Everything can be backed up centrally.&lt;br /&gt;
* Boot times for client PC's are the fastest around.&lt;br /&gt;
* Clients don't need much CPU speed, memory, etc.  Because of this they would be very cheap.  You could get away with using a Pentium 100Mhz with 32MB ram, no hard drive, no CD-ROM, no Floppy and a fanless power supply.  You just need a ethernet card with a PXEBOOT ROM. (XDM mode)&lt;br /&gt;
* Central management of applications, users, config&lt;br /&gt;
&lt;br /&gt;
==From the Beginning==&lt;br /&gt;
I've based this document on FreeBSD 6.1.&lt;br /&gt;
&lt;br /&gt;
Install FreeBSD 6.1 as per usual.&lt;br /&gt;
I've setup my mount points as this:&lt;br /&gt;
  '''Part    Mount        Size'''&lt;br /&gt;
  ad0s1b  Swap         (equal to how much memory I have in my machine)&lt;br /&gt;
  ad0s1a  /            512MB&lt;br /&gt;
  ad0s1d  /var         1G&lt;br /&gt;
  ad0s1e  /tmp         512MB&lt;br /&gt;
  ad0s1f  /usr         2GB    min.&lt;br /&gt;
          /diskless_ro 512MB&lt;br /&gt;
          /diskless_rw 1GB    min.&lt;br /&gt;
&lt;br /&gt;
I selected 'A' for auto and then deleted /usr and created /usr as 2g.&lt;br /&gt;
&lt;br /&gt;
Select User-X install. Yes to Ports if you have the room.&lt;br /&gt;
&lt;br /&gt;
Select SSH Server and NFS Server in the installation process, for the rest of the options go with the default.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
NOTE: If you forget to add any of the labels above, you will have to reboot as you cannot add labels to your boot drive when you have booted off it. So boot of the installation CD and use the configure -&amp;gt; label option in the sysinstall screen to add these labels to your boot drive.  You may need to retype the mount points for /, /var, /tmp and /usr by hitting 'm' on each label.  Once you have created these labels in the 'Disklabel Editor' then you can hit 'w' to write them to the disk.  answer 'yes' to the next question, hit 'ok' to the warning message.  Now quit and reboot. Add them to fstab (/dev/ad0s1g   /diskless_ro) &amp;amp; (/dev/ad0s1h   /diskless_rw) and mount.&lt;br /&gt;
&lt;br /&gt;
I find the best way to get this working is to break it down in to small steps and get each step working independantly.  IE: Setup NFS and see if you can mount it from another FreeBSD machine, don't just assume it will work and boot your PXE-Boot machine.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Throughout my documentation&lt;br /&gt;
&lt;br /&gt;
192.168.1.1 = the Server&lt;br /&gt;
&lt;br /&gt;
192.168.1.2 = the client (may be a full freebsd system or pxeboot)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At this point I normally install fluxbox with the following line:&lt;br /&gt;
&lt;br /&gt;
 shell# pkg_add -r fluxbox-devel&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
change your ~/.xinitrc file to the following:&lt;br /&gt;
&lt;br /&gt;
 startfluxbox&lt;br /&gt;
&lt;br /&gt;
Copy to .xsession&lt;br /&gt;
 $ ln -s ~/.xinitrc ~/.xsession&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Use the following command to update your fluxbox menus:&lt;br /&gt;
&lt;br /&gt;
 shell$ fluxbox-generate_menu&lt;br /&gt;
&lt;br /&gt;
==Running a single application==&lt;br /&gt;
&lt;br /&gt;
To get started I have my server setup running FreeBSD, with X-Windows and a few applications.  Nothing too special.  Then I have my client PC, which to start off I used the frenzy 1.0 boot CD to perform these initial tests.  You can get this from [http://frenzy.org.ua/eng/ frenzy website].  I entered into fluxbox, but you could equally use any X session.&lt;br /&gt;
You must allow incoming connections this is done with two commands&lt;br /&gt;
&lt;br /&gt;
 client$ startx -listen_tcp&lt;br /&gt;
 client$ xhost +&lt;br /&gt;
&lt;br /&gt;
This allows all computers to start applications on your client PC.  It's dangerous but good for testing everything is setup correctly.&lt;br /&gt;
&lt;br /&gt;
 client$ ssh &amp;lt;server user@server ip&amp;gt;&lt;br /&gt;
 eg: ssh mick@192.168.1.1&lt;br /&gt;
&lt;br /&gt;
 ssh$ export DISPLAY='192.168.1.2:0'&lt;br /&gt;
&lt;br /&gt;
Or if your running bash:&lt;br /&gt;
 ssh$ DISPLAY=&amp;lt;client ip&amp;gt;:&amp;lt;client display&amp;gt;; export DISPLAY&lt;br /&gt;
 eg: DISPLAY=192.168.1.2:0; export DISPLAY&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 ssh$ xcalc &amp;amp;&lt;br /&gt;
&lt;br /&gt;
This should display on your client&lt;br /&gt;
&lt;br /&gt;
==Running a whole X Windows Session (XDM)==&lt;br /&gt;
This sets up a server so that you can share your X session with any clients which want to connect.  (Simular to Terminal Services under windows)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===server===&lt;br /&gt;
edit:&lt;br /&gt;
 /usr/X11R6/lib/X11/xdm/xdm-config&lt;br /&gt;
&lt;br /&gt;
comment out with a '!' the request line&amp;lt;br&amp;gt;&lt;br /&gt;
 DisplayManager.requestPort: 0&lt;br /&gt;
&lt;br /&gt;
edit:&amp;lt;br&amp;gt;&lt;br /&gt;
 /usr/X11R6/lib/X11/xdm/Xaccess&lt;br /&gt;
&lt;br /&gt;
Enter a single asterisk any where in the file, so the contents should be one asterisk and the rest commented out.  There should be an asterisk on line 49 which you can uncomment.&lt;br /&gt;
&lt;br /&gt;
Whilst in the /usr/X11R6/lib/X11/xdm directory do these commands:&lt;br /&gt;
 shell# vi Xstartup&lt;br /&gt;
&lt;br /&gt;
Add into this file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
#&lt;br /&gt;
# Xstartup&lt;br /&gt;
#&lt;br /&gt;
# This program is run as root after the user is verified&lt;br /&gt;
#&lt;br /&gt;
if [ -f /etc/nologin ]; then&lt;br /&gt;
   xmessage -file /etc/nologin -timeout 30 -center&lt;br /&gt;
   exit 1&lt;br /&gt;
fi&lt;br /&gt;
sessreg -a -l $DISPLAY -x /usr/X11R6/lib/xdm/Xservers $LOGNAME&lt;br /&gt;
/usr/X11R6/lib/xdm/GiveConsole&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
shell# chmod +x Xstartup&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Make sure your firewall has all traffic for you lan.  (Need to know which exact ports to allow).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;run xdm on server as root&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 shell# xdm&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can put this xdm into the /etc/ttys so that it starts automatically on boot up.&lt;br /&gt;
&lt;br /&gt;
===client===&lt;br /&gt;
make sure your not in X&lt;br /&gt;
&lt;br /&gt;
type this command:&lt;br /&gt;
&lt;br /&gt;
 shell# X -broadcast&lt;br /&gt;
&lt;br /&gt;
This assumes that you are running only one server.&lt;br /&gt;
Otherwise use:&lt;br /&gt;
&lt;br /&gt;
 shell# X -query 192.168.1.1&lt;br /&gt;
&lt;br /&gt;
==DHCP - Install and setup==&lt;br /&gt;
Server setup.&lt;br /&gt;
&lt;br /&gt;
install through package&lt;br /&gt;
 # pkg_add -r isc-dhcp3-server&lt;br /&gt;
&lt;br /&gt;
We do this so we can define the root path for the diskless system.&lt;br /&gt;
&lt;br /&gt;
copy /usr/local/etc/dhcpd.conf.sample to /usr/local/etc/dhcpd.conf&lt;br /&gt;
&lt;br /&gt;
edit /usr/local/etc/dhcpd.conf and make sure it has these lines in it.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# dhcpd.conf&lt;br /&gt;
#&lt;br /&gt;
# Sample configuration file for ISC dhcpd&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
# option definitions common to all supported networks...&lt;br /&gt;
#option domain-name &amp;quot;example.org&amp;quot;;&lt;br /&gt;
#option domain-name-servers ns1.example.org, ns2.example.org;&lt;br /&gt;
&lt;br /&gt;
default-lease-time 3600;&lt;br /&gt;
max-lease-time 86400;&lt;br /&gt;
&lt;br /&gt;
# If this DHCP server is the official DHCP server for the local&lt;br /&gt;
# network, the authoritative directive should be uncommented.&lt;br /&gt;
authoritative;&lt;br /&gt;
&lt;br /&gt;
# ad-hoc DNS update scheme - set to &amp;quot;none&amp;quot; to disable dynamic DNS updates.&lt;br /&gt;
ddns-update-style none;&lt;br /&gt;
&lt;br /&gt;
option root-path &amp;quot;192.168.1.1:/diskless_ro&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
# lines added for pxeboot client&lt;br /&gt;
use-host-decl-names on;&lt;br /&gt;
next-server 192.168.1.1;&lt;br /&gt;
filename &amp;quot;pxeboot&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
# Use this to send dhcp log messages to a different log file (you also&lt;br /&gt;
# have to hack syslog.conf to complete the redirection).&lt;br /&gt;
log-facility local7;&lt;br /&gt;
&lt;br /&gt;
# No service will be given on this subnet, but declaring it helps the&lt;br /&gt;
# DHCP server to understand the network topology.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# This is a very basic subnet declaration.&lt;br /&gt;
&lt;br /&gt;
subnet 192.168.1.0 netmask 255.255.255.0 {&lt;br /&gt;
  range 192.168.1.10 192.168.1.20;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create the leases file&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# touch /var/db/dhcpd.leases&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Restart the daemon&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# killall dhcpd&lt;br /&gt;
# dhcpd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add to /etc/rc.conf&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dhcpd_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using a seperate DHCP server===&lt;br /&gt;
If you already have a DHCP server and you want to use that instead then you have to do these steps.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====On your DHCP Server====&lt;br /&gt;
1. edit /usr/local/etc/dhcpd.conf and add the following&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
authoritative;&lt;br /&gt;
ddns-update-style none;&lt;br /&gt;
&lt;br /&gt;
option root-path &amp;quot;&amp;lt;X Server IP&amp;gt;:/diskless_ro&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
# lines added for pxeboot client&lt;br /&gt;
use-host-decl-names on;&lt;br /&gt;
next-server &amp;lt;X Server IP&amp;gt;;&lt;br /&gt;
filename &amp;quot;pxeboot&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
restart dhcpd&lt;br /&gt;
 # /usr/local/etc/rc.d/isc-dhcpd.sh restart&lt;br /&gt;
&lt;br /&gt;
====Client====&lt;br /&gt;
Your client should boot now just remember that you may get a different IP now that you are talking to a different DHCP server so you have to change your exports file and copy accross a directory in /diskless_rw for the new IP.  All this is done on the X Server.&lt;br /&gt;
&lt;br /&gt;
==TFTP Setup==&lt;br /&gt;
TFTP helps us transport the kernel to the PXE-Boot machines.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# mkdir /tftpboot&lt;br /&gt;
# cp /boot/pxeboot /tftpboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Uncomment the following line in /etc/inetd.conf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tftp    dgram   udp     wait    root    /usr/libexec/tftpd      tftpd -l -s /tftpboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart the inetd service&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# killall -HUP inetd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If inetd has not started automatically do the following:&lt;br /&gt;
&lt;br /&gt;
Add the following to /etc/rc.conf&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
inetd_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now start inetd manually.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# inetd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test===&lt;br /&gt;
To test that tftp has loaded type the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# sockstat -4l | grep 69 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and you should see this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
root      inetd       13719 5   udp4    *:69                 *:*&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==NFS Setup==&lt;br /&gt;
Network File System.  Here we share all the directories from the server so that the diskless clients see these drives as if those directories were the diskless client's.&lt;br /&gt;
&lt;br /&gt;
===Server Setup===&lt;br /&gt;
If you forgot to select 'Yes' to NFS server setup in the FreeBSD installation then you have to setup the server manually like so:&lt;br /&gt;
&lt;br /&gt;
Enable NFS /etc/rc.conf&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rpcbind_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
nfs_server_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test===&lt;br /&gt;
A quick test to see if your NFS server is acting normal:&lt;br /&gt;
&lt;br /&gt;
Edit the /etc/exports and add the following&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/usr       -alldirs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This allows anyone to connect to your /usr mount.&lt;br /&gt;
&lt;br /&gt;
Now run these commands to restart and view your mounts&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# kill -HUP `cat /var/run/mountd.pid`&lt;br /&gt;
# showmount -e&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now try and mount it from a client running BSD&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# mount -t nfs 192.168.1.1:/usr /mnt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Server exports setup===&lt;br /&gt;
&lt;br /&gt;
Make directories for each IP for your clients&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /diskless_rw&lt;br /&gt;
# mkdir 192.168.1.2&lt;br /&gt;
# cd 192.168.1.2&lt;br /&gt;
# mkdir etc var&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Configure /etc/exports&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# file systems accessible only for reading:&lt;br /&gt;
# Original way of linking up the /usr&lt;br /&gt;
#/usr -ro -maproot=0 -network 192.168.1.0 -mask 255.255.255.0&lt;br /&gt;
&lt;br /&gt;
/usr -network 192.168.1.0 -mask 255.255.255.0&lt;br /&gt;
/diskless_ro -ro -maproot=0 -network 192.168.1.0 -mask 255.255.255.0&lt;br /&gt;
/diskless_rw/192.168.1.2/etc /diskless_rw/192.168.1.2/var -maproot=root 192.168.1.2&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restarting NFS&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# kill -HUP `cat /var/run/mountd.pid`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If NFS is not started yet do the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
data# rpcbind&lt;br /&gt;
data# nfsd -u -t -n 20 -h 192.168.1.1&lt;br /&gt;
data# mountd -r&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Testing to see if the exports are correct&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
data# showmount -e&lt;br /&gt;
Exports list on localhost:&lt;br /&gt;
/usr                              192.168.1.0&lt;br /&gt;
/diskless_rw/192.168.1.2/var      192.168.1.2&lt;br /&gt;
/diskless_rw/192.168.1.2/etc      192.168.1.2&lt;br /&gt;
/diskless_ro                      192.168.1.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Setup diskless_rw==&lt;br /&gt;
Create directories&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /diskless_rw/192.168.1.2/etc&lt;br /&gt;
# mkdir pam.d X11&lt;br /&gt;
&lt;br /&gt;
# cd /diskless_rw/192.168.1.2/var&lt;br /&gt;
# mkdir home log run tmp&lt;br /&gt;
# chmod 1777 tmp&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a swap file in the var directory for the client&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# dd if=/dev/zero of=/diskless_rw/192.168.1.2/var/swap bs=1k count=32000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in the /diskless_rw/&amp;lt;ip&amp;gt;/var/log directory I created the following log files so that syslogd would have files to write to:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /diskless_rw/192.168.1.2/var/log&lt;br /&gt;
# touch messages security auth.log maillog lpd-errs xferlog cron debug.log slip.log ppp.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy the following files from the systems /etc directory to /diskless_rw/&amp;lt;client ip&amp;gt;/etc&lt;br /&gt;
 # cp -Rv &amp;lt;files&amp;gt; /diskless_rw/&amp;lt;ip&amp;gt;/etc&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
auth.conf&lt;br /&gt;
disktab&lt;br /&gt;
gettytab&lt;br /&gt;
group&lt;br /&gt;
hosts&lt;br /&gt;
login.access&lt;br /&gt;
login.conf&lt;br /&gt;
login.conf.db&lt;br /&gt;
master.passwd&lt;br /&gt;
netconfig&lt;br /&gt;
protocols&lt;br /&gt;
pam.d&lt;br /&gt;
pwd.db&lt;br /&gt;
services&lt;br /&gt;
spwd.db&lt;br /&gt;
syslog.conf&lt;br /&gt;
termcap -&amp;gt; /usr/share/misc/termcap&lt;br /&gt;
ttys&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is a shortcut which you can just copy and paste in an xterm window.&lt;br /&gt;
 # cd /etc&lt;br /&gt;
 # cp -Rv auth.conf disktab gettytab group hosts login.access login.conf login.conf.db master.passwd netconfig protocols pam.d pwd.db services spwd.db syslog.conf termcapttys /diskless_rw/&amp;lt;ip&amp;gt;/etc&lt;br /&gt;
It's very important that you copy all the files in pam.d across otherwise you will not have a password prompt on your login.&lt;br /&gt;
&lt;br /&gt;
Create a fstab in /diskless_rw/&amp;lt;ip&amp;gt;/etc&lt;br /&gt;
 # touch /diskless_rw/&amp;lt;ip&amp;gt;/etc/fstab&lt;br /&gt;
&lt;br /&gt;
==Setup diskless_ro==&lt;br /&gt;
This is the common root mount for all pxe-boot clients.&lt;br /&gt;
&lt;br /&gt;
Copy accross important directories and kernel from boot to diskless_ro&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cp -rv /bin /lib /libexec /sbin /boot /diskless_ro&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For some client machines you may have to disable the ACPI (Power management) in the /diskless_ro/boot/device.hints&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
hint.acpi.0.disabled=&amp;quot;1&amp;quot; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So we can use the systems /var/tmp and /usr/home directory make soft links to them &lt;br /&gt;
 # cd /diskless_ro&lt;br /&gt;
 # ln -s /var/tmp /usr/home&lt;br /&gt;
&lt;br /&gt;
In the /diskless_ro directory make the following directories:&lt;br /&gt;
-dev so that clients can boot without freezing&lt;br /&gt;
-var so we can mount from the /diskless_rw/&amp;lt;client ip&amp;gt;/var into the var directory&lt;br /&gt;
-etc to store some common files&lt;br /&gt;
 # mkdir usr dev var etc&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We require a few files from the systems /etc directory to be copied into the /diskless_ro/etc for common use between the thin clients.&lt;br /&gt;
 # cd /etc;&lt;br /&gt;
 # cp services netconfig login.conf /diskless_ro/etc&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===rc file===&lt;br /&gt;
The /diskless_ro/etc/rc file is the first file which is ran after the kernel has loaded.  Here we mount a the labels from the server.&lt;br /&gt;
&lt;br /&gt;
Create the /diskless_ro/etc/rc&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin; export PATH&lt;br /&gt;
TMPDIR=~/tmp;export TMPDIR&lt;br /&gt;
TMP=~/tmp;export TMP&lt;br /&gt;
&lt;br /&gt;
mount -t nfs 192.168.1.1:/usr /usr&lt;br /&gt;
&lt;br /&gt;
boot_ip=`/sbin/ifconfig | /usr/bin/grep &amp;quot;inet &amp;quot; | /usr/bin/grep -v 127.0.0.1 |&lt;br /&gt;
/usr/bin/awk '{print $2}'`&lt;br /&gt;
mount_nfs -L 192.168.1.1:/diskless_rw/${boot_ip}/etc /etc&lt;br /&gt;
mount_nfs -L 192.168.1.1:/diskless_rw/${boot_ip}/var /var&lt;br /&gt;
&lt;br /&gt;
swapon /var/swap&lt;br /&gt;
&lt;br /&gt;
#rm -rf /var/tmp/*&lt;br /&gt;
#rm -rf /var/tmp/.*&lt;br /&gt;
&lt;br /&gt;
# Option if you choose XDM terminals&lt;br /&gt;
#X -query 192.168.1.1&lt;br /&gt;
&lt;br /&gt;
. /etc/rc2&lt;br /&gt;
exit 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Remember to change 192.168.1.1 to your X server's IP&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The -L on the mount_nfs is there so we don't get flock errors.&lt;br /&gt;
&lt;br /&gt;
===rc2 file===&lt;br /&gt;
This sets up some links for libraries and the logging daemon.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
mount -a&lt;br /&gt;
/sbin/ldconfig -elf /usr/lib/compat /usr/X11R6/lib /usr/local/lib&lt;br /&gt;
&lt;br /&gt;
syslogd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now change permissions so rc can run.&lt;br /&gt;
 # chmod +x rc*&lt;br /&gt;
&lt;br /&gt;
Copy /diskless_ro/etc/rc and rc2 to /diskless_rw/&amp;lt;client ip&amp;gt;/etc&lt;br /&gt;
 # cp /diskless_ro/etc/rc* /diskless_rw/192.168.1.2/etc&lt;br /&gt;
&lt;br /&gt;
==GRUB Floppy boot (optional)==&lt;br /&gt;
&lt;br /&gt;
(would like to compile this ourselves later)&lt;br /&gt;
To get started we downloaded the image from www.hp.uab.edu/~ed/grub-net&lt;br /&gt;
&lt;br /&gt;
 shell# dd if=/data/grub-net.img of=/dev/fd0&lt;br /&gt;
&lt;br /&gt;
Then we mounted it as msdos&lt;br /&gt;
Remove/rename menu.1st from the grub directory as it was doing something funny with it.  We think that it was looking for a tftp server through our dhcp and we don't have a the dhcp setup correctly here, so we wanted to do it manually.&lt;br /&gt;
&lt;br /&gt;
Reboot off the floppy now..&lt;br /&gt;
&lt;br /&gt;
 grub&amp;gt; ifconfig --address=192.168.1.2 --mask=255.255.255.0 --gateway=192.168.1.1&lt;br /&gt;
 --server=192.168.1.2&lt;br /&gt;
&lt;br /&gt;
OR you can use dhcp&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 grub&amp;gt; dhcp&amp;lt;br&amp;gt; &lt;br /&gt;
 grub&amp;gt; tftpserver 192.168.1.2&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Setup tftp on your server, we created a directory /tftpboot. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Starting diskless system through GRUB===&lt;br /&gt;
This is an alternative boot loader.  You can use this for testing, if you don't have a pxeboot chip, otherwise skip this section.&lt;br /&gt;
&lt;br /&gt;
These commands are half working...&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 grub&amp;gt; root (nd)&amp;lt;br&amp;gt;&lt;br /&gt;
 grub&amp;gt; kernel /kernel root=ad0s1a&amp;lt;br&amp;gt;&lt;br /&gt;
 grub&amp;gt; pxeboot&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Completely Diskless System (PXEBOOT ROM) (optional)==&lt;br /&gt;
&lt;br /&gt;
Running completely diskless by booting from a Network ROM Chip.&lt;br /&gt;
&lt;br /&gt;
We have now got a Intel GD82559 Etherexpress pro/100 Card.&lt;br /&gt;
&lt;br /&gt;
When we boot up on the client machine with that card it displays:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Intel UNDI, PXE-2.0 (build 067)&amp;lt;br /&amp;gt;&lt;br /&gt;
Copyright (C) 1997-1998 Intel Corporation&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Which we cannot get working so we have read that you have to update this version to Build 82.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
copy /boot/pxeboot to /tftpboot directory we made before&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
- Downloaded proboot.exe from support.intel.com and unpacked into a windows box.&amp;lt;br /&amp;gt;&lt;br /&gt;
- Copied ibautil.exe onto a windows 98 boot disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
- Rebooted the test box after disabling network boot on the nic (otherwise it'll kick in before the floppy).&amp;lt;br /&amp;gt;&lt;br /&gt;
- Ran ibautil -iv to see what embedded image versions were available:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Intel(R) Boot Agent XG v1.0.09&amp;lt;br /&amp;gt;&lt;br /&gt;
Intel(R) Boot Agent GE v1.2.36&amp;lt;br /&amp;gt;&lt;br /&gt;
Intel(R) Boot Agent FE v4.1.19&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
- Ran ibautil -up to perform the image upgrade.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
It's interesting to note that no version showed up for out intel nic when initially running ibautil. After the upgrade, however, the version corectly showed as 4.1.19.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I made sure that I had simular features to this in my dhcpd.conf file:&amp;lt;br /&amp;gt;&lt;br /&gt;
option broadcast-address 192.168.254.255;&amp;lt;br /&amp;gt;&lt;br /&gt;
option domain-name-servers 192.168.254.3;&amp;lt;br /&amp;gt;&lt;br /&gt;
option domain-name &amp;quot;simerson.net&amp;quot;;&amp;lt;br /&amp;gt;&lt;br /&gt;
option routers 192.168.254.1;&amp;lt;br /&amp;gt;&lt;br /&gt;
option subnet-mask 255.255.255.0;&amp;lt;br /&amp;gt;&lt;br /&gt;
server-name &amp;quot;pxe-gw&amp;quot;;&amp;lt;br /&amp;gt;&lt;br /&gt;
server-identifier 192.168.254.3;&amp;lt;br /&amp;gt;&lt;br /&gt;
next-server 192.168.254.3;&amp;lt;br /&amp;gt;&lt;br /&gt;
default-lease-time -1;&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
subnet 192.168.254.0 netmask 255.255.255.0 {&amp;lt;br /&amp;gt;&lt;br /&gt;
range 192.168.254.32 192.168.254.99;&amp;lt;br /&amp;gt;&lt;br /&gt;
option root-path &amp;quot;/usr/local/export/pxe&amp;quot;;&amp;lt;br /&amp;gt;&lt;br /&gt;
filename &amp;quot;pxeboot&amp;quot;;&amp;lt;br /&amp;gt;&lt;br /&gt;
}&amp;lt;br /&amp;gt;&lt;br /&gt;
host cm.simerson.net {&amp;lt;br /&amp;gt;&lt;br /&gt;
hardware ethernet 00:e0:18:98:f0:cc;&amp;lt;br /&amp;gt;&lt;br /&gt;
fixed-address 192.168.254.126;&amp;lt;br /&amp;gt;&lt;br /&gt;
}&amp;lt;br /&amp;gt;&lt;br /&gt;
host c1.simerson.net {&amp;lt;br /&amp;gt;&lt;br /&gt;
hardware ethernet 00:60:97:0e:bb:a7;&amp;lt;br /&amp;gt;&lt;br /&gt;
fixed-address 192.168.254.131;&amp;lt;br /&amp;gt;&lt;br /&gt;
}&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==X config notes==&lt;br /&gt;
On the X server the /etc/X11/xorg.conf file is only used for the X server not the clients.&lt;br /&gt;
&lt;br /&gt;
To use this same configuration for your X Terminal Clients copy this file to /diskless_rw/&amp;lt;Client IP&amp;gt;/etc/X11 and it will use it.&lt;br /&gt;
&lt;br /&gt;
==Starting X on the client==&lt;br /&gt;
There are two ways of doing this and it depends on your hardware mainly.  &lt;br /&gt;
&lt;br /&gt;
1. run all programs on the server using the servers CPU and Memory this we will call the 'XDM Method'&lt;br /&gt;
2. run all programs from the NFS mounts using the clients CPU and Memory but the HD of the server, this we will call the 'NFS Method'&lt;br /&gt;
&lt;br /&gt;
Both methods will boot from PXE-Boot and can be diskless.&lt;br /&gt;
&lt;br /&gt;
===XDM Method===&lt;br /&gt;
Recommended for machines less than 1Ghz 256MB&lt;br /&gt;
&lt;br /&gt;
This is quite simple to setup.  Change your rc file in the /diskless_ro/etc directory to have this line at the end:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
X -query &amp;lt;server ip&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make sure on the server you setup xdm to start on system startup&lt;br /&gt;
 # vi /etc/ttys&lt;br /&gt;
&lt;br /&gt;
Search for this line:&lt;br /&gt;
 ttyv8   &amp;quot;/usr/X11R6/bin/xdm -nodaemon&amp;quot;  xterm   off secure&lt;br /&gt;
&lt;br /&gt;
and change it to:&lt;br /&gt;
 ttyv8   &amp;quot;/usr/X11R6/bin/xdm -nodaemon&amp;quot;  xterm   on secure&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also type this command at the command line on the client to test before hand.&lt;br /&gt;
&lt;br /&gt;
===NFS Method===&lt;br /&gt;
Recommended for machines over 1Ghz 256MB or if you want to utilise any of the clients devices such as local HD, USB, CD/DVD burners, etc.&lt;br /&gt;
&lt;br /&gt;
This is much trickier.&lt;br /&gt;
&lt;br /&gt;
Log in&lt;br /&gt;
Now type 'startx' at the command line.&lt;br /&gt;
&lt;br /&gt;
==Custom Kernels==&lt;br /&gt;
If you want to create custom kernels for your clients then do this:&lt;br /&gt;
&lt;br /&gt;
Create your custom kernel&lt;br /&gt;
 # cd /sys/i386/conf&lt;br /&gt;
 # cp GENERIC DISKLESS&lt;br /&gt;
 # vi DISKLESS&lt;br /&gt;
&lt;br /&gt;
Make changes and build and install&lt;br /&gt;
&lt;br /&gt;
 # cd /usr/src&lt;br /&gt;
 # make buildkernel KERNCONF=DISKLESS&lt;br /&gt;
 # make installkernel KERNCONF=DISKLESS DESTDIR=/diskless_ro&lt;br /&gt;
&lt;br /&gt;
==todo==&lt;br /&gt;
Here are some of the jobs left to do to make this secure or generally better:&lt;br /&gt;
&lt;br /&gt;
- There must be a simplier way to set this up if your going to use XDM in the end.  IE: do we need to do half of this tutorial if we are going to run XDM.&lt;br /&gt;
&lt;br /&gt;
- When the same user logs onto two seperate machines they cannot start firefox or thunderbird as it complains about being open somewhere else.  This assumes you have firefox and thunderbird already open on both machines that you logged onto.&lt;br /&gt;
&lt;br /&gt;
===Known Issues===&lt;br /&gt;
&lt;br /&gt;
- Doesn't work with HP-COMPAQ-T5525 thin client as it doesn't want to boot, it says it's missing libfreetype.so.9 which we do have it just cannot find it for some reason.  It's trying to use the VIA chipset for graphics which is different to all the other clients I've loaded successfully so far.&lt;br /&gt;
&lt;br /&gt;
- USB mice not working instead use PS/2.  If we got this working it may help get the HP T5525 working&lt;br /&gt;
&lt;br /&gt;
===Keyboard repeating on notebooks===&lt;br /&gt;
- typing on some keyboards (like my notebook) causes double characters to display if you type too fast. - This is the notebook, if you go and set the KDE Accessabiltiy options and set the keyboard rate to 50ms, this fixes the problem.&lt;br /&gt;
&lt;br /&gt;
===USB mouse===&lt;br /&gt;
&lt;br /&gt;
Editing /etc/devd.conf file and searched for ums&lt;br /&gt;
remarked out the action line.&lt;br /&gt;
 &lt;br /&gt;
rebooted.&lt;br /&gt;
 &lt;br /&gt;
Someone off IRC suggested that I build a GENERIC xorg.conf file which has vesa, usb mouse and ps/2 mouse configurations through it.&lt;br /&gt;
 &lt;br /&gt;
I reverted everything back to normal ps/2 mouse config, copying my usb config files to the following:&lt;br /&gt;
/etc/devd.conf_usb&lt;br /&gt;
/etc/rc.conf_usb&lt;br /&gt;
/etc/X11/xorg.conf_usb&lt;br /&gt;
 &lt;br /&gt;
I think we need a seperate configuration for the HP, it uses a weird display driver.&lt;br /&gt;
&lt;br /&gt;
==links==&lt;br /&gt;
&lt;br /&gt;
http://www.onlamp.com/pub/a/bsd/2004/09/09/diskless_server.html&lt;br /&gt;
&lt;br /&gt;
http://www.onlamp.com/pub/a/bsd/2004/09/30/diskless_clients.html&lt;br /&gt;
&lt;br /&gt;
http://people.freebsd.org/~alfred/pxe/en_US.ISO8859-1/articles/pxe/article.html&lt;br /&gt;
&lt;br /&gt;
http://www.the-labs.com/FreeBSD/Diskless/&lt;br /&gt;
&lt;br /&gt;
http://www.nber.org/sys-admin/FreeBSD-diskless.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://wikitest.freebsd.org/MarkusBoelter&lt;br /&gt;
&lt;br /&gt;
http://www.daemonsecurity.com/pub/pxeboot/&lt;br /&gt;
&lt;br /&gt;
http://www.kano.org.uk/projects/pxe/&lt;br /&gt;
&lt;br /&gt;
File Examples:&lt;br /&gt;
&lt;br /&gt;
http://www.watson.org/~robert/freebsd/pxe/&lt;br /&gt;
&lt;br /&gt;
PXE Information&lt;br /&gt;
http://www.computerworld.com/action/article.do?command=viewArticleBasic&amp;amp;articleId=108551&lt;br /&gt;
&lt;br /&gt;
[[Category:FreeBSD_for_Workstations]]&lt;/div&gt;</summary>
		<author><name>165.228.0.35</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/X_Windows_Terminal</id>
		<title>X Windows Terminal</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/X_Windows_Terminal"/>
				<updated>2006-11-01T00:28:02Z</updated>
		
		<summary type="html">&lt;p&gt;165.228.0.35: /* Setup diskless_ro */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Advantages==&lt;br /&gt;
X Windows can be used in a Server-Client relationship.  By setting up your X Windows Server you allow the use of all the programs on that computer to all the client PC's.  &lt;br /&gt;
&lt;br /&gt;
There are many advantages of running client computers in this manner:&lt;br /&gt;
* They don't even need a hard drive.  &lt;br /&gt;
* It's silent as there are no moving parts&lt;br /&gt;
* The solution saves power as your computers are very thin.&lt;br /&gt;
* Everything can be backed up centrally.&lt;br /&gt;
* Boot times for client PC's are the fastest around.&lt;br /&gt;
* Clients don't need much CPU speed, memory, etc.  Because of this they would be very cheap.  You could get away with using a Pentium 100Mhz with 32MB ram, no hard drive, no CD-ROM, no Floppy and a fanless power supply.  You just need a ethernet card with a PXEBOOT ROM. (XDM mode)&lt;br /&gt;
* Central management of applications, users, config&lt;br /&gt;
&lt;br /&gt;
==From the Beginning==&lt;br /&gt;
I've based this document on FreeBSD 6.1.&lt;br /&gt;
&lt;br /&gt;
Install FreeBSD 6.1 as per usual.&lt;br /&gt;
I've setup my mount points as this:&lt;br /&gt;
  '''Part    Mount        Size'''&lt;br /&gt;
  ad0s1b  Swap         (equal to how much memory I have in my machine)&lt;br /&gt;
  ad0s1a  /            512MB&lt;br /&gt;
  ad0s1d  /var         1G&lt;br /&gt;
  ad0s1e  /tmp         512MB&lt;br /&gt;
  ad0s1f  /usr         2GB    min.&lt;br /&gt;
          /diskless_ro 512MB&lt;br /&gt;
          /diskless_rw 1GB    min.&lt;br /&gt;
&lt;br /&gt;
I selected 'A' for auto and then deleted /usr and created /usr as 2g.&lt;br /&gt;
&lt;br /&gt;
Select User-X install. Yes to Ports if you have the room.&lt;br /&gt;
&lt;br /&gt;
Select SSH Server and NFS Server in the installation process, for the rest of the options go with the default.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
NOTE: If you forget to add any of the labels above, you will have to reboot as you cannot add labels to your boot drive when you have booted off it. So boot of the installation CD and use the configure -&amp;gt; label option in the sysinstall screen to add these labels to your boot drive.  You may need to retype the mount points for /, /var, /tmp and /usr by hitting 'm' on each label.  Once you have created these labels in the 'Disklabel Editor' then you can hit 'w' to write them to the disk.  answer 'yes' to the next question, hit 'ok' to the warning message.  Now quit and reboot. Add them to fstab (/dev/ad0s1g   /diskless_ro) &amp;amp; (/dev/ad0s1h   /diskless_rw) and mount.&lt;br /&gt;
&lt;br /&gt;
I find the best way to get this working is to break it down in to small steps and get each step working independantly.  IE: Setup NFS and see if you can mount it from another FreeBSD machine, don't just assume it will work and boot your PXE-Boot machine.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Throughout my documentation&lt;br /&gt;
&lt;br /&gt;
192.168.1.1 = the Server&lt;br /&gt;
&lt;br /&gt;
192.168.1.2 = the client (may be a full freebsd system or pxeboot)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At this point I normally install fluxbox with the following line:&lt;br /&gt;
&lt;br /&gt;
 shell# pkg_add -r fluxbox-devel&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
change your ~/.xinitrc file to the following:&lt;br /&gt;
&lt;br /&gt;
 startfluxbox&lt;br /&gt;
&lt;br /&gt;
Copy to .xsession&lt;br /&gt;
 $ ln -s ~/.xinitrc ~/.xsession&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Use the following command to update your fluxbox menus:&lt;br /&gt;
&lt;br /&gt;
 shell$ fluxbox-generate_menu&lt;br /&gt;
&lt;br /&gt;
==Running a single application==&lt;br /&gt;
&lt;br /&gt;
To get started I have my server setup running FreeBSD, with X-Windows and a few applications.  Nothing too special.  Then I have my client PC, which to start off I used the frenzy 1.0 boot CD to perform these initial tests.  You can get this from [http://frenzy.org.ua/eng/ frenzy website].  I entered into fluxbox, but you could equally use any X session.&lt;br /&gt;
You must allow incoming connections this is done with two commands&lt;br /&gt;
&lt;br /&gt;
 client$ startx -listen_tcp&lt;br /&gt;
 client$ xhost +&lt;br /&gt;
&lt;br /&gt;
This allows all computers to start applications on your client PC.  It's dangerous but good for testing everything is setup correctly.&lt;br /&gt;
&lt;br /&gt;
 client$ ssh &amp;lt;server user@server ip&amp;gt;&lt;br /&gt;
 eg: ssh mick@192.168.1.1&lt;br /&gt;
&lt;br /&gt;
 ssh$ export DISPLAY='192.168.1.2:0'&lt;br /&gt;
&lt;br /&gt;
Or if your running bash:&lt;br /&gt;
 ssh$ DISPLAY=&amp;lt;client ip&amp;gt;:&amp;lt;client display&amp;gt;; export DISPLAY&lt;br /&gt;
 eg: DISPLAY=192.168.1.2:0; export DISPLAY&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 ssh$ xcalc &amp;amp;&lt;br /&gt;
&lt;br /&gt;
This should display on your client&lt;br /&gt;
&lt;br /&gt;
==Running a whole X Windows Session (XDM)==&lt;br /&gt;
This sets up a server so that you can share your X session with any clients which want to connect.  (Simular to Terminal Services under windows)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===server===&lt;br /&gt;
edit:&lt;br /&gt;
 /usr/X11R6/lib/X11/xdm/xdm-config&lt;br /&gt;
&lt;br /&gt;
comment out with a '!' the request line&amp;lt;br&amp;gt;&lt;br /&gt;
 DisplayManager.requestPort: 0&lt;br /&gt;
&lt;br /&gt;
edit:&amp;lt;br&amp;gt;&lt;br /&gt;
 /usr/X11R6/lib/X11/xdm/Xaccess&lt;br /&gt;
&lt;br /&gt;
Enter a single asterisk any where in the file, so the contents should be one asterisk and the rest commented out.  There should be an asterisk on line 49 which you can uncomment.&lt;br /&gt;
&lt;br /&gt;
Whilst in the /usr/X11R6/lib/X11/xdm directory do these commands:&lt;br /&gt;
 shell# vi Xstartup&lt;br /&gt;
&lt;br /&gt;
Add into this file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
#&lt;br /&gt;
# Xstartup&lt;br /&gt;
#&lt;br /&gt;
# This program is run as root after the user is verified&lt;br /&gt;
#&lt;br /&gt;
if [ -f /etc/nologin ]; then&lt;br /&gt;
   xmessage -file /etc/nologin -timeout 30 -center&lt;br /&gt;
   exit 1&lt;br /&gt;
fi&lt;br /&gt;
sessreg -a -l $DISPLAY -x /usr/X11R6/lib/xdm/Xservers $LOGNAME&lt;br /&gt;
/usr/X11R6/lib/xdm/GiveConsole&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
shell# chmod +x Xstartup&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Make sure your firewall has all traffic for you lan.  (Need to know which exact ports to allow).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;run xdm on server as root&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 shell# xdm&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can put this xdm into the /etc/ttys so that it starts automatically on boot up.&lt;br /&gt;
&lt;br /&gt;
===client===&lt;br /&gt;
make sure your not in X&lt;br /&gt;
&lt;br /&gt;
type this command:&lt;br /&gt;
&lt;br /&gt;
 shell# X -broadcast&lt;br /&gt;
&lt;br /&gt;
This assumes that you are running only one server.&lt;br /&gt;
Otherwise use:&lt;br /&gt;
&lt;br /&gt;
 shell# X -query 192.168.1.1&lt;br /&gt;
&lt;br /&gt;
==DHCP - Install and setup==&lt;br /&gt;
Server setup.&lt;br /&gt;
&lt;br /&gt;
install through package&lt;br /&gt;
 # pkg_add -r isc-dhcp3-server&lt;br /&gt;
&lt;br /&gt;
We do this so we can define the root path for the diskless system.&lt;br /&gt;
&lt;br /&gt;
copy /usr/local/etc/dhcpd.conf.sample to /usr/local/etc/dhcpd.conf&lt;br /&gt;
&lt;br /&gt;
edit /usr/local/etc/dhcpd.conf and make sure it has these lines in it.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# dhcpd.conf&lt;br /&gt;
#&lt;br /&gt;
# Sample configuration file for ISC dhcpd&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
# option definitions common to all supported networks...&lt;br /&gt;
#option domain-name &amp;quot;example.org&amp;quot;;&lt;br /&gt;
#option domain-name-servers ns1.example.org, ns2.example.org;&lt;br /&gt;
&lt;br /&gt;
default-lease-time 3600;&lt;br /&gt;
max-lease-time 86400;&lt;br /&gt;
&lt;br /&gt;
# If this DHCP server is the official DHCP server for the local&lt;br /&gt;
# network, the authoritative directive should be uncommented.&lt;br /&gt;
authoritative;&lt;br /&gt;
&lt;br /&gt;
# ad-hoc DNS update scheme - set to &amp;quot;none&amp;quot; to disable dynamic DNS updates.&lt;br /&gt;
ddns-update-style none;&lt;br /&gt;
&lt;br /&gt;
option root-path &amp;quot;192.168.1.1:/diskless_ro&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
# lines added for pxeboot client&lt;br /&gt;
use-host-decl-names on;&lt;br /&gt;
next-server 192.168.1.1;&lt;br /&gt;
filename &amp;quot;pxeboot&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
# Use this to send dhcp log messages to a different log file (you also&lt;br /&gt;
# have to hack syslog.conf to complete the redirection).&lt;br /&gt;
log-facility local7;&lt;br /&gt;
&lt;br /&gt;
# No service will be given on this subnet, but declaring it helps the&lt;br /&gt;
# DHCP server to understand the network topology.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# This is a very basic subnet declaration.&lt;br /&gt;
&lt;br /&gt;
subnet 192.168.1.0 netmask 255.255.255.0 {&lt;br /&gt;
  range 192.168.1.10 192.168.1.20;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create the leases file&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# touch /var/db/dhcpd.leases&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Restart the daemon&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# killall dhcpd&lt;br /&gt;
# dhcpd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add to /etc/rc.conf&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dhcpd_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using a seperate DHCP server===&lt;br /&gt;
If you already have a DHCP server and you want to use that instead then you have to do these steps.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====On your DHCP Server====&lt;br /&gt;
1. edit /usr/local/etc/dhcpd.conf and add the following&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
authoritative;&lt;br /&gt;
ddns-update-style none;&lt;br /&gt;
&lt;br /&gt;
option root-path &amp;quot;&amp;lt;X Server IP&amp;gt;:/diskless_ro&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
# lines added for pxeboot client&lt;br /&gt;
use-host-decl-names on;&lt;br /&gt;
next-server &amp;lt;X Server IP&amp;gt;;&lt;br /&gt;
filename &amp;quot;pxeboot&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
2. stop dhcpd&lt;br /&gt;
3. start dhcpd&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Client====&lt;br /&gt;
Your client should boot now just remember that you may get a different IP now that you are talking to a different DHCP server so you have to change your exports file and copy accross a directory in /diskless_rw for the new IP.  All this is done on the X Server.&lt;br /&gt;
&lt;br /&gt;
==TFTP Setup==&lt;br /&gt;
TFTP helps us transport the kernel to the PXE-Boot machines.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# mkdir /tftpboot&lt;br /&gt;
# cp /boot/pxeboot /tftpboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Uncomment the following line in /etc/inetd.conf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tftp    dgram   udp     wait    root    /usr/libexec/tftpd      tftpd -l -s /tftpboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart the inetd service&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# killall -HUP inetd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If inetd has not started automatically do the following:&lt;br /&gt;
&lt;br /&gt;
Add the following to /etc/rc.conf&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
inetd_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now start inetd manually.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# inetd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test===&lt;br /&gt;
To test that tftp has loaded type the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# sockstat -4l | grep 69 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and you should see this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
root      inetd       13719 5   udp4    *:69                 *:*&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==NFS Setup==&lt;br /&gt;
Network File System.  Here we share all the directories from the server so that the diskless clients see these drives as if those directories were the diskless client's.&lt;br /&gt;
&lt;br /&gt;
===Server Setup===&lt;br /&gt;
If you forgot to select 'Yes' to NFS server setup in the FreeBSD installation then you have to setup the server manually like so:&lt;br /&gt;
&lt;br /&gt;
Enable NFS /etc/rc.conf&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rpcbind_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
nfs_server_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test===&lt;br /&gt;
A quick test to see if your NFS server is acting normal:&lt;br /&gt;
&lt;br /&gt;
Edit the /etc/exports and add the following&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/usr       -alldirs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This allows anyone to connect to your /usr mount.&lt;br /&gt;
&lt;br /&gt;
Now run these commands to restart and view your mounts&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# kill -HUP `cat /var/run/mountd.pid`&lt;br /&gt;
# showmount -e&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now try and mount it from a client running BSD&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# mount -t nfs 192.168.1.1:/usr /mnt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Server exports setup===&lt;br /&gt;
&lt;br /&gt;
Make directories for each IP for your clients&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /diskless_rw&lt;br /&gt;
# mkdir 192.168.1.2&lt;br /&gt;
# cd 192.168.1.2&lt;br /&gt;
# mkdir etc var&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Configure /etc/exports&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# file systems accessible only for reading:&lt;br /&gt;
# Original way of linking up the /usr&lt;br /&gt;
#/usr -ro -maproot=0 -network 192.168.1.0 -mask 255.255.255.0&lt;br /&gt;
&lt;br /&gt;
/usr -network 192.168.1.0 -mask 255.255.255.0&lt;br /&gt;
/diskless_ro -ro -maproot=0 -network 192.168.1.0 -mask 255.255.255.0&lt;br /&gt;
/diskless_rw/192.168.1.2/etc /diskless_rw/192.168.1.2/var -maproot=root 192.168.1.2&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restarting NFS&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# kill -HUP `cat /var/run/mountd.pid`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If NFS is not started yet do the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
data# rpcbind&lt;br /&gt;
data# nfsd -u -t -n 20 -h 192.168.1.1&lt;br /&gt;
data# mountd -r&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Testing to see if the exports are correct&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
data# showmount -e&lt;br /&gt;
Exports list on localhost:&lt;br /&gt;
/usr                              192.168.1.0&lt;br /&gt;
/diskless_rw/192.168.1.2/var      192.168.1.2&lt;br /&gt;
/diskless_rw/192.168.1.2/etc      192.168.1.2&lt;br /&gt;
/diskless_ro                      192.168.1.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Setup diskless_rw==&lt;br /&gt;
Create directories&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /diskless_rw/192.168.1.2/etc&lt;br /&gt;
# mkdir pam.d X11&lt;br /&gt;
&lt;br /&gt;
# cd /diskless_rw/192.168.1.2/var&lt;br /&gt;
# mkdir home log run tmp&lt;br /&gt;
# chmod 1777 tmp&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a swap file in the var directory for the client&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# dd if=/dev/zero of=/diskless_rw/192.168.1.2/var/swap bs=1k count=32000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in the /diskless_rw/&amp;lt;ip&amp;gt;/var/log directory I created the following log files so that syslogd would have files to write to:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /diskless_rw/192.168.1.2/var/log&lt;br /&gt;
# touch messages security auth.log maillog lpd-errs xferlog cron debug.log slip.log ppp.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy the following files from the systems /etc directory to /diskless_rw/&amp;lt;client ip&amp;gt;/etc&lt;br /&gt;
 # cp -Rv &amp;lt;files&amp;gt; /diskless_rw/&amp;lt;ip&amp;gt;/etc&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
auth.conf&lt;br /&gt;
disktab&lt;br /&gt;
gettytab&lt;br /&gt;
group&lt;br /&gt;
hosts&lt;br /&gt;
login.access&lt;br /&gt;
login.conf&lt;br /&gt;
login.conf.db&lt;br /&gt;
master.passwd&lt;br /&gt;
netconfig&lt;br /&gt;
protocols&lt;br /&gt;
pam.d&lt;br /&gt;
pwd.db&lt;br /&gt;
services&lt;br /&gt;
spwd.db&lt;br /&gt;
syslog.conf&lt;br /&gt;
termcap -&amp;gt; /usr/share/misc/termcap&lt;br /&gt;
ttys&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is a shortcut which you can just copy and paste in an xterm window.&lt;br /&gt;
 # cd /etc&lt;br /&gt;
 # cp -Rv auth.conf disktab gettytab group hosts login.access login.conf login.conf.db master.passwd netconfig protocols pam.d pwd.db services spwd.db syslog.conf termcapttys /diskless_rw/&amp;lt;ip&amp;gt;/etc&lt;br /&gt;
It's very important that you copy all the files in pam.d across otherwise you will not have a password prompt on your login.&lt;br /&gt;
&lt;br /&gt;
Create a fstab in /diskless_rw/&amp;lt;ip&amp;gt;/etc&lt;br /&gt;
 # touch /diskless_rw/&amp;lt;ip&amp;gt;/etc/fstab&lt;br /&gt;
&lt;br /&gt;
==Setup diskless_ro==&lt;br /&gt;
This is the common root mount for all pxe-boot clients.&lt;br /&gt;
&lt;br /&gt;
Copy accross important directories and kernel from boot to diskless_ro&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cp -rv /bin /lib /libexec /sbin /boot /diskless_ro&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For some client machines you may have to disable the ACPI (Power management) in the /diskless_ro/boot/device.hints&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
hint.acpi.0.disabled=&amp;quot;1&amp;quot; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So we can use the systems /var/tmp and /usr/home directory make soft links to them &lt;br /&gt;
 # cd /diskless_ro&lt;br /&gt;
 # ln -s /var/tmp /usr/home&lt;br /&gt;
&lt;br /&gt;
In the /diskless_ro directory make the following directories:&lt;br /&gt;
-dev so that clients can boot without freezing&lt;br /&gt;
-var so we can mount from the /diskless_rw/&amp;lt;client ip&amp;gt;/var into the var directory&lt;br /&gt;
-etc to store some common files&lt;br /&gt;
 # mkdir usr dev var etc&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We require a few files from the systems /etc directory to be copied into the /diskless_ro/etc for common use between the thin clients.&lt;br /&gt;
 # cd /etc;&lt;br /&gt;
 # cp services netconfig login.conf /diskless_ro/etc&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===rc file===&lt;br /&gt;
The /diskless_ro/etc/rc file is the first file which is ran after the kernel has loaded.  Here we mount a the labels from the server.&lt;br /&gt;
&lt;br /&gt;
Create the /diskless_ro/etc/rc&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin; export PATH&lt;br /&gt;
TMPDIR=~/tmp;export TMPDIR&lt;br /&gt;
TMP=~/tmp;export TMP&lt;br /&gt;
&lt;br /&gt;
mount -t nfs 192.168.1.1:/usr /usr&lt;br /&gt;
&lt;br /&gt;
boot_ip=`/sbin/ifconfig | /usr/bin/grep &amp;quot;inet &amp;quot; | /usr/bin/grep -v 127.0.0.1 |&lt;br /&gt;
/usr/bin/awk '{print $2}'`&lt;br /&gt;
mount_nfs -L 192.168.1.1:/diskless_rw/${boot_ip}/etc /etc&lt;br /&gt;
mount_nfs -L 192.168.1.1:/diskless_rw/${boot_ip}/var /var&lt;br /&gt;
&lt;br /&gt;
swapon /var/swap&lt;br /&gt;
&lt;br /&gt;
#rm -rf /var/tmp/*&lt;br /&gt;
#rm -rf /var/tmp/.*&lt;br /&gt;
&lt;br /&gt;
# Option if you choose XDM terminals&lt;br /&gt;
#X -query 192.168.1.1&lt;br /&gt;
&lt;br /&gt;
. /etc/rc2&lt;br /&gt;
exit 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Remember to change 192.168.1.1 to your X server's IP&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The -L on the mount_nfs is there so we don't get flock errors.&lt;br /&gt;
&lt;br /&gt;
===rc2 file===&lt;br /&gt;
This sets up some links for libraries and the logging daemon.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
mount -a&lt;br /&gt;
/sbin/ldconfig -elf /usr/lib/compat /usr/X11R6/lib /usr/local/lib&lt;br /&gt;
&lt;br /&gt;
syslogd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now change permissions so rc can run.&lt;br /&gt;
 # chmod +x rc*&lt;br /&gt;
&lt;br /&gt;
Copy /diskless_ro/etc/rc and rc2 to /diskless_rw/&amp;lt;client ip&amp;gt;/etc&lt;br /&gt;
 # cp /diskless_ro/etc/rc* /diskless_rw/192.168.1.2/etc&lt;br /&gt;
&lt;br /&gt;
==GRUB Floppy boot (optional)==&lt;br /&gt;
&lt;br /&gt;
(would like to compile this ourselves later)&lt;br /&gt;
To get started we downloaded the image from www.hp.uab.edu/~ed/grub-net&lt;br /&gt;
&lt;br /&gt;
 shell# dd if=/data/grub-net.img of=/dev/fd0&lt;br /&gt;
&lt;br /&gt;
Then we mounted it as msdos&lt;br /&gt;
Remove/rename menu.1st from the grub directory as it was doing something funny with it.  We think that it was looking for a tftp server through our dhcp and we don't have a the dhcp setup correctly here, so we wanted to do it manually.&lt;br /&gt;
&lt;br /&gt;
Reboot off the floppy now..&lt;br /&gt;
&lt;br /&gt;
 grub&amp;gt; ifconfig --address=192.168.1.2 --mask=255.255.255.0 --gateway=192.168.1.1&lt;br /&gt;
 --server=192.168.1.2&lt;br /&gt;
&lt;br /&gt;
OR you can use dhcp&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 grub&amp;gt; dhcp&amp;lt;br&amp;gt; &lt;br /&gt;
 grub&amp;gt; tftpserver 192.168.1.2&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Setup tftp on your server, we created a directory /tftpboot. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Starting diskless system through GRUB===&lt;br /&gt;
This is an alternative boot loader.  You can use this for testing, if you don't have a pxeboot chip, otherwise skip this section.&lt;br /&gt;
&lt;br /&gt;
These commands are half working...&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 grub&amp;gt; root (nd)&amp;lt;br&amp;gt;&lt;br /&gt;
 grub&amp;gt; kernel /kernel root=ad0s1a&amp;lt;br&amp;gt;&lt;br /&gt;
 grub&amp;gt; pxeboot&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Completely Diskless System (PXEBOOT ROM) (optional)==&lt;br /&gt;
&lt;br /&gt;
Running completely diskless by booting from a Network ROM Chip.&lt;br /&gt;
&lt;br /&gt;
We have now got a Intel GD82559 Etherexpress pro/100 Card.&lt;br /&gt;
&lt;br /&gt;
When we boot up on the client machine with that card it displays:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Intel UNDI, PXE-2.0 (build 067)&amp;lt;br /&amp;gt;&lt;br /&gt;
Copyright (C) 1997-1998 Intel Corporation&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Which we cannot get working so we have read that you have to update this version to Build 82.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
copy /boot/pxeboot to /tftpboot directory we made before&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
- Downloaded proboot.exe from support.intel.com and unpacked into a windows box.&amp;lt;br /&amp;gt;&lt;br /&gt;
- Copied ibautil.exe onto a windows 98 boot disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
- Rebooted the test box after disabling network boot on the nic (otherwise it'll kick in before the floppy).&amp;lt;br /&amp;gt;&lt;br /&gt;
- Ran ibautil -iv to see what embedded image versions were available:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Intel(R) Boot Agent XG v1.0.09&amp;lt;br /&amp;gt;&lt;br /&gt;
Intel(R) Boot Agent GE v1.2.36&amp;lt;br /&amp;gt;&lt;br /&gt;
Intel(R) Boot Agent FE v4.1.19&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
- Ran ibautil -up to perform the image upgrade.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
It's interesting to note that no version showed up for out intel nic when initially running ibautil. After the upgrade, however, the version corectly showed as 4.1.19.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I made sure that I had simular features to this in my dhcpd.conf file:&amp;lt;br /&amp;gt;&lt;br /&gt;
option broadcast-address 192.168.254.255;&amp;lt;br /&amp;gt;&lt;br /&gt;
option domain-name-servers 192.168.254.3;&amp;lt;br /&amp;gt;&lt;br /&gt;
option domain-name &amp;quot;simerson.net&amp;quot;;&amp;lt;br /&amp;gt;&lt;br /&gt;
option routers 192.168.254.1;&amp;lt;br /&amp;gt;&lt;br /&gt;
option subnet-mask 255.255.255.0;&amp;lt;br /&amp;gt;&lt;br /&gt;
server-name &amp;quot;pxe-gw&amp;quot;;&amp;lt;br /&amp;gt;&lt;br /&gt;
server-identifier 192.168.254.3;&amp;lt;br /&amp;gt;&lt;br /&gt;
next-server 192.168.254.3;&amp;lt;br /&amp;gt;&lt;br /&gt;
default-lease-time -1;&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
subnet 192.168.254.0 netmask 255.255.255.0 {&amp;lt;br /&amp;gt;&lt;br /&gt;
range 192.168.254.32 192.168.254.99;&amp;lt;br /&amp;gt;&lt;br /&gt;
option root-path &amp;quot;/usr/local/export/pxe&amp;quot;;&amp;lt;br /&amp;gt;&lt;br /&gt;
filename &amp;quot;pxeboot&amp;quot;;&amp;lt;br /&amp;gt;&lt;br /&gt;
}&amp;lt;br /&amp;gt;&lt;br /&gt;
host cm.simerson.net {&amp;lt;br /&amp;gt;&lt;br /&gt;
hardware ethernet 00:e0:18:98:f0:cc;&amp;lt;br /&amp;gt;&lt;br /&gt;
fixed-address 192.168.254.126;&amp;lt;br /&amp;gt;&lt;br /&gt;
}&amp;lt;br /&amp;gt;&lt;br /&gt;
host c1.simerson.net {&amp;lt;br /&amp;gt;&lt;br /&gt;
hardware ethernet 00:60:97:0e:bb:a7;&amp;lt;br /&amp;gt;&lt;br /&gt;
fixed-address 192.168.254.131;&amp;lt;br /&amp;gt;&lt;br /&gt;
}&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==X config notes==&lt;br /&gt;
On the X server the /etc/X11/xorg.conf file is only used for the X server not the clients.&lt;br /&gt;
&lt;br /&gt;
To use this same configuration for your X Terminal Clients copy this file to /diskless_rw/&amp;lt;Client IP&amp;gt;/etc/X11 and it will use it.&lt;br /&gt;
&lt;br /&gt;
==Starting X on the client==&lt;br /&gt;
There are two ways of doing this and it depends on your hardware mainly.  &lt;br /&gt;
&lt;br /&gt;
1. run all programs on the server using the servers CPU and Memory this we will call the 'XDM Method'&lt;br /&gt;
2. run all programs from the NFS mounts using the clients CPU and Memory but the HD of the server, this we will call the 'NFS Method'&lt;br /&gt;
&lt;br /&gt;
Both methods will boot from PXE-Boot and can be diskless.&lt;br /&gt;
&lt;br /&gt;
===XDM Method===&lt;br /&gt;
Recommended for machines less than 1Ghz 256MB&lt;br /&gt;
&lt;br /&gt;
This is quite simple to setup.  Change your rc file in the /diskless_ro/etc directory to have this line at the end:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
X -query &amp;lt;server ip&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make sure on the server you setup xdm to start on system startup&lt;br /&gt;
 # vi /etc/ttys&lt;br /&gt;
&lt;br /&gt;
Search for this line:&lt;br /&gt;
 ttyv8   &amp;quot;/usr/X11R6/bin/xdm -nodaemon&amp;quot;  xterm   off secure&lt;br /&gt;
&lt;br /&gt;
and change it to:&lt;br /&gt;
 ttyv8   &amp;quot;/usr/X11R6/bin/xdm -nodaemon&amp;quot;  xterm   on secure&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also type this command at the command line on the client to test before hand.&lt;br /&gt;
&lt;br /&gt;
===NFS Method===&lt;br /&gt;
Recommended for machines over 1Ghz 256MB or if you want to utilise any of the clients devices such as local HD, USB, CD/DVD burners, etc.&lt;br /&gt;
&lt;br /&gt;
This is much trickier.&lt;br /&gt;
&lt;br /&gt;
Log in&lt;br /&gt;
Now type 'startx' at the command line.&lt;br /&gt;
&lt;br /&gt;
==Custom Kernels==&lt;br /&gt;
If you want to create custom kernels for your clients then do this:&lt;br /&gt;
&lt;br /&gt;
Create your custom kernel&lt;br /&gt;
 # cd /sys/i386/conf&lt;br /&gt;
 # cp GENERIC DISKLESS&lt;br /&gt;
 # vi DISKLESS&lt;br /&gt;
&lt;br /&gt;
Make changes and build and install&lt;br /&gt;
&lt;br /&gt;
 # cd /usr/src&lt;br /&gt;
 # make buildkernel KERNCONF=DISKLESS&lt;br /&gt;
 # make installkernel KERNCONF=DISKLESS DESTDIR=/diskless_ro&lt;br /&gt;
&lt;br /&gt;
==todo==&lt;br /&gt;
Here are some of the jobs left to do to make this secure or generally better:&lt;br /&gt;
&lt;br /&gt;
- There must be a simplier way to set this up if your going to use XDM in the end.  IE: do we need to do half of this tutorial if we are going to run XDM.&lt;br /&gt;
&lt;br /&gt;
- When the same user logs onto two seperate machines they cannot start firefox or thunderbird as it complains about being open somewhere else.  This assumes you have firefox and thunderbird already open on both machines that you logged onto.&lt;br /&gt;
&lt;br /&gt;
===Known Issues===&lt;br /&gt;
&lt;br /&gt;
- Doesn't work with HP-COMPAQ-T5525 thin client as it doesn't want to boot, it says it's missing libfreetype.so.9 which we do have it just cannot find it for some reason.  It's trying to use the VIA chipset for graphics which is different to all the other clients I've loaded successfully so far.&lt;br /&gt;
&lt;br /&gt;
- USB mice not working instead use PS/2.  If we got this working it may help get the HP T5525 working&lt;br /&gt;
&lt;br /&gt;
===Keyboard repeating on notebooks===&lt;br /&gt;
- typing on some keyboards (like my notebook) causes double characters to display if you type too fast. - This is the notebook, if you go and set the KDE Accessabiltiy options and set the keyboard rate to 50ms, this fixes the problem.&lt;br /&gt;
&lt;br /&gt;
===USB mouse===&lt;br /&gt;
&lt;br /&gt;
Editing /etc/devd.conf file and searched for ums&lt;br /&gt;
remarked out the action line.&lt;br /&gt;
 &lt;br /&gt;
rebooted.&lt;br /&gt;
 &lt;br /&gt;
Someone off IRC suggested that I build a GENERIC xorg.conf file which has vesa, usb mouse and ps/2 mouse configurations through it.&lt;br /&gt;
 &lt;br /&gt;
I reverted everything back to normal ps/2 mouse config, copying my usb config files to the following:&lt;br /&gt;
/etc/devd.conf_usb&lt;br /&gt;
/etc/rc.conf_usb&lt;br /&gt;
/etc/X11/xorg.conf_usb&lt;br /&gt;
 &lt;br /&gt;
I think we need a seperate configuration for the HP, it uses a weird display driver.&lt;br /&gt;
&lt;br /&gt;
==links==&lt;br /&gt;
&lt;br /&gt;
http://www.onlamp.com/pub/a/bsd/2004/09/09/diskless_server.html&lt;br /&gt;
&lt;br /&gt;
http://www.onlamp.com/pub/a/bsd/2004/09/30/diskless_clients.html&lt;br /&gt;
&lt;br /&gt;
http://people.freebsd.org/~alfred/pxe/en_US.ISO8859-1/articles/pxe/article.html&lt;br /&gt;
&lt;br /&gt;
http://www.the-labs.com/FreeBSD/Diskless/&lt;br /&gt;
&lt;br /&gt;
http://www.nber.org/sys-admin/FreeBSD-diskless.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://wikitest.freebsd.org/MarkusBoelter&lt;br /&gt;
&lt;br /&gt;
http://www.daemonsecurity.com/pub/pxeboot/&lt;br /&gt;
&lt;br /&gt;
http://www.kano.org.uk/projects/pxe/&lt;br /&gt;
&lt;br /&gt;
File Examples:&lt;br /&gt;
&lt;br /&gt;
http://www.watson.org/~robert/freebsd/pxe/&lt;br /&gt;
&lt;br /&gt;
PXE Information&lt;br /&gt;
http://www.computerworld.com/action/article.do?command=viewArticleBasic&amp;amp;articleId=108551&lt;br /&gt;
&lt;br /&gt;
[[Category:FreeBSD_for_Workstations]]&lt;/div&gt;</summary>
		<author><name>165.228.0.35</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/X_Windows_Terminal</id>
		<title>X Windows Terminal</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/X_Windows_Terminal"/>
				<updated>2006-11-01T00:24:56Z</updated>
		
		<summary type="html">&lt;p&gt;165.228.0.35: /* Setup diskless_ro */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Advantages==&lt;br /&gt;
X Windows can be used in a Server-Client relationship.  By setting up your X Windows Server you allow the use of all the programs on that computer to all the client PC's.  &lt;br /&gt;
&lt;br /&gt;
There are many advantages of running client computers in this manner:&lt;br /&gt;
* They don't even need a hard drive.  &lt;br /&gt;
* It's silent as there are no moving parts&lt;br /&gt;
* The solution saves power as your computers are very thin.&lt;br /&gt;
* Everything can be backed up centrally.&lt;br /&gt;
* Boot times for client PC's are the fastest around.&lt;br /&gt;
* Clients don't need much CPU speed, memory, etc.  Because of this they would be very cheap.  You could get away with using a Pentium 100Mhz with 32MB ram, no hard drive, no CD-ROM, no Floppy and a fanless power supply.  You just need a ethernet card with a PXEBOOT ROM. (XDM mode)&lt;br /&gt;
* Central management of applications, users, config&lt;br /&gt;
&lt;br /&gt;
==From the Beginning==&lt;br /&gt;
I've based this document on FreeBSD 6.1.&lt;br /&gt;
&lt;br /&gt;
Install FreeBSD 6.1 as per usual.&lt;br /&gt;
I've setup my mount points as this:&lt;br /&gt;
  '''Part    Mount        Size'''&lt;br /&gt;
  ad0s1b  Swap         (equal to how much memory I have in my machine)&lt;br /&gt;
  ad0s1a  /            512MB&lt;br /&gt;
  ad0s1d  /var         1G&lt;br /&gt;
  ad0s1e  /tmp         512MB&lt;br /&gt;
  ad0s1f  /usr         2GB    min.&lt;br /&gt;
          /diskless_ro 512MB&lt;br /&gt;
          /diskless_rw 1GB    min.&lt;br /&gt;
&lt;br /&gt;
I selected 'A' for auto and then deleted /usr and created /usr as 2g.&lt;br /&gt;
&lt;br /&gt;
Select User-X install. Yes to Ports if you have the room.&lt;br /&gt;
&lt;br /&gt;
Select SSH Server and NFS Server in the installation process, for the rest of the options go with the default.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
NOTE: If you forget to add any of the labels above, you will have to reboot as you cannot add labels to your boot drive when you have booted off it. So boot of the installation CD and use the configure -&amp;gt; label option in the sysinstall screen to add these labels to your boot drive.  You may need to retype the mount points for /, /var, /tmp and /usr by hitting 'm' on each label.  Once you have created these labels in the 'Disklabel Editor' then you can hit 'w' to write them to the disk.  answer 'yes' to the next question, hit 'ok' to the warning message.  Now quit and reboot. Add them to fstab (/dev/ad0s1g   /diskless_ro) &amp;amp; (/dev/ad0s1h   /diskless_rw) and mount.&lt;br /&gt;
&lt;br /&gt;
I find the best way to get this working is to break it down in to small steps and get each step working independantly.  IE: Setup NFS and see if you can mount it from another FreeBSD machine, don't just assume it will work and boot your PXE-Boot machine.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Throughout my documentation&lt;br /&gt;
&lt;br /&gt;
192.168.1.1 = the Server&lt;br /&gt;
&lt;br /&gt;
192.168.1.2 = the client (may be a full freebsd system or pxeboot)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At this point I normally install fluxbox with the following line:&lt;br /&gt;
&lt;br /&gt;
 shell# pkg_add -r fluxbox-devel&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
change your ~/.xinitrc file to the following:&lt;br /&gt;
&lt;br /&gt;
 startfluxbox&lt;br /&gt;
&lt;br /&gt;
Copy to .xsession&lt;br /&gt;
 $ ln -s ~/.xinitrc ~/.xsession&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Use the following command to update your fluxbox menus:&lt;br /&gt;
&lt;br /&gt;
 shell$ fluxbox-generate_menu&lt;br /&gt;
&lt;br /&gt;
==Running a single application==&lt;br /&gt;
&lt;br /&gt;
To get started I have my server setup running FreeBSD, with X-Windows and a few applications.  Nothing too special.  Then I have my client PC, which to start off I used the frenzy 1.0 boot CD to perform these initial tests.  You can get this from [http://frenzy.org.ua/eng/ frenzy website].  I entered into fluxbox, but you could equally use any X session.&lt;br /&gt;
You must allow incoming connections this is done with two commands&lt;br /&gt;
&lt;br /&gt;
 client$ startx -listen_tcp&lt;br /&gt;
 client$ xhost +&lt;br /&gt;
&lt;br /&gt;
This allows all computers to start applications on your client PC.  It's dangerous but good for testing everything is setup correctly.&lt;br /&gt;
&lt;br /&gt;
 client$ ssh &amp;lt;server user@server ip&amp;gt;&lt;br /&gt;
 eg: ssh mick@192.168.1.1&lt;br /&gt;
&lt;br /&gt;
 ssh$ export DISPLAY='192.168.1.2:0'&lt;br /&gt;
&lt;br /&gt;
Or if your running bash:&lt;br /&gt;
 ssh$ DISPLAY=&amp;lt;client ip&amp;gt;:&amp;lt;client display&amp;gt;; export DISPLAY&lt;br /&gt;
 eg: DISPLAY=192.168.1.2:0; export DISPLAY&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 ssh$ xcalc &amp;amp;&lt;br /&gt;
&lt;br /&gt;
This should display on your client&lt;br /&gt;
&lt;br /&gt;
==Running a whole X Windows Session (XDM)==&lt;br /&gt;
This sets up a server so that you can share your X session with any clients which want to connect.  (Simular to Terminal Services under windows)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===server===&lt;br /&gt;
edit:&lt;br /&gt;
 /usr/X11R6/lib/X11/xdm/xdm-config&lt;br /&gt;
&lt;br /&gt;
comment out with a '!' the request line&amp;lt;br&amp;gt;&lt;br /&gt;
 DisplayManager.requestPort: 0&lt;br /&gt;
&lt;br /&gt;
edit:&amp;lt;br&amp;gt;&lt;br /&gt;
 /usr/X11R6/lib/X11/xdm/Xaccess&lt;br /&gt;
&lt;br /&gt;
Enter a single asterisk any where in the file, so the contents should be one asterisk and the rest commented out.  There should be an asterisk on line 49 which you can uncomment.&lt;br /&gt;
&lt;br /&gt;
Whilst in the /usr/X11R6/lib/X11/xdm directory do these commands:&lt;br /&gt;
 shell# vi Xstartup&lt;br /&gt;
&lt;br /&gt;
Add into this file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
#&lt;br /&gt;
# Xstartup&lt;br /&gt;
#&lt;br /&gt;
# This program is run as root after the user is verified&lt;br /&gt;
#&lt;br /&gt;
if [ -f /etc/nologin ]; then&lt;br /&gt;
   xmessage -file /etc/nologin -timeout 30 -center&lt;br /&gt;
   exit 1&lt;br /&gt;
fi&lt;br /&gt;
sessreg -a -l $DISPLAY -x /usr/X11R6/lib/xdm/Xservers $LOGNAME&lt;br /&gt;
/usr/X11R6/lib/xdm/GiveConsole&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
shell# chmod +x Xstartup&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Make sure your firewall has all traffic for you lan.  (Need to know which exact ports to allow).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;run xdm on server as root&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 shell# xdm&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can put this xdm into the /etc/ttys so that it starts automatically on boot up.&lt;br /&gt;
&lt;br /&gt;
===client===&lt;br /&gt;
make sure your not in X&lt;br /&gt;
&lt;br /&gt;
type this command:&lt;br /&gt;
&lt;br /&gt;
 shell# X -broadcast&lt;br /&gt;
&lt;br /&gt;
This assumes that you are running only one server.&lt;br /&gt;
Otherwise use:&lt;br /&gt;
&lt;br /&gt;
 shell# X -query 192.168.1.1&lt;br /&gt;
&lt;br /&gt;
==DHCP - Install and setup==&lt;br /&gt;
Server setup.&lt;br /&gt;
&lt;br /&gt;
install through package&lt;br /&gt;
 # pkg_add -r isc-dhcp3-server&lt;br /&gt;
&lt;br /&gt;
We do this so we can define the root path for the diskless system.&lt;br /&gt;
&lt;br /&gt;
copy /usr/local/etc/dhcpd.conf.sample to /usr/local/etc/dhcpd.conf&lt;br /&gt;
&lt;br /&gt;
edit /usr/local/etc/dhcpd.conf and make sure it has these lines in it.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# dhcpd.conf&lt;br /&gt;
#&lt;br /&gt;
# Sample configuration file for ISC dhcpd&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
# option definitions common to all supported networks...&lt;br /&gt;
#option domain-name &amp;quot;example.org&amp;quot;;&lt;br /&gt;
#option domain-name-servers ns1.example.org, ns2.example.org;&lt;br /&gt;
&lt;br /&gt;
default-lease-time 3600;&lt;br /&gt;
max-lease-time 86400;&lt;br /&gt;
&lt;br /&gt;
# If this DHCP server is the official DHCP server for the local&lt;br /&gt;
# network, the authoritative directive should be uncommented.&lt;br /&gt;
authoritative;&lt;br /&gt;
&lt;br /&gt;
# ad-hoc DNS update scheme - set to &amp;quot;none&amp;quot; to disable dynamic DNS updates.&lt;br /&gt;
ddns-update-style none;&lt;br /&gt;
&lt;br /&gt;
option root-path &amp;quot;192.168.1.1:/diskless_ro&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
# lines added for pxeboot client&lt;br /&gt;
use-host-decl-names on;&lt;br /&gt;
next-server 192.168.1.1;&lt;br /&gt;
filename &amp;quot;pxeboot&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
# Use this to send dhcp log messages to a different log file (you also&lt;br /&gt;
# have to hack syslog.conf to complete the redirection).&lt;br /&gt;
log-facility local7;&lt;br /&gt;
&lt;br /&gt;
# No service will be given on this subnet, but declaring it helps the&lt;br /&gt;
# DHCP server to understand the network topology.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# This is a very basic subnet declaration.&lt;br /&gt;
&lt;br /&gt;
subnet 192.168.1.0 netmask 255.255.255.0 {&lt;br /&gt;
  range 192.168.1.10 192.168.1.20;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create the leases file&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# touch /var/db/dhcpd.leases&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Restart the daemon&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# killall dhcpd&lt;br /&gt;
# dhcpd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add to /etc/rc.conf&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dhcpd_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using a seperate DHCP server===&lt;br /&gt;
If you already have a DHCP server and you want to use that instead then you have to do these steps.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====On your DHCP Server====&lt;br /&gt;
1. edit /usr/local/etc/dhcpd.conf and add the following&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
authoritative;&lt;br /&gt;
ddns-update-style none;&lt;br /&gt;
&lt;br /&gt;
option root-path &amp;quot;&amp;lt;X Server IP&amp;gt;:/diskless_ro&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
# lines added for pxeboot client&lt;br /&gt;
use-host-decl-names on;&lt;br /&gt;
next-server &amp;lt;X Server IP&amp;gt;;&lt;br /&gt;
filename &amp;quot;pxeboot&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
2. stop dhcpd&lt;br /&gt;
3. start dhcpd&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Client====&lt;br /&gt;
Your client should boot now just remember that you may get a different IP now that you are talking to a different DHCP server so you have to change your exports file and copy accross a directory in /diskless_rw for the new IP.  All this is done on the X Server.&lt;br /&gt;
&lt;br /&gt;
==TFTP Setup==&lt;br /&gt;
TFTP helps us transport the kernel to the PXE-Boot machines.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# mkdir /tftpboot&lt;br /&gt;
# cp /boot/pxeboot /tftpboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Uncomment the following line in /etc/inetd.conf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tftp    dgram   udp     wait    root    /usr/libexec/tftpd      tftpd -l -s /tftpboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart the inetd service&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# killall -HUP inetd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If inetd has not started automatically do the following:&lt;br /&gt;
&lt;br /&gt;
Add the following to /etc/rc.conf&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
inetd_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now start inetd manually.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# inetd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test===&lt;br /&gt;
To test that tftp has loaded type the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# sockstat -4l | grep 69 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and you should see this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
root      inetd       13719 5   udp4    *:69                 *:*&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==NFS Setup==&lt;br /&gt;
Network File System.  Here we share all the directories from the server so that the diskless clients see these drives as if those directories were the diskless client's.&lt;br /&gt;
&lt;br /&gt;
===Server Setup===&lt;br /&gt;
If you forgot to select 'Yes' to NFS server setup in the FreeBSD installation then you have to setup the server manually like so:&lt;br /&gt;
&lt;br /&gt;
Enable NFS /etc/rc.conf&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rpcbind_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
nfs_server_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test===&lt;br /&gt;
A quick test to see if your NFS server is acting normal:&lt;br /&gt;
&lt;br /&gt;
Edit the /etc/exports and add the following&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/usr       -alldirs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This allows anyone to connect to your /usr mount.&lt;br /&gt;
&lt;br /&gt;
Now run these commands to restart and view your mounts&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# kill -HUP `cat /var/run/mountd.pid`&lt;br /&gt;
# showmount -e&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now try and mount it from a client running BSD&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# mount -t nfs 192.168.1.1:/usr /mnt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Server exports setup===&lt;br /&gt;
&lt;br /&gt;
Make directories for each IP for your clients&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /diskless_rw&lt;br /&gt;
# mkdir 192.168.1.2&lt;br /&gt;
# cd 192.168.1.2&lt;br /&gt;
# mkdir etc var&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Configure /etc/exports&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# file systems accessible only for reading:&lt;br /&gt;
# Original way of linking up the /usr&lt;br /&gt;
#/usr -ro -maproot=0 -network 192.168.1.0 -mask 255.255.255.0&lt;br /&gt;
&lt;br /&gt;
/usr -network 192.168.1.0 -mask 255.255.255.0&lt;br /&gt;
/diskless_ro -ro -maproot=0 -network 192.168.1.0 -mask 255.255.255.0&lt;br /&gt;
/diskless_rw/192.168.1.2/etc /diskless_rw/192.168.1.2/var -maproot=root 192.168.1.2&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restarting NFS&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# kill -HUP `cat /var/run/mountd.pid`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If NFS is not started yet do the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
data# rpcbind&lt;br /&gt;
data# nfsd -u -t -n 20 -h 192.168.1.1&lt;br /&gt;
data# mountd -r&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Testing to see if the exports are correct&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
data# showmount -e&lt;br /&gt;
Exports list on localhost:&lt;br /&gt;
/usr                              192.168.1.0&lt;br /&gt;
/diskless_rw/192.168.1.2/var      192.168.1.2&lt;br /&gt;
/diskless_rw/192.168.1.2/etc      192.168.1.2&lt;br /&gt;
/diskless_ro                      192.168.1.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Setup diskless_rw==&lt;br /&gt;
Create directories&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /diskless_rw/192.168.1.2/etc&lt;br /&gt;
# mkdir pam.d X11&lt;br /&gt;
&lt;br /&gt;
# cd /diskless_rw/192.168.1.2/var&lt;br /&gt;
# mkdir home log run tmp&lt;br /&gt;
# chmod 1777 tmp&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a swap file in the var directory for the client&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# dd if=/dev/zero of=/diskless_rw/192.168.1.2/var/swap bs=1k count=32000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in the /diskless_rw/&amp;lt;ip&amp;gt;/var/log directory I created the following log files so that syslogd would have files to write to:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /diskless_rw/192.168.1.2/var/log&lt;br /&gt;
# touch messages security auth.log maillog lpd-errs xferlog cron debug.log slip.log ppp.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy the following files from the systems /etc directory to /diskless_rw/&amp;lt;client ip&amp;gt;/etc&lt;br /&gt;
 # cp -Rv &amp;lt;files&amp;gt; /diskless_rw/&amp;lt;ip&amp;gt;/etc&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
auth.conf&lt;br /&gt;
disktab&lt;br /&gt;
gettytab&lt;br /&gt;
group&lt;br /&gt;
hosts&lt;br /&gt;
login.access&lt;br /&gt;
login.conf&lt;br /&gt;
login.conf.db&lt;br /&gt;
master.passwd&lt;br /&gt;
netconfig&lt;br /&gt;
protocols&lt;br /&gt;
pam.d&lt;br /&gt;
pwd.db&lt;br /&gt;
services&lt;br /&gt;
spwd.db&lt;br /&gt;
syslog.conf&lt;br /&gt;
termcap -&amp;gt; /usr/share/misc/termcap&lt;br /&gt;
ttys&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is a shortcut which you can just copy and paste in an xterm window.&lt;br /&gt;
 # cd /etc&lt;br /&gt;
 # cp -Rv auth.conf disktab gettytab group hosts login.access login.conf login.conf.db master.passwd netconfig protocols pam.d pwd.db services spwd.db syslog.conf termcapttys /diskless_rw/&amp;lt;ip&amp;gt;/etc&lt;br /&gt;
It's very important that you copy all the files in pam.d across otherwise you will not have a password prompt on your login.&lt;br /&gt;
&lt;br /&gt;
Create a fstab in /diskless_rw/&amp;lt;ip&amp;gt;/etc&lt;br /&gt;
 # touch /diskless_rw/&amp;lt;ip&amp;gt;/etc/fstab&lt;br /&gt;
&lt;br /&gt;
==Setup diskless_ro==&lt;br /&gt;
This is the common root mount for all pxe-boot clients.&lt;br /&gt;
&lt;br /&gt;
Copy accross important directories and kernel from boot to diskless_ro&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cp -rv /bin /lib /libexec /sbin /boot /diskless_ro&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For some client machines you may have to disable the ACPI (Power management) in the /diskless_ro/boot/device.hints&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
hint.acpi.0.disabled=&amp;quot;1&amp;quot; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make a dev so that clients can boot without freezing&lt;br /&gt;
Make a directory so that we can mount var from the /diskless_rw/&amp;lt;client ip&amp;gt;/var&lt;br /&gt;
 # cd /diskless_ro&lt;br /&gt;
 # mkdir usr dev var&lt;br /&gt;
&lt;br /&gt;
So we can use the systems /var/tmp and /usr/home directory make soft links to them in the diskless_ro directory&lt;br /&gt;
 # ln -s /var/tmp /usr/home&lt;br /&gt;
&lt;br /&gt;
We require a few files from the systems /etc directory to be copied into the /diskless_ro/etc for common use between the thin clients.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# mkdir /diskless_ro/etc&lt;br /&gt;
# cd /etc&lt;br /&gt;
# cp /services /netconfig /login.conf /diskless_ro/etc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===rc file===&lt;br /&gt;
The /diskless_ro/etc/rc file is the first file which is ran after the kernel has loaded.  Here we mount a the labels from the server.&lt;br /&gt;
&lt;br /&gt;
Create the /diskless_ro/etc/rc&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin; export PATH&lt;br /&gt;
TMPDIR=~/tmp;export TMPDIR&lt;br /&gt;
TMP=~/tmp;export TMP&lt;br /&gt;
&lt;br /&gt;
mount -t nfs 192.168.1.1:/usr /usr&lt;br /&gt;
&lt;br /&gt;
boot_ip=`/sbin/ifconfig | /usr/bin/grep &amp;quot;inet &amp;quot; | /usr/bin/grep -v 127.0.0.1 |&lt;br /&gt;
/usr/bin/awk '{print $2}'`&lt;br /&gt;
mount_nfs -L 192.168.1.1:/diskless_rw/${boot_ip}/etc /etc&lt;br /&gt;
mount_nfs -L 192.168.1.1:/diskless_rw/${boot_ip}/var /var&lt;br /&gt;
&lt;br /&gt;
swapon /var/swap&lt;br /&gt;
&lt;br /&gt;
#rm -rf /var/tmp/*&lt;br /&gt;
#rm -rf /var/tmp/.*&lt;br /&gt;
&lt;br /&gt;
# Option if you choose XDM terminals&lt;br /&gt;
#X -query 192.168.1.1&lt;br /&gt;
&lt;br /&gt;
. /etc/rc2&lt;br /&gt;
exit 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Remember to change 192.168.1.1 to your X server's IP&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The -L on the mount_nfs is there so we don't get flock errors.&lt;br /&gt;
&lt;br /&gt;
===rc2 file===&lt;br /&gt;
This sets up some links for libraries and the logging daemon.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
mount -a&lt;br /&gt;
/sbin/ldconfig -elf /usr/lib/compat /usr/X11R6/lib /usr/local/lib&lt;br /&gt;
&lt;br /&gt;
syslogd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now change permissions so rc can run.&lt;br /&gt;
 # chmod +x rc*&lt;br /&gt;
&lt;br /&gt;
Copy /diskless_ro/etc/rc and rc2 to /diskless_rw/&amp;lt;client ip&amp;gt;/etc&lt;br /&gt;
 # cp /diskless_ro/etc/rc* /diskless_rw/192.168.1.2/etc&lt;br /&gt;
&lt;br /&gt;
==GRUB Floppy boot (optional)==&lt;br /&gt;
&lt;br /&gt;
(would like to compile this ourselves later)&lt;br /&gt;
To get started we downloaded the image from www.hp.uab.edu/~ed/grub-net&lt;br /&gt;
&lt;br /&gt;
 shell# dd if=/data/grub-net.img of=/dev/fd0&lt;br /&gt;
&lt;br /&gt;
Then we mounted it as msdos&lt;br /&gt;
Remove/rename menu.1st from the grub directory as it was doing something funny with it.  We think that it was looking for a tftp server through our dhcp and we don't have a the dhcp setup correctly here, so we wanted to do it manually.&lt;br /&gt;
&lt;br /&gt;
Reboot off the floppy now..&lt;br /&gt;
&lt;br /&gt;
 grub&amp;gt; ifconfig --address=192.168.1.2 --mask=255.255.255.0 --gateway=192.168.1.1&lt;br /&gt;
 --server=192.168.1.2&lt;br /&gt;
&lt;br /&gt;
OR you can use dhcp&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 grub&amp;gt; dhcp&amp;lt;br&amp;gt; &lt;br /&gt;
 grub&amp;gt; tftpserver 192.168.1.2&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Setup tftp on your server, we created a directory /tftpboot. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Starting diskless system through GRUB===&lt;br /&gt;
This is an alternative boot loader.  You can use this for testing, if you don't have a pxeboot chip, otherwise skip this section.&lt;br /&gt;
&lt;br /&gt;
These commands are half working...&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 grub&amp;gt; root (nd)&amp;lt;br&amp;gt;&lt;br /&gt;
 grub&amp;gt; kernel /kernel root=ad0s1a&amp;lt;br&amp;gt;&lt;br /&gt;
 grub&amp;gt; pxeboot&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Completely Diskless System (PXEBOOT ROM) (optional)==&lt;br /&gt;
&lt;br /&gt;
Running completely diskless by booting from a Network ROM Chip.&lt;br /&gt;
&lt;br /&gt;
We have now got a Intel GD82559 Etherexpress pro/100 Card.&lt;br /&gt;
&lt;br /&gt;
When we boot up on the client machine with that card it displays:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Intel UNDI, PXE-2.0 (build 067)&amp;lt;br /&amp;gt;&lt;br /&gt;
Copyright (C) 1997-1998 Intel Corporation&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Which we cannot get working so we have read that you have to update this version to Build 82.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
copy /boot/pxeboot to /tftpboot directory we made before&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
- Downloaded proboot.exe from support.intel.com and unpacked into a windows box.&amp;lt;br /&amp;gt;&lt;br /&gt;
- Copied ibautil.exe onto a windows 98 boot disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
- Rebooted the test box after disabling network boot on the nic (otherwise it'll kick in before the floppy).&amp;lt;br /&amp;gt;&lt;br /&gt;
- Ran ibautil -iv to see what embedded image versions were available:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Intel(R) Boot Agent XG v1.0.09&amp;lt;br /&amp;gt;&lt;br /&gt;
Intel(R) Boot Agent GE v1.2.36&amp;lt;br /&amp;gt;&lt;br /&gt;
Intel(R) Boot Agent FE v4.1.19&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
- Ran ibautil -up to perform the image upgrade.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
It's interesting to note that no version showed up for out intel nic when initially running ibautil. After the upgrade, however, the version corectly showed as 4.1.19.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I made sure that I had simular features to this in my dhcpd.conf file:&amp;lt;br /&amp;gt;&lt;br /&gt;
option broadcast-address 192.168.254.255;&amp;lt;br /&amp;gt;&lt;br /&gt;
option domain-name-servers 192.168.254.3;&amp;lt;br /&amp;gt;&lt;br /&gt;
option domain-name &amp;quot;simerson.net&amp;quot;;&amp;lt;br /&amp;gt;&lt;br /&gt;
option routers 192.168.254.1;&amp;lt;br /&amp;gt;&lt;br /&gt;
option subnet-mask 255.255.255.0;&amp;lt;br /&amp;gt;&lt;br /&gt;
server-name &amp;quot;pxe-gw&amp;quot;;&amp;lt;br /&amp;gt;&lt;br /&gt;
server-identifier 192.168.254.3;&amp;lt;br /&amp;gt;&lt;br /&gt;
next-server 192.168.254.3;&amp;lt;br /&amp;gt;&lt;br /&gt;
default-lease-time -1;&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
subnet 192.168.254.0 netmask 255.255.255.0 {&amp;lt;br /&amp;gt;&lt;br /&gt;
range 192.168.254.32 192.168.254.99;&amp;lt;br /&amp;gt;&lt;br /&gt;
option root-path &amp;quot;/usr/local/export/pxe&amp;quot;;&amp;lt;br /&amp;gt;&lt;br /&gt;
filename &amp;quot;pxeboot&amp;quot;;&amp;lt;br /&amp;gt;&lt;br /&gt;
}&amp;lt;br /&amp;gt;&lt;br /&gt;
host cm.simerson.net {&amp;lt;br /&amp;gt;&lt;br /&gt;
hardware ethernet 00:e0:18:98:f0:cc;&amp;lt;br /&amp;gt;&lt;br /&gt;
fixed-address 192.168.254.126;&amp;lt;br /&amp;gt;&lt;br /&gt;
}&amp;lt;br /&amp;gt;&lt;br /&gt;
host c1.simerson.net {&amp;lt;br /&amp;gt;&lt;br /&gt;
hardware ethernet 00:60:97:0e:bb:a7;&amp;lt;br /&amp;gt;&lt;br /&gt;
fixed-address 192.168.254.131;&amp;lt;br /&amp;gt;&lt;br /&gt;
}&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==X config notes==&lt;br /&gt;
On the X server the /etc/X11/xorg.conf file is only used for the X server not the clients.&lt;br /&gt;
&lt;br /&gt;
To use this same configuration for your X Terminal Clients copy this file to /diskless_rw/&amp;lt;Client IP&amp;gt;/etc/X11 and it will use it.&lt;br /&gt;
&lt;br /&gt;
==Starting X on the client==&lt;br /&gt;
There are two ways of doing this and it depends on your hardware mainly.  &lt;br /&gt;
&lt;br /&gt;
1. run all programs on the server using the servers CPU and Memory this we will call the 'XDM Method'&lt;br /&gt;
2. run all programs from the NFS mounts using the clients CPU and Memory but the HD of the server, this we will call the 'NFS Method'&lt;br /&gt;
&lt;br /&gt;
Both methods will boot from PXE-Boot and can be diskless.&lt;br /&gt;
&lt;br /&gt;
===XDM Method===&lt;br /&gt;
Recommended for machines less than 1Ghz 256MB&lt;br /&gt;
&lt;br /&gt;
This is quite simple to setup.  Change your rc file in the /diskless_ro/etc directory to have this line at the end:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
X -query &amp;lt;server ip&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make sure on the server you setup xdm to start on system startup&lt;br /&gt;
 # vi /etc/ttys&lt;br /&gt;
&lt;br /&gt;
Search for this line:&lt;br /&gt;
 ttyv8   &amp;quot;/usr/X11R6/bin/xdm -nodaemon&amp;quot;  xterm   off secure&lt;br /&gt;
&lt;br /&gt;
and change it to:&lt;br /&gt;
 ttyv8   &amp;quot;/usr/X11R6/bin/xdm -nodaemon&amp;quot;  xterm   on secure&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also type this command at the command line on the client to test before hand.&lt;br /&gt;
&lt;br /&gt;
===NFS Method===&lt;br /&gt;
Recommended for machines over 1Ghz 256MB or if you want to utilise any of the clients devices such as local HD, USB, CD/DVD burners, etc.&lt;br /&gt;
&lt;br /&gt;
This is much trickier.&lt;br /&gt;
&lt;br /&gt;
Log in&lt;br /&gt;
Now type 'startx' at the command line.&lt;br /&gt;
&lt;br /&gt;
==Custom Kernels==&lt;br /&gt;
If you want to create custom kernels for your clients then do this:&lt;br /&gt;
&lt;br /&gt;
Create your custom kernel&lt;br /&gt;
 # cd /sys/i386/conf&lt;br /&gt;
 # cp GENERIC DISKLESS&lt;br /&gt;
 # vi DISKLESS&lt;br /&gt;
&lt;br /&gt;
Make changes and build and install&lt;br /&gt;
&lt;br /&gt;
 # cd /usr/src&lt;br /&gt;
 # make buildkernel KERNCONF=DISKLESS&lt;br /&gt;
 # make installkernel KERNCONF=DISKLESS DESTDIR=/diskless_ro&lt;br /&gt;
&lt;br /&gt;
==todo==&lt;br /&gt;
Here are some of the jobs left to do to make this secure or generally better:&lt;br /&gt;
&lt;br /&gt;
- There must be a simplier way to set this up if your going to use XDM in the end.  IE: do we need to do half of this tutorial if we are going to run XDM.&lt;br /&gt;
&lt;br /&gt;
- When the same user logs onto two seperate machines they cannot start firefox or thunderbird as it complains about being open somewhere else.  This assumes you have firefox and thunderbird already open on both machines that you logged onto.&lt;br /&gt;
&lt;br /&gt;
===Known Issues===&lt;br /&gt;
&lt;br /&gt;
- Doesn't work with HP-COMPAQ-T5525 thin client as it doesn't want to boot, it says it's missing libfreetype.so.9 which we do have it just cannot find it for some reason.  It's trying to use the VIA chipset for graphics which is different to all the other clients I've loaded successfully so far.&lt;br /&gt;
&lt;br /&gt;
- USB mice not working instead use PS/2.  If we got this working it may help get the HP T5525 working&lt;br /&gt;
&lt;br /&gt;
===Keyboard repeating on notebooks===&lt;br /&gt;
- typing on some keyboards (like my notebook) causes double characters to display if you type too fast. - This is the notebook, if you go and set the KDE Accessabiltiy options and set the keyboard rate to 50ms, this fixes the problem.&lt;br /&gt;
&lt;br /&gt;
===USB mouse===&lt;br /&gt;
&lt;br /&gt;
Editing /etc/devd.conf file and searched for ums&lt;br /&gt;
remarked out the action line.&lt;br /&gt;
 &lt;br /&gt;
rebooted.&lt;br /&gt;
 &lt;br /&gt;
Someone off IRC suggested that I build a GENERIC xorg.conf file which has vesa, usb mouse and ps/2 mouse configurations through it.&lt;br /&gt;
 &lt;br /&gt;
I reverted everything back to normal ps/2 mouse config, copying my usb config files to the following:&lt;br /&gt;
/etc/devd.conf_usb&lt;br /&gt;
/etc/rc.conf_usb&lt;br /&gt;
/etc/X11/xorg.conf_usb&lt;br /&gt;
 &lt;br /&gt;
I think we need a seperate configuration for the HP, it uses a weird display driver.&lt;br /&gt;
&lt;br /&gt;
==links==&lt;br /&gt;
&lt;br /&gt;
http://www.onlamp.com/pub/a/bsd/2004/09/09/diskless_server.html&lt;br /&gt;
&lt;br /&gt;
http://www.onlamp.com/pub/a/bsd/2004/09/30/diskless_clients.html&lt;br /&gt;
&lt;br /&gt;
http://people.freebsd.org/~alfred/pxe/en_US.ISO8859-1/articles/pxe/article.html&lt;br /&gt;
&lt;br /&gt;
http://www.the-labs.com/FreeBSD/Diskless/&lt;br /&gt;
&lt;br /&gt;
http://www.nber.org/sys-admin/FreeBSD-diskless.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://wikitest.freebsd.org/MarkusBoelter&lt;br /&gt;
&lt;br /&gt;
http://www.daemonsecurity.com/pub/pxeboot/&lt;br /&gt;
&lt;br /&gt;
http://www.kano.org.uk/projects/pxe/&lt;br /&gt;
&lt;br /&gt;
File Examples:&lt;br /&gt;
&lt;br /&gt;
http://www.watson.org/~robert/freebsd/pxe/&lt;br /&gt;
&lt;br /&gt;
PXE Information&lt;br /&gt;
http://www.computerworld.com/action/article.do?command=viewArticleBasic&amp;amp;articleId=108551&lt;br /&gt;
&lt;br /&gt;
[[Category:FreeBSD_for_Workstations]]&lt;/div&gt;</summary>
		<author><name>165.228.0.35</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/X_Windows_Terminal</id>
		<title>X Windows Terminal</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/X_Windows_Terminal"/>
				<updated>2006-11-01T00:21:18Z</updated>
		
		<summary type="html">&lt;p&gt;165.228.0.35: /* Setup diskless_rw */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Advantages==&lt;br /&gt;
X Windows can be used in a Server-Client relationship.  By setting up your X Windows Server you allow the use of all the programs on that computer to all the client PC's.  &lt;br /&gt;
&lt;br /&gt;
There are many advantages of running client computers in this manner:&lt;br /&gt;
* They don't even need a hard drive.  &lt;br /&gt;
* It's silent as there are no moving parts&lt;br /&gt;
* The solution saves power as your computers are very thin.&lt;br /&gt;
* Everything can be backed up centrally.&lt;br /&gt;
* Boot times for client PC's are the fastest around.&lt;br /&gt;
* Clients don't need much CPU speed, memory, etc.  Because of this they would be very cheap.  You could get away with using a Pentium 100Mhz with 32MB ram, no hard drive, no CD-ROM, no Floppy and a fanless power supply.  You just need a ethernet card with a PXEBOOT ROM. (XDM mode)&lt;br /&gt;
* Central management of applications, users, config&lt;br /&gt;
&lt;br /&gt;
==From the Beginning==&lt;br /&gt;
I've based this document on FreeBSD 6.1.&lt;br /&gt;
&lt;br /&gt;
Install FreeBSD 6.1 as per usual.&lt;br /&gt;
I've setup my mount points as this:&lt;br /&gt;
  '''Part    Mount        Size'''&lt;br /&gt;
  ad0s1b  Swap         (equal to how much memory I have in my machine)&lt;br /&gt;
  ad0s1a  /            512MB&lt;br /&gt;
  ad0s1d  /var         1G&lt;br /&gt;
  ad0s1e  /tmp         512MB&lt;br /&gt;
  ad0s1f  /usr         2GB    min.&lt;br /&gt;
          /diskless_ro 512MB&lt;br /&gt;
          /diskless_rw 1GB    min.&lt;br /&gt;
&lt;br /&gt;
I selected 'A' for auto and then deleted /usr and created /usr as 2g.&lt;br /&gt;
&lt;br /&gt;
Select User-X install. Yes to Ports if you have the room.&lt;br /&gt;
&lt;br /&gt;
Select SSH Server and NFS Server in the installation process, for the rest of the options go with the default.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
NOTE: If you forget to add any of the labels above, you will have to reboot as you cannot add labels to your boot drive when you have booted off it. So boot of the installation CD and use the configure -&amp;gt; label option in the sysinstall screen to add these labels to your boot drive.  You may need to retype the mount points for /, /var, /tmp and /usr by hitting 'm' on each label.  Once you have created these labels in the 'Disklabel Editor' then you can hit 'w' to write them to the disk.  answer 'yes' to the next question, hit 'ok' to the warning message.  Now quit and reboot. Add them to fstab (/dev/ad0s1g   /diskless_ro) &amp;amp; (/dev/ad0s1h   /diskless_rw) and mount.&lt;br /&gt;
&lt;br /&gt;
I find the best way to get this working is to break it down in to small steps and get each step working independantly.  IE: Setup NFS and see if you can mount it from another FreeBSD machine, don't just assume it will work and boot your PXE-Boot machine.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Throughout my documentation&lt;br /&gt;
&lt;br /&gt;
192.168.1.1 = the Server&lt;br /&gt;
&lt;br /&gt;
192.168.1.2 = the client (may be a full freebsd system or pxeboot)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At this point I normally install fluxbox with the following line:&lt;br /&gt;
&lt;br /&gt;
 shell# pkg_add -r fluxbox-devel&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
change your ~/.xinitrc file to the following:&lt;br /&gt;
&lt;br /&gt;
 startfluxbox&lt;br /&gt;
&lt;br /&gt;
Copy to .xsession&lt;br /&gt;
 $ ln -s ~/.xinitrc ~/.xsession&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Use the following command to update your fluxbox menus:&lt;br /&gt;
&lt;br /&gt;
 shell$ fluxbox-generate_menu&lt;br /&gt;
&lt;br /&gt;
==Running a single application==&lt;br /&gt;
&lt;br /&gt;
To get started I have my server setup running FreeBSD, with X-Windows and a few applications.  Nothing too special.  Then I have my client PC, which to start off I used the frenzy 1.0 boot CD to perform these initial tests.  You can get this from [http://frenzy.org.ua/eng/ frenzy website].  I entered into fluxbox, but you could equally use any X session.&lt;br /&gt;
You must allow incoming connections this is done with two commands&lt;br /&gt;
&lt;br /&gt;
 client$ startx -listen_tcp&lt;br /&gt;
 client$ xhost +&lt;br /&gt;
&lt;br /&gt;
This allows all computers to start applications on your client PC.  It's dangerous but good for testing everything is setup correctly.&lt;br /&gt;
&lt;br /&gt;
 client$ ssh &amp;lt;server user@server ip&amp;gt;&lt;br /&gt;
 eg: ssh mick@192.168.1.1&lt;br /&gt;
&lt;br /&gt;
 ssh$ export DISPLAY='192.168.1.2:0'&lt;br /&gt;
&lt;br /&gt;
Or if your running bash:&lt;br /&gt;
 ssh$ DISPLAY=&amp;lt;client ip&amp;gt;:&amp;lt;client display&amp;gt;; export DISPLAY&lt;br /&gt;
 eg: DISPLAY=192.168.1.2:0; export DISPLAY&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 ssh$ xcalc &amp;amp;&lt;br /&gt;
&lt;br /&gt;
This should display on your client&lt;br /&gt;
&lt;br /&gt;
==Running a whole X Windows Session (XDM)==&lt;br /&gt;
This sets up a server so that you can share your X session with any clients which want to connect.  (Simular to Terminal Services under windows)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===server===&lt;br /&gt;
edit:&lt;br /&gt;
 /usr/X11R6/lib/X11/xdm/xdm-config&lt;br /&gt;
&lt;br /&gt;
comment out with a '!' the request line&amp;lt;br&amp;gt;&lt;br /&gt;
 DisplayManager.requestPort: 0&lt;br /&gt;
&lt;br /&gt;
edit:&amp;lt;br&amp;gt;&lt;br /&gt;
 /usr/X11R6/lib/X11/xdm/Xaccess&lt;br /&gt;
&lt;br /&gt;
Enter a single asterisk any where in the file, so the contents should be one asterisk and the rest commented out.  There should be an asterisk on line 49 which you can uncomment.&lt;br /&gt;
&lt;br /&gt;
Whilst in the /usr/X11R6/lib/X11/xdm directory do these commands:&lt;br /&gt;
 shell# vi Xstartup&lt;br /&gt;
&lt;br /&gt;
Add into this file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
#&lt;br /&gt;
# Xstartup&lt;br /&gt;
#&lt;br /&gt;
# This program is run as root after the user is verified&lt;br /&gt;
#&lt;br /&gt;
if [ -f /etc/nologin ]; then&lt;br /&gt;
   xmessage -file /etc/nologin -timeout 30 -center&lt;br /&gt;
   exit 1&lt;br /&gt;
fi&lt;br /&gt;
sessreg -a -l $DISPLAY -x /usr/X11R6/lib/xdm/Xservers $LOGNAME&lt;br /&gt;
/usr/X11R6/lib/xdm/GiveConsole&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
shell# chmod +x Xstartup&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Make sure your firewall has all traffic for you lan.  (Need to know which exact ports to allow).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;run xdm on server as root&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 shell# xdm&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can put this xdm into the /etc/ttys so that it starts automatically on boot up.&lt;br /&gt;
&lt;br /&gt;
===client===&lt;br /&gt;
make sure your not in X&lt;br /&gt;
&lt;br /&gt;
type this command:&lt;br /&gt;
&lt;br /&gt;
 shell# X -broadcast&lt;br /&gt;
&lt;br /&gt;
This assumes that you are running only one server.&lt;br /&gt;
Otherwise use:&lt;br /&gt;
&lt;br /&gt;
 shell# X -query 192.168.1.1&lt;br /&gt;
&lt;br /&gt;
==DHCP - Install and setup==&lt;br /&gt;
Server setup.&lt;br /&gt;
&lt;br /&gt;
install through package&lt;br /&gt;
 # pkg_add -r isc-dhcp3-server&lt;br /&gt;
&lt;br /&gt;
We do this so we can define the root path for the diskless system.&lt;br /&gt;
&lt;br /&gt;
copy /usr/local/etc/dhcpd.conf.sample to /usr/local/etc/dhcpd.conf&lt;br /&gt;
&lt;br /&gt;
edit /usr/local/etc/dhcpd.conf and make sure it has these lines in it.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# dhcpd.conf&lt;br /&gt;
#&lt;br /&gt;
# Sample configuration file for ISC dhcpd&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
# option definitions common to all supported networks...&lt;br /&gt;
#option domain-name &amp;quot;example.org&amp;quot;;&lt;br /&gt;
#option domain-name-servers ns1.example.org, ns2.example.org;&lt;br /&gt;
&lt;br /&gt;
default-lease-time 3600;&lt;br /&gt;
max-lease-time 86400;&lt;br /&gt;
&lt;br /&gt;
# If this DHCP server is the official DHCP server for the local&lt;br /&gt;
# network, the authoritative directive should be uncommented.&lt;br /&gt;
authoritative;&lt;br /&gt;
&lt;br /&gt;
# ad-hoc DNS update scheme - set to &amp;quot;none&amp;quot; to disable dynamic DNS updates.&lt;br /&gt;
ddns-update-style none;&lt;br /&gt;
&lt;br /&gt;
option root-path &amp;quot;192.168.1.1:/diskless_ro&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
# lines added for pxeboot client&lt;br /&gt;
use-host-decl-names on;&lt;br /&gt;
next-server 192.168.1.1;&lt;br /&gt;
filename &amp;quot;pxeboot&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
# Use this to send dhcp log messages to a different log file (you also&lt;br /&gt;
# have to hack syslog.conf to complete the redirection).&lt;br /&gt;
log-facility local7;&lt;br /&gt;
&lt;br /&gt;
# No service will be given on this subnet, but declaring it helps the&lt;br /&gt;
# DHCP server to understand the network topology.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# This is a very basic subnet declaration.&lt;br /&gt;
&lt;br /&gt;
subnet 192.168.1.0 netmask 255.255.255.0 {&lt;br /&gt;
  range 192.168.1.10 192.168.1.20;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create the leases file&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# touch /var/db/dhcpd.leases&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Restart the daemon&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# killall dhcpd&lt;br /&gt;
# dhcpd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add to /etc/rc.conf&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dhcpd_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using a seperate DHCP server===&lt;br /&gt;
If you already have a DHCP server and you want to use that instead then you have to do these steps.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====On your DHCP Server====&lt;br /&gt;
1. edit /usr/local/etc/dhcpd.conf and add the following&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
authoritative;&lt;br /&gt;
ddns-update-style none;&lt;br /&gt;
&lt;br /&gt;
option root-path &amp;quot;&amp;lt;X Server IP&amp;gt;:/diskless_ro&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
# lines added for pxeboot client&lt;br /&gt;
use-host-decl-names on;&lt;br /&gt;
next-server &amp;lt;X Server IP&amp;gt;;&lt;br /&gt;
filename &amp;quot;pxeboot&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
2. stop dhcpd&lt;br /&gt;
3. start dhcpd&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Client====&lt;br /&gt;
Your client should boot now just remember that you may get a different IP now that you are talking to a different DHCP server so you have to change your exports file and copy accross a directory in /diskless_rw for the new IP.  All this is done on the X Server.&lt;br /&gt;
&lt;br /&gt;
==TFTP Setup==&lt;br /&gt;
TFTP helps us transport the kernel to the PXE-Boot machines.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# mkdir /tftpboot&lt;br /&gt;
# cp /boot/pxeboot /tftpboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Uncomment the following line in /etc/inetd.conf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tftp    dgram   udp     wait    root    /usr/libexec/tftpd      tftpd -l -s /tftpboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart the inetd service&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# killall -HUP inetd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If inetd has not started automatically do the following:&lt;br /&gt;
&lt;br /&gt;
Add the following to /etc/rc.conf&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
inetd_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now start inetd manually.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# inetd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test===&lt;br /&gt;
To test that tftp has loaded type the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# sockstat -4l | grep 69 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and you should see this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
root      inetd       13719 5   udp4    *:69                 *:*&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==NFS Setup==&lt;br /&gt;
Network File System.  Here we share all the directories from the server so that the diskless clients see these drives as if those directories were the diskless client's.&lt;br /&gt;
&lt;br /&gt;
===Server Setup===&lt;br /&gt;
If you forgot to select 'Yes' to NFS server setup in the FreeBSD installation then you have to setup the server manually like so:&lt;br /&gt;
&lt;br /&gt;
Enable NFS /etc/rc.conf&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rpcbind_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
nfs_server_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test===&lt;br /&gt;
A quick test to see if your NFS server is acting normal:&lt;br /&gt;
&lt;br /&gt;
Edit the /etc/exports and add the following&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/usr       -alldirs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This allows anyone to connect to your /usr mount.&lt;br /&gt;
&lt;br /&gt;
Now run these commands to restart and view your mounts&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# kill -HUP `cat /var/run/mountd.pid`&lt;br /&gt;
# showmount -e&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now try and mount it from a client running BSD&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# mount -t nfs 192.168.1.1:/usr /mnt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Server exports setup===&lt;br /&gt;
&lt;br /&gt;
Make directories for each IP for your clients&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /diskless_rw&lt;br /&gt;
# mkdir 192.168.1.2&lt;br /&gt;
# cd 192.168.1.2&lt;br /&gt;
# mkdir etc var&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Configure /etc/exports&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# file systems accessible only for reading:&lt;br /&gt;
# Original way of linking up the /usr&lt;br /&gt;
#/usr -ro -maproot=0 -network 192.168.1.0 -mask 255.255.255.0&lt;br /&gt;
&lt;br /&gt;
/usr -network 192.168.1.0 -mask 255.255.255.0&lt;br /&gt;
/diskless_ro -ro -maproot=0 -network 192.168.1.0 -mask 255.255.255.0&lt;br /&gt;
/diskless_rw/192.168.1.2/etc /diskless_rw/192.168.1.2/var -maproot=root 192.168.1.2&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restarting NFS&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# kill -HUP `cat /var/run/mountd.pid`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If NFS is not started yet do the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
data# rpcbind&lt;br /&gt;
data# nfsd -u -t -n 20 -h 192.168.1.1&lt;br /&gt;
data# mountd -r&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Testing to see if the exports are correct&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
data# showmount -e&lt;br /&gt;
Exports list on localhost:&lt;br /&gt;
/usr                              192.168.1.0&lt;br /&gt;
/diskless_rw/192.168.1.2/var      192.168.1.2&lt;br /&gt;
/diskless_rw/192.168.1.2/etc      192.168.1.2&lt;br /&gt;
/diskless_ro                      192.168.1.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Setup diskless_rw==&lt;br /&gt;
Create directories&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /diskless_rw/192.168.1.2/etc&lt;br /&gt;
# mkdir pam.d X11&lt;br /&gt;
&lt;br /&gt;
# cd /diskless_rw/192.168.1.2/var&lt;br /&gt;
# mkdir home log run tmp&lt;br /&gt;
# chmod 1777 tmp&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a swap file in the var directory for the client&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# dd if=/dev/zero of=/diskless_rw/192.168.1.2/var/swap bs=1k count=32000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in the /diskless_rw/&amp;lt;ip&amp;gt;/var/log directory I created the following log files so that syslogd would have files to write to:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /diskless_rw/192.168.1.2/var/log&lt;br /&gt;
# touch messages security auth.log maillog lpd-errs xferlog cron debug.log slip.log ppp.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy the following files from the systems /etc directory to /diskless_rw/&amp;lt;client ip&amp;gt;/etc&lt;br /&gt;
 # cp -Rv &amp;lt;files&amp;gt; /diskless_rw/&amp;lt;ip&amp;gt;/etc&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
auth.conf&lt;br /&gt;
disktab&lt;br /&gt;
gettytab&lt;br /&gt;
group&lt;br /&gt;
hosts&lt;br /&gt;
login.access&lt;br /&gt;
login.conf&lt;br /&gt;
login.conf.db&lt;br /&gt;
master.passwd&lt;br /&gt;
netconfig&lt;br /&gt;
protocols&lt;br /&gt;
pam.d&lt;br /&gt;
pwd.db&lt;br /&gt;
services&lt;br /&gt;
spwd.db&lt;br /&gt;
syslog.conf&lt;br /&gt;
termcap -&amp;gt; /usr/share/misc/termcap&lt;br /&gt;
ttys&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is a shortcut which you can just copy and paste in an xterm window.&lt;br /&gt;
 # cd /etc&lt;br /&gt;
 # cp -Rv auth.conf disktab gettytab group hosts login.access login.conf login.conf.db master.passwd netconfig protocols pam.d pwd.db services spwd.db syslog.conf termcapttys /diskless_rw/&amp;lt;ip&amp;gt;/etc&lt;br /&gt;
It's very important that you copy all the files in pam.d across otherwise you will not have a password prompt on your login.&lt;br /&gt;
&lt;br /&gt;
Create a fstab in /diskless_rw/&amp;lt;ip&amp;gt;/etc&lt;br /&gt;
 # touch /diskless_rw/&amp;lt;ip&amp;gt;/etc/fstab&lt;br /&gt;
&lt;br /&gt;
==Setup diskless_ro==&lt;br /&gt;
This is the common root mount for all pxe-boot clients.&lt;br /&gt;
&lt;br /&gt;
Copy accross important directories and kernel from boot to diskless_ro&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cp -rv /bin /lib /libexec /sbin /boot /diskless_ro&lt;br /&gt;
# mkdir /diskless_ro/usr&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For some client machines you may have to disable the ACPI (Power management) in the /diskless_ro/boot/device.hints&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
hint.acpi.0.disabled=&amp;quot;1&amp;quot; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make a dev so that clients can boot without freezing.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# mkdir /diskless_ro/dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make a directory so that we can mount var from the /diskless_rw/&amp;lt;client ip&amp;gt;/var&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# mkdir /diskless_ro/var&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
So we can use the systems /var/tmp and /usr/home directory make soft links to them&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /diskless_ro&lt;br /&gt;
# ln -s /var/tmp&lt;br /&gt;
# ln -s /usr/home&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We require a few files from the systems /etc directory to be copied into the /diskless_ro/etc for common use between the thin clients.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# mkdir /diskless_ro/etc&lt;br /&gt;
# cd /etc&lt;br /&gt;
# cp /services /netconfig /login.conf /diskless_ro/etc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===rc file===&lt;br /&gt;
The /diskless_ro/etc/rc file is the first file which is ran after the kernel has loaded.  Here we mount a the labels from the server.&lt;br /&gt;
&lt;br /&gt;
Create the /diskless_ro/etc/rc&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin; export PATH&lt;br /&gt;
TMPDIR=~/tmp;export TMPDIR&lt;br /&gt;
TMP=~/tmp;export TMP&lt;br /&gt;
&lt;br /&gt;
mount -t nfs 192.168.1.1:/usr /usr&lt;br /&gt;
&lt;br /&gt;
boot_ip=`/sbin/ifconfig | /usr/bin/grep &amp;quot;inet &amp;quot; | /usr/bin/grep -v 127.0.0.1 |&lt;br /&gt;
/usr/bin/awk '{print $2}'`&lt;br /&gt;
mount_nfs -L 192.168.1.1:/diskless_rw/${boot_ip}/etc /etc&lt;br /&gt;
mount_nfs -L 192.168.1.1:/diskless_rw/${boot_ip}/var /var&lt;br /&gt;
&lt;br /&gt;
swapon /var/swap&lt;br /&gt;
&lt;br /&gt;
#rm -rf /var/tmp/*&lt;br /&gt;
#rm -rf /var/tmp/.*&lt;br /&gt;
&lt;br /&gt;
# Option if you choose XDM terminals&lt;br /&gt;
#X -query 192.168.1.1&lt;br /&gt;
&lt;br /&gt;
. /etc/rc2&lt;br /&gt;
exit 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Remember to change 192.168.1.1 to your X server's IP&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The -L on the mount_nfs is there so we don't get flock errors.&lt;br /&gt;
&lt;br /&gt;
===rc2 file===&lt;br /&gt;
This sets up some links for libraries and the logging daemon.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
mount -a&lt;br /&gt;
/sbin/ldconfig -elf /usr/lib/compat /usr/X11R6/lib /usr/local/lib&lt;br /&gt;
&lt;br /&gt;
syslogd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now change permissions so rc can run.&lt;br /&gt;
 # chmod +x rc*&lt;br /&gt;
&lt;br /&gt;
Copy /diskless_ro/etc/rc and rc2 to /diskless_rw/&amp;lt;client ip&amp;gt;/etc&lt;br /&gt;
 # cp /diskless_ro/etc/rc* /diskless_rw/192.168.1.2/etc&lt;br /&gt;
&lt;br /&gt;
==GRUB Floppy boot (optional)==&lt;br /&gt;
&lt;br /&gt;
(would like to compile this ourselves later)&lt;br /&gt;
To get started we downloaded the image from www.hp.uab.edu/~ed/grub-net&lt;br /&gt;
&lt;br /&gt;
 shell# dd if=/data/grub-net.img of=/dev/fd0&lt;br /&gt;
&lt;br /&gt;
Then we mounted it as msdos&lt;br /&gt;
Remove/rename menu.1st from the grub directory as it was doing something funny with it.  We think that it was looking for a tftp server through our dhcp and we don't have a the dhcp setup correctly here, so we wanted to do it manually.&lt;br /&gt;
&lt;br /&gt;
Reboot off the floppy now..&lt;br /&gt;
&lt;br /&gt;
 grub&amp;gt; ifconfig --address=192.168.1.2 --mask=255.255.255.0 --gateway=192.168.1.1&lt;br /&gt;
 --server=192.168.1.2&lt;br /&gt;
&lt;br /&gt;
OR you can use dhcp&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 grub&amp;gt; dhcp&amp;lt;br&amp;gt; &lt;br /&gt;
 grub&amp;gt; tftpserver 192.168.1.2&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Setup tftp on your server, we created a directory /tftpboot. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Starting diskless system through GRUB===&lt;br /&gt;
This is an alternative boot loader.  You can use this for testing, if you don't have a pxeboot chip, otherwise skip this section.&lt;br /&gt;
&lt;br /&gt;
These commands are half working...&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 grub&amp;gt; root (nd)&amp;lt;br&amp;gt;&lt;br /&gt;
 grub&amp;gt; kernel /kernel root=ad0s1a&amp;lt;br&amp;gt;&lt;br /&gt;
 grub&amp;gt; pxeboot&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Completely Diskless System (PXEBOOT ROM) (optional)==&lt;br /&gt;
&lt;br /&gt;
Running completely diskless by booting from a Network ROM Chip.&lt;br /&gt;
&lt;br /&gt;
We have now got a Intel GD82559 Etherexpress pro/100 Card.&lt;br /&gt;
&lt;br /&gt;
When we boot up on the client machine with that card it displays:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Intel UNDI, PXE-2.0 (build 067)&amp;lt;br /&amp;gt;&lt;br /&gt;
Copyright (C) 1997-1998 Intel Corporation&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Which we cannot get working so we have read that you have to update this version to Build 82.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
copy /boot/pxeboot to /tftpboot directory we made before&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
- Downloaded proboot.exe from support.intel.com and unpacked into a windows box.&amp;lt;br /&amp;gt;&lt;br /&gt;
- Copied ibautil.exe onto a windows 98 boot disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
- Rebooted the test box after disabling network boot on the nic (otherwise it'll kick in before the floppy).&amp;lt;br /&amp;gt;&lt;br /&gt;
- Ran ibautil -iv to see what embedded image versions were available:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Intel(R) Boot Agent XG v1.0.09&amp;lt;br /&amp;gt;&lt;br /&gt;
Intel(R) Boot Agent GE v1.2.36&amp;lt;br /&amp;gt;&lt;br /&gt;
Intel(R) Boot Agent FE v4.1.19&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
- Ran ibautil -up to perform the image upgrade.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
It's interesting to note that no version showed up for out intel nic when initially running ibautil. After the upgrade, however, the version corectly showed as 4.1.19.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I made sure that I had simular features to this in my dhcpd.conf file:&amp;lt;br /&amp;gt;&lt;br /&gt;
option broadcast-address 192.168.254.255;&amp;lt;br /&amp;gt;&lt;br /&gt;
option domain-name-servers 192.168.254.3;&amp;lt;br /&amp;gt;&lt;br /&gt;
option domain-name &amp;quot;simerson.net&amp;quot;;&amp;lt;br /&amp;gt;&lt;br /&gt;
option routers 192.168.254.1;&amp;lt;br /&amp;gt;&lt;br /&gt;
option subnet-mask 255.255.255.0;&amp;lt;br /&amp;gt;&lt;br /&gt;
server-name &amp;quot;pxe-gw&amp;quot;;&amp;lt;br /&amp;gt;&lt;br /&gt;
server-identifier 192.168.254.3;&amp;lt;br /&amp;gt;&lt;br /&gt;
next-server 192.168.254.3;&amp;lt;br /&amp;gt;&lt;br /&gt;
default-lease-time -1;&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
subnet 192.168.254.0 netmask 255.255.255.0 {&amp;lt;br /&amp;gt;&lt;br /&gt;
range 192.168.254.32 192.168.254.99;&amp;lt;br /&amp;gt;&lt;br /&gt;
option root-path &amp;quot;/usr/local/export/pxe&amp;quot;;&amp;lt;br /&amp;gt;&lt;br /&gt;
filename &amp;quot;pxeboot&amp;quot;;&amp;lt;br /&amp;gt;&lt;br /&gt;
}&amp;lt;br /&amp;gt;&lt;br /&gt;
host cm.simerson.net {&amp;lt;br /&amp;gt;&lt;br /&gt;
hardware ethernet 00:e0:18:98:f0:cc;&amp;lt;br /&amp;gt;&lt;br /&gt;
fixed-address 192.168.254.126;&amp;lt;br /&amp;gt;&lt;br /&gt;
}&amp;lt;br /&amp;gt;&lt;br /&gt;
host c1.simerson.net {&amp;lt;br /&amp;gt;&lt;br /&gt;
hardware ethernet 00:60:97:0e:bb:a7;&amp;lt;br /&amp;gt;&lt;br /&gt;
fixed-address 192.168.254.131;&amp;lt;br /&amp;gt;&lt;br /&gt;
}&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==X config notes==&lt;br /&gt;
On the X server the /etc/X11/xorg.conf file is only used for the X server not the clients.&lt;br /&gt;
&lt;br /&gt;
To use this same configuration for your X Terminal Clients copy this file to /diskless_rw/&amp;lt;Client IP&amp;gt;/etc/X11 and it will use it.&lt;br /&gt;
&lt;br /&gt;
==Starting X on the client==&lt;br /&gt;
There are two ways of doing this and it depends on your hardware mainly.  &lt;br /&gt;
&lt;br /&gt;
1. run all programs on the server using the servers CPU and Memory this we will call the 'XDM Method'&lt;br /&gt;
2. run all programs from the NFS mounts using the clients CPU and Memory but the HD of the server, this we will call the 'NFS Method'&lt;br /&gt;
&lt;br /&gt;
Both methods will boot from PXE-Boot and can be diskless.&lt;br /&gt;
&lt;br /&gt;
===XDM Method===&lt;br /&gt;
Recommended for machines less than 1Ghz 256MB&lt;br /&gt;
&lt;br /&gt;
This is quite simple to setup.  Change your rc file in the /diskless_ro/etc directory to have this line at the end:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
X -query &amp;lt;server ip&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make sure on the server you setup xdm to start on system startup&lt;br /&gt;
 # vi /etc/ttys&lt;br /&gt;
&lt;br /&gt;
Search for this line:&lt;br /&gt;
 ttyv8   &amp;quot;/usr/X11R6/bin/xdm -nodaemon&amp;quot;  xterm   off secure&lt;br /&gt;
&lt;br /&gt;
and change it to:&lt;br /&gt;
 ttyv8   &amp;quot;/usr/X11R6/bin/xdm -nodaemon&amp;quot;  xterm   on secure&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also type this command at the command line on the client to test before hand.&lt;br /&gt;
&lt;br /&gt;
===NFS Method===&lt;br /&gt;
Recommended for machines over 1Ghz 256MB or if you want to utilise any of the clients devices such as local HD, USB, CD/DVD burners, etc.&lt;br /&gt;
&lt;br /&gt;
This is much trickier.&lt;br /&gt;
&lt;br /&gt;
Log in&lt;br /&gt;
Now type 'startx' at the command line.&lt;br /&gt;
&lt;br /&gt;
==Custom Kernels==&lt;br /&gt;
If you want to create custom kernels for your clients then do this:&lt;br /&gt;
&lt;br /&gt;
Create your custom kernel&lt;br /&gt;
 # cd /sys/i386/conf&lt;br /&gt;
 # cp GENERIC DISKLESS&lt;br /&gt;
 # vi DISKLESS&lt;br /&gt;
&lt;br /&gt;
Make changes and build and install&lt;br /&gt;
&lt;br /&gt;
 # cd /usr/src&lt;br /&gt;
 # make buildkernel KERNCONF=DISKLESS&lt;br /&gt;
 # make installkernel KERNCONF=DISKLESS DESTDIR=/diskless_ro&lt;br /&gt;
&lt;br /&gt;
==todo==&lt;br /&gt;
Here are some of the jobs left to do to make this secure or generally better:&lt;br /&gt;
&lt;br /&gt;
- There must be a simplier way to set this up if your going to use XDM in the end.  IE: do we need to do half of this tutorial if we are going to run XDM.&lt;br /&gt;
&lt;br /&gt;
- When the same user logs onto two seperate machines they cannot start firefox or thunderbird as it complains about being open somewhere else.  This assumes you have firefox and thunderbird already open on both machines that you logged onto.&lt;br /&gt;
&lt;br /&gt;
===Known Issues===&lt;br /&gt;
&lt;br /&gt;
- Doesn't work with HP-COMPAQ-T5525 thin client as it doesn't want to boot, it says it's missing libfreetype.so.9 which we do have it just cannot find it for some reason.  It's trying to use the VIA chipset for graphics which is different to all the other clients I've loaded successfully so far.&lt;br /&gt;
&lt;br /&gt;
- USB mice not working instead use PS/2.  If we got this working it may help get the HP T5525 working&lt;br /&gt;
&lt;br /&gt;
===Keyboard repeating on notebooks===&lt;br /&gt;
- typing on some keyboards (like my notebook) causes double characters to display if you type too fast. - This is the notebook, if you go and set the KDE Accessabiltiy options and set the keyboard rate to 50ms, this fixes the problem.&lt;br /&gt;
&lt;br /&gt;
===USB mouse===&lt;br /&gt;
&lt;br /&gt;
Editing /etc/devd.conf file and searched for ums&lt;br /&gt;
remarked out the action line.&lt;br /&gt;
 &lt;br /&gt;
rebooted.&lt;br /&gt;
 &lt;br /&gt;
Someone off IRC suggested that I build a GENERIC xorg.conf file which has vesa, usb mouse and ps/2 mouse configurations through it.&lt;br /&gt;
 &lt;br /&gt;
I reverted everything back to normal ps/2 mouse config, copying my usb config files to the following:&lt;br /&gt;
/etc/devd.conf_usb&lt;br /&gt;
/etc/rc.conf_usb&lt;br /&gt;
/etc/X11/xorg.conf_usb&lt;br /&gt;
 &lt;br /&gt;
I think we need a seperate configuration for the HP, it uses a weird display driver.&lt;br /&gt;
&lt;br /&gt;
==links==&lt;br /&gt;
&lt;br /&gt;
http://www.onlamp.com/pub/a/bsd/2004/09/09/diskless_server.html&lt;br /&gt;
&lt;br /&gt;
http://www.onlamp.com/pub/a/bsd/2004/09/30/diskless_clients.html&lt;br /&gt;
&lt;br /&gt;
http://people.freebsd.org/~alfred/pxe/en_US.ISO8859-1/articles/pxe/article.html&lt;br /&gt;
&lt;br /&gt;
http://www.the-labs.com/FreeBSD/Diskless/&lt;br /&gt;
&lt;br /&gt;
http://www.nber.org/sys-admin/FreeBSD-diskless.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://wikitest.freebsd.org/MarkusBoelter&lt;br /&gt;
&lt;br /&gt;
http://www.daemonsecurity.com/pub/pxeboot/&lt;br /&gt;
&lt;br /&gt;
http://www.kano.org.uk/projects/pxe/&lt;br /&gt;
&lt;br /&gt;
File Examples:&lt;br /&gt;
&lt;br /&gt;
http://www.watson.org/~robert/freebsd/pxe/&lt;br /&gt;
&lt;br /&gt;
PXE Information&lt;br /&gt;
http://www.computerworld.com/action/article.do?command=viewArticleBasic&amp;amp;articleId=108551&lt;br /&gt;
&lt;br /&gt;
[[Category:FreeBSD_for_Workstations]]&lt;/div&gt;</summary>
		<author><name>165.228.0.35</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/X_Windows_Terminal</id>
		<title>X Windows Terminal</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/X_Windows_Terminal"/>
				<updated>2006-11-01T00:20:24Z</updated>
		
		<summary type="html">&lt;p&gt;165.228.0.35: /* Setup diskless_rw */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Advantages==&lt;br /&gt;
X Windows can be used in a Server-Client relationship.  By setting up your X Windows Server you allow the use of all the programs on that computer to all the client PC's.  &lt;br /&gt;
&lt;br /&gt;
There are many advantages of running client computers in this manner:&lt;br /&gt;
* They don't even need a hard drive.  &lt;br /&gt;
* It's silent as there are no moving parts&lt;br /&gt;
* The solution saves power as your computers are very thin.&lt;br /&gt;
* Everything can be backed up centrally.&lt;br /&gt;
* Boot times for client PC's are the fastest around.&lt;br /&gt;
* Clients don't need much CPU speed, memory, etc.  Because of this they would be very cheap.  You could get away with using a Pentium 100Mhz with 32MB ram, no hard drive, no CD-ROM, no Floppy and a fanless power supply.  You just need a ethernet card with a PXEBOOT ROM. (XDM mode)&lt;br /&gt;
* Central management of applications, users, config&lt;br /&gt;
&lt;br /&gt;
==From the Beginning==&lt;br /&gt;
I've based this document on FreeBSD 6.1.&lt;br /&gt;
&lt;br /&gt;
Install FreeBSD 6.1 as per usual.&lt;br /&gt;
I've setup my mount points as this:&lt;br /&gt;
  '''Part    Mount        Size'''&lt;br /&gt;
  ad0s1b  Swap         (equal to how much memory I have in my machine)&lt;br /&gt;
  ad0s1a  /            512MB&lt;br /&gt;
  ad0s1d  /var         1G&lt;br /&gt;
  ad0s1e  /tmp         512MB&lt;br /&gt;
  ad0s1f  /usr         2GB    min.&lt;br /&gt;
          /diskless_ro 512MB&lt;br /&gt;
          /diskless_rw 1GB    min.&lt;br /&gt;
&lt;br /&gt;
I selected 'A' for auto and then deleted /usr and created /usr as 2g.&lt;br /&gt;
&lt;br /&gt;
Select User-X install. Yes to Ports if you have the room.&lt;br /&gt;
&lt;br /&gt;
Select SSH Server and NFS Server in the installation process, for the rest of the options go with the default.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
NOTE: If you forget to add any of the labels above, you will have to reboot as you cannot add labels to your boot drive when you have booted off it. So boot of the installation CD and use the configure -&amp;gt; label option in the sysinstall screen to add these labels to your boot drive.  You may need to retype the mount points for /, /var, /tmp and /usr by hitting 'm' on each label.  Once you have created these labels in the 'Disklabel Editor' then you can hit 'w' to write them to the disk.  answer 'yes' to the next question, hit 'ok' to the warning message.  Now quit and reboot. Add them to fstab (/dev/ad0s1g   /diskless_ro) &amp;amp; (/dev/ad0s1h   /diskless_rw) and mount.&lt;br /&gt;
&lt;br /&gt;
I find the best way to get this working is to break it down in to small steps and get each step working independantly.  IE: Setup NFS and see if you can mount it from another FreeBSD machine, don't just assume it will work and boot your PXE-Boot machine.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Throughout my documentation&lt;br /&gt;
&lt;br /&gt;
192.168.1.1 = the Server&lt;br /&gt;
&lt;br /&gt;
192.168.1.2 = the client (may be a full freebsd system or pxeboot)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At this point I normally install fluxbox with the following line:&lt;br /&gt;
&lt;br /&gt;
 shell# pkg_add -r fluxbox-devel&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
change your ~/.xinitrc file to the following:&lt;br /&gt;
&lt;br /&gt;
 startfluxbox&lt;br /&gt;
&lt;br /&gt;
Copy to .xsession&lt;br /&gt;
 $ ln -s ~/.xinitrc ~/.xsession&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Use the following command to update your fluxbox menus:&lt;br /&gt;
&lt;br /&gt;
 shell$ fluxbox-generate_menu&lt;br /&gt;
&lt;br /&gt;
==Running a single application==&lt;br /&gt;
&lt;br /&gt;
To get started I have my server setup running FreeBSD, with X-Windows and a few applications.  Nothing too special.  Then I have my client PC, which to start off I used the frenzy 1.0 boot CD to perform these initial tests.  You can get this from [http://frenzy.org.ua/eng/ frenzy website].  I entered into fluxbox, but you could equally use any X session.&lt;br /&gt;
You must allow incoming connections this is done with two commands&lt;br /&gt;
&lt;br /&gt;
 client$ startx -listen_tcp&lt;br /&gt;
 client$ xhost +&lt;br /&gt;
&lt;br /&gt;
This allows all computers to start applications on your client PC.  It's dangerous but good for testing everything is setup correctly.&lt;br /&gt;
&lt;br /&gt;
 client$ ssh &amp;lt;server user@server ip&amp;gt;&lt;br /&gt;
 eg: ssh mick@192.168.1.1&lt;br /&gt;
&lt;br /&gt;
 ssh$ export DISPLAY='192.168.1.2:0'&lt;br /&gt;
&lt;br /&gt;
Or if your running bash:&lt;br /&gt;
 ssh$ DISPLAY=&amp;lt;client ip&amp;gt;:&amp;lt;client display&amp;gt;; export DISPLAY&lt;br /&gt;
 eg: DISPLAY=192.168.1.2:0; export DISPLAY&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 ssh$ xcalc &amp;amp;&lt;br /&gt;
&lt;br /&gt;
This should display on your client&lt;br /&gt;
&lt;br /&gt;
==Running a whole X Windows Session (XDM)==&lt;br /&gt;
This sets up a server so that you can share your X session with any clients which want to connect.  (Simular to Terminal Services under windows)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===server===&lt;br /&gt;
edit:&lt;br /&gt;
 /usr/X11R6/lib/X11/xdm/xdm-config&lt;br /&gt;
&lt;br /&gt;
comment out with a '!' the request line&amp;lt;br&amp;gt;&lt;br /&gt;
 DisplayManager.requestPort: 0&lt;br /&gt;
&lt;br /&gt;
edit:&amp;lt;br&amp;gt;&lt;br /&gt;
 /usr/X11R6/lib/X11/xdm/Xaccess&lt;br /&gt;
&lt;br /&gt;
Enter a single asterisk any where in the file, so the contents should be one asterisk and the rest commented out.  There should be an asterisk on line 49 which you can uncomment.&lt;br /&gt;
&lt;br /&gt;
Whilst in the /usr/X11R6/lib/X11/xdm directory do these commands:&lt;br /&gt;
 shell# vi Xstartup&lt;br /&gt;
&lt;br /&gt;
Add into this file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
#&lt;br /&gt;
# Xstartup&lt;br /&gt;
#&lt;br /&gt;
# This program is run as root after the user is verified&lt;br /&gt;
#&lt;br /&gt;
if [ -f /etc/nologin ]; then&lt;br /&gt;
   xmessage -file /etc/nologin -timeout 30 -center&lt;br /&gt;
   exit 1&lt;br /&gt;
fi&lt;br /&gt;
sessreg -a -l $DISPLAY -x /usr/X11R6/lib/xdm/Xservers $LOGNAME&lt;br /&gt;
/usr/X11R6/lib/xdm/GiveConsole&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
shell# chmod +x Xstartup&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Make sure your firewall has all traffic for you lan.  (Need to know which exact ports to allow).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;run xdm on server as root&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 shell# xdm&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can put this xdm into the /etc/ttys so that it starts automatically on boot up.&lt;br /&gt;
&lt;br /&gt;
===client===&lt;br /&gt;
make sure your not in X&lt;br /&gt;
&lt;br /&gt;
type this command:&lt;br /&gt;
&lt;br /&gt;
 shell# X -broadcast&lt;br /&gt;
&lt;br /&gt;
This assumes that you are running only one server.&lt;br /&gt;
Otherwise use:&lt;br /&gt;
&lt;br /&gt;
 shell# X -query 192.168.1.1&lt;br /&gt;
&lt;br /&gt;
==DHCP - Install and setup==&lt;br /&gt;
Server setup.&lt;br /&gt;
&lt;br /&gt;
install through package&lt;br /&gt;
 # pkg_add -r isc-dhcp3-server&lt;br /&gt;
&lt;br /&gt;
We do this so we can define the root path for the diskless system.&lt;br /&gt;
&lt;br /&gt;
copy /usr/local/etc/dhcpd.conf.sample to /usr/local/etc/dhcpd.conf&lt;br /&gt;
&lt;br /&gt;
edit /usr/local/etc/dhcpd.conf and make sure it has these lines in it.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# dhcpd.conf&lt;br /&gt;
#&lt;br /&gt;
# Sample configuration file for ISC dhcpd&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
# option definitions common to all supported networks...&lt;br /&gt;
#option domain-name &amp;quot;example.org&amp;quot;;&lt;br /&gt;
#option domain-name-servers ns1.example.org, ns2.example.org;&lt;br /&gt;
&lt;br /&gt;
default-lease-time 3600;&lt;br /&gt;
max-lease-time 86400;&lt;br /&gt;
&lt;br /&gt;
# If this DHCP server is the official DHCP server for the local&lt;br /&gt;
# network, the authoritative directive should be uncommented.&lt;br /&gt;
authoritative;&lt;br /&gt;
&lt;br /&gt;
# ad-hoc DNS update scheme - set to &amp;quot;none&amp;quot; to disable dynamic DNS updates.&lt;br /&gt;
ddns-update-style none;&lt;br /&gt;
&lt;br /&gt;
option root-path &amp;quot;192.168.1.1:/diskless_ro&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
# lines added for pxeboot client&lt;br /&gt;
use-host-decl-names on;&lt;br /&gt;
next-server 192.168.1.1;&lt;br /&gt;
filename &amp;quot;pxeboot&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
# Use this to send dhcp log messages to a different log file (you also&lt;br /&gt;
# have to hack syslog.conf to complete the redirection).&lt;br /&gt;
log-facility local7;&lt;br /&gt;
&lt;br /&gt;
# No service will be given on this subnet, but declaring it helps the&lt;br /&gt;
# DHCP server to understand the network topology.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# This is a very basic subnet declaration.&lt;br /&gt;
&lt;br /&gt;
subnet 192.168.1.0 netmask 255.255.255.0 {&lt;br /&gt;
  range 192.168.1.10 192.168.1.20;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create the leases file&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# touch /var/db/dhcpd.leases&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Restart the daemon&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# killall dhcpd&lt;br /&gt;
# dhcpd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add to /etc/rc.conf&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dhcpd_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using a seperate DHCP server===&lt;br /&gt;
If you already have a DHCP server and you want to use that instead then you have to do these steps.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====On your DHCP Server====&lt;br /&gt;
1. edit /usr/local/etc/dhcpd.conf and add the following&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
authoritative;&lt;br /&gt;
ddns-update-style none;&lt;br /&gt;
&lt;br /&gt;
option root-path &amp;quot;&amp;lt;X Server IP&amp;gt;:/diskless_ro&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
# lines added for pxeboot client&lt;br /&gt;
use-host-decl-names on;&lt;br /&gt;
next-server &amp;lt;X Server IP&amp;gt;;&lt;br /&gt;
filename &amp;quot;pxeboot&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
2. stop dhcpd&lt;br /&gt;
3. start dhcpd&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Client====&lt;br /&gt;
Your client should boot now just remember that you may get a different IP now that you are talking to a different DHCP server so you have to change your exports file and copy accross a directory in /diskless_rw for the new IP.  All this is done on the X Server.&lt;br /&gt;
&lt;br /&gt;
==TFTP Setup==&lt;br /&gt;
TFTP helps us transport the kernel to the PXE-Boot machines.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# mkdir /tftpboot&lt;br /&gt;
# cp /boot/pxeboot /tftpboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Uncomment the following line in /etc/inetd.conf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tftp    dgram   udp     wait    root    /usr/libexec/tftpd      tftpd -l -s /tftpboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart the inetd service&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# killall -HUP inetd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If inetd has not started automatically do the following:&lt;br /&gt;
&lt;br /&gt;
Add the following to /etc/rc.conf&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
inetd_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now start inetd manually.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# inetd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test===&lt;br /&gt;
To test that tftp has loaded type the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# sockstat -4l | grep 69 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and you should see this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
root      inetd       13719 5   udp4    *:69                 *:*&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==NFS Setup==&lt;br /&gt;
Network File System.  Here we share all the directories from the server so that the diskless clients see these drives as if those directories were the diskless client's.&lt;br /&gt;
&lt;br /&gt;
===Server Setup===&lt;br /&gt;
If you forgot to select 'Yes' to NFS server setup in the FreeBSD installation then you have to setup the server manually like so:&lt;br /&gt;
&lt;br /&gt;
Enable NFS /etc/rc.conf&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rpcbind_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
nfs_server_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test===&lt;br /&gt;
A quick test to see if your NFS server is acting normal:&lt;br /&gt;
&lt;br /&gt;
Edit the /etc/exports and add the following&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/usr       -alldirs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This allows anyone to connect to your /usr mount.&lt;br /&gt;
&lt;br /&gt;
Now run these commands to restart and view your mounts&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# kill -HUP `cat /var/run/mountd.pid`&lt;br /&gt;
# showmount -e&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now try and mount it from a client running BSD&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# mount -t nfs 192.168.1.1:/usr /mnt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Server exports setup===&lt;br /&gt;
&lt;br /&gt;
Make directories for each IP for your clients&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /diskless_rw&lt;br /&gt;
# mkdir 192.168.1.2&lt;br /&gt;
# cd 192.168.1.2&lt;br /&gt;
# mkdir etc var&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Configure /etc/exports&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# file systems accessible only for reading:&lt;br /&gt;
# Original way of linking up the /usr&lt;br /&gt;
#/usr -ro -maproot=0 -network 192.168.1.0 -mask 255.255.255.0&lt;br /&gt;
&lt;br /&gt;
/usr -network 192.168.1.0 -mask 255.255.255.0&lt;br /&gt;
/diskless_ro -ro -maproot=0 -network 192.168.1.0 -mask 255.255.255.0&lt;br /&gt;
/diskless_rw/192.168.1.2/etc /diskless_rw/192.168.1.2/var -maproot=root 192.168.1.2&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restarting NFS&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# kill -HUP `cat /var/run/mountd.pid`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If NFS is not started yet do the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
data# rpcbind&lt;br /&gt;
data# nfsd -u -t -n 20 -h 192.168.1.1&lt;br /&gt;
data# mountd -r&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Testing to see if the exports are correct&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
data# showmount -e&lt;br /&gt;
Exports list on localhost:&lt;br /&gt;
/usr                              192.168.1.0&lt;br /&gt;
/diskless_rw/192.168.1.2/var      192.168.1.2&lt;br /&gt;
/diskless_rw/192.168.1.2/etc      192.168.1.2&lt;br /&gt;
/diskless_ro                      192.168.1.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Setup diskless_rw==&lt;br /&gt;
Create directories&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /diskless_rw/192.168.1.2/etc&lt;br /&gt;
# mkdir pam.d X11&lt;br /&gt;
&lt;br /&gt;
# cd /diskless_rw/192.168.1.2/var&lt;br /&gt;
# mkdir home log run tmp&lt;br /&gt;
# chmod 1777 tmp&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a swap file in the var directory for the client&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# dd if=/dev/zero of=/diskless_rw/192.168.1.2/var/swap bs=1k count=32000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in the /diskless_rw/&amp;lt;ip&amp;gt;/var/log directory I created the following log files so that syslogd would have files to write to:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /diskless_rw/192.168.1.2/var/log&lt;br /&gt;
# touch messages security auth.log maillog lpd-errs xferlog cron debug.log slip.log ppp.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy the following files from the systems /etc directory to /diskless_rw/&amp;lt;client ip&amp;gt;/etc&lt;br /&gt;
 # cp -Rv &amp;lt;files&amp;gt; /diskless_rw/&amp;lt;ip&amp;gt;/etc&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
auth.conf&lt;br /&gt;
disktab&lt;br /&gt;
gettytab&lt;br /&gt;
group&lt;br /&gt;
hosts&lt;br /&gt;
login.access&lt;br /&gt;
login.conf&lt;br /&gt;
login.conf.db&lt;br /&gt;
master.passwd&lt;br /&gt;
netconfig&lt;br /&gt;
protocols&lt;br /&gt;
pam.d&lt;br /&gt;
pwd.db&lt;br /&gt;
services&lt;br /&gt;
spwd.db&lt;br /&gt;
syslog.conf&lt;br /&gt;
termcap -&amp;gt; /usr/share/misc/termcap&lt;br /&gt;
ttys&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 # cd /etc&lt;br /&gt;
 # cp -Rv auth.conf disktab gettytab group hosts login.access login.conf login.conf.db master.passwd netconfig protocols pam.d pwd.db services spwd.db syslog.conf termcapttys&lt;br /&gt;
It's very important that you copy all the files in pam.d across otherwise you will not have a password prompt on your login.&lt;br /&gt;
&lt;br /&gt;
Create a fstab in /diskless_rw/&amp;lt;ip&amp;gt;/etc&lt;br /&gt;
 # touch /diskless_rw/&amp;lt;ip&amp;gt;/etc/fstab&lt;br /&gt;
&lt;br /&gt;
==Setup diskless_ro==&lt;br /&gt;
This is the common root mount for all pxe-boot clients.&lt;br /&gt;
&lt;br /&gt;
Copy accross important directories and kernel from boot to diskless_ro&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cp -rv /bin /lib /libexec /sbin /boot /diskless_ro&lt;br /&gt;
# mkdir /diskless_ro/usr&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For some client machines you may have to disable the ACPI (Power management) in the /diskless_ro/boot/device.hints&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
hint.acpi.0.disabled=&amp;quot;1&amp;quot; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make a dev so that clients can boot without freezing.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# mkdir /diskless_ro/dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make a directory so that we can mount var from the /diskless_rw/&amp;lt;client ip&amp;gt;/var&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# mkdir /diskless_ro/var&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
So we can use the systems /var/tmp and /usr/home directory make soft links to them&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /diskless_ro&lt;br /&gt;
# ln -s /var/tmp&lt;br /&gt;
# ln -s /usr/home&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We require a few files from the systems /etc directory to be copied into the /diskless_ro/etc for common use between the thin clients.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# mkdir /diskless_ro/etc&lt;br /&gt;
# cd /etc&lt;br /&gt;
# cp /services /netconfig /login.conf /diskless_ro/etc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===rc file===&lt;br /&gt;
The /diskless_ro/etc/rc file is the first file which is ran after the kernel has loaded.  Here we mount a the labels from the server.&lt;br /&gt;
&lt;br /&gt;
Create the /diskless_ro/etc/rc&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin; export PATH&lt;br /&gt;
TMPDIR=~/tmp;export TMPDIR&lt;br /&gt;
TMP=~/tmp;export TMP&lt;br /&gt;
&lt;br /&gt;
mount -t nfs 192.168.1.1:/usr /usr&lt;br /&gt;
&lt;br /&gt;
boot_ip=`/sbin/ifconfig | /usr/bin/grep &amp;quot;inet &amp;quot; | /usr/bin/grep -v 127.0.0.1 |&lt;br /&gt;
/usr/bin/awk '{print $2}'`&lt;br /&gt;
mount_nfs -L 192.168.1.1:/diskless_rw/${boot_ip}/etc /etc&lt;br /&gt;
mount_nfs -L 192.168.1.1:/diskless_rw/${boot_ip}/var /var&lt;br /&gt;
&lt;br /&gt;
swapon /var/swap&lt;br /&gt;
&lt;br /&gt;
#rm -rf /var/tmp/*&lt;br /&gt;
#rm -rf /var/tmp/.*&lt;br /&gt;
&lt;br /&gt;
# Option if you choose XDM terminals&lt;br /&gt;
#X -query 192.168.1.1&lt;br /&gt;
&lt;br /&gt;
. /etc/rc2&lt;br /&gt;
exit 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Remember to change 192.168.1.1 to your X server's IP&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The -L on the mount_nfs is there so we don't get flock errors.&lt;br /&gt;
&lt;br /&gt;
===rc2 file===&lt;br /&gt;
This sets up some links for libraries and the logging daemon.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
mount -a&lt;br /&gt;
/sbin/ldconfig -elf /usr/lib/compat /usr/X11R6/lib /usr/local/lib&lt;br /&gt;
&lt;br /&gt;
syslogd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now change permissions so rc can run.&lt;br /&gt;
 # chmod +x rc*&lt;br /&gt;
&lt;br /&gt;
Copy /diskless_ro/etc/rc and rc2 to /diskless_rw/&amp;lt;client ip&amp;gt;/etc&lt;br /&gt;
 # cp /diskless_ro/etc/rc* /diskless_rw/192.168.1.2/etc&lt;br /&gt;
&lt;br /&gt;
==GRUB Floppy boot (optional)==&lt;br /&gt;
&lt;br /&gt;
(would like to compile this ourselves later)&lt;br /&gt;
To get started we downloaded the image from www.hp.uab.edu/~ed/grub-net&lt;br /&gt;
&lt;br /&gt;
 shell# dd if=/data/grub-net.img of=/dev/fd0&lt;br /&gt;
&lt;br /&gt;
Then we mounted it as msdos&lt;br /&gt;
Remove/rename menu.1st from the grub directory as it was doing something funny with it.  We think that it was looking for a tftp server through our dhcp and we don't have a the dhcp setup correctly here, so we wanted to do it manually.&lt;br /&gt;
&lt;br /&gt;
Reboot off the floppy now..&lt;br /&gt;
&lt;br /&gt;
 grub&amp;gt; ifconfig --address=192.168.1.2 --mask=255.255.255.0 --gateway=192.168.1.1&lt;br /&gt;
 --server=192.168.1.2&lt;br /&gt;
&lt;br /&gt;
OR you can use dhcp&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 grub&amp;gt; dhcp&amp;lt;br&amp;gt; &lt;br /&gt;
 grub&amp;gt; tftpserver 192.168.1.2&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Setup tftp on your server, we created a directory /tftpboot. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Starting diskless system through GRUB===&lt;br /&gt;
This is an alternative boot loader.  You can use this for testing, if you don't have a pxeboot chip, otherwise skip this section.&lt;br /&gt;
&lt;br /&gt;
These commands are half working...&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 grub&amp;gt; root (nd)&amp;lt;br&amp;gt;&lt;br /&gt;
 grub&amp;gt; kernel /kernel root=ad0s1a&amp;lt;br&amp;gt;&lt;br /&gt;
 grub&amp;gt; pxeboot&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Completely Diskless System (PXEBOOT ROM) (optional)==&lt;br /&gt;
&lt;br /&gt;
Running completely diskless by booting from a Network ROM Chip.&lt;br /&gt;
&lt;br /&gt;
We have now got a Intel GD82559 Etherexpress pro/100 Card.&lt;br /&gt;
&lt;br /&gt;
When we boot up on the client machine with that card it displays:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Intel UNDI, PXE-2.0 (build 067)&amp;lt;br /&amp;gt;&lt;br /&gt;
Copyright (C) 1997-1998 Intel Corporation&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Which we cannot get working so we have read that you have to update this version to Build 82.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
copy /boot/pxeboot to /tftpboot directory we made before&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
- Downloaded proboot.exe from support.intel.com and unpacked into a windows box.&amp;lt;br /&amp;gt;&lt;br /&gt;
- Copied ibautil.exe onto a windows 98 boot disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
- Rebooted the test box after disabling network boot on the nic (otherwise it'll kick in before the floppy).&amp;lt;br /&amp;gt;&lt;br /&gt;
- Ran ibautil -iv to see what embedded image versions were available:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Intel(R) Boot Agent XG v1.0.09&amp;lt;br /&amp;gt;&lt;br /&gt;
Intel(R) Boot Agent GE v1.2.36&amp;lt;br /&amp;gt;&lt;br /&gt;
Intel(R) Boot Agent FE v4.1.19&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
- Ran ibautil -up to perform the image upgrade.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
It's interesting to note that no version showed up for out intel nic when initially running ibautil. After the upgrade, however, the version corectly showed as 4.1.19.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I made sure that I had simular features to this in my dhcpd.conf file:&amp;lt;br /&amp;gt;&lt;br /&gt;
option broadcast-address 192.168.254.255;&amp;lt;br /&amp;gt;&lt;br /&gt;
option domain-name-servers 192.168.254.3;&amp;lt;br /&amp;gt;&lt;br /&gt;
option domain-name &amp;quot;simerson.net&amp;quot;;&amp;lt;br /&amp;gt;&lt;br /&gt;
option routers 192.168.254.1;&amp;lt;br /&amp;gt;&lt;br /&gt;
option subnet-mask 255.255.255.0;&amp;lt;br /&amp;gt;&lt;br /&gt;
server-name &amp;quot;pxe-gw&amp;quot;;&amp;lt;br /&amp;gt;&lt;br /&gt;
server-identifier 192.168.254.3;&amp;lt;br /&amp;gt;&lt;br /&gt;
next-server 192.168.254.3;&amp;lt;br /&amp;gt;&lt;br /&gt;
default-lease-time -1;&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
subnet 192.168.254.0 netmask 255.255.255.0 {&amp;lt;br /&amp;gt;&lt;br /&gt;
range 192.168.254.32 192.168.254.99;&amp;lt;br /&amp;gt;&lt;br /&gt;
option root-path &amp;quot;/usr/local/export/pxe&amp;quot;;&amp;lt;br /&amp;gt;&lt;br /&gt;
filename &amp;quot;pxeboot&amp;quot;;&amp;lt;br /&amp;gt;&lt;br /&gt;
}&amp;lt;br /&amp;gt;&lt;br /&gt;
host cm.simerson.net {&amp;lt;br /&amp;gt;&lt;br /&gt;
hardware ethernet 00:e0:18:98:f0:cc;&amp;lt;br /&amp;gt;&lt;br /&gt;
fixed-address 192.168.254.126;&amp;lt;br /&amp;gt;&lt;br /&gt;
}&amp;lt;br /&amp;gt;&lt;br /&gt;
host c1.simerson.net {&amp;lt;br /&amp;gt;&lt;br /&gt;
hardware ethernet 00:60:97:0e:bb:a7;&amp;lt;br /&amp;gt;&lt;br /&gt;
fixed-address 192.168.254.131;&amp;lt;br /&amp;gt;&lt;br /&gt;
}&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==X config notes==&lt;br /&gt;
On the X server the /etc/X11/xorg.conf file is only used for the X server not the clients.&lt;br /&gt;
&lt;br /&gt;
To use this same configuration for your X Terminal Clients copy this file to /diskless_rw/&amp;lt;Client IP&amp;gt;/etc/X11 and it will use it.&lt;br /&gt;
&lt;br /&gt;
==Starting X on the client==&lt;br /&gt;
There are two ways of doing this and it depends on your hardware mainly.  &lt;br /&gt;
&lt;br /&gt;
1. run all programs on the server using the servers CPU and Memory this we will call the 'XDM Method'&lt;br /&gt;
2. run all programs from the NFS mounts using the clients CPU and Memory but the HD of the server, this we will call the 'NFS Method'&lt;br /&gt;
&lt;br /&gt;
Both methods will boot from PXE-Boot and can be diskless.&lt;br /&gt;
&lt;br /&gt;
===XDM Method===&lt;br /&gt;
Recommended for machines less than 1Ghz 256MB&lt;br /&gt;
&lt;br /&gt;
This is quite simple to setup.  Change your rc file in the /diskless_ro/etc directory to have this line at the end:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
X -query &amp;lt;server ip&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make sure on the server you setup xdm to start on system startup&lt;br /&gt;
 # vi /etc/ttys&lt;br /&gt;
&lt;br /&gt;
Search for this line:&lt;br /&gt;
 ttyv8   &amp;quot;/usr/X11R6/bin/xdm -nodaemon&amp;quot;  xterm   off secure&lt;br /&gt;
&lt;br /&gt;
and change it to:&lt;br /&gt;
 ttyv8   &amp;quot;/usr/X11R6/bin/xdm -nodaemon&amp;quot;  xterm   on secure&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also type this command at the command line on the client to test before hand.&lt;br /&gt;
&lt;br /&gt;
===NFS Method===&lt;br /&gt;
Recommended for machines over 1Ghz 256MB or if you want to utilise any of the clients devices such as local HD, USB, CD/DVD burners, etc.&lt;br /&gt;
&lt;br /&gt;
This is much trickier.&lt;br /&gt;
&lt;br /&gt;
Log in&lt;br /&gt;
Now type 'startx' at the command line.&lt;br /&gt;
&lt;br /&gt;
==Custom Kernels==&lt;br /&gt;
If you want to create custom kernels for your clients then do this:&lt;br /&gt;
&lt;br /&gt;
Create your custom kernel&lt;br /&gt;
 # cd /sys/i386/conf&lt;br /&gt;
 # cp GENERIC DISKLESS&lt;br /&gt;
 # vi DISKLESS&lt;br /&gt;
&lt;br /&gt;
Make changes and build and install&lt;br /&gt;
&lt;br /&gt;
 # cd /usr/src&lt;br /&gt;
 # make buildkernel KERNCONF=DISKLESS&lt;br /&gt;
 # make installkernel KERNCONF=DISKLESS DESTDIR=/diskless_ro&lt;br /&gt;
&lt;br /&gt;
==todo==&lt;br /&gt;
Here are some of the jobs left to do to make this secure or generally better:&lt;br /&gt;
&lt;br /&gt;
- There must be a simplier way to set this up if your going to use XDM in the end.  IE: do we need to do half of this tutorial if we are going to run XDM.&lt;br /&gt;
&lt;br /&gt;
- When the same user logs onto two seperate machines they cannot start firefox or thunderbird as it complains about being open somewhere else.  This assumes you have firefox and thunderbird already open on both machines that you logged onto.&lt;br /&gt;
&lt;br /&gt;
===Known Issues===&lt;br /&gt;
&lt;br /&gt;
- Doesn't work with HP-COMPAQ-T5525 thin client as it doesn't want to boot, it says it's missing libfreetype.so.9 which we do have it just cannot find it for some reason.  It's trying to use the VIA chipset for graphics which is different to all the other clients I've loaded successfully so far.&lt;br /&gt;
&lt;br /&gt;
- USB mice not working instead use PS/2.  If we got this working it may help get the HP T5525 working&lt;br /&gt;
&lt;br /&gt;
===Keyboard repeating on notebooks===&lt;br /&gt;
- typing on some keyboards (like my notebook) causes double characters to display if you type too fast. - This is the notebook, if you go and set the KDE Accessabiltiy options and set the keyboard rate to 50ms, this fixes the problem.&lt;br /&gt;
&lt;br /&gt;
===USB mouse===&lt;br /&gt;
&lt;br /&gt;
Editing /etc/devd.conf file and searched for ums&lt;br /&gt;
remarked out the action line.&lt;br /&gt;
 &lt;br /&gt;
rebooted.&lt;br /&gt;
 &lt;br /&gt;
Someone off IRC suggested that I build a GENERIC xorg.conf file which has vesa, usb mouse and ps/2 mouse configurations through it.&lt;br /&gt;
 &lt;br /&gt;
I reverted everything back to normal ps/2 mouse config, copying my usb config files to the following:&lt;br /&gt;
/etc/devd.conf_usb&lt;br /&gt;
/etc/rc.conf_usb&lt;br /&gt;
/etc/X11/xorg.conf_usb&lt;br /&gt;
 &lt;br /&gt;
I think we need a seperate configuration for the HP, it uses a weird display driver.&lt;br /&gt;
&lt;br /&gt;
==links==&lt;br /&gt;
&lt;br /&gt;
http://www.onlamp.com/pub/a/bsd/2004/09/09/diskless_server.html&lt;br /&gt;
&lt;br /&gt;
http://www.onlamp.com/pub/a/bsd/2004/09/30/diskless_clients.html&lt;br /&gt;
&lt;br /&gt;
http://people.freebsd.org/~alfred/pxe/en_US.ISO8859-1/articles/pxe/article.html&lt;br /&gt;
&lt;br /&gt;
http://www.the-labs.com/FreeBSD/Diskless/&lt;br /&gt;
&lt;br /&gt;
http://www.nber.org/sys-admin/FreeBSD-diskless.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://wikitest.freebsd.org/MarkusBoelter&lt;br /&gt;
&lt;br /&gt;
http://www.daemonsecurity.com/pub/pxeboot/&lt;br /&gt;
&lt;br /&gt;
http://www.kano.org.uk/projects/pxe/&lt;br /&gt;
&lt;br /&gt;
File Examples:&lt;br /&gt;
&lt;br /&gt;
http://www.watson.org/~robert/freebsd/pxe/&lt;br /&gt;
&lt;br /&gt;
PXE Information&lt;br /&gt;
http://www.computerworld.com/action/article.do?command=viewArticleBasic&amp;amp;articleId=108551&lt;br /&gt;
&lt;br /&gt;
[[Category:FreeBSD_for_Workstations]]&lt;/div&gt;</summary>
		<author><name>165.228.0.35</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/X_Windows_Terminal</id>
		<title>X Windows Terminal</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/X_Windows_Terminal"/>
				<updated>2006-11-01T00:02:33Z</updated>
		
		<summary type="html">&lt;p&gt;165.228.0.35: /* server */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Advantages==&lt;br /&gt;
X Windows can be used in a Server-Client relationship.  By setting up your X Windows Server you allow the use of all the programs on that computer to all the client PC's.  &lt;br /&gt;
&lt;br /&gt;
There are many advantages of running client computers in this manner:&lt;br /&gt;
* They don't even need a hard drive.  &lt;br /&gt;
* It's silent as there are no moving parts&lt;br /&gt;
* The solution saves power as your computers are very thin.&lt;br /&gt;
* Everything can be backed up centrally.&lt;br /&gt;
* Boot times for client PC's are the fastest around.&lt;br /&gt;
* Clients don't need much CPU speed, memory, etc.  Because of this they would be very cheap.  You could get away with using a Pentium 100Mhz with 32MB ram, no hard drive, no CD-ROM, no Floppy and a fanless power supply.  You just need a ethernet card with a PXEBOOT ROM. (XDM mode)&lt;br /&gt;
* Central management of applications, users, config&lt;br /&gt;
&lt;br /&gt;
==From the Beginning==&lt;br /&gt;
I've based this document on FreeBSD 6.1.&lt;br /&gt;
&lt;br /&gt;
Install FreeBSD 6.1 as per usual.&lt;br /&gt;
I've setup my mount points as this:&lt;br /&gt;
  '''Part    Mount        Size'''&lt;br /&gt;
  ad0s1b  Swap         (equal to how much memory I have in my machine)&lt;br /&gt;
  ad0s1a  /            512MB&lt;br /&gt;
  ad0s1d  /var         1G&lt;br /&gt;
  ad0s1e  /tmp         512MB&lt;br /&gt;
  ad0s1f  /usr         2GB    min.&lt;br /&gt;
          /diskless_ro 512MB&lt;br /&gt;
          /diskless_rw 1GB    min.&lt;br /&gt;
&lt;br /&gt;
I selected 'A' for auto and then deleted /usr and created /usr as 2g.&lt;br /&gt;
&lt;br /&gt;
Select User-X install. Yes to Ports if you have the room.&lt;br /&gt;
&lt;br /&gt;
Select SSH Server and NFS Server in the installation process, for the rest of the options go with the default.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
NOTE: If you forget to add any of the labels above, you will have to reboot as you cannot add labels to your boot drive when you have booted off it. So boot of the installation CD and use the configure -&amp;gt; label option in the sysinstall screen to add these labels to your boot drive.  You may need to retype the mount points for /, /var, /tmp and /usr by hitting 'm' on each label.  Once you have created these labels in the 'Disklabel Editor' then you can hit 'w' to write them to the disk.  answer 'yes' to the next question, hit 'ok' to the warning message.  Now quit and reboot. Add them to fstab (/dev/ad0s1g   /diskless_ro) &amp;amp; (/dev/ad0s1h   /diskless_rw) and mount.&lt;br /&gt;
&lt;br /&gt;
I find the best way to get this working is to break it down in to small steps and get each step working independantly.  IE: Setup NFS and see if you can mount it from another FreeBSD machine, don't just assume it will work and boot your PXE-Boot machine.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Throughout my documentation&lt;br /&gt;
&lt;br /&gt;
192.168.1.1 = the Server&lt;br /&gt;
&lt;br /&gt;
192.168.1.2 = the client (may be a full freebsd system or pxeboot)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At this point I normally install fluxbox with the following line:&lt;br /&gt;
&lt;br /&gt;
 shell# pkg_add -r fluxbox-devel&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
change your ~/.xinitrc file to the following:&lt;br /&gt;
&lt;br /&gt;
 startfluxbox&lt;br /&gt;
&lt;br /&gt;
Copy to .xsession&lt;br /&gt;
 $ ln -s ~/.xinitrc ~/.xsession&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Use the following command to update your fluxbox menus:&lt;br /&gt;
&lt;br /&gt;
 shell$ fluxbox-generate_menu&lt;br /&gt;
&lt;br /&gt;
==Running a single application==&lt;br /&gt;
&lt;br /&gt;
To get started I have my server setup running FreeBSD, with X-Windows and a few applications.  Nothing too special.  Then I have my client PC, which to start off I used the frenzy 1.0 boot CD to perform these initial tests.  You can get this from [http://frenzy.org.ua/eng/ frenzy website].  I entered into fluxbox, but you could equally use any X session.&lt;br /&gt;
You must allow incoming connections this is done with two commands&lt;br /&gt;
&lt;br /&gt;
 client$ startx -listen_tcp&lt;br /&gt;
 client$ xhost +&lt;br /&gt;
&lt;br /&gt;
This allows all computers to start applications on your client PC.  It's dangerous but good for testing everything is setup correctly.&lt;br /&gt;
&lt;br /&gt;
 client$ ssh &amp;lt;server user@server ip&amp;gt;&lt;br /&gt;
 eg: ssh mick@192.168.1.1&lt;br /&gt;
&lt;br /&gt;
 ssh$ export DISPLAY='192.168.1.2:0'&lt;br /&gt;
&lt;br /&gt;
Or if your running bash:&lt;br /&gt;
 ssh$ DISPLAY=&amp;lt;client ip&amp;gt;:&amp;lt;client display&amp;gt;; export DISPLAY&lt;br /&gt;
 eg: DISPLAY=192.168.1.2:0; export DISPLAY&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 ssh$ xcalc &amp;amp;&lt;br /&gt;
&lt;br /&gt;
This should display on your client&lt;br /&gt;
&lt;br /&gt;
==Running a whole X Windows Session (XDM)==&lt;br /&gt;
This sets up a server so that you can share your X session with any clients which want to connect.  (Simular to Terminal Services under windows)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===server===&lt;br /&gt;
edit:&lt;br /&gt;
 /usr/X11R6/lib/X11/xdm/xdm-config&lt;br /&gt;
&lt;br /&gt;
comment out with a '!' the request line&amp;lt;br&amp;gt;&lt;br /&gt;
 DisplayManager.requestPort: 0&lt;br /&gt;
&lt;br /&gt;
edit:&amp;lt;br&amp;gt;&lt;br /&gt;
 /usr/X11R6/lib/X11/xdm/Xaccess&lt;br /&gt;
&lt;br /&gt;
Enter a single asterisk any where in the file, so the contents should be one asterisk and the rest commented out.  There should be an asterisk on line 49 which you can uncomment.&lt;br /&gt;
&lt;br /&gt;
Whilst in the /usr/X11R6/lib/X11/xdm directory do these commands:&lt;br /&gt;
 shell# vi Xstartup&lt;br /&gt;
&lt;br /&gt;
Add into this file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
#&lt;br /&gt;
# Xstartup&lt;br /&gt;
#&lt;br /&gt;
# This program is run as root after the user is verified&lt;br /&gt;
#&lt;br /&gt;
if [ -f /etc/nologin ]; then&lt;br /&gt;
   xmessage -file /etc/nologin -timeout 30 -center&lt;br /&gt;
   exit 1&lt;br /&gt;
fi&lt;br /&gt;
sessreg -a -l $DISPLAY -x /usr/X11R6/lib/xdm/Xservers $LOGNAME&lt;br /&gt;
/usr/X11R6/lib/xdm/GiveConsole&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
shell# chmod +x Xstartup&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Make sure your firewall has all traffic for you lan.  (Need to know which exact ports to allow).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;run xdm on server as root&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 shell# xdm&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can put this xdm into the /etc/ttys so that it starts automatically on boot up.&lt;br /&gt;
&lt;br /&gt;
===client===&lt;br /&gt;
make sure your not in X&lt;br /&gt;
&lt;br /&gt;
type this command:&lt;br /&gt;
&lt;br /&gt;
 shell# X -broadcast&lt;br /&gt;
&lt;br /&gt;
This assumes that you are running only one server.&lt;br /&gt;
Otherwise use:&lt;br /&gt;
&lt;br /&gt;
 shell# X -query 192.168.1.1&lt;br /&gt;
&lt;br /&gt;
==DHCP - Install and setup==&lt;br /&gt;
Server setup.&lt;br /&gt;
&lt;br /&gt;
install through package&lt;br /&gt;
 # pkg_add -r isc-dhcp3-server&lt;br /&gt;
&lt;br /&gt;
We do this so we can define the root path for the diskless system.&lt;br /&gt;
&lt;br /&gt;
copy /usr/local/etc/dhcpd.conf.sample to /usr/local/etc/dhcpd.conf&lt;br /&gt;
&lt;br /&gt;
edit /usr/local/etc/dhcpd.conf and make sure it has these lines in it.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# dhcpd.conf&lt;br /&gt;
#&lt;br /&gt;
# Sample configuration file for ISC dhcpd&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
# option definitions common to all supported networks...&lt;br /&gt;
#option domain-name &amp;quot;example.org&amp;quot;;&lt;br /&gt;
#option domain-name-servers ns1.example.org, ns2.example.org;&lt;br /&gt;
&lt;br /&gt;
default-lease-time 3600;&lt;br /&gt;
max-lease-time 86400;&lt;br /&gt;
&lt;br /&gt;
# If this DHCP server is the official DHCP server for the local&lt;br /&gt;
# network, the authoritative directive should be uncommented.&lt;br /&gt;
authoritative;&lt;br /&gt;
&lt;br /&gt;
# ad-hoc DNS update scheme - set to &amp;quot;none&amp;quot; to disable dynamic DNS updates.&lt;br /&gt;
ddns-update-style none;&lt;br /&gt;
&lt;br /&gt;
option root-path &amp;quot;192.168.1.1:/diskless_ro&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
# lines added for pxeboot client&lt;br /&gt;
use-host-decl-names on;&lt;br /&gt;
next-server 192.168.1.1;&lt;br /&gt;
filename &amp;quot;pxeboot&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
# Use this to send dhcp log messages to a different log file (you also&lt;br /&gt;
# have to hack syslog.conf to complete the redirection).&lt;br /&gt;
log-facility local7;&lt;br /&gt;
&lt;br /&gt;
# No service will be given on this subnet, but declaring it helps the&lt;br /&gt;
# DHCP server to understand the network topology.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# This is a very basic subnet declaration.&lt;br /&gt;
&lt;br /&gt;
subnet 192.168.1.0 netmask 255.255.255.0 {&lt;br /&gt;
  range 192.168.1.10 192.168.1.20;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create the leases file&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# touch /var/db/dhcpd.leases&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Restart the daemon&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# killall dhcpd&lt;br /&gt;
# dhcpd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add to /etc/rc.conf&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dhcpd_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using a seperate DHCP server===&lt;br /&gt;
If you already have a DHCP server and you want to use that instead then you have to do these steps.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====On your DHCP Server====&lt;br /&gt;
1. edit /usr/local/etc/dhcpd.conf and add the following&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
authoritative;&lt;br /&gt;
ddns-update-style none;&lt;br /&gt;
&lt;br /&gt;
option root-path &amp;quot;&amp;lt;X Server IP&amp;gt;:/diskless_ro&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
# lines added for pxeboot client&lt;br /&gt;
use-host-decl-names on;&lt;br /&gt;
next-server &amp;lt;X Server IP&amp;gt;;&lt;br /&gt;
filename &amp;quot;pxeboot&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
2. stop dhcpd&lt;br /&gt;
3. start dhcpd&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Client====&lt;br /&gt;
Your client should boot now just remember that you may get a different IP now that you are talking to a different DHCP server so you have to change your exports file and copy accross a directory in /diskless_rw for the new IP.  All this is done on the X Server.&lt;br /&gt;
&lt;br /&gt;
==TFTP Setup==&lt;br /&gt;
TFTP helps us transport the kernel to the PXE-Boot machines.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# mkdir /tftpboot&lt;br /&gt;
# cp /boot/pxeboot /tftpboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Uncomment the following line in /etc/inetd.conf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tftp    dgram   udp     wait    root    /usr/libexec/tftpd      tftpd -l -s /tftpboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart the inetd service&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# killall -HUP inetd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If inetd has not started automatically do the following:&lt;br /&gt;
&lt;br /&gt;
Add the following to /etc/rc.conf&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
inetd_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now start inetd manually.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# inetd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test===&lt;br /&gt;
To test that tftp has loaded type the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# sockstat -4l | grep 69 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and you should see this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
root      inetd       13719 5   udp4    *:69                 *:*&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==NFS Setup==&lt;br /&gt;
Network File System.  Here we share all the directories from the server so that the diskless clients see these drives as if those directories were the diskless client's.&lt;br /&gt;
&lt;br /&gt;
===Server Setup===&lt;br /&gt;
If you forgot to select 'Yes' to NFS server setup in the FreeBSD installation then you have to setup the server manually like so:&lt;br /&gt;
&lt;br /&gt;
Enable NFS /etc/rc.conf&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rpcbind_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
nfs_server_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test===&lt;br /&gt;
A quick test to see if your NFS server is acting normal:&lt;br /&gt;
&lt;br /&gt;
Edit the /etc/exports and add the following&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/usr       -alldirs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This allows anyone to connect to your /usr mount.&lt;br /&gt;
&lt;br /&gt;
Now run these commands to restart and view your mounts&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# kill -HUP `cat /var/run/mountd.pid`&lt;br /&gt;
# showmount -e&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now try and mount it from a client running BSD&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# mount -t nfs 192.168.1.1:/usr /mnt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Server exports setup===&lt;br /&gt;
&lt;br /&gt;
Make directories for each IP for your clients&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /diskless_rw&lt;br /&gt;
# mkdir 192.168.1.2&lt;br /&gt;
# cd 192.168.1.2&lt;br /&gt;
# mkdir etc var&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Configure /etc/exports&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# file systems accessible only for reading:&lt;br /&gt;
# Original way of linking up the /usr&lt;br /&gt;
#/usr -ro -maproot=0 -network 192.168.1.0 -mask 255.255.255.0&lt;br /&gt;
&lt;br /&gt;
/usr -network 192.168.1.0 -mask 255.255.255.0&lt;br /&gt;
/diskless_ro -ro -maproot=0 -network 192.168.1.0 -mask 255.255.255.0&lt;br /&gt;
/diskless_rw/192.168.1.2/etc /diskless_rw/192.168.1.2/var -maproot=root 192.168.1.2&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restarting NFS&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# kill -HUP `cat /var/run/mountd.pid`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If NFS is not started yet do the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
data# rpcbind&lt;br /&gt;
data# nfsd -u -t -n 20 -h 192.168.1.1&lt;br /&gt;
data# mountd -r&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Testing to see if the exports are correct&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
data# showmount -e&lt;br /&gt;
Exports list on localhost:&lt;br /&gt;
/usr                              192.168.1.0&lt;br /&gt;
/diskless_rw/192.168.1.2/var      192.168.1.2&lt;br /&gt;
/diskless_rw/192.168.1.2/etc      192.168.1.2&lt;br /&gt;
/diskless_ro                      192.168.1.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Setup diskless_rw==&lt;br /&gt;
Create directories&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /diskless_rw/192.168.1.2/etc&lt;br /&gt;
# mkdir pam.d X11&lt;br /&gt;
&lt;br /&gt;
# cd /diskless_rw/192.168.1.2/var&lt;br /&gt;
# mkdir home log run tmp&lt;br /&gt;
# chmod 1777 tmp&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a swap file in the var directory for the client&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# dd if=/dev/zero of=/diskless_rw/192.168.1.2/var/swap bs=1k count=32000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in the /diskless_rw/&amp;lt;ip&amp;gt;/var/log directory I created the following log files so that syslogd would have files to write to:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /diskless_rw/192.168.1.2/var/log&lt;br /&gt;
# touch messages security auth.log maillog lpd-errs xferlog cron debug.log slip.log ppp.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy the following files from the systems /etc directory to /diskless_rw/&amp;lt;client ip&amp;gt;/etc&lt;br /&gt;
 # cp -Rv &amp;lt;files&amp;gt; /diskless_rw/&amp;lt;ip&amp;gt;/etc&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
auth.conf&lt;br /&gt;
disktab&lt;br /&gt;
gettytab&lt;br /&gt;
group&lt;br /&gt;
hosts&lt;br /&gt;
login.access&lt;br /&gt;
login.conf&lt;br /&gt;
login.conf.db&lt;br /&gt;
master.passwd&lt;br /&gt;
netconfig&lt;br /&gt;
protocols&lt;br /&gt;
pam.d&lt;br /&gt;
pwd.db&lt;br /&gt;
services&lt;br /&gt;
spwd.db&lt;br /&gt;
syslog.conf&lt;br /&gt;
termcap -&amp;gt; /usr/share/misc/termcap&lt;br /&gt;
ttys&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It's very important that you copy all the files in pam.d across otherwise you will not have a password prompt on your login.&lt;br /&gt;
&lt;br /&gt;
Create a fstab in /diskless_rw/&amp;lt;ip&amp;gt;/etc&lt;br /&gt;
 # touch /diskless_rw/&amp;lt;ip&amp;gt;/etc/fstab&lt;br /&gt;
&lt;br /&gt;
==Setup diskless_ro==&lt;br /&gt;
This is the common root mount for all pxe-boot clients.&lt;br /&gt;
&lt;br /&gt;
Copy accross important directories and kernel from boot to diskless_ro&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cp -rv /bin /lib /libexec /sbin /boot /diskless_ro&lt;br /&gt;
# mkdir /diskless_ro/usr&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For some client machines you may have to disable the ACPI (Power management) in the /diskless_ro/boot/device.hints&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
hint.acpi.0.disabled=&amp;quot;1&amp;quot; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make a dev so that clients can boot without freezing.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# mkdir /diskless_ro/dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make a directory so that we can mount var from the /diskless_rw/&amp;lt;client ip&amp;gt;/var&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# mkdir /diskless_ro/var&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
So we can use the systems /var/tmp and /usr/home directory make soft links to them&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /diskless_ro&lt;br /&gt;
# ln -s /var/tmp&lt;br /&gt;
# ln -s /usr/home&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We require a few files from the systems /etc directory to be copied into the /diskless_ro/etc for common use between the thin clients.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# mkdir /diskless_ro/etc&lt;br /&gt;
# cd /etc&lt;br /&gt;
# cp /services /netconfig /login.conf /diskless_ro/etc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===rc file===&lt;br /&gt;
The /diskless_ro/etc/rc file is the first file which is ran after the kernel has loaded.  Here we mount a the labels from the server.&lt;br /&gt;
&lt;br /&gt;
Create the /diskless_ro/etc/rc&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin; export PATH&lt;br /&gt;
TMPDIR=~/tmp;export TMPDIR&lt;br /&gt;
TMP=~/tmp;export TMP&lt;br /&gt;
&lt;br /&gt;
mount -t nfs 192.168.1.1:/usr /usr&lt;br /&gt;
&lt;br /&gt;
boot_ip=`/sbin/ifconfig | /usr/bin/grep &amp;quot;inet &amp;quot; | /usr/bin/grep -v 127.0.0.1 |&lt;br /&gt;
/usr/bin/awk '{print $2}'`&lt;br /&gt;
mount_nfs -L 192.168.1.1:/diskless_rw/${boot_ip}/etc /etc&lt;br /&gt;
mount_nfs -L 192.168.1.1:/diskless_rw/${boot_ip}/var /var&lt;br /&gt;
&lt;br /&gt;
swapon /var/swap&lt;br /&gt;
&lt;br /&gt;
#rm -rf /var/tmp/*&lt;br /&gt;
#rm -rf /var/tmp/.*&lt;br /&gt;
&lt;br /&gt;
# Option if you choose XDM terminals&lt;br /&gt;
#X -query 192.168.1.1&lt;br /&gt;
&lt;br /&gt;
. /etc/rc2&lt;br /&gt;
exit 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Remember to change 192.168.1.1 to your X server's IP&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The -L on the mount_nfs is there so we don't get flock errors.&lt;br /&gt;
&lt;br /&gt;
===rc2 file===&lt;br /&gt;
This sets up some links for libraries and the logging daemon.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
mount -a&lt;br /&gt;
/sbin/ldconfig -elf /usr/lib/compat /usr/X11R6/lib /usr/local/lib&lt;br /&gt;
&lt;br /&gt;
syslogd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now change permissions so rc can run.&lt;br /&gt;
 # chmod +x rc*&lt;br /&gt;
&lt;br /&gt;
Copy /diskless_ro/etc/rc and rc2 to /diskless_rw/&amp;lt;client ip&amp;gt;/etc&lt;br /&gt;
 # cp /diskless_ro/etc/rc* /diskless_rw/192.168.1.2/etc&lt;br /&gt;
&lt;br /&gt;
==GRUB Floppy boot (optional)==&lt;br /&gt;
&lt;br /&gt;
(would like to compile this ourselves later)&lt;br /&gt;
To get started we downloaded the image from www.hp.uab.edu/~ed/grub-net&lt;br /&gt;
&lt;br /&gt;
 shell# dd if=/data/grub-net.img of=/dev/fd0&lt;br /&gt;
&lt;br /&gt;
Then we mounted it as msdos&lt;br /&gt;
Remove/rename menu.1st from the grub directory as it was doing something funny with it.  We think that it was looking for a tftp server through our dhcp and we don't have a the dhcp setup correctly here, so we wanted to do it manually.&lt;br /&gt;
&lt;br /&gt;
Reboot off the floppy now..&lt;br /&gt;
&lt;br /&gt;
 grub&amp;gt; ifconfig --address=192.168.1.2 --mask=255.255.255.0 --gateway=192.168.1.1&lt;br /&gt;
 --server=192.168.1.2&lt;br /&gt;
&lt;br /&gt;
OR you can use dhcp&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 grub&amp;gt; dhcp&amp;lt;br&amp;gt; &lt;br /&gt;
 grub&amp;gt; tftpserver 192.168.1.2&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Setup tftp on your server, we created a directory /tftpboot. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Starting diskless system through GRUB===&lt;br /&gt;
This is an alternative boot loader.  You can use this for testing, if you don't have a pxeboot chip, otherwise skip this section.&lt;br /&gt;
&lt;br /&gt;
These commands are half working...&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 grub&amp;gt; root (nd)&amp;lt;br&amp;gt;&lt;br /&gt;
 grub&amp;gt; kernel /kernel root=ad0s1a&amp;lt;br&amp;gt;&lt;br /&gt;
 grub&amp;gt; pxeboot&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Completely Diskless System (PXEBOOT ROM) (optional)==&lt;br /&gt;
&lt;br /&gt;
Running completely diskless by booting from a Network ROM Chip.&lt;br /&gt;
&lt;br /&gt;
We have now got a Intel GD82559 Etherexpress pro/100 Card.&lt;br /&gt;
&lt;br /&gt;
When we boot up on the client machine with that card it displays:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Intel UNDI, PXE-2.0 (build 067)&amp;lt;br /&amp;gt;&lt;br /&gt;
Copyright (C) 1997-1998 Intel Corporation&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Which we cannot get working so we have read that you have to update this version to Build 82.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
copy /boot/pxeboot to /tftpboot directory we made before&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
- Downloaded proboot.exe from support.intel.com and unpacked into a windows box.&amp;lt;br /&amp;gt;&lt;br /&gt;
- Copied ibautil.exe onto a windows 98 boot disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
- Rebooted the test box after disabling network boot on the nic (otherwise it'll kick in before the floppy).&amp;lt;br /&amp;gt;&lt;br /&gt;
- Ran ibautil -iv to see what embedded image versions were available:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Intel(R) Boot Agent XG v1.0.09&amp;lt;br /&amp;gt;&lt;br /&gt;
Intel(R) Boot Agent GE v1.2.36&amp;lt;br /&amp;gt;&lt;br /&gt;
Intel(R) Boot Agent FE v4.1.19&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
- Ran ibautil -up to perform the image upgrade.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
It's interesting to note that no version showed up for out intel nic when initially running ibautil. After the upgrade, however, the version corectly showed as 4.1.19.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I made sure that I had simular features to this in my dhcpd.conf file:&amp;lt;br /&amp;gt;&lt;br /&gt;
option broadcast-address 192.168.254.255;&amp;lt;br /&amp;gt;&lt;br /&gt;
option domain-name-servers 192.168.254.3;&amp;lt;br /&amp;gt;&lt;br /&gt;
option domain-name &amp;quot;simerson.net&amp;quot;;&amp;lt;br /&amp;gt;&lt;br /&gt;
option routers 192.168.254.1;&amp;lt;br /&amp;gt;&lt;br /&gt;
option subnet-mask 255.255.255.0;&amp;lt;br /&amp;gt;&lt;br /&gt;
server-name &amp;quot;pxe-gw&amp;quot;;&amp;lt;br /&amp;gt;&lt;br /&gt;
server-identifier 192.168.254.3;&amp;lt;br /&amp;gt;&lt;br /&gt;
next-server 192.168.254.3;&amp;lt;br /&amp;gt;&lt;br /&gt;
default-lease-time -1;&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
subnet 192.168.254.0 netmask 255.255.255.0 {&amp;lt;br /&amp;gt;&lt;br /&gt;
range 192.168.254.32 192.168.254.99;&amp;lt;br /&amp;gt;&lt;br /&gt;
option root-path &amp;quot;/usr/local/export/pxe&amp;quot;;&amp;lt;br /&amp;gt;&lt;br /&gt;
filename &amp;quot;pxeboot&amp;quot;;&amp;lt;br /&amp;gt;&lt;br /&gt;
}&amp;lt;br /&amp;gt;&lt;br /&gt;
host cm.simerson.net {&amp;lt;br /&amp;gt;&lt;br /&gt;
hardware ethernet 00:e0:18:98:f0:cc;&amp;lt;br /&amp;gt;&lt;br /&gt;
fixed-address 192.168.254.126;&amp;lt;br /&amp;gt;&lt;br /&gt;
}&amp;lt;br /&amp;gt;&lt;br /&gt;
host c1.simerson.net {&amp;lt;br /&amp;gt;&lt;br /&gt;
hardware ethernet 00:60:97:0e:bb:a7;&amp;lt;br /&amp;gt;&lt;br /&gt;
fixed-address 192.168.254.131;&amp;lt;br /&amp;gt;&lt;br /&gt;
}&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==X config notes==&lt;br /&gt;
On the X server the /etc/X11/xorg.conf file is only used for the X server not the clients.&lt;br /&gt;
&lt;br /&gt;
To use this same configuration for your X Terminal Clients copy this file to /diskless_rw/&amp;lt;Client IP&amp;gt;/etc/X11 and it will use it.&lt;br /&gt;
&lt;br /&gt;
==Starting X on the client==&lt;br /&gt;
There are two ways of doing this and it depends on your hardware mainly.  &lt;br /&gt;
&lt;br /&gt;
1. run all programs on the server using the servers CPU and Memory this we will call the 'XDM Method'&lt;br /&gt;
2. run all programs from the NFS mounts using the clients CPU and Memory but the HD of the server, this we will call the 'NFS Method'&lt;br /&gt;
&lt;br /&gt;
Both methods will boot from PXE-Boot and can be diskless.&lt;br /&gt;
&lt;br /&gt;
===XDM Method===&lt;br /&gt;
Recommended for machines less than 1Ghz 256MB&lt;br /&gt;
&lt;br /&gt;
This is quite simple to setup.  Change your rc file in the /diskless_ro/etc directory to have this line at the end:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
X -query &amp;lt;server ip&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make sure on the server you setup xdm to start on system startup&lt;br /&gt;
 # vi /etc/ttys&lt;br /&gt;
&lt;br /&gt;
Search for this line:&lt;br /&gt;
 ttyv8   &amp;quot;/usr/X11R6/bin/xdm -nodaemon&amp;quot;  xterm   off secure&lt;br /&gt;
&lt;br /&gt;
and change it to:&lt;br /&gt;
 ttyv8   &amp;quot;/usr/X11R6/bin/xdm -nodaemon&amp;quot;  xterm   on secure&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also type this command at the command line on the client to test before hand.&lt;br /&gt;
&lt;br /&gt;
===NFS Method===&lt;br /&gt;
Recommended for machines over 1Ghz 256MB or if you want to utilise any of the clients devices such as local HD, USB, CD/DVD burners, etc.&lt;br /&gt;
&lt;br /&gt;
This is much trickier.&lt;br /&gt;
&lt;br /&gt;
Log in&lt;br /&gt;
Now type 'startx' at the command line.&lt;br /&gt;
&lt;br /&gt;
==Custom Kernels==&lt;br /&gt;
If you want to create custom kernels for your clients then do this:&lt;br /&gt;
&lt;br /&gt;
Create your custom kernel&lt;br /&gt;
 # cd /sys/i386/conf&lt;br /&gt;
 # cp GENERIC DISKLESS&lt;br /&gt;
 # vi DISKLESS&lt;br /&gt;
&lt;br /&gt;
Make changes and build and install&lt;br /&gt;
&lt;br /&gt;
 # cd /usr/src&lt;br /&gt;
 # make buildkernel KERNCONF=DISKLESS&lt;br /&gt;
 # make installkernel KERNCONF=DISKLESS DESTDIR=/diskless_ro&lt;br /&gt;
&lt;br /&gt;
==todo==&lt;br /&gt;
Here are some of the jobs left to do to make this secure or generally better:&lt;br /&gt;
&lt;br /&gt;
- There must be a simplier way to set this up if your going to use XDM in the end.  IE: do we need to do half of this tutorial if we are going to run XDM.&lt;br /&gt;
&lt;br /&gt;
- When the same user logs onto two seperate machines they cannot start firefox or thunderbird as it complains about being open somewhere else.  This assumes you have firefox and thunderbird already open on both machines that you logged onto.&lt;br /&gt;
&lt;br /&gt;
===Known Issues===&lt;br /&gt;
&lt;br /&gt;
- Doesn't work with HP-COMPAQ-T5525 thin client as it doesn't want to boot, it says it's missing libfreetype.so.9 which we do have it just cannot find it for some reason.  It's trying to use the VIA chipset for graphics which is different to all the other clients I've loaded successfully so far.&lt;br /&gt;
&lt;br /&gt;
- USB mice not working instead use PS/2.  If we got this working it may help get the HP T5525 working&lt;br /&gt;
&lt;br /&gt;
===Keyboard repeating on notebooks===&lt;br /&gt;
- typing on some keyboards (like my notebook) causes double characters to display if you type too fast. - This is the notebook, if you go and set the KDE Accessabiltiy options and set the keyboard rate to 50ms, this fixes the problem.&lt;br /&gt;
&lt;br /&gt;
===USB mouse===&lt;br /&gt;
&lt;br /&gt;
Editing /etc/devd.conf file and searched for ums&lt;br /&gt;
remarked out the action line.&lt;br /&gt;
 &lt;br /&gt;
rebooted.&lt;br /&gt;
 &lt;br /&gt;
Someone off IRC suggested that I build a GENERIC xorg.conf file which has vesa, usb mouse and ps/2 mouse configurations through it.&lt;br /&gt;
 &lt;br /&gt;
I reverted everything back to normal ps/2 mouse config, copying my usb config files to the following:&lt;br /&gt;
/etc/devd.conf_usb&lt;br /&gt;
/etc/rc.conf_usb&lt;br /&gt;
/etc/X11/xorg.conf_usb&lt;br /&gt;
 &lt;br /&gt;
I think we need a seperate configuration for the HP, it uses a weird display driver.&lt;br /&gt;
&lt;br /&gt;
==links==&lt;br /&gt;
&lt;br /&gt;
http://www.onlamp.com/pub/a/bsd/2004/09/09/diskless_server.html&lt;br /&gt;
&lt;br /&gt;
http://www.onlamp.com/pub/a/bsd/2004/09/30/diskless_clients.html&lt;br /&gt;
&lt;br /&gt;
http://people.freebsd.org/~alfred/pxe/en_US.ISO8859-1/articles/pxe/article.html&lt;br /&gt;
&lt;br /&gt;
http://www.the-labs.com/FreeBSD/Diskless/&lt;br /&gt;
&lt;br /&gt;
http://www.nber.org/sys-admin/FreeBSD-diskless.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://wikitest.freebsd.org/MarkusBoelter&lt;br /&gt;
&lt;br /&gt;
http://www.daemonsecurity.com/pub/pxeboot/&lt;br /&gt;
&lt;br /&gt;
http://www.kano.org.uk/projects/pxe/&lt;br /&gt;
&lt;br /&gt;
File Examples:&lt;br /&gt;
&lt;br /&gt;
http://www.watson.org/~robert/freebsd/pxe/&lt;br /&gt;
&lt;br /&gt;
PXE Information&lt;br /&gt;
http://www.computerworld.com/action/article.do?command=viewArticleBasic&amp;amp;articleId=108551&lt;br /&gt;
&lt;br /&gt;
[[Category:FreeBSD_for_Workstations]]&lt;/div&gt;</summary>
		<author><name>165.228.0.35</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/X_Windows_Terminal</id>
		<title>X Windows Terminal</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/X_Windows_Terminal"/>
				<updated>2006-11-01T00:02:00Z</updated>
		
		<summary type="html">&lt;p&gt;165.228.0.35: /* From the Beginning */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Advantages==&lt;br /&gt;
X Windows can be used in a Server-Client relationship.  By setting up your X Windows Server you allow the use of all the programs on that computer to all the client PC's.  &lt;br /&gt;
&lt;br /&gt;
There are many advantages of running client computers in this manner:&lt;br /&gt;
* They don't even need a hard drive.  &lt;br /&gt;
* It's silent as there are no moving parts&lt;br /&gt;
* The solution saves power as your computers are very thin.&lt;br /&gt;
* Everything can be backed up centrally.&lt;br /&gt;
* Boot times for client PC's are the fastest around.&lt;br /&gt;
* Clients don't need much CPU speed, memory, etc.  Because of this they would be very cheap.  You could get away with using a Pentium 100Mhz with 32MB ram, no hard drive, no CD-ROM, no Floppy and a fanless power supply.  You just need a ethernet card with a PXEBOOT ROM. (XDM mode)&lt;br /&gt;
* Central management of applications, users, config&lt;br /&gt;
&lt;br /&gt;
==From the Beginning==&lt;br /&gt;
I've based this document on FreeBSD 6.1.&lt;br /&gt;
&lt;br /&gt;
Install FreeBSD 6.1 as per usual.&lt;br /&gt;
I've setup my mount points as this:&lt;br /&gt;
  '''Part    Mount        Size'''&lt;br /&gt;
  ad0s1b  Swap         (equal to how much memory I have in my machine)&lt;br /&gt;
  ad0s1a  /            512MB&lt;br /&gt;
  ad0s1d  /var         1G&lt;br /&gt;
  ad0s1e  /tmp         512MB&lt;br /&gt;
  ad0s1f  /usr         2GB    min.&lt;br /&gt;
          /diskless_ro 512MB&lt;br /&gt;
          /diskless_rw 1GB    min.&lt;br /&gt;
&lt;br /&gt;
I selected 'A' for auto and then deleted /usr and created /usr as 2g.&lt;br /&gt;
&lt;br /&gt;
Select User-X install. Yes to Ports if you have the room.&lt;br /&gt;
&lt;br /&gt;
Select SSH Server and NFS Server in the installation process, for the rest of the options go with the default.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
NOTE: If you forget to add any of the labels above, you will have to reboot as you cannot add labels to your boot drive when you have booted off it. So boot of the installation CD and use the configure -&amp;gt; label option in the sysinstall screen to add these labels to your boot drive.  You may need to retype the mount points for /, /var, /tmp and /usr by hitting 'm' on each label.  Once you have created these labels in the 'Disklabel Editor' then you can hit 'w' to write them to the disk.  answer 'yes' to the next question, hit 'ok' to the warning message.  Now quit and reboot. Add them to fstab (/dev/ad0s1g   /diskless_ro) &amp;amp; (/dev/ad0s1h   /diskless_rw) and mount.&lt;br /&gt;
&lt;br /&gt;
I find the best way to get this working is to break it down in to small steps and get each step working independantly.  IE: Setup NFS and see if you can mount it from another FreeBSD machine, don't just assume it will work and boot your PXE-Boot machine.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Throughout my documentation&lt;br /&gt;
&lt;br /&gt;
192.168.1.1 = the Server&lt;br /&gt;
&lt;br /&gt;
192.168.1.2 = the client (may be a full freebsd system or pxeboot)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At this point I normally install fluxbox with the following line:&lt;br /&gt;
&lt;br /&gt;
 shell# pkg_add -r fluxbox-devel&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
change your ~/.xinitrc file to the following:&lt;br /&gt;
&lt;br /&gt;
 startfluxbox&lt;br /&gt;
&lt;br /&gt;
Copy to .xsession&lt;br /&gt;
 $ ln -s ~/.xinitrc ~/.xsession&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Use the following command to update your fluxbox menus:&lt;br /&gt;
&lt;br /&gt;
 shell$ fluxbox-generate_menu&lt;br /&gt;
&lt;br /&gt;
==Running a single application==&lt;br /&gt;
&lt;br /&gt;
To get started I have my server setup running FreeBSD, with X-Windows and a few applications.  Nothing too special.  Then I have my client PC, which to start off I used the frenzy 1.0 boot CD to perform these initial tests.  You can get this from [http://frenzy.org.ua/eng/ frenzy website].  I entered into fluxbox, but you could equally use any X session.&lt;br /&gt;
You must allow incoming connections this is done with two commands&lt;br /&gt;
&lt;br /&gt;
 client$ startx -listen_tcp&lt;br /&gt;
 client$ xhost +&lt;br /&gt;
&lt;br /&gt;
This allows all computers to start applications on your client PC.  It's dangerous but good for testing everything is setup correctly.&lt;br /&gt;
&lt;br /&gt;
 client$ ssh &amp;lt;server user@server ip&amp;gt;&lt;br /&gt;
 eg: ssh mick@192.168.1.1&lt;br /&gt;
&lt;br /&gt;
 ssh$ export DISPLAY='192.168.1.2:0'&lt;br /&gt;
&lt;br /&gt;
Or if your running bash:&lt;br /&gt;
 ssh$ DISPLAY=&amp;lt;client ip&amp;gt;:&amp;lt;client display&amp;gt;; export DISPLAY&lt;br /&gt;
 eg: DISPLAY=192.168.1.2:0; export DISPLAY&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 ssh$ xcalc &amp;amp;&lt;br /&gt;
&lt;br /&gt;
This should display on your client&lt;br /&gt;
&lt;br /&gt;
==Running a whole X Windows Session (XDM)==&lt;br /&gt;
This sets up a server so that you can share your X session with any clients which want to connect.  (Simular to Terminal Services under windows)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===server===&lt;br /&gt;
edit:&lt;br /&gt;
 /usr/X11R6/lib/X11/xdm/xdm-config&lt;br /&gt;
&lt;br /&gt;
comment out with a '!' the request line&amp;lt;br&amp;gt;&lt;br /&gt;
 DisplayManager.requestPort: 0&lt;br /&gt;
&lt;br /&gt;
edit:&amp;lt;br&amp;gt;&lt;br /&gt;
 /usr/X11R6/lib/X11/xdm/Xaccess&lt;br /&gt;
&lt;br /&gt;
Enter a single asterisk any where in the file, so the contents should be one asterisk and the rest commented out.  There should be an asterisk on line 49 which you can uncomment.&lt;br /&gt;
&lt;br /&gt;
Whilst in the /usr/X11R6/lib/X11/xdm directory do these commands:&lt;br /&gt;
 shell# vi Xstartup&lt;br /&gt;
&lt;br /&gt;
Add into this file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
#&lt;br /&gt;
# Xstartup&lt;br /&gt;
#&lt;br /&gt;
# This program is run as root after the user is verified&lt;br /&gt;
#&lt;br /&gt;
if [ -f /etc/nologin ]; then&lt;br /&gt;
   xmessage -file /etc/nologin -timeout 30 -center&lt;br /&gt;
   exit 1&lt;br /&gt;
fi&lt;br /&gt;
sessreg -a -l $DISPLAY -x /usr/X11R6/lib/xdm/Xservers $LOGNAME&lt;br /&gt;
/usr/X11R6/lib/xdm/GiveConsole&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
shell# chmod +x Xstartup&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Make sure your firewall has all traffic for you lan.  (Need to know which exact ports to allow).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Make sure you &amp;lt;/b&amp;gt;create ~/.xsession for each user which requires access and enter your start up for x &lt;br /&gt;
eg:&lt;br /&gt;
&lt;br /&gt;
 startfluxbox&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;run xdm on server as root&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 shell# xdm&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can put this xdm into the /etc/ttys so that it starts automatically on boot up.&lt;br /&gt;
&lt;br /&gt;
===client===&lt;br /&gt;
make sure your not in X&lt;br /&gt;
&lt;br /&gt;
type this command:&lt;br /&gt;
&lt;br /&gt;
 shell# X -broadcast&lt;br /&gt;
&lt;br /&gt;
This assumes that you are running only one server.&lt;br /&gt;
Otherwise use:&lt;br /&gt;
&lt;br /&gt;
 shell# X -query 192.168.1.1&lt;br /&gt;
&lt;br /&gt;
==DHCP - Install and setup==&lt;br /&gt;
Server setup.&lt;br /&gt;
&lt;br /&gt;
install through package&lt;br /&gt;
 # pkg_add -r isc-dhcp3-server&lt;br /&gt;
&lt;br /&gt;
We do this so we can define the root path for the diskless system.&lt;br /&gt;
&lt;br /&gt;
copy /usr/local/etc/dhcpd.conf.sample to /usr/local/etc/dhcpd.conf&lt;br /&gt;
&lt;br /&gt;
edit /usr/local/etc/dhcpd.conf and make sure it has these lines in it.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# dhcpd.conf&lt;br /&gt;
#&lt;br /&gt;
# Sample configuration file for ISC dhcpd&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
# option definitions common to all supported networks...&lt;br /&gt;
#option domain-name &amp;quot;example.org&amp;quot;;&lt;br /&gt;
#option domain-name-servers ns1.example.org, ns2.example.org;&lt;br /&gt;
&lt;br /&gt;
default-lease-time 3600;&lt;br /&gt;
max-lease-time 86400;&lt;br /&gt;
&lt;br /&gt;
# If this DHCP server is the official DHCP server for the local&lt;br /&gt;
# network, the authoritative directive should be uncommented.&lt;br /&gt;
authoritative;&lt;br /&gt;
&lt;br /&gt;
# ad-hoc DNS update scheme - set to &amp;quot;none&amp;quot; to disable dynamic DNS updates.&lt;br /&gt;
ddns-update-style none;&lt;br /&gt;
&lt;br /&gt;
option root-path &amp;quot;192.168.1.1:/diskless_ro&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
# lines added for pxeboot client&lt;br /&gt;
use-host-decl-names on;&lt;br /&gt;
next-server 192.168.1.1;&lt;br /&gt;
filename &amp;quot;pxeboot&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
# Use this to send dhcp log messages to a different log file (you also&lt;br /&gt;
# have to hack syslog.conf to complete the redirection).&lt;br /&gt;
log-facility local7;&lt;br /&gt;
&lt;br /&gt;
# No service will be given on this subnet, but declaring it helps the&lt;br /&gt;
# DHCP server to understand the network topology.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# This is a very basic subnet declaration.&lt;br /&gt;
&lt;br /&gt;
subnet 192.168.1.0 netmask 255.255.255.0 {&lt;br /&gt;
  range 192.168.1.10 192.168.1.20;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create the leases file&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# touch /var/db/dhcpd.leases&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Restart the daemon&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# killall dhcpd&lt;br /&gt;
# dhcpd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add to /etc/rc.conf&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dhcpd_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using a seperate DHCP server===&lt;br /&gt;
If you already have a DHCP server and you want to use that instead then you have to do these steps.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====On your DHCP Server====&lt;br /&gt;
1. edit /usr/local/etc/dhcpd.conf and add the following&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
authoritative;&lt;br /&gt;
ddns-update-style none;&lt;br /&gt;
&lt;br /&gt;
option root-path &amp;quot;&amp;lt;X Server IP&amp;gt;:/diskless_ro&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
# lines added for pxeboot client&lt;br /&gt;
use-host-decl-names on;&lt;br /&gt;
next-server &amp;lt;X Server IP&amp;gt;;&lt;br /&gt;
filename &amp;quot;pxeboot&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
2. stop dhcpd&lt;br /&gt;
3. start dhcpd&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Client====&lt;br /&gt;
Your client should boot now just remember that you may get a different IP now that you are talking to a different DHCP server so you have to change your exports file and copy accross a directory in /diskless_rw for the new IP.  All this is done on the X Server.&lt;br /&gt;
&lt;br /&gt;
==TFTP Setup==&lt;br /&gt;
TFTP helps us transport the kernel to the PXE-Boot machines.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# mkdir /tftpboot&lt;br /&gt;
# cp /boot/pxeboot /tftpboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Uncomment the following line in /etc/inetd.conf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tftp    dgram   udp     wait    root    /usr/libexec/tftpd      tftpd -l -s /tftpboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart the inetd service&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# killall -HUP inetd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If inetd has not started automatically do the following:&lt;br /&gt;
&lt;br /&gt;
Add the following to /etc/rc.conf&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
inetd_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now start inetd manually.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# inetd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test===&lt;br /&gt;
To test that tftp has loaded type the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# sockstat -4l | grep 69 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and you should see this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
root      inetd       13719 5   udp4    *:69                 *:*&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==NFS Setup==&lt;br /&gt;
Network File System.  Here we share all the directories from the server so that the diskless clients see these drives as if those directories were the diskless client's.&lt;br /&gt;
&lt;br /&gt;
===Server Setup===&lt;br /&gt;
If you forgot to select 'Yes' to NFS server setup in the FreeBSD installation then you have to setup the server manually like so:&lt;br /&gt;
&lt;br /&gt;
Enable NFS /etc/rc.conf&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rpcbind_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
nfs_server_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test===&lt;br /&gt;
A quick test to see if your NFS server is acting normal:&lt;br /&gt;
&lt;br /&gt;
Edit the /etc/exports and add the following&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/usr       -alldirs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This allows anyone to connect to your /usr mount.&lt;br /&gt;
&lt;br /&gt;
Now run these commands to restart and view your mounts&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# kill -HUP `cat /var/run/mountd.pid`&lt;br /&gt;
# showmount -e&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now try and mount it from a client running BSD&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# mount -t nfs 192.168.1.1:/usr /mnt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Server exports setup===&lt;br /&gt;
&lt;br /&gt;
Make directories for each IP for your clients&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /diskless_rw&lt;br /&gt;
# mkdir 192.168.1.2&lt;br /&gt;
# cd 192.168.1.2&lt;br /&gt;
# mkdir etc var&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Configure /etc/exports&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# file systems accessible only for reading:&lt;br /&gt;
# Original way of linking up the /usr&lt;br /&gt;
#/usr -ro -maproot=0 -network 192.168.1.0 -mask 255.255.255.0&lt;br /&gt;
&lt;br /&gt;
/usr -network 192.168.1.0 -mask 255.255.255.0&lt;br /&gt;
/diskless_ro -ro -maproot=0 -network 192.168.1.0 -mask 255.255.255.0&lt;br /&gt;
/diskless_rw/192.168.1.2/etc /diskless_rw/192.168.1.2/var -maproot=root 192.168.1.2&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restarting NFS&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# kill -HUP `cat /var/run/mountd.pid`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If NFS is not started yet do the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
data# rpcbind&lt;br /&gt;
data# nfsd -u -t -n 20 -h 192.168.1.1&lt;br /&gt;
data# mountd -r&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Testing to see if the exports are correct&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
data# showmount -e&lt;br /&gt;
Exports list on localhost:&lt;br /&gt;
/usr                              192.168.1.0&lt;br /&gt;
/diskless_rw/192.168.1.2/var      192.168.1.2&lt;br /&gt;
/diskless_rw/192.168.1.2/etc      192.168.1.2&lt;br /&gt;
/diskless_ro                      192.168.1.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Setup diskless_rw==&lt;br /&gt;
Create directories&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /diskless_rw/192.168.1.2/etc&lt;br /&gt;
# mkdir pam.d X11&lt;br /&gt;
&lt;br /&gt;
# cd /diskless_rw/192.168.1.2/var&lt;br /&gt;
# mkdir home log run tmp&lt;br /&gt;
# chmod 1777 tmp&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a swap file in the var directory for the client&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# dd if=/dev/zero of=/diskless_rw/192.168.1.2/var/swap bs=1k count=32000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in the /diskless_rw/&amp;lt;ip&amp;gt;/var/log directory I created the following log files so that syslogd would have files to write to:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /diskless_rw/192.168.1.2/var/log&lt;br /&gt;
# touch messages security auth.log maillog lpd-errs xferlog cron debug.log slip.log ppp.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy the following files from the systems /etc directory to /diskless_rw/&amp;lt;client ip&amp;gt;/etc&lt;br /&gt;
 # cp -Rv &amp;lt;files&amp;gt; /diskless_rw/&amp;lt;ip&amp;gt;/etc&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
auth.conf&lt;br /&gt;
disktab&lt;br /&gt;
gettytab&lt;br /&gt;
group&lt;br /&gt;
hosts&lt;br /&gt;
login.access&lt;br /&gt;
login.conf&lt;br /&gt;
login.conf.db&lt;br /&gt;
master.passwd&lt;br /&gt;
netconfig&lt;br /&gt;
protocols&lt;br /&gt;
pam.d&lt;br /&gt;
pwd.db&lt;br /&gt;
services&lt;br /&gt;
spwd.db&lt;br /&gt;
syslog.conf&lt;br /&gt;
termcap -&amp;gt; /usr/share/misc/termcap&lt;br /&gt;
ttys&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It's very important that you copy all the files in pam.d across otherwise you will not have a password prompt on your login.&lt;br /&gt;
&lt;br /&gt;
Create a fstab in /diskless_rw/&amp;lt;ip&amp;gt;/etc&lt;br /&gt;
 # touch /diskless_rw/&amp;lt;ip&amp;gt;/etc/fstab&lt;br /&gt;
&lt;br /&gt;
==Setup diskless_ro==&lt;br /&gt;
This is the common root mount for all pxe-boot clients.&lt;br /&gt;
&lt;br /&gt;
Copy accross important directories and kernel from boot to diskless_ro&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cp -rv /bin /lib /libexec /sbin /boot /diskless_ro&lt;br /&gt;
# mkdir /diskless_ro/usr&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For some client machines you may have to disable the ACPI (Power management) in the /diskless_ro/boot/device.hints&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
hint.acpi.0.disabled=&amp;quot;1&amp;quot; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make a dev so that clients can boot without freezing.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# mkdir /diskless_ro/dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make a directory so that we can mount var from the /diskless_rw/&amp;lt;client ip&amp;gt;/var&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# mkdir /diskless_ro/var&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
So we can use the systems /var/tmp and /usr/home directory make soft links to them&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /diskless_ro&lt;br /&gt;
# ln -s /var/tmp&lt;br /&gt;
# ln -s /usr/home&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We require a few files from the systems /etc directory to be copied into the /diskless_ro/etc for common use between the thin clients.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# mkdir /diskless_ro/etc&lt;br /&gt;
# cd /etc&lt;br /&gt;
# cp /services /netconfig /login.conf /diskless_ro/etc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===rc file===&lt;br /&gt;
The /diskless_ro/etc/rc file is the first file which is ran after the kernel has loaded.  Here we mount a the labels from the server.&lt;br /&gt;
&lt;br /&gt;
Create the /diskless_ro/etc/rc&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin; export PATH&lt;br /&gt;
TMPDIR=~/tmp;export TMPDIR&lt;br /&gt;
TMP=~/tmp;export TMP&lt;br /&gt;
&lt;br /&gt;
mount -t nfs 192.168.1.1:/usr /usr&lt;br /&gt;
&lt;br /&gt;
boot_ip=`/sbin/ifconfig | /usr/bin/grep &amp;quot;inet &amp;quot; | /usr/bin/grep -v 127.0.0.1 |&lt;br /&gt;
/usr/bin/awk '{print $2}'`&lt;br /&gt;
mount_nfs -L 192.168.1.1:/diskless_rw/${boot_ip}/etc /etc&lt;br /&gt;
mount_nfs -L 192.168.1.1:/diskless_rw/${boot_ip}/var /var&lt;br /&gt;
&lt;br /&gt;
swapon /var/swap&lt;br /&gt;
&lt;br /&gt;
#rm -rf /var/tmp/*&lt;br /&gt;
#rm -rf /var/tmp/.*&lt;br /&gt;
&lt;br /&gt;
# Option if you choose XDM terminals&lt;br /&gt;
#X -query 192.168.1.1&lt;br /&gt;
&lt;br /&gt;
. /etc/rc2&lt;br /&gt;
exit 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Remember to change 192.168.1.1 to your X server's IP&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The -L on the mount_nfs is there so we don't get flock errors.&lt;br /&gt;
&lt;br /&gt;
===rc2 file===&lt;br /&gt;
This sets up some links for libraries and the logging daemon.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
mount -a&lt;br /&gt;
/sbin/ldconfig -elf /usr/lib/compat /usr/X11R6/lib /usr/local/lib&lt;br /&gt;
&lt;br /&gt;
syslogd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now change permissions so rc can run.&lt;br /&gt;
 # chmod +x rc*&lt;br /&gt;
&lt;br /&gt;
Copy /diskless_ro/etc/rc and rc2 to /diskless_rw/&amp;lt;client ip&amp;gt;/etc&lt;br /&gt;
 # cp /diskless_ro/etc/rc* /diskless_rw/192.168.1.2/etc&lt;br /&gt;
&lt;br /&gt;
==GRUB Floppy boot (optional)==&lt;br /&gt;
&lt;br /&gt;
(would like to compile this ourselves later)&lt;br /&gt;
To get started we downloaded the image from www.hp.uab.edu/~ed/grub-net&lt;br /&gt;
&lt;br /&gt;
 shell# dd if=/data/grub-net.img of=/dev/fd0&lt;br /&gt;
&lt;br /&gt;
Then we mounted it as msdos&lt;br /&gt;
Remove/rename menu.1st from the grub directory as it was doing something funny with it.  We think that it was looking for a tftp server through our dhcp and we don't have a the dhcp setup correctly here, so we wanted to do it manually.&lt;br /&gt;
&lt;br /&gt;
Reboot off the floppy now..&lt;br /&gt;
&lt;br /&gt;
 grub&amp;gt; ifconfig --address=192.168.1.2 --mask=255.255.255.0 --gateway=192.168.1.1&lt;br /&gt;
 --server=192.168.1.2&lt;br /&gt;
&lt;br /&gt;
OR you can use dhcp&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 grub&amp;gt; dhcp&amp;lt;br&amp;gt; &lt;br /&gt;
 grub&amp;gt; tftpserver 192.168.1.2&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Setup tftp on your server, we created a directory /tftpboot. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Starting diskless system through GRUB===&lt;br /&gt;
This is an alternative boot loader.  You can use this for testing, if you don't have a pxeboot chip, otherwise skip this section.&lt;br /&gt;
&lt;br /&gt;
These commands are half working...&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 grub&amp;gt; root (nd)&amp;lt;br&amp;gt;&lt;br /&gt;
 grub&amp;gt; kernel /kernel root=ad0s1a&amp;lt;br&amp;gt;&lt;br /&gt;
 grub&amp;gt; pxeboot&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Completely Diskless System (PXEBOOT ROM) (optional)==&lt;br /&gt;
&lt;br /&gt;
Running completely diskless by booting from a Network ROM Chip.&lt;br /&gt;
&lt;br /&gt;
We have now got a Intel GD82559 Etherexpress pro/100 Card.&lt;br /&gt;
&lt;br /&gt;
When we boot up on the client machine with that card it displays:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Intel UNDI, PXE-2.0 (build 067)&amp;lt;br /&amp;gt;&lt;br /&gt;
Copyright (C) 1997-1998 Intel Corporation&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Which we cannot get working so we have read that you have to update this version to Build 82.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
copy /boot/pxeboot to /tftpboot directory we made before&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
- Downloaded proboot.exe from support.intel.com and unpacked into a windows box.&amp;lt;br /&amp;gt;&lt;br /&gt;
- Copied ibautil.exe onto a windows 98 boot disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
- Rebooted the test box after disabling network boot on the nic (otherwise it'll kick in before the floppy).&amp;lt;br /&amp;gt;&lt;br /&gt;
- Ran ibautil -iv to see what embedded image versions were available:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Intel(R) Boot Agent XG v1.0.09&amp;lt;br /&amp;gt;&lt;br /&gt;
Intel(R) Boot Agent GE v1.2.36&amp;lt;br /&amp;gt;&lt;br /&gt;
Intel(R) Boot Agent FE v4.1.19&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
- Ran ibautil -up to perform the image upgrade.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
It's interesting to note that no version showed up for out intel nic when initially running ibautil. After the upgrade, however, the version corectly showed as 4.1.19.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I made sure that I had simular features to this in my dhcpd.conf file:&amp;lt;br /&amp;gt;&lt;br /&gt;
option broadcast-address 192.168.254.255;&amp;lt;br /&amp;gt;&lt;br /&gt;
option domain-name-servers 192.168.254.3;&amp;lt;br /&amp;gt;&lt;br /&gt;
option domain-name &amp;quot;simerson.net&amp;quot;;&amp;lt;br /&amp;gt;&lt;br /&gt;
option routers 192.168.254.1;&amp;lt;br /&amp;gt;&lt;br /&gt;
option subnet-mask 255.255.255.0;&amp;lt;br /&amp;gt;&lt;br /&gt;
server-name &amp;quot;pxe-gw&amp;quot;;&amp;lt;br /&amp;gt;&lt;br /&gt;
server-identifier 192.168.254.3;&amp;lt;br /&amp;gt;&lt;br /&gt;
next-server 192.168.254.3;&amp;lt;br /&amp;gt;&lt;br /&gt;
default-lease-time -1;&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
subnet 192.168.254.0 netmask 255.255.255.0 {&amp;lt;br /&amp;gt;&lt;br /&gt;
range 192.168.254.32 192.168.254.99;&amp;lt;br /&amp;gt;&lt;br /&gt;
option root-path &amp;quot;/usr/local/export/pxe&amp;quot;;&amp;lt;br /&amp;gt;&lt;br /&gt;
filename &amp;quot;pxeboot&amp;quot;;&amp;lt;br /&amp;gt;&lt;br /&gt;
}&amp;lt;br /&amp;gt;&lt;br /&gt;
host cm.simerson.net {&amp;lt;br /&amp;gt;&lt;br /&gt;
hardware ethernet 00:e0:18:98:f0:cc;&amp;lt;br /&amp;gt;&lt;br /&gt;
fixed-address 192.168.254.126;&amp;lt;br /&amp;gt;&lt;br /&gt;
}&amp;lt;br /&amp;gt;&lt;br /&gt;
host c1.simerson.net {&amp;lt;br /&amp;gt;&lt;br /&gt;
hardware ethernet 00:60:97:0e:bb:a7;&amp;lt;br /&amp;gt;&lt;br /&gt;
fixed-address 192.168.254.131;&amp;lt;br /&amp;gt;&lt;br /&gt;
}&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==X config notes==&lt;br /&gt;
On the X server the /etc/X11/xorg.conf file is only used for the X server not the clients.&lt;br /&gt;
&lt;br /&gt;
To use this same configuration for your X Terminal Clients copy this file to /diskless_rw/&amp;lt;Client IP&amp;gt;/etc/X11 and it will use it.&lt;br /&gt;
&lt;br /&gt;
==Starting X on the client==&lt;br /&gt;
There are two ways of doing this and it depends on your hardware mainly.  &lt;br /&gt;
&lt;br /&gt;
1. run all programs on the server using the servers CPU and Memory this we will call the 'XDM Method'&lt;br /&gt;
2. run all programs from the NFS mounts using the clients CPU and Memory but the HD of the server, this we will call the 'NFS Method'&lt;br /&gt;
&lt;br /&gt;
Both methods will boot from PXE-Boot and can be diskless.&lt;br /&gt;
&lt;br /&gt;
===XDM Method===&lt;br /&gt;
Recommended for machines less than 1Ghz 256MB&lt;br /&gt;
&lt;br /&gt;
This is quite simple to setup.  Change your rc file in the /diskless_ro/etc directory to have this line at the end:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
X -query &amp;lt;server ip&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make sure on the server you setup xdm to start on system startup&lt;br /&gt;
 # vi /etc/ttys&lt;br /&gt;
&lt;br /&gt;
Search for this line:&lt;br /&gt;
 ttyv8   &amp;quot;/usr/X11R6/bin/xdm -nodaemon&amp;quot;  xterm   off secure&lt;br /&gt;
&lt;br /&gt;
and change it to:&lt;br /&gt;
 ttyv8   &amp;quot;/usr/X11R6/bin/xdm -nodaemon&amp;quot;  xterm   on secure&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also type this command at the command line on the client to test before hand.&lt;br /&gt;
&lt;br /&gt;
===NFS Method===&lt;br /&gt;
Recommended for machines over 1Ghz 256MB or if you want to utilise any of the clients devices such as local HD, USB, CD/DVD burners, etc.&lt;br /&gt;
&lt;br /&gt;
This is much trickier.&lt;br /&gt;
&lt;br /&gt;
Log in&lt;br /&gt;
Now type 'startx' at the command line.&lt;br /&gt;
&lt;br /&gt;
==Custom Kernels==&lt;br /&gt;
If you want to create custom kernels for your clients then do this:&lt;br /&gt;
&lt;br /&gt;
Create your custom kernel&lt;br /&gt;
 # cd /sys/i386/conf&lt;br /&gt;
 # cp GENERIC DISKLESS&lt;br /&gt;
 # vi DISKLESS&lt;br /&gt;
&lt;br /&gt;
Make changes and build and install&lt;br /&gt;
&lt;br /&gt;
 # cd /usr/src&lt;br /&gt;
 # make buildkernel KERNCONF=DISKLESS&lt;br /&gt;
 # make installkernel KERNCONF=DISKLESS DESTDIR=/diskless_ro&lt;br /&gt;
&lt;br /&gt;
==todo==&lt;br /&gt;
Here are some of the jobs left to do to make this secure or generally better:&lt;br /&gt;
&lt;br /&gt;
- There must be a simplier way to set this up if your going to use XDM in the end.  IE: do we need to do half of this tutorial if we are going to run XDM.&lt;br /&gt;
&lt;br /&gt;
- When the same user logs onto two seperate machines they cannot start firefox or thunderbird as it complains about being open somewhere else.  This assumes you have firefox and thunderbird already open on both machines that you logged onto.&lt;br /&gt;
&lt;br /&gt;
===Known Issues===&lt;br /&gt;
&lt;br /&gt;
- Doesn't work with HP-COMPAQ-T5525 thin client as it doesn't want to boot, it says it's missing libfreetype.so.9 which we do have it just cannot find it for some reason.  It's trying to use the VIA chipset for graphics which is different to all the other clients I've loaded successfully so far.&lt;br /&gt;
&lt;br /&gt;
- USB mice not working instead use PS/2.  If we got this working it may help get the HP T5525 working&lt;br /&gt;
&lt;br /&gt;
===Keyboard repeating on notebooks===&lt;br /&gt;
- typing on some keyboards (like my notebook) causes double characters to display if you type too fast. - This is the notebook, if you go and set the KDE Accessabiltiy options and set the keyboard rate to 50ms, this fixes the problem.&lt;br /&gt;
&lt;br /&gt;
===USB mouse===&lt;br /&gt;
&lt;br /&gt;
Editing /etc/devd.conf file and searched for ums&lt;br /&gt;
remarked out the action line.&lt;br /&gt;
 &lt;br /&gt;
rebooted.&lt;br /&gt;
 &lt;br /&gt;
Someone off IRC suggested that I build a GENERIC xorg.conf file which has vesa, usb mouse and ps/2 mouse configurations through it.&lt;br /&gt;
 &lt;br /&gt;
I reverted everything back to normal ps/2 mouse config, copying my usb config files to the following:&lt;br /&gt;
/etc/devd.conf_usb&lt;br /&gt;
/etc/rc.conf_usb&lt;br /&gt;
/etc/X11/xorg.conf_usb&lt;br /&gt;
 &lt;br /&gt;
I think we need a seperate configuration for the HP, it uses a weird display driver.&lt;br /&gt;
&lt;br /&gt;
==links==&lt;br /&gt;
&lt;br /&gt;
http://www.onlamp.com/pub/a/bsd/2004/09/09/diskless_server.html&lt;br /&gt;
&lt;br /&gt;
http://www.onlamp.com/pub/a/bsd/2004/09/30/diskless_clients.html&lt;br /&gt;
&lt;br /&gt;
http://people.freebsd.org/~alfred/pxe/en_US.ISO8859-1/articles/pxe/article.html&lt;br /&gt;
&lt;br /&gt;
http://www.the-labs.com/FreeBSD/Diskless/&lt;br /&gt;
&lt;br /&gt;
http://www.nber.org/sys-admin/FreeBSD-diskless.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://wikitest.freebsd.org/MarkusBoelter&lt;br /&gt;
&lt;br /&gt;
http://www.daemonsecurity.com/pub/pxeboot/&lt;br /&gt;
&lt;br /&gt;
http://www.kano.org.uk/projects/pxe/&lt;br /&gt;
&lt;br /&gt;
File Examples:&lt;br /&gt;
&lt;br /&gt;
http://www.watson.org/~robert/freebsd/pxe/&lt;br /&gt;
&lt;br /&gt;
PXE Information&lt;br /&gt;
http://www.computerworld.com/action/article.do?command=viewArticleBasic&amp;amp;articleId=108551&lt;br /&gt;
&lt;br /&gt;
[[Category:FreeBSD_for_Workstations]]&lt;/div&gt;</summary>
		<author><name>165.228.0.35</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/X_Windows_Terminal</id>
		<title>X Windows Terminal</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/X_Windows_Terminal"/>
				<updated>2006-10-10T02:20:13Z</updated>
		
		<summary type="html">&lt;p&gt;165.228.0.35: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Advantages==&lt;br /&gt;
X Windows can be used in a Server-Client relationship.  By setting up your X Windows Server you allow the use of all the programs on that computer to all the client PC's.  &lt;br /&gt;
&lt;br /&gt;
There are many advantages of running client computers in this manner:&lt;br /&gt;
* They don't even need a hard drive.  &lt;br /&gt;
* It's silent as there are no moving parts&lt;br /&gt;
* The solution saves power as your computers are very thin.&lt;br /&gt;
* Everything can be backed up centrally.&lt;br /&gt;
* Boot times for client PC's are the fastest around.&lt;br /&gt;
* Clients don't need much CPU speed, memory, etc.  Because of this they would be very cheap.  You could get away with using a Pentium 100Mhz with 32MB ram, no hard drive, no CD-ROM, no Floppy and a fanless power supply.  You just need a ethernet card with a PXEBOOT ROM.&lt;br /&gt;
&lt;br /&gt;
==From the Beginning==&lt;br /&gt;
I've based this document on FreeBSD 6.1.&lt;br /&gt;
&lt;br /&gt;
Install FreeBSD 6.1 as per usual.&lt;br /&gt;
I've setup my mount points as this:&lt;br /&gt;
  Swap          (equal to how much memory I have in my machine)&lt;br /&gt;
  /             512MB&lt;br /&gt;
  /var          1.4G&lt;br /&gt;
  /tmp          512MB&lt;br /&gt;
  /usr          2GB&lt;br /&gt;
&lt;br /&gt;
I selected 'A' for auto and then deleted /usr and created /usr as 2g.&lt;br /&gt;
&lt;br /&gt;
Select User-X install.&lt;br /&gt;
&lt;br /&gt;
Select SSH Server and NFS Server in the installation process&lt;br /&gt;
&lt;br /&gt;
After the install I went back into sysinstall and added the following labels.&lt;br /&gt;
NOTE: you cannot add labels to your boot drive, so boot of the installation CD and use the configure -&amp;gt; label option in the sysinstall screen to add these labels to your boot drive.  You may need to retype the mount points for /, /var, /tmp and /usr by hitting 'm' on each label.&lt;br /&gt;
&lt;br /&gt;
  /diskless_ro  512MB&lt;br /&gt;
  /diskless_rw  1GB    minimum&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I find the best way to get this working is to break it down in to small steps and get each step working independantly.  IE: Setup NFS and see if you can mount it from another FreeBSD machine, don't just assume it will work and boot your PXE-Boot machine.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Throughout my documentation&lt;br /&gt;
&lt;br /&gt;
192.168.1.1 = the Server&lt;br /&gt;
&lt;br /&gt;
192.168.1.2 = the client (may be a full freebsd system or pxeboot)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At this point I normally install fluxbox with the following line:&lt;br /&gt;
&lt;br /&gt;
shell# pkg_add -r fluxbox-devel&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
change your ~/.xinitrc file to the following:&lt;br /&gt;
&lt;br /&gt;
startfluxbox&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Use the following command to update your fluxbox menus:&lt;br /&gt;
&lt;br /&gt;
shell$ fluxbox-generate_menu&lt;br /&gt;
&lt;br /&gt;
==Running a single application==&lt;br /&gt;
&lt;br /&gt;
To get started I have my server setup running FreeBSD, with X-Windows and a few applications.  Nothing too special.  Then I have my client PC, which to start off I used the freesbie 1.1 boot CD to perform these initial tests.  You can get this from www.freesbie.org.  I entered into fluxbox, but you could equally use xfce4.&lt;br /&gt;
&lt;br /&gt;
You must allow incoming connections this is done with two commands&lt;br /&gt;
&lt;br /&gt;
 client# startx -listen_tcp&lt;br /&gt;
 client# xhost +&lt;br /&gt;
&lt;br /&gt;
This allows all computers to start applications on your client PC.  It's dangerous but good for testing everything is setup correctly.&lt;br /&gt;
&lt;br /&gt;
 client# ssh &amp;lt;server user@server ip&amp;gt;&lt;br /&gt;
 eg: ssh mick@192.168.1.1&lt;br /&gt;
&lt;br /&gt;
 ssh$ setenv DISPLAY '192.168.1.2:0'&lt;br /&gt;
&lt;br /&gt;
Or if your running bash:&lt;br /&gt;
 ssh$ DISPLAY=&amp;lt;client ip&amp;gt;:&amp;lt;client display&amp;gt;; export DISPLAY&lt;br /&gt;
 eg: DISPLAY=192.168.1.2:0; export DISPLAY&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 ssh$ xcalc &amp;amp;&lt;br /&gt;
&lt;br /&gt;
This should display on your client&lt;br /&gt;
&lt;br /&gt;
==Running a whole X Windows Session (XDM)==&lt;br /&gt;
This sets up a server so that you can share your X session with any clients which want to connect.  (Simular to Terminal Services under windows)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===server===&lt;br /&gt;
edit:&lt;br /&gt;
 /usr/X11R6/lib/X11/xdm/xdm-config&lt;br /&gt;
&lt;br /&gt;
comment out with a '!' the request line&amp;lt;br&amp;gt;&lt;br /&gt;
 DisplayManager.requestPort: 0&lt;br /&gt;
&lt;br /&gt;
edit:&amp;lt;br&amp;gt;&lt;br /&gt;
 /usr/X11R6/lib/X11/xdm/Xaccess&lt;br /&gt;
&lt;br /&gt;
Enter a single asterisk any where in the file, so the contents should be one asterisk and the rest commented out.  There should be an asterisk on line 49 which you can uncomment.&lt;br /&gt;
&lt;br /&gt;
Whilst in the /usr/X11R6/lib/X11/xdm directory do these commands:&lt;br /&gt;
shell# vi Xstartup&lt;br /&gt;
&lt;br /&gt;
Add into this file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
#&lt;br /&gt;
# Xstartup&lt;br /&gt;
#&lt;br /&gt;
# This program is run as root after the user is verified&lt;br /&gt;
#&lt;br /&gt;
if [ -f /etc/nologin ]; then&lt;br /&gt;
   xmessage -file /etc/nologin -timeout 30 -center&lt;br /&gt;
   exit 1&lt;br /&gt;
fi&lt;br /&gt;
sessreg -a -l $DISPLAY -x /usr/X11R6/lib/xdm/Xservers $LOGNAME&lt;br /&gt;
/usr/X11R6/lib/xdm/GiveConsole&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
shell# chmod +x Xstartup&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Make sure your firewall has all traffic for you lan.  (Need to know which exact ports to allow).&lt;br /&gt;
&lt;br /&gt;
create ~/.xsession for each user which requires access and enter your start up for x &lt;br /&gt;
eg:&lt;br /&gt;
&lt;br /&gt;
 startkde&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;run xdm on server as root&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can put this xdm into the /etc/ttys so that it starts automatically on boot up.&lt;br /&gt;
&lt;br /&gt;
===client===&lt;br /&gt;
make sure your not in X&lt;br /&gt;
&lt;br /&gt;
type this command:&lt;br /&gt;
&lt;br /&gt;
 shell# X -broadcast&lt;br /&gt;
&lt;br /&gt;
This assumes that you are running only one server.&lt;br /&gt;
Otherwise use:&lt;br /&gt;
&lt;br /&gt;
 shell# X -query 192.168.1.1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==DHCP - Install and setup==&lt;br /&gt;
Server setup.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
install /usr/ports/net/isc-dhcp3-server&lt;br /&gt;
&lt;br /&gt;
We do this so we can define the root path for the diskless system.&lt;br /&gt;
&lt;br /&gt;
copy /usr/local/etc/dhcpd.conf.sample to /usr/local/etc/dhcpd.conf&lt;br /&gt;
&lt;br /&gt;
edit /usr/local/etc/dhcpd.conf and make sure it has these lines in it.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# dhcpd.conf&lt;br /&gt;
#&lt;br /&gt;
# Sample configuration file for ISC dhcpd&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
# option definitions common to all supported networks...&lt;br /&gt;
#option domain-name &amp;quot;example.org&amp;quot;;&lt;br /&gt;
#option domain-name-servers ns1.example.org, ns2.example.org;&lt;br /&gt;
&lt;br /&gt;
default-lease-time 3600;&lt;br /&gt;
max-lease-time 86400;&lt;br /&gt;
&lt;br /&gt;
# If this DHCP server is the official DHCP server for the local&lt;br /&gt;
# network, the authoritative directive should be uncommented.&lt;br /&gt;
authoritative;&lt;br /&gt;
&lt;br /&gt;
# ad-hoc DNS update scheme - set to &amp;quot;none&amp;quot; to disable dynamic DNS updates.&lt;br /&gt;
ddns-update-style none;&lt;br /&gt;
&lt;br /&gt;
option root-path &amp;quot;192.168.1.1:/diskless_ro&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
# lines added for pxeboot client&lt;br /&gt;
use-host-decl-names on;&lt;br /&gt;
next-server 192.168.1.1;&lt;br /&gt;
filename &amp;quot;pxeboot&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
# Use this to send dhcp log messages to a different log file (you also&lt;br /&gt;
# have to hack syslog.conf to complete the redirection).&lt;br /&gt;
log-facility local7;&lt;br /&gt;
&lt;br /&gt;
# No service will be given on this subnet, but declaring it helps the&lt;br /&gt;
# DHCP server to understand the network topology.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# This is a very basic subnet declaration.&lt;br /&gt;
&lt;br /&gt;
subnet 192.168.1.0 netmask 255.255.255.0 {&lt;br /&gt;
  range 192.168.1.10 192.168.1.20;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create the leases file&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# touch /var/db/dhcpd.leases&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Restart the daemon&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# killall dhcpd&lt;br /&gt;
# dhcpd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add to /etc/rc.conf&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dhcpd_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==TFTP Setup==&lt;br /&gt;
TFTP helps us transport the kernel to the PXE-Boot machines.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# mkdir /tftpboot&lt;br /&gt;
# cp /boot/pxeboot /tftpboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Uncomment the following line in /etc/inetd.conf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tftp    dgram   udp     wait    root    /usr/libexec/tftpd      tftpd -l -s /tftpboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart the inetd service&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# killall -HUP inetd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If inetd has not started automatically do the following:&lt;br /&gt;
&lt;br /&gt;
Add the following to /etc/rc.conf&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
inetd_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now start inetd manually.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# inetd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test===&lt;br /&gt;
To test that tftp has loaded type the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# sockstat -4l | grep 69 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and you should see this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
root      inetd       13719 5   udp4    *:69                 *:*&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==NFS Setup==&lt;br /&gt;
Network File System.  Here we share all the directories from the server so that the diskless clients see these drives as if those directories were the diskless client's.&lt;br /&gt;
&lt;br /&gt;
===Server Setup===&lt;br /&gt;
If you forgot to select 'Yes' to NFS server setup in the FreeBSD installation then you have to setup the server manually like so:&lt;br /&gt;
&lt;br /&gt;
Enable NFS /etc/rc.conf&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rpcbind_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
nfs_server_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test===&lt;br /&gt;
A quick test to see if your NFS server is acting normal:&lt;br /&gt;
&lt;br /&gt;
Edit the /etc/exports and add the following&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/usr       -alldirs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This allows anyone to connect to your /usr mount.&lt;br /&gt;
&lt;br /&gt;
Now run these commands to restart and view your mounts&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# kill -HUP `cat /var/run/mountd.pid`&lt;br /&gt;
# showmount -e&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now try and mount it from a client running BSD&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# mount -t nfs 192.168.1.1:/usr /mnt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Server exports setup===&lt;br /&gt;
&lt;br /&gt;
Make directories for each IP for your clients&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /diskless_rw&lt;br /&gt;
# mkdir 192.168.1.2&lt;br /&gt;
# cd 192.168.1.2&lt;br /&gt;
# mkdir etc var&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Configure /etc/exports&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# file systems accessible only for reading:&lt;br /&gt;
# Original way of linking up the /usr&lt;br /&gt;
#/usr -ro -maproot=0 -network 192.168.1.0 -mask 255.255.255.0&lt;br /&gt;
&lt;br /&gt;
/usr -network 192.168.1.0 -mask 255.255.255.0&lt;br /&gt;
/diskless_ro -ro -maproot=0 -network 192.168.1.0 -mask 255.255.255.0&lt;br /&gt;
/diskless_rw/192.168.1.2/etc /diskless_rw/192.168.1.2/var -maproot=root 192.168.1.2&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restarting NFS&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# kill -HUP `cat /var/run/mountd.pid`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If NFS is not started yet do the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
data# rpcbind&lt;br /&gt;
data# nfsd -u -t -n 20 -h 192.168.1.1&lt;br /&gt;
data# mountd -r&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Testing to see if the exports are correct&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
data# showmount -e&lt;br /&gt;
Exports list on localhost:&lt;br /&gt;
/usr                              192.168.1.0&lt;br /&gt;
/diskless_rw/192.168.1.2/var      192.168.1.2&lt;br /&gt;
/diskless_rw/192.168.1.2/etc      192.168.1.2&lt;br /&gt;
/diskless_ro                      192.168.1.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Setup diskless_rw==&lt;br /&gt;
Create directories&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /diskless_rw/192.168.1.2/etc&lt;br /&gt;
# mkdir pam.d X11&lt;br /&gt;
&lt;br /&gt;
# cd /diskless_rw/192.168.1.2/var&lt;br /&gt;
# mkdir home log run tmp&lt;br /&gt;
# chmod 1777 tmp&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a swap file in the var directory for the client&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# dd if=/dev/zero of=/diskless_rw/192.168.1.2/var/swap bs=1k count=32000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in the /diskless_rw/&amp;lt;ip&amp;gt;/var/log directory I created the following log files so that syslogd would have files to write to:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /diskless_rw/192.168.1.2/var/log&lt;br /&gt;
# touch messages security auth.log maillog lpd-errs xferlog cron debug.log slip.log ppp.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy the following files from the systems /etc directory to /diskless_rw/&amp;lt;client ip&amp;gt;/etc&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
auth.conf&lt;br /&gt;
disktab&lt;br /&gt;
gettytab&lt;br /&gt;
group&lt;br /&gt;
hosts&lt;br /&gt;
login.access&lt;br /&gt;
login.conf&lt;br /&gt;
login.conf.db&lt;br /&gt;
master.passwd&lt;br /&gt;
netconfig&lt;br /&gt;
protocols&lt;br /&gt;
pwd.db&lt;br /&gt;
services&lt;br /&gt;
spwd.db&lt;br /&gt;
syslog.conf&lt;br /&gt;
termcap -&amp;gt; /usr/share/misc/termcap&lt;br /&gt;
ttys&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy /diskless_ro/etc/rc to /diskless_rw/&amp;lt;client ip&amp;gt;/etc&lt;br /&gt;
&lt;br /&gt;
==Setup diskless_ro==&lt;br /&gt;
This is the common root mount for all pxe-boot clients.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cp -rv /bin /lib /libexec /sbin /diskless_ro&lt;br /&gt;
# mkdir /diskless_ro/usr&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy the kernel accross.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cp -rv /boot /diskless_ro&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For some client machines you may have to disable the ACPI (Power management) in the /diskless_ro/boot/device.hints&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
hint.acpi.0.disabled=&amp;quot;1&amp;quot; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make a dev so that clients can boot without freezing.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# mkdir /diskless_ro/dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make a directory so that we can mount var from the /diskless_rw/&amp;lt;client ip&amp;gt;/var&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# mkdir /diskless_ro/var&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
So we can use the systems /var/tmp and /usr/home directory make soft links to them&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /diskless_ro&lt;br /&gt;
# ln -s /var/tmp .&lt;br /&gt;
# ln -s /usr/home .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We require a few files from the systems /etc directory to be copied into the /diskless_ro/etc for common use between the thin clients.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# mkdir /diskless_ro/etc&lt;br /&gt;
# cp /etc/services /etc/netconfig /etc/login.conf /diskless_ro/etc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===rc file===&lt;br /&gt;
The /diskless_ro/etc/rc file is the first file which is ran after the kernel has loaded.  Here we mount a the labels from the server.&lt;br /&gt;
&lt;br /&gt;
Create the /diskless_ro/etc/rc&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin; export PATH&lt;br /&gt;
TMPDIR=~/tmp;export TMPDIR&lt;br /&gt;
TMP=~/tmp;export TMP&lt;br /&gt;
&lt;br /&gt;
mount -t nfs 192.168.0.1:/usr /usr&lt;br /&gt;
&lt;br /&gt;
boot_ip=`/sbin/ifconfig | /usr/bin/grep &amp;quot;inet &amp;quot; | /usr/bin/grep -v 127.0.0.1 |&lt;br /&gt;
/usr/bin/awk '{print $2}'`&lt;br /&gt;
mount -t nfs 192.168.0.1:/diskless_rw/${boot_ip}/etc /etc&lt;br /&gt;
mount -t nfs 192.168.0.1:/diskless_rw/${boot_ip}/var /var&lt;br /&gt;
&lt;br /&gt;
swapon /var/swap&lt;br /&gt;
&lt;br /&gt;
#rm -rf /var/tmp/*&lt;br /&gt;
#rm -rf /var/tmp/.*&lt;br /&gt;
&lt;br /&gt;
X -query 192.168.0.1&lt;br /&gt;
&lt;br /&gt;
. /etc/rc2&lt;br /&gt;
exit 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===rc2 file===&lt;br /&gt;
This sets up some links for libraries and the logging daemon.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
mount -a&lt;br /&gt;
/sbin/ldconfig -elf /usr/lib/compat /usr/X11R6/lib /usr/local/lib&lt;br /&gt;
&lt;br /&gt;
syslogd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now change permissions so rc can run.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# chmod +x rc*&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Using a seperate DHCP server==&lt;br /&gt;
If you already have a DHCP server and you want to use that instead then you have to do these steps.&lt;br /&gt;
&lt;br /&gt;
===On the Xserver===&lt;br /&gt;
1. stop dhcpd&lt;br /&gt;
2. remove dhcpd from /etc/rc.conf&lt;br /&gt;
3. change your IP address to dhcp or static&lt;br /&gt;
4. Change your /diskless_ro/etc/rc file so that it mounts from the new Xserver IP&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===On your DHCP Server===&lt;br /&gt;
1. edit /usr/local/etc/dhcpd.conf and add the following&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
authoritative;&lt;br /&gt;
ddns-update-style none;&lt;br /&gt;
&lt;br /&gt;
option root-path &amp;quot;&amp;lt;X Server IP&amp;gt;:/diskless_ro&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
# lines added for pxeboot client&lt;br /&gt;
use-host-decl-names on;&lt;br /&gt;
next-server &amp;lt;X Server IP&amp;gt;;&lt;br /&gt;
filename &amp;quot;pxeboot&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
2. stop dhcpd&lt;br /&gt;
3. start dhcpd&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Client===&lt;br /&gt;
Your client should boot now just remember that you may get a different IP now that you are talking to a different DHCP server so you have to change your exports file and copy accross a directory in /diskless_rw for the new IP.  All this is done on the X Server.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==GRUB Floppy boot (optional)==&lt;br /&gt;
&lt;br /&gt;
(would like to compile this ourselves later)&lt;br /&gt;
To get started we downloaded the image from www.hp.uab.edu/~ed/grub-net&lt;br /&gt;
&lt;br /&gt;
 shell# dd if=/data/grub-net.img of=/dev/fd0&lt;br /&gt;
&lt;br /&gt;
Then we mounted it as msdos&lt;br /&gt;
Remove/rename menu.1st from the grub directory as it was doing something funny with it.  We think that it was looking for a tftp server through our dhcp and we don't have a the dhcp setup correctly here, so we wanted to do it manually.&lt;br /&gt;
&lt;br /&gt;
Reboot off the floppy now..&lt;br /&gt;
&lt;br /&gt;
 grub&amp;gt; ifconfig --address=192.168.1.2 --mask=255.255.255.0 --gateway=192.168.1.1&lt;br /&gt;
 --server=192.168.1.2&lt;br /&gt;
&lt;br /&gt;
OR you can use dhcp&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 grub&amp;gt; dhcp&amp;lt;br&amp;gt; &lt;br /&gt;
 grub&amp;gt; tftpserver 192.168.1.2&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Setup tftp on your server, we created a directory /tftpboot. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Starting diskless system through GRUB===&lt;br /&gt;
This is an alternative boot loader.  You can use this for testing, if you don't have a pxeboot chip, otherwise skip this section.&lt;br /&gt;
&lt;br /&gt;
These commands are half working...&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 grub&amp;gt; root (nd)&amp;lt;br&amp;gt;&lt;br /&gt;
 grub&amp;gt; kernel /kernel root=ad0s1a&amp;lt;br&amp;gt;&lt;br /&gt;
 grub&amp;gt; pxeboot&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Completely Diskless System (PXEBOOT ROM) (optional)==&lt;br /&gt;
&lt;br /&gt;
Running completely diskless by booting from a Network ROM Chip.&lt;br /&gt;
&lt;br /&gt;
We have now got a Intel GD82559 Etherexpress pro/100 Card.&lt;br /&gt;
&lt;br /&gt;
When we boot up on the client machine with that card it displays:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Intel UNDI, PXE-2.0 (build 067)&amp;lt;br /&amp;gt;&lt;br /&gt;
Copyright (C) 1997-1998 Intel Corporation&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Which we cannot get working so we have read that you have to update this version to Build 82.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
copy /boot/pxeboot to /tftpboot directory we made before&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
- Downloaded proboot.exe from support.intel.com and unpacked into a windows box.&amp;lt;br /&amp;gt;&lt;br /&gt;
- Copied ibautil.exe onto a windows 98 boot disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
- Rebooted the test box after disabling network boot on the nic (otherwise it'll kick in before the floppy).&amp;lt;br /&amp;gt;&lt;br /&gt;
- Ran ibautil -iv to see what embedded image versions were available:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Intel(R) Boot Agent XG v1.0.09&amp;lt;br /&amp;gt;&lt;br /&gt;
Intel(R) Boot Agent GE v1.2.36&amp;lt;br /&amp;gt;&lt;br /&gt;
Intel(R) Boot Agent FE v4.1.19&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
- Ran ibautil -up to perform the image upgrade.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
It's interesting to note that no version showed up for out intel nic when initially running ibautil. After the upgrade, however, the version corectly showed as 4.1.19.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I made sure that I had simular features to this in my dhcpd.conf file:&amp;lt;br /&amp;gt;&lt;br /&gt;
option broadcast-address 192.168.254.255;&amp;lt;br /&amp;gt;&lt;br /&gt;
option domain-name-servers 192.168.254.3;&amp;lt;br /&amp;gt;&lt;br /&gt;
option domain-name &amp;quot;simerson.net&amp;quot;;&amp;lt;br /&amp;gt;&lt;br /&gt;
option routers 192.168.254.1;&amp;lt;br /&amp;gt;&lt;br /&gt;
option subnet-mask 255.255.255.0;&amp;lt;br /&amp;gt;&lt;br /&gt;
server-name &amp;quot;pxe-gw&amp;quot;;&amp;lt;br /&amp;gt;&lt;br /&gt;
server-identifier 192.168.254.3;&amp;lt;br /&amp;gt;&lt;br /&gt;
next-server 192.168.254.3;&amp;lt;br /&amp;gt;&lt;br /&gt;
default-lease-time -1;&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
subnet 192.168.254.0 netmask 255.255.255.0 {&amp;lt;br /&amp;gt;&lt;br /&gt;
range 192.168.254.32 192.168.254.99;&amp;lt;br /&amp;gt;&lt;br /&gt;
option root-path &amp;quot;/usr/local/export/pxe&amp;quot;;&amp;lt;br /&amp;gt;&lt;br /&gt;
filename &amp;quot;pxeboot&amp;quot;;&amp;lt;br /&amp;gt;&lt;br /&gt;
}&amp;lt;br /&amp;gt;&lt;br /&gt;
host cm.simerson.net {&amp;lt;br /&amp;gt;&lt;br /&gt;
hardware ethernet 00:e0:18:98:f0:cc;&amp;lt;br /&amp;gt;&lt;br /&gt;
fixed-address 192.168.254.126;&amp;lt;br /&amp;gt;&lt;br /&gt;
}&amp;lt;br /&amp;gt;&lt;br /&gt;
host c1.simerson.net {&amp;lt;br /&amp;gt;&lt;br /&gt;
hardware ethernet 00:60:97:0e:bb:a7;&amp;lt;br /&amp;gt;&lt;br /&gt;
fixed-address 192.168.254.131;&amp;lt;br /&amp;gt;&lt;br /&gt;
}&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==X config notes==&lt;br /&gt;
On the X server the /etc/X11/xorg.conf file is only used for the X server not the clients.&lt;br /&gt;
&lt;br /&gt;
To use this same configuration for your X Terminal Clients copy this file to /diskless_rw/&amp;lt;Client IP&amp;gt;/etc/X11 and it will use it.&lt;br /&gt;
&lt;br /&gt;
==Starting X on the client==&lt;br /&gt;
There are two ways of doing this and it depends on your hardware mainly.  &lt;br /&gt;
&lt;br /&gt;
1. run all programs on the server using the servers CPU and Memory this we will call the 'XDM Method'&lt;br /&gt;
2. run all programs from the NFS mounts using the clients CPU and Memory but the HD of the server, this we will call the 'NFS Method'&lt;br /&gt;
&lt;br /&gt;
Both methods will boot from PXE-Boot and can be diskless.&lt;br /&gt;
&lt;br /&gt;
===XDM Method===&lt;br /&gt;
Recommended for machines less than 1Ghz 256MB&lt;br /&gt;
&lt;br /&gt;
This is quite simple to setup.  Change your rc file in the /diskless_ro/etc directory to have this line at the end:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
X -query &amp;lt;server ip&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also type this command at the command line on the client to test before hand.&lt;br /&gt;
&lt;br /&gt;
===NFS Method===&lt;br /&gt;
Recommended for machines over 1Ghz 256MB or if you want to utilise any of the clients devices such as local HD, USB, CD/DVD burners, etc.&lt;br /&gt;
&lt;br /&gt;
This is much trickier.&lt;br /&gt;
&lt;br /&gt;
Log in&lt;br /&gt;
Now type 'startx' at the command line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==todo==&lt;br /&gt;
Here are some of the jobs left to do to make this secure or generally better:&lt;br /&gt;
&lt;br /&gt;
- If you don't configure your clients to run xdm it will put you at the text login.  The problem here is people can login as root without a password for some reason.  If the user hits &amp;lt;Ctrl&amp;gt;&amp;lt;Alt&amp;gt;&amp;lt;Back space&amp;gt; then it will crash them out to a login screen which the user could then login as root with out a password, not good!&lt;br /&gt;
&lt;br /&gt;
- Optimise the boot up sequence&lt;br /&gt;
&lt;br /&gt;
- There must be a simplier way to set this up if your going to use XDM in the end.  IE: do we need to do half of this tutorial if we are going to run XDM.&lt;br /&gt;
&lt;br /&gt;
- When the same user logs onto two seperate machines they cannot start firefox or thunderbird as it complains about being open somewhere else.  This assumes you have firefox and thunderbird already open on both machines that you logged onto.&lt;br /&gt;
&lt;br /&gt;
===Known Issues===&lt;br /&gt;
&lt;br /&gt;
- Doesn't work with HP-COMPAQ-T5525 thin client as it doesn't want to boot, it says it's missing libfreetype.so.9 which we do have it just cannot find it for some reason.  It's trying to use the VIA chipset for graphics which is different to all the other clients I've loaded successfully so far.&lt;br /&gt;
&lt;br /&gt;
- USB mice not working instead use PS/2.  If we got this working it may help get the HP T5525 working&lt;br /&gt;
&lt;br /&gt;
===Keyboard repeating on notebooks===&lt;br /&gt;
- typing on some keyboards (like my notebook) causes double characters to display if you type too fast. - This is the notebook, if you go and set the KDE Accessabiltiy options and set the keyboard rate to 50ms, this fixes the problem.&lt;br /&gt;
&lt;br /&gt;
===USB mouse===&lt;br /&gt;
&lt;br /&gt;
Editing /etc/devd.conf file and searched for ums&lt;br /&gt;
remarked out the action line.&lt;br /&gt;
 &lt;br /&gt;
rebooted.&lt;br /&gt;
 &lt;br /&gt;
Someone off IRC suggested that I build a GENERIC xorg.conf file which has vesa, usb mouse and ps/2 mouse configurations through it.&lt;br /&gt;
 &lt;br /&gt;
I reverted everything back to normal ps/2 mouse config, copying my usb config files to the following:&lt;br /&gt;
/etc/devd.conf_usb&lt;br /&gt;
/etc/rc.conf_usb&lt;br /&gt;
/etc/X11/xorg.conf_usb&lt;br /&gt;
 &lt;br /&gt;
I think we need a seperate configuration for the HP, it uses a weird display driver.&lt;br /&gt;
&lt;br /&gt;
==links==&lt;br /&gt;
&lt;br /&gt;
http://www.onlamp.com/pub/a/bsd/2004/09/09/diskless_server.html&lt;br /&gt;
&lt;br /&gt;
http://www.onlamp.com/pub/a/bsd/2004/09/30/diskless_clients.html&lt;br /&gt;
&lt;br /&gt;
http://people.freebsd.org/~alfred/pxe/en_US.ISO8859-1/articles/pxe/article.html&lt;br /&gt;
&lt;br /&gt;
http://www.the-labs.com/FreeBSD/Diskless/&lt;br /&gt;
&lt;br /&gt;
http://www.nber.org/sys-admin/FreeBSD-diskless.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://wikitest.freebsd.org/MarkusBoelter&lt;br /&gt;
&lt;br /&gt;
http://www.daemonsecurity.com/pub/pxeboot/&lt;br /&gt;
&lt;br /&gt;
http://www.kano.org.uk/projects/pxe/&lt;br /&gt;
&lt;br /&gt;
File Examples:&lt;br /&gt;
&lt;br /&gt;
http://www.watson.org/~robert/freebsd/pxe/&lt;br /&gt;
&lt;br /&gt;
PXE Information&lt;br /&gt;
http://www.computerworld.com/action/article.do?command=viewArticleBasic&amp;amp;articleId=108551&lt;br /&gt;
&lt;br /&gt;
[[Category:FreeBSD_for_Workstations]]&lt;/div&gt;</summary>
		<author><name>165.228.0.35</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/X_Windows_Terminal</id>
		<title>X Windows Terminal</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/X_Windows_Terminal"/>
				<updated>2006-10-06T03:52:54Z</updated>
		
		<summary type="html">&lt;p&gt;165.228.0.35: /* todo */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Advantages==&lt;br /&gt;
X Windows can be used in a Server-Client relationship.  By setting up your X Windows Server you allow the use of all the programs on that computer to all the client PC's.  &lt;br /&gt;
&lt;br /&gt;
There are many advantages of running client computers in this manner:&lt;br /&gt;
* They don't even need a hard drive.  &lt;br /&gt;
* It's silent as there are no moving parts&lt;br /&gt;
* The solution saves power as your computers are very thin.&lt;br /&gt;
* Everything can be backed up centrally.&lt;br /&gt;
* Boot times for client PC's are the fastest around.&lt;br /&gt;
* Clients don't need much CPU speed, memory, etc.  Because of this they would be very cheap.  You could get away with using a Pentium 100Mhz with 32MB ram, no hard drive, no CD-ROM, no Floppy and a fanless power supply.  You just need a ethernet card with a PXEBOOT ROM.&lt;br /&gt;
&lt;br /&gt;
==From the Beginning==&lt;br /&gt;
I've based this document on FreeBSD 6.1.&lt;br /&gt;
&lt;br /&gt;
Install FreeBSD 6.1 as per usual.&lt;br /&gt;
I've setup my mount points as this:&lt;br /&gt;
  Swap          (equal to how much memory I have in my machine)&lt;br /&gt;
  /             512MB&lt;br /&gt;
  /var          1.4G&lt;br /&gt;
  /tmp          512MB&lt;br /&gt;
  /usr          2GB&lt;br /&gt;
&lt;br /&gt;
I selected 'A' for auto and then deleted /usr and created /usr as 2g.&lt;br /&gt;
&lt;br /&gt;
Select User-X install.&lt;br /&gt;
&lt;br /&gt;
Select SSH Server and NFS Server in the installation process&lt;br /&gt;
&lt;br /&gt;
After the install I went back into sysinstall and added the following labels.&lt;br /&gt;
NOTE: you cannot add labels to your boot drive, so boot of the installation CD and use the configure -&amp;gt; label option in the sysinstall screen to add these labels to your boot drive.  You may need to retype the mount points for /, /var, /tmp and /usr by hitting 'm' on each label.&lt;br /&gt;
&lt;br /&gt;
  /diskless_ro  512MB&lt;br /&gt;
  /diskless_rw  1GB    minimum&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I find the best way to get this working is to break it down in to small steps and get each step working independantly.  IE: Setup NFS and see if you can mount it from another FreeBSD machine, don't just assume it will work and boot your PXE-Boot machine.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Throughout my documentation&lt;br /&gt;
&lt;br /&gt;
192.168.1.1 = the Server&lt;br /&gt;
&lt;br /&gt;
192.168.1.2 = the client (may be a full freebsd system or pxeboot)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At this point I normally install fluxbox with the following line:&lt;br /&gt;
&lt;br /&gt;
shell# pkg_add -r fluxbox-devel&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
change your ~/.xinitrc file to the following:&lt;br /&gt;
&lt;br /&gt;
startfluxbox&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Use the following command to update your fluxbox menus:&lt;br /&gt;
&lt;br /&gt;
shell$ fluxbox-generate_menu&lt;br /&gt;
&lt;br /&gt;
==Running a single application==&lt;br /&gt;
&lt;br /&gt;
To get started I have my server setup running FreeBSD, with X-Windows and a few applications.  Nothing too special.  Then I have my client PC, which to start off I used the freesbie 1.1 boot CD to perform these initial tests.  You can get this from www.freesbie.org.  I entered into fluxbox, but you could equally use xfce4.&lt;br /&gt;
&lt;br /&gt;
You must allow incoming connections this is done with two commands&lt;br /&gt;
&lt;br /&gt;
 client# startx -listen_tcp&lt;br /&gt;
 client# xhost +&lt;br /&gt;
&lt;br /&gt;
This allows all computers to start applications on your client PC.  It's dangerous but good for testing everything is setup correctly.&lt;br /&gt;
&lt;br /&gt;
 client# ssh &amp;lt;server user@server ip&amp;gt;&lt;br /&gt;
 eg: ssh mick@192.168.1.1&lt;br /&gt;
&lt;br /&gt;
 ssh$ setenv DISPLAY '192.168.1.2:0'&lt;br /&gt;
&lt;br /&gt;
Or if your running bash:&lt;br /&gt;
 ssh$ DISPLAY=&amp;lt;client ip&amp;gt;:&amp;lt;client display&amp;gt;; export DISPLAY&lt;br /&gt;
 eg: DISPLAY=192.168.1.2:0; export DISPLAY&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 ssh$ xcalc &amp;amp;&lt;br /&gt;
&lt;br /&gt;
This should display on your client&lt;br /&gt;
&lt;br /&gt;
==Running a whole X Windows Session (XDM)==&lt;br /&gt;
This sets up a server so that you can share your X session with any clients which want to connect.  (Simular to Terminal Services under windows)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===server===&lt;br /&gt;
edit:&lt;br /&gt;
 /usr/X11R6/lib/X11/xdm/xdm-config&lt;br /&gt;
&lt;br /&gt;
comment out with a '!' the request line&amp;lt;br&amp;gt;&lt;br /&gt;
 DisplayManager.requestPort: 0&lt;br /&gt;
&lt;br /&gt;
edit:&amp;lt;br&amp;gt;&lt;br /&gt;
 /usr/X11R6/lib/X11/xdm/Xaccess&lt;br /&gt;
&lt;br /&gt;
Enter a single asterisk any where in the file, so the contents should be one asterisk and the rest commented out.  There should be an asterisk on line 49 which you can uncomment.&lt;br /&gt;
&lt;br /&gt;
Whilst in the /usr/X11R6/lib/X11/xdm directory do these commands:&lt;br /&gt;
shell# vi Xstartup&lt;br /&gt;
&lt;br /&gt;
Add into this file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
#&lt;br /&gt;
# Xstartup&lt;br /&gt;
#&lt;br /&gt;
# This program is run as root after the user is verified&lt;br /&gt;
#&lt;br /&gt;
if [ -f /etc/nologin ]; then&lt;br /&gt;
   xmessage -file /etc/nologin -timeout 30 -center&lt;br /&gt;
   exit 1&lt;br /&gt;
fi&lt;br /&gt;
sessreg -a -l $DISPLAY -x /usr/X11R6/lib/xdm/Xservers $LOGNAME&lt;br /&gt;
/usr/X11R6/lib/xdm/GiveConsole&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
shell# chmod +x Xstartup&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Make sure your firewall has all traffic for you lan.  (Need to know which exact ports to allow).&lt;br /&gt;
&lt;br /&gt;
create ~/.xsession for each user which requires access and enter your start up for x &lt;br /&gt;
eg:&lt;br /&gt;
&lt;br /&gt;
 startkde&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;run xdm on server as root&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can put this xdm into the /etc/ttys so that it starts automatically on boot up.&lt;br /&gt;
&lt;br /&gt;
===client===&lt;br /&gt;
make sure your not in X&lt;br /&gt;
&lt;br /&gt;
type this command:&lt;br /&gt;
&lt;br /&gt;
 shell# X -broadcast&lt;br /&gt;
&lt;br /&gt;
This assumes that you are running only one server.&lt;br /&gt;
Otherwise use:&lt;br /&gt;
&lt;br /&gt;
 shell# X -query 192.168.1.1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==DHCP - Install and setup==&lt;br /&gt;
Server setup.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
install /usr/ports/net/isc-dhcp3-server&lt;br /&gt;
&lt;br /&gt;
We do this so we can define the root path for the diskless system.&lt;br /&gt;
&lt;br /&gt;
copy /usr/local/etc/dhcpd.conf.sample to /usr/local/etc/dhcpd.conf&lt;br /&gt;
&lt;br /&gt;
edit /usr/local/etc/dhcpd.conf and make sure it has these lines in it.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# dhcpd.conf&lt;br /&gt;
#&lt;br /&gt;
# Sample configuration file for ISC dhcpd&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
# option definitions common to all supported networks...&lt;br /&gt;
#option domain-name &amp;quot;example.org&amp;quot;;&lt;br /&gt;
#option domain-name-servers ns1.example.org, ns2.example.org;&lt;br /&gt;
&lt;br /&gt;
default-lease-time 3600;&lt;br /&gt;
max-lease-time 86400;&lt;br /&gt;
&lt;br /&gt;
# If this DHCP server is the official DHCP server for the local&lt;br /&gt;
# network, the authoritative directive should be uncommented.&lt;br /&gt;
authoritative;&lt;br /&gt;
&lt;br /&gt;
# ad-hoc DNS update scheme - set to &amp;quot;none&amp;quot; to disable dynamic DNS updates.&lt;br /&gt;
ddns-update-style none;&lt;br /&gt;
&lt;br /&gt;
option root-path &amp;quot;192.168.1.1:/diskless_ro&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
# lines added for pxeboot client&lt;br /&gt;
use-host-decl-names on;&lt;br /&gt;
next-server 192.168.1.1;&lt;br /&gt;
filename &amp;quot;pxeboot&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
# Use this to send dhcp log messages to a different log file (you also&lt;br /&gt;
# have to hack syslog.conf to complete the redirection).&lt;br /&gt;
log-facility local7;&lt;br /&gt;
&lt;br /&gt;
# No service will be given on this subnet, but declaring it helps the&lt;br /&gt;
# DHCP server to understand the network topology.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# This is a very basic subnet declaration.&lt;br /&gt;
&lt;br /&gt;
subnet 192.168.1.0 netmask 255.255.255.0 {&lt;br /&gt;
  range 192.168.1.10 192.168.1.20;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create the leases file&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# touch /var/db/dhcpd.leases&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Restart the daemon&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# killall dhcpd&lt;br /&gt;
# dhcpd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add to /etc/rc.conf&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dhcpd_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==TFTP Setup==&lt;br /&gt;
TFTP helps us transport the kernel to the PXE-Boot machines.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# mkdir /tftpboot&lt;br /&gt;
# cp /boot/pxeboot /tftpboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Uncomment the following line in /etc/inetd.conf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tftp    dgram   udp     wait    root    /usr/libexec/tftpd      tftpd -l -s /tftpboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart the inetd service&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# killall -HUP inetd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If inetd has not started automatically do the following:&lt;br /&gt;
&lt;br /&gt;
Add the following to /etc/rc.conf&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
inetd_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now start inetd manually.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# inetd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test===&lt;br /&gt;
To test that tftp has loaded type the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# sockstat -4l | grep 69 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and you should see this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
root      inetd       13719 5   udp4    *:69                 *:*&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==NFS Setup==&lt;br /&gt;
Network File System.  Here we share all the directories from the server so that the diskless clients see these drives as if those directories were the diskless client's.&lt;br /&gt;
&lt;br /&gt;
===Server Setup===&lt;br /&gt;
If you forgot to select 'Yes' to NFS server setup in the FreeBSD installation then you have to setup the server manually like so:&lt;br /&gt;
&lt;br /&gt;
Enable NFS /etc/rc.conf&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rpcbind_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
nfs_server_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test===&lt;br /&gt;
A quick test to see if your NFS server is acting normal:&lt;br /&gt;
&lt;br /&gt;
Edit the /etc/exports and add the following&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/usr       -alldirs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This allows anyone to connect to your /usr mount.&lt;br /&gt;
&lt;br /&gt;
Now run these commands to restart and view your mounts&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# kill -HUP `cat /var/run/mountd.pid`&lt;br /&gt;
# showmount -e&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now try and mount it from a client running BSD&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# mount -t nfs 192.168.1.1:/usr /mnt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Server exports setup===&lt;br /&gt;
&lt;br /&gt;
Make directories for each IP for your clients&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /diskless_rw&lt;br /&gt;
# mkdir 192.168.1.2&lt;br /&gt;
# cd 192.168.1.2&lt;br /&gt;
# mkdir etc var&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Configure /etc/exports&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# file systems accessible only for reading:&lt;br /&gt;
# Original way of linking up the /usr&lt;br /&gt;
#/usr -ro -maproot=0 -network 192.168.1.0 -mask 255.255.255.0&lt;br /&gt;
&lt;br /&gt;
/usr -network 192.168.1.0 -mask 255.255.255.0&lt;br /&gt;
/diskless_ro -ro -maproot=0 -network 192.168.1.0 -mask 255.255.255.0&lt;br /&gt;
/diskless_rw/192.168.1.2/etc /diskless_rw/192.168.1.2/var -maproot=root 192.168.1.2&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restarting NFS&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# kill -HUP `cat /var/run/mountd.pid`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If NFS is not started yet do the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
data# rpcbind&lt;br /&gt;
data# nfsd -u -t -n 20 -h 192.168.1.1&lt;br /&gt;
data# mountd -r&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Testing to see if the exports are correct&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
data# showmount -e&lt;br /&gt;
Exports list on localhost:&lt;br /&gt;
/usr                              192.168.1.0&lt;br /&gt;
/diskless_rw/192.168.1.2/var      192.168.1.2&lt;br /&gt;
/diskless_rw/192.168.1.2/etc      192.168.1.2&lt;br /&gt;
/diskless_ro                      192.168.1.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Setup diskless_rw==&lt;br /&gt;
Create directories&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /diskless_rw/192.168.1.2/etc&lt;br /&gt;
# mkdir pam.d X11&lt;br /&gt;
&lt;br /&gt;
# cd /diskless_rw/192.168.1.2/var&lt;br /&gt;
# mkdir home log run tmp&lt;br /&gt;
# chmod 1777 tmp&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a swap file in the var directory for the client&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# dd if=/dev/zero of=/diskless_rw/192.168.1.2/var/swap bs=1k count=32000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in the /diskless_rw/&amp;lt;ip&amp;gt;/var/log directory I created the following log files so that syslogd would have files to write to:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /diskless_rw/192.168.1.2/var/log&lt;br /&gt;
# touch messages security auth.log maillog lpd-errs xferlog cron debug.log slip.log ppp.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy the following files from the systems /etc directory to /diskless_rw/&amp;lt;client ip&amp;gt;/etc&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
auth.conf&lt;br /&gt;
disktab&lt;br /&gt;
gettytab&lt;br /&gt;
group&lt;br /&gt;
hosts&lt;br /&gt;
login.access&lt;br /&gt;
login.conf&lt;br /&gt;
login.conf.db&lt;br /&gt;
master.passwd&lt;br /&gt;
netconfig&lt;br /&gt;
protocols&lt;br /&gt;
pwd.db&lt;br /&gt;
services&lt;br /&gt;
spwd.db&lt;br /&gt;
syslog.conf&lt;br /&gt;
termcap -&amp;gt; /usr/share/misc/termcap&lt;br /&gt;
ttys&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy /diskless_ro/etc/rc to /diskless_rw/&amp;lt;client ip&amp;gt;/etc&lt;br /&gt;
&lt;br /&gt;
==Setup diskless_ro==&lt;br /&gt;
This is the common root mount for all pxe-boot clients.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cp -rv /bin /lib /libexec /sbin /diskless_ro&lt;br /&gt;
# mkdir /diskless_ro/usr&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy the kernel accross.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cp -rv /boot /diskless_ro&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For some client machines you may have to disable the ACPI (Power management) in the /diskless_ro/boot/device.hints&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
hint.acpi.0.disabled=&amp;quot;1&amp;quot; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make a dev so that clients can boot without freezing.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# mkdir /diskless_ro/dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make a directory so that we can mount var from the /diskless_rw/&amp;lt;client ip&amp;gt;/var&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# mkdir /diskless_ro/var&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
So we can use the systems /var/tmp and /usr/home directory make soft links to them&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /diskless_ro&lt;br /&gt;
# ln -s /var/tmp .&lt;br /&gt;
# ln -s /usr/home .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We require a few files from the systems /etc directory to be copied into the /diskless_ro/etc for common use between the thin clients.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# mkdir /diskless_ro/etc&lt;br /&gt;
# cp /etc/services /etc/netconfig /etc/login.conf /diskless_ro/etc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===rc file===&lt;br /&gt;
The /diskless_ro/etc/rc file is the first file which is ran after the kernel has loaded.  Here we mount a the labels from the server.&lt;br /&gt;
&lt;br /&gt;
Create the /diskless_ro/etc/rc&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin; export PATH&lt;br /&gt;
TMPDIR=~/tmp;export TMPDIR&lt;br /&gt;
TMP=~/tmp;export TMP&lt;br /&gt;
&lt;br /&gt;
mount -t nfs 192.168.0.1:/usr /usr&lt;br /&gt;
&lt;br /&gt;
boot_ip=`/sbin/ifconfig | /usr/bin/grep &amp;quot;inet &amp;quot; | /usr/bin/grep -v 127.0.0.1 |&lt;br /&gt;
/usr/bin/awk '{print $2}'`&lt;br /&gt;
mount -t nfs 192.168.0.1:/diskless_rw/${boot_ip}/etc /etc&lt;br /&gt;
mount -t nfs 192.168.0.1:/diskless_rw/${boot_ip}/var /var&lt;br /&gt;
&lt;br /&gt;
swapon /var/swap&lt;br /&gt;
&lt;br /&gt;
#rm -rf /var/tmp/*&lt;br /&gt;
#rm -rf /var/tmp/.*&lt;br /&gt;
&lt;br /&gt;
X -query 192.168.0.1&lt;br /&gt;
&lt;br /&gt;
. /etc/rc2&lt;br /&gt;
exit 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===rc2 file===&lt;br /&gt;
This sets up some links for libraries and the logging daemon.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
mount -a&lt;br /&gt;
/sbin/ldconfig -elf /usr/lib/compat /usr/X11R6/lib /usr/local/lib&lt;br /&gt;
&lt;br /&gt;
syslogd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now change permissions so rc can run.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# chmod +x rc*&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Using a seperate DHCP server==&lt;br /&gt;
If you already have a DHCP server and you want to use that instead then you have to do these steps.&lt;br /&gt;
&lt;br /&gt;
===On the Xserver===&lt;br /&gt;
1. stop dhcpd&lt;br /&gt;
2. remove dhcpd from /etc/rc.conf&lt;br /&gt;
3. change your IP address to dhcp or static&lt;br /&gt;
4. Change your /diskless_ro/etc/rc file so that it mounts from the new Xserver IP&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===On your DHCP Server===&lt;br /&gt;
1. edit /usr/local/etc/dhcpd.conf and add the following&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
authoritative;&lt;br /&gt;
ddns-update-style none;&lt;br /&gt;
&lt;br /&gt;
option root-path &amp;quot;&amp;lt;X Server IP&amp;gt;:/diskless_ro&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
# lines added for pxeboot client&lt;br /&gt;
use-host-decl-names on;&lt;br /&gt;
next-server &amp;lt;X Server IP&amp;gt;;&lt;br /&gt;
filename &amp;quot;pxeboot&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
2. stop dhcpd&lt;br /&gt;
3. start dhcpd&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Client===&lt;br /&gt;
Your client should boot now just remember that you may get a different IP now that you are talking to a different DHCP server so you have to change your exports file and copy accross a directory in /diskless_rw for the new IP.  All this is done on the X Server.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==GRUB Floppy boot (optional)==&lt;br /&gt;
&lt;br /&gt;
(would like to compile this ourselves later)&lt;br /&gt;
To get started we downloaded the image from www.hp.uab.edu/~ed/grub-net&lt;br /&gt;
&lt;br /&gt;
 shell# dd if=/data/grub-net.img of=/dev/fd0&lt;br /&gt;
&lt;br /&gt;
Then we mounted it as msdos&lt;br /&gt;
Remove/rename menu.1st from the grub directory as it was doing something funny with it.  We think that it was looking for a tftp server through our dhcp and we don't have a the dhcp setup correctly here, so we wanted to do it manually.&lt;br /&gt;
&lt;br /&gt;
Reboot off the floppy now..&lt;br /&gt;
&lt;br /&gt;
 grub&amp;gt; ifconfig --address=192.168.1.2 --mask=255.255.255.0 --gateway=192.168.1.1&lt;br /&gt;
 --server=192.168.1.2&lt;br /&gt;
&lt;br /&gt;
OR you can use dhcp&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 grub&amp;gt; dhcp&amp;lt;br&amp;gt; &lt;br /&gt;
 grub&amp;gt; tftpserver 192.168.1.2&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Setup tftp on your server, we created a directory /tftpboot. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Starting diskless system through GRUB===&lt;br /&gt;
This is an alternative boot loader.  You can use this for testing, if you don't have a pxeboot chip, otherwise skip this section.&lt;br /&gt;
&lt;br /&gt;
These commands are half working...&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 grub&amp;gt; root (nd)&amp;lt;br&amp;gt;&lt;br /&gt;
 grub&amp;gt; kernel /kernel root=ad0s1a&amp;lt;br&amp;gt;&lt;br /&gt;
 grub&amp;gt; pxeboot&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Completely Diskless System (PXEBOOT ROM) (optional)==&lt;br /&gt;
&lt;br /&gt;
Running completely diskless by booting from a Network ROM Chip.&lt;br /&gt;
&lt;br /&gt;
We have now got a Intel GD82559 Etherexpress pro/100 Card.&lt;br /&gt;
&lt;br /&gt;
When we boot up on the client machine with that card it displays:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Intel UNDI, PXE-2.0 (build 067)&amp;lt;br /&amp;gt;&lt;br /&gt;
Copyright (C) 1997-1998 Intel Corporation&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Which we cannot get working so we have read that you have to update this version to Build 82.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
copy /boot/pxeboot to /tftpboot directory we made before&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
- Downloaded proboot.exe from support.intel.com and unpacked into a windows box.&amp;lt;br /&amp;gt;&lt;br /&gt;
- Copied ibautil.exe onto a windows 98 boot disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
- Rebooted the test box after disabling network boot on the nic (otherwise it'll kick in before the floppy).&amp;lt;br /&amp;gt;&lt;br /&gt;
- Ran ibautil -iv to see what embedded image versions were available:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Intel(R) Boot Agent XG v1.0.09&amp;lt;br /&amp;gt;&lt;br /&gt;
Intel(R) Boot Agent GE v1.2.36&amp;lt;br /&amp;gt;&lt;br /&gt;
Intel(R) Boot Agent FE v4.1.19&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
- Ran ibautil -up to perform the image upgrade.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
It's interesting to note that no version showed up for out intel nic when initially running ibautil. After the upgrade, however, the version corectly showed as 4.1.19.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I made sure that I had simular features to this in my dhcpd.conf file:&amp;lt;br /&amp;gt;&lt;br /&gt;
option broadcast-address 192.168.254.255;&amp;lt;br /&amp;gt;&lt;br /&gt;
option domain-name-servers 192.168.254.3;&amp;lt;br /&amp;gt;&lt;br /&gt;
option domain-name &amp;quot;simerson.net&amp;quot;;&amp;lt;br /&amp;gt;&lt;br /&gt;
option routers 192.168.254.1;&amp;lt;br /&amp;gt;&lt;br /&gt;
option subnet-mask 255.255.255.0;&amp;lt;br /&amp;gt;&lt;br /&gt;
server-name &amp;quot;pxe-gw&amp;quot;;&amp;lt;br /&amp;gt;&lt;br /&gt;
server-identifier 192.168.254.3;&amp;lt;br /&amp;gt;&lt;br /&gt;
next-server 192.168.254.3;&amp;lt;br /&amp;gt;&lt;br /&gt;
default-lease-time -1;&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
subnet 192.168.254.0 netmask 255.255.255.0 {&amp;lt;br /&amp;gt;&lt;br /&gt;
range 192.168.254.32 192.168.254.99;&amp;lt;br /&amp;gt;&lt;br /&gt;
option root-path &amp;quot;/usr/local/export/pxe&amp;quot;;&amp;lt;br /&amp;gt;&lt;br /&gt;
filename &amp;quot;pxeboot&amp;quot;;&amp;lt;br /&amp;gt;&lt;br /&gt;
}&amp;lt;br /&amp;gt;&lt;br /&gt;
host cm.simerson.net {&amp;lt;br /&amp;gt;&lt;br /&gt;
hardware ethernet 00:e0:18:98:f0:cc;&amp;lt;br /&amp;gt;&lt;br /&gt;
fixed-address 192.168.254.126;&amp;lt;br /&amp;gt;&lt;br /&gt;
}&amp;lt;br /&amp;gt;&lt;br /&gt;
host c1.simerson.net {&amp;lt;br /&amp;gt;&lt;br /&gt;
hardware ethernet 00:60:97:0e:bb:a7;&amp;lt;br /&amp;gt;&lt;br /&gt;
fixed-address 192.168.254.131;&amp;lt;br /&amp;gt;&lt;br /&gt;
}&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==X config notes==&lt;br /&gt;
On the X server the /etc/X11/xorg.conf file is only used for the X server not the clients.&lt;br /&gt;
&lt;br /&gt;
To use this same configuration for your X Terminal Clients copy this file to /diskless_rw/&amp;lt;Client IP&amp;gt;/etc/X11 and it will use it.&lt;br /&gt;
&lt;br /&gt;
==Starting X on the client==&lt;br /&gt;
There are two ways of doing this and it depends on your hardware mainly.  &lt;br /&gt;
&lt;br /&gt;
1. run all programs on the server using the servers CPU and Memory this we will call the 'XDM Method'&lt;br /&gt;
2. run all programs from the NFS mounts using the clients CPU and Memory but the HD of the server, this we will call the 'NFS Method'&lt;br /&gt;
&lt;br /&gt;
Both methods will boot from PXE-Boot and can be diskless.&lt;br /&gt;
&lt;br /&gt;
===XDM Method===&lt;br /&gt;
Recommended for machines less than 1Ghz 256MB&lt;br /&gt;
&lt;br /&gt;
This is quite simple to setup.  Change your rc file in the /diskless_ro/etc directory to have this line at the end:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
X -query &amp;lt;server ip&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also type this command at the command line on the client to test before hand.&lt;br /&gt;
&lt;br /&gt;
===NFS Method===&lt;br /&gt;
Recommended for machines over 1Ghz 256MB or if you want to utilise any of the clients devices such as local HD, USB, CD/DVD burners, etc.&lt;br /&gt;
&lt;br /&gt;
This is much trickier.&lt;br /&gt;
&lt;br /&gt;
Log in&lt;br /&gt;
Now type 'startx' at the command line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==todo==&lt;br /&gt;
Here are some of the jobs left to do to make this secure or generally better:&lt;br /&gt;
&lt;br /&gt;
- If you don't configure your clients to run xdm it will put you at the text login.  The problem here is people can login as root without a password for some reason.  If the user hits &amp;lt;Ctrl&amp;gt;&amp;lt;Alt&amp;gt;&amp;lt;Back space&amp;gt; then it will crash them out to a login screen which the user could then login as root with out a password, not good!&lt;br /&gt;
&lt;br /&gt;
- Optimise the boot up sequence&lt;br /&gt;
&lt;br /&gt;
- There must be a simplier way to set this up if your going to use XDM in the end.  IE: do we need to do half of this tutorial if we are going to run XDM.&lt;br /&gt;
&lt;br /&gt;
- When the same user logs onto two seperate machines they cannot start firefox or thunderbird as it complains about being open somewhere else.  This assumes you have firefox and thunderbird already open on both machines that you logged onto.&lt;br /&gt;
&lt;br /&gt;
===Known Issues===&lt;br /&gt;
&lt;br /&gt;
- Doesn't work with HP-COMPAQ-T5525 thin client as it doesn't want to boot, it says it's missing libfreetype.so.9 which we do have it just cannot find it for some reason.  It's trying to use the VIA chipset for graphics which is different to all the other clients I've loaded successfully so far.&lt;br /&gt;
&lt;br /&gt;
- USB mice not working instead use PS/2.  If we got this working it may help get the HP T5525 working&lt;br /&gt;
&lt;br /&gt;
===Keyboard repeating on notebooks====&lt;br /&gt;
- typing on some keyboards (like my notebook) causes double characters to display if you type too fast. - This is the notebook, if you go and set the KDE Accessabiltiy options and set the keyboard rate to 50ms, this fixes the problem.&lt;br /&gt;
&lt;br /&gt;
===USB mouse===&lt;br /&gt;
&lt;br /&gt;
Editing /etc/devd.conf file and searched for ums&lt;br /&gt;
remarked out the action line.&lt;br /&gt;
 &lt;br /&gt;
rebooted.&lt;br /&gt;
 &lt;br /&gt;
Someone off IRC suggested that I build a GENERIC xorg.conf file which has vesa, usb mouse and ps/2 mouse configurations through it.&lt;br /&gt;
 &lt;br /&gt;
I reverted everything back to normal ps/2 mouse config, copying my usb config files to the following:&lt;br /&gt;
/etc/devd.conf_usb&lt;br /&gt;
/etc/rc.conf_usb&lt;br /&gt;
/etc/X11/xorg.conf_usb&lt;br /&gt;
 &lt;br /&gt;
I think we need a seperate configuration for the HP, it uses a weird display driver.&lt;br /&gt;
&lt;br /&gt;
==links==&lt;br /&gt;
&lt;br /&gt;
http://www.onlamp.com/pub/a/bsd/2004/09/09/diskless_server.html&lt;br /&gt;
&lt;br /&gt;
http://www.onlamp.com/pub/a/bsd/2004/09/30/diskless_clients.html&lt;br /&gt;
&lt;br /&gt;
http://people.freebsd.org/~alfred/pxe/en_US.ISO8859-1/articles/pxe/article.html&lt;br /&gt;
&lt;br /&gt;
http://www.the-labs.com/FreeBSD/Diskless/&lt;br /&gt;
&lt;br /&gt;
http://www.nber.org/sys-admin/FreeBSD-diskless.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://wikitest.freebsd.org/MarkusBoelter&lt;br /&gt;
&lt;br /&gt;
http://www.daemonsecurity.com/pub/pxeboot/&lt;br /&gt;
&lt;br /&gt;
http://www.kano.org.uk/projects/pxe/&lt;br /&gt;
&lt;br /&gt;
File Examples:&lt;br /&gt;
&lt;br /&gt;
http://www.watson.org/~robert/freebsd/pxe/&lt;br /&gt;
&lt;br /&gt;
[[Category:FreeBSD_for_Workstations]]&lt;/div&gt;</summary>
		<author><name>165.228.0.35</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/X_Windows_Terminal</id>
		<title>X Windows Terminal</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/X_Windows_Terminal"/>
				<updated>2006-10-06T03:50:45Z</updated>
		
		<summary type="html">&lt;p&gt;165.228.0.35: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Advantages==&lt;br /&gt;
X Windows can be used in a Server-Client relationship.  By setting up your X Windows Server you allow the use of all the programs on that computer to all the client PC's.  &lt;br /&gt;
&lt;br /&gt;
There are many advantages of running client computers in this manner:&lt;br /&gt;
* They don't even need a hard drive.  &lt;br /&gt;
* It's silent as there are no moving parts&lt;br /&gt;
* The solution saves power as your computers are very thin.&lt;br /&gt;
* Everything can be backed up centrally.&lt;br /&gt;
* Boot times for client PC's are the fastest around.&lt;br /&gt;
* Clients don't need much CPU speed, memory, etc.  Because of this they would be very cheap.  You could get away with using a Pentium 100Mhz with 32MB ram, no hard drive, no CD-ROM, no Floppy and a fanless power supply.  You just need a ethernet card with a PXEBOOT ROM.&lt;br /&gt;
&lt;br /&gt;
==From the Beginning==&lt;br /&gt;
I've based this document on FreeBSD 6.1.&lt;br /&gt;
&lt;br /&gt;
Install FreeBSD 6.1 as per usual.&lt;br /&gt;
I've setup my mount points as this:&lt;br /&gt;
  Swap          (equal to how much memory I have in my machine)&lt;br /&gt;
  /             512MB&lt;br /&gt;
  /var          1.4G&lt;br /&gt;
  /tmp          512MB&lt;br /&gt;
  /usr          2GB&lt;br /&gt;
&lt;br /&gt;
I selected 'A' for auto and then deleted /usr and created /usr as 2g.&lt;br /&gt;
&lt;br /&gt;
Select User-X install.&lt;br /&gt;
&lt;br /&gt;
Select SSH Server and NFS Server in the installation process&lt;br /&gt;
&lt;br /&gt;
After the install I went back into sysinstall and added the following labels.&lt;br /&gt;
NOTE: you cannot add labels to your boot drive, so boot of the installation CD and use the configure -&amp;gt; label option in the sysinstall screen to add these labels to your boot drive.  You may need to retype the mount points for /, /var, /tmp and /usr by hitting 'm' on each label.&lt;br /&gt;
&lt;br /&gt;
  /diskless_ro  512MB&lt;br /&gt;
  /diskless_rw  1GB    minimum&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I find the best way to get this working is to break it down in to small steps and get each step working independantly.  IE: Setup NFS and see if you can mount it from another FreeBSD machine, don't just assume it will work and boot your PXE-Boot machine.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Throughout my documentation&lt;br /&gt;
&lt;br /&gt;
192.168.1.1 = the Server&lt;br /&gt;
&lt;br /&gt;
192.168.1.2 = the client (may be a full freebsd system or pxeboot)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At this point I normally install fluxbox with the following line:&lt;br /&gt;
&lt;br /&gt;
shell# pkg_add -r fluxbox-devel&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
change your ~/.xinitrc file to the following:&lt;br /&gt;
&lt;br /&gt;
startfluxbox&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Use the following command to update your fluxbox menus:&lt;br /&gt;
&lt;br /&gt;
shell$ fluxbox-generate_menu&lt;br /&gt;
&lt;br /&gt;
==Running a single application==&lt;br /&gt;
&lt;br /&gt;
To get started I have my server setup running FreeBSD, with X-Windows and a few applications.  Nothing too special.  Then I have my client PC, which to start off I used the freesbie 1.1 boot CD to perform these initial tests.  You can get this from www.freesbie.org.  I entered into fluxbox, but you could equally use xfce4.&lt;br /&gt;
&lt;br /&gt;
You must allow incoming connections this is done with two commands&lt;br /&gt;
&lt;br /&gt;
 client# startx -listen_tcp&lt;br /&gt;
 client# xhost +&lt;br /&gt;
&lt;br /&gt;
This allows all computers to start applications on your client PC.  It's dangerous but good for testing everything is setup correctly.&lt;br /&gt;
&lt;br /&gt;
 client# ssh &amp;lt;server user@server ip&amp;gt;&lt;br /&gt;
 eg: ssh mick@192.168.1.1&lt;br /&gt;
&lt;br /&gt;
 ssh$ setenv DISPLAY '192.168.1.2:0'&lt;br /&gt;
&lt;br /&gt;
Or if your running bash:&lt;br /&gt;
 ssh$ DISPLAY=&amp;lt;client ip&amp;gt;:&amp;lt;client display&amp;gt;; export DISPLAY&lt;br /&gt;
 eg: DISPLAY=192.168.1.2:0; export DISPLAY&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 ssh$ xcalc &amp;amp;&lt;br /&gt;
&lt;br /&gt;
This should display on your client&lt;br /&gt;
&lt;br /&gt;
==Running a whole X Windows Session (XDM)==&lt;br /&gt;
This sets up a server so that you can share your X session with any clients which want to connect.  (Simular to Terminal Services under windows)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===server===&lt;br /&gt;
edit:&lt;br /&gt;
 /usr/X11R6/lib/X11/xdm/xdm-config&lt;br /&gt;
&lt;br /&gt;
comment out with a '!' the request line&amp;lt;br&amp;gt;&lt;br /&gt;
 DisplayManager.requestPort: 0&lt;br /&gt;
&lt;br /&gt;
edit:&amp;lt;br&amp;gt;&lt;br /&gt;
 /usr/X11R6/lib/X11/xdm/Xaccess&lt;br /&gt;
&lt;br /&gt;
Enter a single asterisk any where in the file, so the contents should be one asterisk and the rest commented out.  There should be an asterisk on line 49 which you can uncomment.&lt;br /&gt;
&lt;br /&gt;
Whilst in the /usr/X11R6/lib/X11/xdm directory do these commands:&lt;br /&gt;
shell# vi Xstartup&lt;br /&gt;
&lt;br /&gt;
Add into this file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
#&lt;br /&gt;
# Xstartup&lt;br /&gt;
#&lt;br /&gt;
# This program is run as root after the user is verified&lt;br /&gt;
#&lt;br /&gt;
if [ -f /etc/nologin ]; then&lt;br /&gt;
   xmessage -file /etc/nologin -timeout 30 -center&lt;br /&gt;
   exit 1&lt;br /&gt;
fi&lt;br /&gt;
sessreg -a -l $DISPLAY -x /usr/X11R6/lib/xdm/Xservers $LOGNAME&lt;br /&gt;
/usr/X11R6/lib/xdm/GiveConsole&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
shell# chmod +x Xstartup&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Make sure your firewall has all traffic for you lan.  (Need to know which exact ports to allow).&lt;br /&gt;
&lt;br /&gt;
create ~/.xsession for each user which requires access and enter your start up for x &lt;br /&gt;
eg:&lt;br /&gt;
&lt;br /&gt;
 startkde&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;run xdm on server as root&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can put this xdm into the /etc/ttys so that it starts automatically on boot up.&lt;br /&gt;
&lt;br /&gt;
===client===&lt;br /&gt;
make sure your not in X&lt;br /&gt;
&lt;br /&gt;
type this command:&lt;br /&gt;
&lt;br /&gt;
 shell# X -broadcast&lt;br /&gt;
&lt;br /&gt;
This assumes that you are running only one server.&lt;br /&gt;
Otherwise use:&lt;br /&gt;
&lt;br /&gt;
 shell# X -query 192.168.1.1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==DHCP - Install and setup==&lt;br /&gt;
Server setup.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
install /usr/ports/net/isc-dhcp3-server&lt;br /&gt;
&lt;br /&gt;
We do this so we can define the root path for the diskless system.&lt;br /&gt;
&lt;br /&gt;
copy /usr/local/etc/dhcpd.conf.sample to /usr/local/etc/dhcpd.conf&lt;br /&gt;
&lt;br /&gt;
edit /usr/local/etc/dhcpd.conf and make sure it has these lines in it.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# dhcpd.conf&lt;br /&gt;
#&lt;br /&gt;
# Sample configuration file for ISC dhcpd&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
# option definitions common to all supported networks...&lt;br /&gt;
#option domain-name &amp;quot;example.org&amp;quot;;&lt;br /&gt;
#option domain-name-servers ns1.example.org, ns2.example.org;&lt;br /&gt;
&lt;br /&gt;
default-lease-time 3600;&lt;br /&gt;
max-lease-time 86400;&lt;br /&gt;
&lt;br /&gt;
# If this DHCP server is the official DHCP server for the local&lt;br /&gt;
# network, the authoritative directive should be uncommented.&lt;br /&gt;
authoritative;&lt;br /&gt;
&lt;br /&gt;
# ad-hoc DNS update scheme - set to &amp;quot;none&amp;quot; to disable dynamic DNS updates.&lt;br /&gt;
ddns-update-style none;&lt;br /&gt;
&lt;br /&gt;
option root-path &amp;quot;192.168.1.1:/diskless_ro&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
# lines added for pxeboot client&lt;br /&gt;
use-host-decl-names on;&lt;br /&gt;
next-server 192.168.1.1;&lt;br /&gt;
filename &amp;quot;pxeboot&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
# Use this to send dhcp log messages to a different log file (you also&lt;br /&gt;
# have to hack syslog.conf to complete the redirection).&lt;br /&gt;
log-facility local7;&lt;br /&gt;
&lt;br /&gt;
# No service will be given on this subnet, but declaring it helps the&lt;br /&gt;
# DHCP server to understand the network topology.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# This is a very basic subnet declaration.&lt;br /&gt;
&lt;br /&gt;
subnet 192.168.1.0 netmask 255.255.255.0 {&lt;br /&gt;
  range 192.168.1.10 192.168.1.20;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create the leases file&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# touch /var/db/dhcpd.leases&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Restart the daemon&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# killall dhcpd&lt;br /&gt;
# dhcpd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add to /etc/rc.conf&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dhcpd_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==TFTP Setup==&lt;br /&gt;
TFTP helps us transport the kernel to the PXE-Boot machines.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# mkdir /tftpboot&lt;br /&gt;
# cp /boot/pxeboot /tftpboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Uncomment the following line in /etc/inetd.conf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tftp    dgram   udp     wait    root    /usr/libexec/tftpd      tftpd -l -s /tftpboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart the inetd service&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# killall -HUP inetd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If inetd has not started automatically do the following:&lt;br /&gt;
&lt;br /&gt;
Add the following to /etc/rc.conf&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
inetd_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now start inetd manually.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# inetd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test===&lt;br /&gt;
To test that tftp has loaded type the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# sockstat -4l | grep 69 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and you should see this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
root      inetd       13719 5   udp4    *:69                 *:*&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==NFS Setup==&lt;br /&gt;
Network File System.  Here we share all the directories from the server so that the diskless clients see these drives as if those directories were the diskless client's.&lt;br /&gt;
&lt;br /&gt;
===Server Setup===&lt;br /&gt;
If you forgot to select 'Yes' to NFS server setup in the FreeBSD installation then you have to setup the server manually like so:&lt;br /&gt;
&lt;br /&gt;
Enable NFS /etc/rc.conf&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rpcbind_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
nfs_server_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test===&lt;br /&gt;
A quick test to see if your NFS server is acting normal:&lt;br /&gt;
&lt;br /&gt;
Edit the /etc/exports and add the following&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/usr       -alldirs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This allows anyone to connect to your /usr mount.&lt;br /&gt;
&lt;br /&gt;
Now run these commands to restart and view your mounts&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# kill -HUP `cat /var/run/mountd.pid`&lt;br /&gt;
# showmount -e&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now try and mount it from a client running BSD&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# mount -t nfs 192.168.1.1:/usr /mnt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Server exports setup===&lt;br /&gt;
&lt;br /&gt;
Make directories for each IP for your clients&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /diskless_rw&lt;br /&gt;
# mkdir 192.168.1.2&lt;br /&gt;
# cd 192.168.1.2&lt;br /&gt;
# mkdir etc var&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Configure /etc/exports&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# file systems accessible only for reading:&lt;br /&gt;
# Original way of linking up the /usr&lt;br /&gt;
#/usr -ro -maproot=0 -network 192.168.1.0 -mask 255.255.255.0&lt;br /&gt;
&lt;br /&gt;
/usr -network 192.168.1.0 -mask 255.255.255.0&lt;br /&gt;
/diskless_ro -ro -maproot=0 -network 192.168.1.0 -mask 255.255.255.0&lt;br /&gt;
/diskless_rw/192.168.1.2/etc /diskless_rw/192.168.1.2/var -maproot=root 192.168.1.2&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restarting NFS&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# kill -HUP `cat /var/run/mountd.pid`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If NFS is not started yet do the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
data# rpcbind&lt;br /&gt;
data# nfsd -u -t -n 20 -h 192.168.1.1&lt;br /&gt;
data# mountd -r&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Testing to see if the exports are correct&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
data# showmount -e&lt;br /&gt;
Exports list on localhost:&lt;br /&gt;
/usr                              192.168.1.0&lt;br /&gt;
/diskless_rw/192.168.1.2/var      192.168.1.2&lt;br /&gt;
/diskless_rw/192.168.1.2/etc      192.168.1.2&lt;br /&gt;
/diskless_ro                      192.168.1.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Setup diskless_rw==&lt;br /&gt;
Create directories&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /diskless_rw/192.168.1.2/etc&lt;br /&gt;
# mkdir pam.d X11&lt;br /&gt;
&lt;br /&gt;
# cd /diskless_rw/192.168.1.2/var&lt;br /&gt;
# mkdir home log run tmp&lt;br /&gt;
# chmod 1777 tmp&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a swap file in the var directory for the client&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# dd if=/dev/zero of=/diskless_rw/192.168.1.2/var/swap bs=1k count=32000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in the /diskless_rw/&amp;lt;ip&amp;gt;/var/log directory I created the following log files so that syslogd would have files to write to:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /diskless_rw/192.168.1.2/var/log&lt;br /&gt;
# touch messages security auth.log maillog lpd-errs xferlog cron debug.log slip.log ppp.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy the following files from the systems /etc directory to /diskless_rw/&amp;lt;client ip&amp;gt;/etc&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
auth.conf&lt;br /&gt;
disktab&lt;br /&gt;
gettytab&lt;br /&gt;
group&lt;br /&gt;
hosts&lt;br /&gt;
login.access&lt;br /&gt;
login.conf&lt;br /&gt;
login.conf.db&lt;br /&gt;
master.passwd&lt;br /&gt;
netconfig&lt;br /&gt;
protocols&lt;br /&gt;
pwd.db&lt;br /&gt;
services&lt;br /&gt;
spwd.db&lt;br /&gt;
syslog.conf&lt;br /&gt;
termcap -&amp;gt; /usr/share/misc/termcap&lt;br /&gt;
ttys&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy /diskless_ro/etc/rc to /diskless_rw/&amp;lt;client ip&amp;gt;/etc&lt;br /&gt;
&lt;br /&gt;
==Setup diskless_ro==&lt;br /&gt;
This is the common root mount for all pxe-boot clients.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cp -rv /bin /lib /libexec /sbin /diskless_ro&lt;br /&gt;
# mkdir /diskless_ro/usr&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy the kernel accross.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cp -rv /boot /diskless_ro&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For some client machines you may have to disable the ACPI (Power management) in the /diskless_ro/boot/device.hints&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
hint.acpi.0.disabled=&amp;quot;1&amp;quot; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make a dev so that clients can boot without freezing.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# mkdir /diskless_ro/dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make a directory so that we can mount var from the /diskless_rw/&amp;lt;client ip&amp;gt;/var&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# mkdir /diskless_ro/var&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
So we can use the systems /var/tmp and /usr/home directory make soft links to them&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /diskless_ro&lt;br /&gt;
# ln -s /var/tmp .&lt;br /&gt;
# ln -s /usr/home .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We require a few files from the systems /etc directory to be copied into the /diskless_ro/etc for common use between the thin clients.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# mkdir /diskless_ro/etc&lt;br /&gt;
# cp /etc/services /etc/netconfig /etc/login.conf /diskless_ro/etc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===rc file===&lt;br /&gt;
The /diskless_ro/etc/rc file is the first file which is ran after the kernel has loaded.  Here we mount a the labels from the server.&lt;br /&gt;
&lt;br /&gt;
Create the /diskless_ro/etc/rc&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin; export PATH&lt;br /&gt;
TMPDIR=~/tmp;export TMPDIR&lt;br /&gt;
TMP=~/tmp;export TMP&lt;br /&gt;
&lt;br /&gt;
mount -t nfs 192.168.0.1:/usr /usr&lt;br /&gt;
&lt;br /&gt;
boot_ip=`/sbin/ifconfig | /usr/bin/grep &amp;quot;inet &amp;quot; | /usr/bin/grep -v 127.0.0.1 |&lt;br /&gt;
/usr/bin/awk '{print $2}'`&lt;br /&gt;
mount -t nfs 192.168.0.1:/diskless_rw/${boot_ip}/etc /etc&lt;br /&gt;
mount -t nfs 192.168.0.1:/diskless_rw/${boot_ip}/var /var&lt;br /&gt;
&lt;br /&gt;
swapon /var/swap&lt;br /&gt;
&lt;br /&gt;
#rm -rf /var/tmp/*&lt;br /&gt;
#rm -rf /var/tmp/.*&lt;br /&gt;
&lt;br /&gt;
X -query 192.168.0.1&lt;br /&gt;
&lt;br /&gt;
. /etc/rc2&lt;br /&gt;
exit 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===rc2 file===&lt;br /&gt;
This sets up some links for libraries and the logging daemon.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
mount -a&lt;br /&gt;
/sbin/ldconfig -elf /usr/lib/compat /usr/X11R6/lib /usr/local/lib&lt;br /&gt;
&lt;br /&gt;
syslogd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now change permissions so rc can run.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# chmod +x rc*&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Using a seperate DHCP server==&lt;br /&gt;
If you already have a DHCP server and you want to use that instead then you have to do these steps.&lt;br /&gt;
&lt;br /&gt;
===On the Xserver===&lt;br /&gt;
1. stop dhcpd&lt;br /&gt;
2. remove dhcpd from /etc/rc.conf&lt;br /&gt;
3. change your IP address to dhcp or static&lt;br /&gt;
4. Change your /diskless_ro/etc/rc file so that it mounts from the new Xserver IP&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===On your DHCP Server===&lt;br /&gt;
1. edit /usr/local/etc/dhcpd.conf and add the following&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
authoritative;&lt;br /&gt;
ddns-update-style none;&lt;br /&gt;
&lt;br /&gt;
option root-path &amp;quot;&amp;lt;X Server IP&amp;gt;:/diskless_ro&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
# lines added for pxeboot client&lt;br /&gt;
use-host-decl-names on;&lt;br /&gt;
next-server &amp;lt;X Server IP&amp;gt;;&lt;br /&gt;
filename &amp;quot;pxeboot&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
2. stop dhcpd&lt;br /&gt;
3. start dhcpd&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Client===&lt;br /&gt;
Your client should boot now just remember that you may get a different IP now that you are talking to a different DHCP server so you have to change your exports file and copy accross a directory in /diskless_rw for the new IP.  All this is done on the X Server.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==GRUB Floppy boot (optional)==&lt;br /&gt;
&lt;br /&gt;
(would like to compile this ourselves later)&lt;br /&gt;
To get started we downloaded the image from www.hp.uab.edu/~ed/grub-net&lt;br /&gt;
&lt;br /&gt;
 shell# dd if=/data/grub-net.img of=/dev/fd0&lt;br /&gt;
&lt;br /&gt;
Then we mounted it as msdos&lt;br /&gt;
Remove/rename menu.1st from the grub directory as it was doing something funny with it.  We think that it was looking for a tftp server through our dhcp and we don't have a the dhcp setup correctly here, so we wanted to do it manually.&lt;br /&gt;
&lt;br /&gt;
Reboot off the floppy now..&lt;br /&gt;
&lt;br /&gt;
 grub&amp;gt; ifconfig --address=192.168.1.2 --mask=255.255.255.0 --gateway=192.168.1.1&lt;br /&gt;
 --server=192.168.1.2&lt;br /&gt;
&lt;br /&gt;
OR you can use dhcp&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 grub&amp;gt; dhcp&amp;lt;br&amp;gt; &lt;br /&gt;
 grub&amp;gt; tftpserver 192.168.1.2&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Setup tftp on your server, we created a directory /tftpboot. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Starting diskless system through GRUB===&lt;br /&gt;
This is an alternative boot loader.  You can use this for testing, if you don't have a pxeboot chip, otherwise skip this section.&lt;br /&gt;
&lt;br /&gt;
These commands are half working...&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 grub&amp;gt; root (nd)&amp;lt;br&amp;gt;&lt;br /&gt;
 grub&amp;gt; kernel /kernel root=ad0s1a&amp;lt;br&amp;gt;&lt;br /&gt;
 grub&amp;gt; pxeboot&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Completely Diskless System (PXEBOOT ROM) (optional)==&lt;br /&gt;
&lt;br /&gt;
Running completely diskless by booting from a Network ROM Chip.&lt;br /&gt;
&lt;br /&gt;
We have now got a Intel GD82559 Etherexpress pro/100 Card.&lt;br /&gt;
&lt;br /&gt;
When we boot up on the client machine with that card it displays:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Intel UNDI, PXE-2.0 (build 067)&amp;lt;br /&amp;gt;&lt;br /&gt;
Copyright (C) 1997-1998 Intel Corporation&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Which we cannot get working so we have read that you have to update this version to Build 82.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
copy /boot/pxeboot to /tftpboot directory we made before&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
- Downloaded proboot.exe from support.intel.com and unpacked into a windows box.&amp;lt;br /&amp;gt;&lt;br /&gt;
- Copied ibautil.exe onto a windows 98 boot disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
- Rebooted the test box after disabling network boot on the nic (otherwise it'll kick in before the floppy).&amp;lt;br /&amp;gt;&lt;br /&gt;
- Ran ibautil -iv to see what embedded image versions were available:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Intel(R) Boot Agent XG v1.0.09&amp;lt;br /&amp;gt;&lt;br /&gt;
Intel(R) Boot Agent GE v1.2.36&amp;lt;br /&amp;gt;&lt;br /&gt;
Intel(R) Boot Agent FE v4.1.19&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
- Ran ibautil -up to perform the image upgrade.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
It's interesting to note that no version showed up for out intel nic when initially running ibautil. After the upgrade, however, the version corectly showed as 4.1.19.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I made sure that I had simular features to this in my dhcpd.conf file:&amp;lt;br /&amp;gt;&lt;br /&gt;
option broadcast-address 192.168.254.255;&amp;lt;br /&amp;gt;&lt;br /&gt;
option domain-name-servers 192.168.254.3;&amp;lt;br /&amp;gt;&lt;br /&gt;
option domain-name &amp;quot;simerson.net&amp;quot;;&amp;lt;br /&amp;gt;&lt;br /&gt;
option routers 192.168.254.1;&amp;lt;br /&amp;gt;&lt;br /&gt;
option subnet-mask 255.255.255.0;&amp;lt;br /&amp;gt;&lt;br /&gt;
server-name &amp;quot;pxe-gw&amp;quot;;&amp;lt;br /&amp;gt;&lt;br /&gt;
server-identifier 192.168.254.3;&amp;lt;br /&amp;gt;&lt;br /&gt;
next-server 192.168.254.3;&amp;lt;br /&amp;gt;&lt;br /&gt;
default-lease-time -1;&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
subnet 192.168.254.0 netmask 255.255.255.0 {&amp;lt;br /&amp;gt;&lt;br /&gt;
range 192.168.254.32 192.168.254.99;&amp;lt;br /&amp;gt;&lt;br /&gt;
option root-path &amp;quot;/usr/local/export/pxe&amp;quot;;&amp;lt;br /&amp;gt;&lt;br /&gt;
filename &amp;quot;pxeboot&amp;quot;;&amp;lt;br /&amp;gt;&lt;br /&gt;
}&amp;lt;br /&amp;gt;&lt;br /&gt;
host cm.simerson.net {&amp;lt;br /&amp;gt;&lt;br /&gt;
hardware ethernet 00:e0:18:98:f0:cc;&amp;lt;br /&amp;gt;&lt;br /&gt;
fixed-address 192.168.254.126;&amp;lt;br /&amp;gt;&lt;br /&gt;
}&amp;lt;br /&amp;gt;&lt;br /&gt;
host c1.simerson.net {&amp;lt;br /&amp;gt;&lt;br /&gt;
hardware ethernet 00:60:97:0e:bb:a7;&amp;lt;br /&amp;gt;&lt;br /&gt;
fixed-address 192.168.254.131;&amp;lt;br /&amp;gt;&lt;br /&gt;
}&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==X config notes==&lt;br /&gt;
On the X server the /etc/X11/xorg.conf file is only used for the X server not the clients.&lt;br /&gt;
&lt;br /&gt;
To use this same configuration for your X Terminal Clients copy this file to /diskless_rw/&amp;lt;Client IP&amp;gt;/etc/X11 and it will use it.&lt;br /&gt;
&lt;br /&gt;
==Starting X on the client==&lt;br /&gt;
There are two ways of doing this and it depends on your hardware mainly.  &lt;br /&gt;
&lt;br /&gt;
1. run all programs on the server using the servers CPU and Memory this we will call the 'XDM Method'&lt;br /&gt;
2. run all programs from the NFS mounts using the clients CPU and Memory but the HD of the server, this we will call the 'NFS Method'&lt;br /&gt;
&lt;br /&gt;
Both methods will boot from PXE-Boot and can be diskless.&lt;br /&gt;
&lt;br /&gt;
===XDM Method===&lt;br /&gt;
Recommended for machines less than 1Ghz 256MB&lt;br /&gt;
&lt;br /&gt;
This is quite simple to setup.  Change your rc file in the /diskless_ro/etc directory to have this line at the end:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
X -query &amp;lt;server ip&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also type this command at the command line on the client to test before hand.&lt;br /&gt;
&lt;br /&gt;
===NFS Method===&lt;br /&gt;
Recommended for machines over 1Ghz 256MB or if you want to utilise any of the clients devices such as local HD, USB, CD/DVD burners, etc.&lt;br /&gt;
&lt;br /&gt;
This is much trickier.&lt;br /&gt;
&lt;br /&gt;
Log in&lt;br /&gt;
Now type 'startx' at the command line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==todo==&lt;br /&gt;
Here are some of the jobs left to do to make this secure or generally better:&lt;br /&gt;
&lt;br /&gt;
- If you don't configure your clients to run xdm it will put you at the text login.  The problem here is people can login as root without a password for some reason.  If the user hits &amp;lt;Ctrl&amp;gt;&amp;lt;Alt&amp;gt;&amp;lt;Back space&amp;gt; then it will crash them out to a login screen which the user could then login as root with out a password, not good!&lt;br /&gt;
&lt;br /&gt;
- Make the clients use their MEM and their CPU to run the applications. We still want all the files to be on the Applications to be on the X server but we want to utilise the power of distributed computering.&lt;br /&gt;
&lt;br /&gt;
- Optimise the boot up sequence&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- There must be a simplier way to set this up if your going to use XDM in the end.  IE: do we need to do half of this tutorial if we are going to run XDM.&lt;br /&gt;
&lt;br /&gt;
- When the same user logs onto two seperate machines they cannot start firefox or thunderbird as it complains about being open somewhere else.  This assumes you have firefox and thunderbird already open on both machines that you logged onto.&lt;br /&gt;
&lt;br /&gt;
- HP-COMPAQ-T5525 thin client doesn't want to boot, it says it's missing libfreetype.so.9 which we do have it just cannot find it for some reason.  It's trying to use the VIA chipset for graphics which is different to all the other clients I've loaded successfully so far.&lt;br /&gt;
&lt;br /&gt;
- Get USB mice working instead of PS/2, this may fix the HP as well.&lt;br /&gt;
&lt;br /&gt;
===Keyboard repeating on notebooks====&lt;br /&gt;
- typing on some keyboards (like my notebook) causes double characters to display if you type too fast. - This is the notebook, if you go and set the KDE Accessabiltiy options and set the keyboard rate to 50ms, this fixes the problem.&lt;br /&gt;
&lt;br /&gt;
===USB mouse===&lt;br /&gt;
&lt;br /&gt;
Editing /etc/devd.conf file and searched for ums&lt;br /&gt;
remarked out the action line.&lt;br /&gt;
 &lt;br /&gt;
rebooted.&lt;br /&gt;
 &lt;br /&gt;
Someone off IRC suggested that I build a GENERIC xorg.conf file which has vesa, usb mouse and ps/2 mouse configurations through it.&lt;br /&gt;
 &lt;br /&gt;
I reverted everything back to normal ps/2 mouse config, copying my usb config files to the following:&lt;br /&gt;
/etc/devd.conf_usb&lt;br /&gt;
/etc/rc.conf_usb&lt;br /&gt;
/etc/X11/xorg.conf_usb&lt;br /&gt;
 &lt;br /&gt;
I think we need a seperate configuration for the HP, it uses a weird display driver.&lt;br /&gt;
&lt;br /&gt;
==links==&lt;br /&gt;
&lt;br /&gt;
http://www.onlamp.com/pub/a/bsd/2004/09/09/diskless_server.html&lt;br /&gt;
&lt;br /&gt;
http://www.onlamp.com/pub/a/bsd/2004/09/30/diskless_clients.html&lt;br /&gt;
&lt;br /&gt;
http://people.freebsd.org/~alfred/pxe/en_US.ISO8859-1/articles/pxe/article.html&lt;br /&gt;
&lt;br /&gt;
http://www.the-labs.com/FreeBSD/Diskless/&lt;br /&gt;
&lt;br /&gt;
http://www.nber.org/sys-admin/FreeBSD-diskless.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://wikitest.freebsd.org/MarkusBoelter&lt;br /&gt;
&lt;br /&gt;
http://www.daemonsecurity.com/pub/pxeboot/&lt;br /&gt;
&lt;br /&gt;
http://www.kano.org.uk/projects/pxe/&lt;br /&gt;
&lt;br /&gt;
File Examples:&lt;br /&gt;
&lt;br /&gt;
http://www.watson.org/~robert/freebsd/pxe/&lt;br /&gt;
&lt;br /&gt;
[[Category:FreeBSD_for_Workstations]]&lt;/div&gt;</summary>
		<author><name>165.228.0.35</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/X_Windows_Terminal</id>
		<title>X Windows Terminal</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/X_Windows_Terminal"/>
				<updated>2006-07-13T03:17:03Z</updated>
		
		<summary type="html">&lt;p&gt;165.228.0.35: /* Running a single application */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Advantages==&lt;br /&gt;
X Windows can be used in a Server-Client relationship.  By setting up your X Windows Server you allow the use of all the programs on that computer to all the client PC's.  &lt;br /&gt;
&lt;br /&gt;
There are many advantages of running client computers in this manner:&lt;br /&gt;
* They don't even need a hard drive.  &lt;br /&gt;
* It's silent as there are no moving parts&lt;br /&gt;
* The solution saves power as your computers are very thin.&lt;br /&gt;
* Everything can be backed up centrally.&lt;br /&gt;
* Boot times for client PC's are the fastest around.&lt;br /&gt;
* Clients don't need much CPU speed, memory, etc.  Because of this they would be very cheap.  You could get away with using a Pentium 100Mhz with 32MB ram, no hard drive, no CD-ROM, no Floppy and a fanless power supply.  You just need a ethernet card with a PXEBOOT ROM.&lt;br /&gt;
&lt;br /&gt;
==From the Beginning==&lt;br /&gt;
I've based this document on FreeBSD 6.1.&lt;br /&gt;
&lt;br /&gt;
Install FreeBSD 6.1 as per usual.&lt;br /&gt;
I've setup my mount points as this:&lt;br /&gt;
  Swap (equal to how much memory I have in my machine)&lt;br /&gt;
  /    The rest of the hard drive&lt;br /&gt;
&lt;br /&gt;
I've made one big '/' label as I want to put all my config files for the clients into that label.&lt;br /&gt;
&lt;br /&gt;
Select User-X install.&lt;br /&gt;
&lt;br /&gt;
Select SSH Server and NFS Server in the installation process&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I find the best way to get this working is to break it down in to small steps and get each step working independantly.  IE: Setup NFS and see if you can mount it from another FreeBSD machine, don't just assume it will work and boot your PXE-Boot machine.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Throughout my documentation&lt;br /&gt;
192.168.1.1 = the Server&lt;br /&gt;
192.168.1.1 = the client (may be a full freebsd system or pxeboot)&lt;br /&gt;
&lt;br /&gt;
==Running a single application==&lt;br /&gt;
&lt;br /&gt;
To get started I have my server setup running FreeBSD, with X-Windows and a few applications.  Nothing too special.  Then I have my client PC, which to start off I used the freesbie 1.1 boot CD to perform these initial tests.  You can get this from www.freesbie.org.  I entered into fluxbox, but you could equally use xfce4.&lt;br /&gt;
&lt;br /&gt;
 client# xhost +&lt;br /&gt;
&lt;br /&gt;
This allows all computers to start applications on your client PC.  It's dangerous but good for testing everything is setup correctly.&lt;br /&gt;
&lt;br /&gt;
 client# ssh &amp;lt;server user@server ip&amp;gt;&lt;br /&gt;
 eg: ssh mick@192.168.1.1&lt;br /&gt;
&lt;br /&gt;
 ssh$ setenv DISPLAY '192.168.1.2:0'&lt;br /&gt;
&lt;br /&gt;
Or if your running bash:&lt;br /&gt;
 ssh$ DISPLAY=&amp;lt;client ip&amp;gt;:&amp;lt;client display&amp;gt;; export DISPLAY&lt;br /&gt;
 eg: DISPLAY=192.168.1.2:0; export DISPLAY&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 ssh$ xcalc &amp;amp;&lt;br /&gt;
&lt;br /&gt;
This should display on your client&lt;br /&gt;
&lt;br /&gt;
==Running a whole X Windows Session (XDM)==&lt;br /&gt;
This sets up a server so that you can share your X session with any clients which want to connect.  (Simular to Terminal Services under windows)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===server===&lt;br /&gt;
edit:&lt;br /&gt;
 /usr/X11R6/lib/X11/xdm/xdm-config&lt;br /&gt;
&lt;br /&gt;
comment out with a '!' the request line&amp;lt;br&amp;gt;&lt;br /&gt;
 DisplayManager.requestPort: 0&lt;br /&gt;
&lt;br /&gt;
edit:&amp;lt;br&amp;gt;&lt;br /&gt;
 /usr/X11R6/lib/X11/xdm/Xaccess&lt;br /&gt;
&lt;br /&gt;
to have a single asterisk any where in the file, so the contents should be one asterisk and the rest commented out.&lt;br /&gt;
&lt;br /&gt;
Make sure your firewall has all traffic for you lan.  (Need to know which exact ports to allow).&lt;br /&gt;
&lt;br /&gt;
create ~/.xsession for each user which requires access and enter your start up for x &lt;br /&gt;
eg:&lt;br /&gt;
&lt;br /&gt;
 shell#!/bin/sh&amp;lt;br&amp;gt;&lt;br /&gt;
 startkde&lt;br /&gt;
&lt;br /&gt;
run xdm on server as root&lt;br /&gt;
&lt;br /&gt;
===client===&lt;br /&gt;
make sure your not in X&lt;br /&gt;
&lt;br /&gt;
type this command:&lt;br /&gt;
&lt;br /&gt;
 shell# X -broadcast&lt;br /&gt;
&lt;br /&gt;
This assumes that you are running only one server.&lt;br /&gt;
Otherwise use:&lt;br /&gt;
&lt;br /&gt;
 shell# X -query 192.168.1.2&lt;br /&gt;
&lt;br /&gt;
==GRUB Floppy boot==&lt;br /&gt;
&lt;br /&gt;
(would like to compile this ourselves later)&lt;br /&gt;
To get started we downloaded the image from www.hp.uab.edu/~ed/grub-net&lt;br /&gt;
&lt;br /&gt;
 shell# dd if=/data/grub-net.img of=/dev/fd0&lt;br /&gt;
&lt;br /&gt;
Then we mounted it as msdos&lt;br /&gt;
Remove/rename menu.1st from the grub directory as it was doing something funny with it.  We think that it was looking for a tftp server through our dhcp and we don't have a the dhcp setup correctly here, so we wanted to do it manually.&lt;br /&gt;
&lt;br /&gt;
Reboot off the floppy now..&lt;br /&gt;
&lt;br /&gt;
 grub&amp;gt; ifconfig --address=192.168.1.2 --mask=255.255.255.0 --gateway=192.168.1.1&lt;br /&gt;
 --server=192.168.1.2&lt;br /&gt;
&lt;br /&gt;
OR you can use dhcp&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 grub&amp;gt; dhcp&amp;lt;br&amp;gt; &lt;br /&gt;
 grub&amp;gt; tftpserver 192.168.1.2&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Setup tftp on your server, we created a directory /tftpboot. &lt;br /&gt;
&lt;br /&gt;
===Install and setup dhcp===&lt;br /&gt;
Server setup.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
install /usr/ports/net/isc-dhcp3-server&lt;br /&gt;
&lt;br /&gt;
We do this so we can define the root path for the diskless system.&lt;br /&gt;
&lt;br /&gt;
edit /usr/local/etc/dhcpd.conf&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
option domain-name &amp;quot;iinet.net.au&amp;quot;;&lt;br /&gt;
option domain-name-servers 203.0.178.191;&lt;br /&gt;
&lt;br /&gt;
# The shared root file system of diskless workstation&lt;br /&gt;
option root-path &amp;quot;192.168.1.2:/diskless_ro&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
# The server from which to upload the initial boot-file (loads tftp server)&lt;br /&gt;
next-server 192.168.1.2;&lt;br /&gt;
&lt;br /&gt;
default-lease-time 3600;&lt;br /&gt;
max-lease-time 86400;&lt;br /&gt;
ddns-update-style none;&lt;br /&gt;
&lt;br /&gt;
subnet 192.168.1.0 netmask 255.255.255.0 {&lt;br /&gt;
        range 192.168.1.10 192.168.1.30;&lt;br /&gt;
&lt;br /&gt;
        # Set up default gateway&lt;br /&gt;
        option routers 192.168.1.1;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
shell# dhcpd&lt;br /&gt;
&lt;br /&gt;
===Setting NFS===&lt;br /&gt;
Network File System.  Here we share all the directories from the server so that the diskless clients see these drives as if those directories were the diskless client's.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# mkdir /diskless_ro&lt;br /&gt;
# chmod 444 /diskless_ro&lt;br /&gt;
&lt;br /&gt;
# mkdir /diskless_rw&lt;br /&gt;
# chmod 777 diskless_rw&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make directories for each IP for your clients&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /diskless_rw&lt;br /&gt;
# mkdir 192.168.1.XXX&lt;br /&gt;
# cd 192.168.1.XXX&lt;br /&gt;
# mkdir etc var&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enable NFS /etc/rc.conf&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rpcbind_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
nfs_server_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
nfs_server_flags=&amp;quot;-u -t -n 20 -h 192.168.1.2&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Configure /etc/exports&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# file systems accessible only for reading:&lt;br /&gt;
/usr -ro -maproot=0 -network 192.168.1.0 -mask 255.255.255.0&lt;br /&gt;
/diskless_ro -ro -maproot=0 -network 192.168.1.0&lt;br /&gt;
        -mask 255.255.255.0&lt;br /&gt;
&lt;br /&gt;
# file systems accessible for writing. All the resources&lt;br /&gt;
# given to every diskless station are specified by one line:&lt;br /&gt;
#&lt;br /&gt;
# Diskless-20&lt;br /&gt;
/diskless_rw/192.168.1.20/etc /diskless_rw/192.168.1.20/var \&lt;br /&gt;
        -mapall=root 192.168.1.20&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Starting NFS&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
data# rpcbind&lt;br /&gt;
data# nfsd -u -t -n 20 -h 192.168.1.2&lt;br /&gt;
data# mountd -r&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Testing to see if the exports are correct&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
data# showmount -e&lt;br /&gt;
Exports list on localhost:&lt;br /&gt;
/usr                               192.168.1.0&lt;br /&gt;
/diskless_rw/192.168.1.20/var      192.168.1.20&lt;br /&gt;
/diskless_rw/192.168.1.20/etc      192.168.1.20&lt;br /&gt;
/diskless_ro                       192.168.1.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Starting diskless system through GRUB===&lt;br /&gt;
This is an alternative boot loader.  You can use this for testing, if you don't have a pxeboot chip, otherwise skip this section.&lt;br /&gt;
&lt;br /&gt;
These commands are half working...&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 grub&amp;gt; root (nd)&amp;lt;br&amp;gt;&lt;br /&gt;
 grub&amp;gt; kernel /kernel root=ad0s1a&amp;lt;br&amp;gt;&lt;br /&gt;
 grub&amp;gt; pxeboot&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Completely Diskless System (PXEBOOT ROM)==&lt;br /&gt;
&lt;br /&gt;
Running completely diskless by booting from a Network ROM Chip.&lt;br /&gt;
&lt;br /&gt;
We have now got a Intel GD82559 Etherexpress pro/100 Card.&lt;br /&gt;
&lt;br /&gt;
When we boot up on the client machine with that card it displays:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Intel UNDI, PXE-2.0 (build 067)&amp;lt;br /&amp;gt;&lt;br /&gt;
Copyright (C) 1997-1998 Intel Corporation&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Which we cannot get working so we have read that you have to update this version to Build 82.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
copy /boot/pxeboot to /tftpboot directory we made before&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
- Downloaded proboot.exe from support.intel.com and unpacked into a windows box.&amp;lt;br /&amp;gt;&lt;br /&gt;
- Copied ibautil.exe onto a windows 98 boot disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
- Rebooted the test box after disabling network boot on the nic (otherwise it'll kick in before the floppy).&amp;lt;br /&amp;gt;&lt;br /&gt;
- Ran ibautil -iv to see what embedded image versions were available:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Intel(R) Boot Agent XG v1.0.09&amp;lt;br /&amp;gt;&lt;br /&gt;
Intel(R) Boot Agent GE v1.2.36&amp;lt;br /&amp;gt;&lt;br /&gt;
Intel(R) Boot Agent FE v4.1.19&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
- Ran ibautil -up to perform the image upgrade.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
It's interesting to note that no version showed up for out intel nic when initially running ibautil. After the upgrade, however, the version corectly showed as 4.1.19.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I made sure that I had simular features to this in my dhcpd.conf file:&amp;lt;br /&amp;gt;&lt;br /&gt;
option broadcast-address 192.168.254.255;&amp;lt;br /&amp;gt;&lt;br /&gt;
option domain-name-servers 192.168.254.3;&amp;lt;br /&amp;gt;&lt;br /&gt;
option domain-name &amp;quot;simerson.net&amp;quot;;&amp;lt;br /&amp;gt;&lt;br /&gt;
option routers 192.168.254.1;&amp;lt;br /&amp;gt;&lt;br /&gt;
option subnet-mask 255.255.255.0;&amp;lt;br /&amp;gt;&lt;br /&gt;
server-name &amp;quot;pxe-gw&amp;quot;;&amp;lt;br /&amp;gt;&lt;br /&gt;
server-identifier 192.168.254.3;&amp;lt;br /&amp;gt;&lt;br /&gt;
next-server 192.168.254.3;&amp;lt;br /&amp;gt;&lt;br /&gt;
default-lease-time -1;&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
subnet 192.168.254.0 netmask 255.255.255.0 {&amp;lt;br /&amp;gt;&lt;br /&gt;
range 192.168.254.32 192.168.254.99;&amp;lt;br /&amp;gt;&lt;br /&gt;
option root-path &amp;quot;/usr/local/export/pxe&amp;quot;;&amp;lt;br /&amp;gt;&lt;br /&gt;
filename &amp;quot;pxeboot&amp;quot;;&amp;lt;br /&amp;gt;&lt;br /&gt;
}&amp;lt;br /&amp;gt;&lt;br /&gt;
host cm.simerson.net {&amp;lt;br /&amp;gt;&lt;br /&gt;
hardware ethernet 00:e0:18:98:f0:cc;&amp;lt;br /&amp;gt;&lt;br /&gt;
fixed-address 192.168.254.126;&amp;lt;br /&amp;gt;&lt;br /&gt;
}&amp;lt;br /&amp;gt;&lt;br /&gt;
host c1.simerson.net {&amp;lt;br /&amp;gt;&lt;br /&gt;
hardware ethernet 00:60:97:0e:bb:a7;&amp;lt;br /&amp;gt;&lt;br /&gt;
fixed-address 192.168.254.131;&amp;lt;br /&amp;gt;&lt;br /&gt;
}&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==links==&lt;br /&gt;
&lt;br /&gt;
http://people.freebsd.org/~alfred/pxe/en_US.ISO8859-1/articles/pxe/article.html&lt;br /&gt;
&lt;br /&gt;
http://www.the-labs.com/FreeBSD/Diskless/&lt;br /&gt;
&lt;br /&gt;
http://www.nber.org/sys-admin/FreeBSD-diskless.html&lt;br /&gt;
&lt;br /&gt;
http://www.onlamp.com/pub/a/bsd/2004/09/09/diskless_server.html&lt;br /&gt;
&lt;br /&gt;
http://www.onlamp.com/pub/a/bsd/2004/09/30/diskless_clients.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://wikitest.freebsd.org/MarkusBoelter&lt;br /&gt;
&lt;br /&gt;
http://www.daemonsecurity.com/pub/pxeboot/&lt;br /&gt;
&lt;br /&gt;
http://www.kano.org.uk/projects/pxe/&lt;br /&gt;
&lt;br /&gt;
File Examples:&lt;br /&gt;
&lt;br /&gt;
http://www.watson.org/~robert/freebsd/pxe/&lt;br /&gt;
&lt;br /&gt;
[[Category:FreeBSD_for_Workstations]]&lt;/div&gt;</summary>
		<author><name>165.228.0.35</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/X_Windows_Terminal</id>
		<title>X Windows Terminal</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/X_Windows_Terminal"/>
				<updated>2006-07-13T03:16:13Z</updated>
		
		<summary type="html">&lt;p&gt;165.228.0.35: /* Running a single application */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Advantages==&lt;br /&gt;
X Windows can be used in a Server-Client relationship.  By setting up your X Windows Server you allow the use of all the programs on that computer to all the client PC's.  &lt;br /&gt;
&lt;br /&gt;
There are many advantages of running client computers in this manner:&lt;br /&gt;
* They don't even need a hard drive.  &lt;br /&gt;
* It's silent as there are no moving parts&lt;br /&gt;
* The solution saves power as your computers are very thin.&lt;br /&gt;
* Everything can be backed up centrally.&lt;br /&gt;
* Boot times for client PC's are the fastest around.&lt;br /&gt;
* Clients don't need much CPU speed, memory, etc.  Because of this they would be very cheap.  You could get away with using a Pentium 100Mhz with 32MB ram, no hard drive, no CD-ROM, no Floppy and a fanless power supply.  You just need a ethernet card with a PXEBOOT ROM.&lt;br /&gt;
&lt;br /&gt;
==From the Beginning==&lt;br /&gt;
I've based this document on FreeBSD 6.1.&lt;br /&gt;
&lt;br /&gt;
Install FreeBSD 6.1 as per usual.&lt;br /&gt;
I've setup my mount points as this:&lt;br /&gt;
  Swap (equal to how much memory I have in my machine)&lt;br /&gt;
  /    The rest of the hard drive&lt;br /&gt;
&lt;br /&gt;
I've made one big '/' label as I want to put all my config files for the clients into that label.&lt;br /&gt;
&lt;br /&gt;
Select User-X install.&lt;br /&gt;
&lt;br /&gt;
Select SSH Server and NFS Server in the installation process&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I find the best way to get this working is to break it down in to small steps and get each step working independantly.  IE: Setup NFS and see if you can mount it from another FreeBSD machine, don't just assume it will work and boot your PXE-Boot machine.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Throughout my documentation&lt;br /&gt;
192.168.1.1 = the Server&lt;br /&gt;
192.168.1.1 = the client (may be a full freebsd system or pxeboot)&lt;br /&gt;
&lt;br /&gt;
==Running a single application==&lt;br /&gt;
&lt;br /&gt;
To get started I have my server setup running FreeBSD, with X-Windows and a few applications.  Nothing too special.  Then I have my client PC, which to start off I used the freesbie 1.1 boot CD to perform these initial tests.  You can get this from www.freesbie.org.  I entered into fluxbox, but you could equally use xfce4.&lt;br /&gt;
&lt;br /&gt;
 client# xhost +&lt;br /&gt;
&lt;br /&gt;
This allows all computers to start applications on your client PC.  It's dangerous but good for testing everything is setup correctly.&lt;br /&gt;
&lt;br /&gt;
 client# ssh &amp;lt;server user@server ip&amp;gt;&lt;br /&gt;
 eg: ssh mick@192.168.1.1&lt;br /&gt;
&lt;br /&gt;
 ssh$ setenv DISPLAY '192.168.1.3:0'&lt;br /&gt;
&lt;br /&gt;
Or if your running bash:&lt;br /&gt;
 ssh$ DISPLAY=&amp;lt;client ip&amp;gt;:&amp;lt;client display&amp;gt;; export DISPLAY&lt;br /&gt;
 eg: DISPLAY=192.168.1.2:0; export DISPLAY&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 ssh$ xcalc &amp;amp;&lt;br /&gt;
&lt;br /&gt;
This should display on your client&lt;br /&gt;
&lt;br /&gt;
==Running a whole X Windows Session (XDM)==&lt;br /&gt;
This sets up a server so that you can share your X session with any clients which want to connect.  (Simular to Terminal Services under windows)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===server===&lt;br /&gt;
edit:&lt;br /&gt;
 /usr/X11R6/lib/X11/xdm/xdm-config&lt;br /&gt;
&lt;br /&gt;
comment out with a '!' the request line&amp;lt;br&amp;gt;&lt;br /&gt;
 DisplayManager.requestPort: 0&lt;br /&gt;
&lt;br /&gt;
edit:&amp;lt;br&amp;gt;&lt;br /&gt;
 /usr/X11R6/lib/X11/xdm/Xaccess&lt;br /&gt;
&lt;br /&gt;
to have a single asterisk any where in the file, so the contents should be one asterisk and the rest commented out.&lt;br /&gt;
&lt;br /&gt;
Make sure your firewall has all traffic for you lan.  (Need to know which exact ports to allow).&lt;br /&gt;
&lt;br /&gt;
create ~/.xsession for each user which requires access and enter your start up for x &lt;br /&gt;
eg:&lt;br /&gt;
&lt;br /&gt;
 shell#!/bin/sh&amp;lt;br&amp;gt;&lt;br /&gt;
 startkde&lt;br /&gt;
&lt;br /&gt;
run xdm on server as root&lt;br /&gt;
&lt;br /&gt;
===client===&lt;br /&gt;
make sure your not in X&lt;br /&gt;
&lt;br /&gt;
type this command:&lt;br /&gt;
&lt;br /&gt;
 shell# X -broadcast&lt;br /&gt;
&lt;br /&gt;
This assumes that you are running only one server.&lt;br /&gt;
Otherwise use:&lt;br /&gt;
&lt;br /&gt;
 shell# X -query 192.168.1.2&lt;br /&gt;
&lt;br /&gt;
==GRUB Floppy boot==&lt;br /&gt;
&lt;br /&gt;
(would like to compile this ourselves later)&lt;br /&gt;
To get started we downloaded the image from www.hp.uab.edu/~ed/grub-net&lt;br /&gt;
&lt;br /&gt;
 shell# dd if=/data/grub-net.img of=/dev/fd0&lt;br /&gt;
&lt;br /&gt;
Then we mounted it as msdos&lt;br /&gt;
Remove/rename menu.1st from the grub directory as it was doing something funny with it.  We think that it was looking for a tftp server through our dhcp and we don't have a the dhcp setup correctly here, so we wanted to do it manually.&lt;br /&gt;
&lt;br /&gt;
Reboot off the floppy now..&lt;br /&gt;
&lt;br /&gt;
 grub&amp;gt; ifconfig --address=192.168.1.2 --mask=255.255.255.0 --gateway=192.168.1.1&lt;br /&gt;
 --server=192.168.1.2&lt;br /&gt;
&lt;br /&gt;
OR you can use dhcp&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 grub&amp;gt; dhcp&amp;lt;br&amp;gt; &lt;br /&gt;
 grub&amp;gt; tftpserver 192.168.1.2&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Setup tftp on your server, we created a directory /tftpboot. &lt;br /&gt;
&lt;br /&gt;
===Install and setup dhcp===&lt;br /&gt;
Server setup.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
install /usr/ports/net/isc-dhcp3-server&lt;br /&gt;
&lt;br /&gt;
We do this so we can define the root path for the diskless system.&lt;br /&gt;
&lt;br /&gt;
edit /usr/local/etc/dhcpd.conf&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
option domain-name &amp;quot;iinet.net.au&amp;quot;;&lt;br /&gt;
option domain-name-servers 203.0.178.191;&lt;br /&gt;
&lt;br /&gt;
# The shared root file system of diskless workstation&lt;br /&gt;
option root-path &amp;quot;192.168.1.2:/diskless_ro&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
# The server from which to upload the initial boot-file (loads tftp server)&lt;br /&gt;
next-server 192.168.1.2;&lt;br /&gt;
&lt;br /&gt;
default-lease-time 3600;&lt;br /&gt;
max-lease-time 86400;&lt;br /&gt;
ddns-update-style none;&lt;br /&gt;
&lt;br /&gt;
subnet 192.168.1.0 netmask 255.255.255.0 {&lt;br /&gt;
        range 192.168.1.10 192.168.1.30;&lt;br /&gt;
&lt;br /&gt;
        # Set up default gateway&lt;br /&gt;
        option routers 192.168.1.1;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
shell# dhcpd&lt;br /&gt;
&lt;br /&gt;
===Setting NFS===&lt;br /&gt;
Network File System.  Here we share all the directories from the server so that the diskless clients see these drives as if those directories were the diskless client's.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# mkdir /diskless_ro&lt;br /&gt;
# chmod 444 /diskless_ro&lt;br /&gt;
&lt;br /&gt;
# mkdir /diskless_rw&lt;br /&gt;
# chmod 777 diskless_rw&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make directories for each IP for your clients&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /diskless_rw&lt;br /&gt;
# mkdir 192.168.1.XXX&lt;br /&gt;
# cd 192.168.1.XXX&lt;br /&gt;
# mkdir etc var&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enable NFS /etc/rc.conf&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rpcbind_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
nfs_server_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
nfs_server_flags=&amp;quot;-u -t -n 20 -h 192.168.1.2&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Configure /etc/exports&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# file systems accessible only for reading:&lt;br /&gt;
/usr -ro -maproot=0 -network 192.168.1.0 -mask 255.255.255.0&lt;br /&gt;
/diskless_ro -ro -maproot=0 -network 192.168.1.0&lt;br /&gt;
        -mask 255.255.255.0&lt;br /&gt;
&lt;br /&gt;
# file systems accessible for writing. All the resources&lt;br /&gt;
# given to every diskless station are specified by one line:&lt;br /&gt;
#&lt;br /&gt;
# Diskless-20&lt;br /&gt;
/diskless_rw/192.168.1.20/etc /diskless_rw/192.168.1.20/var \&lt;br /&gt;
        -mapall=root 192.168.1.20&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Starting NFS&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
data# rpcbind&lt;br /&gt;
data# nfsd -u -t -n 20 -h 192.168.1.2&lt;br /&gt;
data# mountd -r&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Testing to see if the exports are correct&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
data# showmount -e&lt;br /&gt;
Exports list on localhost:&lt;br /&gt;
/usr                               192.168.1.0&lt;br /&gt;
/diskless_rw/192.168.1.20/var      192.168.1.20&lt;br /&gt;
/diskless_rw/192.168.1.20/etc      192.168.1.20&lt;br /&gt;
/diskless_ro                       192.168.1.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Starting diskless system through GRUB===&lt;br /&gt;
This is an alternative boot loader.  You can use this for testing, if you don't have a pxeboot chip, otherwise skip this section.&lt;br /&gt;
&lt;br /&gt;
These commands are half working...&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 grub&amp;gt; root (nd)&amp;lt;br&amp;gt;&lt;br /&gt;
 grub&amp;gt; kernel /kernel root=ad0s1a&amp;lt;br&amp;gt;&lt;br /&gt;
 grub&amp;gt; pxeboot&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Completely Diskless System (PXEBOOT ROM)==&lt;br /&gt;
&lt;br /&gt;
Running completely diskless by booting from a Network ROM Chip.&lt;br /&gt;
&lt;br /&gt;
We have now got a Intel GD82559 Etherexpress pro/100 Card.&lt;br /&gt;
&lt;br /&gt;
When we boot up on the client machine with that card it displays:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Intel UNDI, PXE-2.0 (build 067)&amp;lt;br /&amp;gt;&lt;br /&gt;
Copyright (C) 1997-1998 Intel Corporation&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Which we cannot get working so we have read that you have to update this version to Build 82.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
copy /boot/pxeboot to /tftpboot directory we made before&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
- Downloaded proboot.exe from support.intel.com and unpacked into a windows box.&amp;lt;br /&amp;gt;&lt;br /&gt;
- Copied ibautil.exe onto a windows 98 boot disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
- Rebooted the test box after disabling network boot on the nic (otherwise it'll kick in before the floppy).&amp;lt;br /&amp;gt;&lt;br /&gt;
- Ran ibautil -iv to see what embedded image versions were available:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Intel(R) Boot Agent XG v1.0.09&amp;lt;br /&amp;gt;&lt;br /&gt;
Intel(R) Boot Agent GE v1.2.36&amp;lt;br /&amp;gt;&lt;br /&gt;
Intel(R) Boot Agent FE v4.1.19&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
- Ran ibautil -up to perform the image upgrade.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
It's interesting to note that no version showed up for out intel nic when initially running ibautil. After the upgrade, however, the version corectly showed as 4.1.19.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I made sure that I had simular features to this in my dhcpd.conf file:&amp;lt;br /&amp;gt;&lt;br /&gt;
option broadcast-address 192.168.254.255;&amp;lt;br /&amp;gt;&lt;br /&gt;
option domain-name-servers 192.168.254.3;&amp;lt;br /&amp;gt;&lt;br /&gt;
option domain-name &amp;quot;simerson.net&amp;quot;;&amp;lt;br /&amp;gt;&lt;br /&gt;
option routers 192.168.254.1;&amp;lt;br /&amp;gt;&lt;br /&gt;
option subnet-mask 255.255.255.0;&amp;lt;br /&amp;gt;&lt;br /&gt;
server-name &amp;quot;pxe-gw&amp;quot;;&amp;lt;br /&amp;gt;&lt;br /&gt;
server-identifier 192.168.254.3;&amp;lt;br /&amp;gt;&lt;br /&gt;
next-server 192.168.254.3;&amp;lt;br /&amp;gt;&lt;br /&gt;
default-lease-time -1;&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
subnet 192.168.254.0 netmask 255.255.255.0 {&amp;lt;br /&amp;gt;&lt;br /&gt;
range 192.168.254.32 192.168.254.99;&amp;lt;br /&amp;gt;&lt;br /&gt;
option root-path &amp;quot;/usr/local/export/pxe&amp;quot;;&amp;lt;br /&amp;gt;&lt;br /&gt;
filename &amp;quot;pxeboot&amp;quot;;&amp;lt;br /&amp;gt;&lt;br /&gt;
}&amp;lt;br /&amp;gt;&lt;br /&gt;
host cm.simerson.net {&amp;lt;br /&amp;gt;&lt;br /&gt;
hardware ethernet 00:e0:18:98:f0:cc;&amp;lt;br /&amp;gt;&lt;br /&gt;
fixed-address 192.168.254.126;&amp;lt;br /&amp;gt;&lt;br /&gt;
}&amp;lt;br /&amp;gt;&lt;br /&gt;
host c1.simerson.net {&amp;lt;br /&amp;gt;&lt;br /&gt;
hardware ethernet 00:60:97:0e:bb:a7;&amp;lt;br /&amp;gt;&lt;br /&gt;
fixed-address 192.168.254.131;&amp;lt;br /&amp;gt;&lt;br /&gt;
}&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==links==&lt;br /&gt;
&lt;br /&gt;
http://people.freebsd.org/~alfred/pxe/en_US.ISO8859-1/articles/pxe/article.html&lt;br /&gt;
&lt;br /&gt;
http://www.the-labs.com/FreeBSD/Diskless/&lt;br /&gt;
&lt;br /&gt;
http://www.nber.org/sys-admin/FreeBSD-diskless.html&lt;br /&gt;
&lt;br /&gt;
http://www.onlamp.com/pub/a/bsd/2004/09/09/diskless_server.html&lt;br /&gt;
&lt;br /&gt;
http://www.onlamp.com/pub/a/bsd/2004/09/30/diskless_clients.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://wikitest.freebsd.org/MarkusBoelter&lt;br /&gt;
&lt;br /&gt;
http://www.daemonsecurity.com/pub/pxeboot/&lt;br /&gt;
&lt;br /&gt;
http://www.kano.org.uk/projects/pxe/&lt;br /&gt;
&lt;br /&gt;
File Examples:&lt;br /&gt;
&lt;br /&gt;
http://www.watson.org/~robert/freebsd/pxe/&lt;br /&gt;
&lt;br /&gt;
[[Category:FreeBSD_for_Workstations]]&lt;/div&gt;</summary>
		<author><name>165.228.0.35</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/X_Windows_Terminal</id>
		<title>X Windows Terminal</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/X_Windows_Terminal"/>
				<updated>2006-06-22T02:02:03Z</updated>
		
		<summary type="html">&lt;p&gt;165.228.0.35: /* Running a whole X Windows Session (XDM) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Advantages==&lt;br /&gt;
X Windows can be used in a Server-Client relationship.  By setting up your X Windows Server you allow the use of all the programs on that computer to all the client PC's.  &lt;br /&gt;
&lt;br /&gt;
There are many advantages of running client computers in this manner:&lt;br /&gt;
* They don't even need a hard drive.  &lt;br /&gt;
* It's silent as there are no moving parts&lt;br /&gt;
* The solution saves power as your computers are very thin.&lt;br /&gt;
* Everything can be backed up centrally.&lt;br /&gt;
* Boot times for client PC's are the fastest around.&lt;br /&gt;
* Clients don't need much CPU speed, memory, etc.  Because of this they would be very cheap.  You could get away with using a Pentium 100Mhz with 32MB ram, no hard drive, no CD-ROM, no Floppy and a fanless power supply.  You just need a ethernet card with a PXEBOOT ROM.&lt;br /&gt;
&lt;br /&gt;
==Running a single application==&lt;br /&gt;
&lt;br /&gt;
To get started I have my server setup running FreeBSD, with X-Windows and a few applications.  Nothing too special.  Then I have my client PC, which to start off I used the freesbie 1.1 boot CD to perform these initial tests.  You can get this from www.freesbie.org.  I entered into fluxbox, but you could equally use xfce4.&lt;br /&gt;
&lt;br /&gt;
 client# xhost +&lt;br /&gt;
&lt;br /&gt;
This allows all computers to start applications on your client PC.  It's dangerous but good for testing everything is setup correctly.&lt;br /&gt;
&lt;br /&gt;
 client# ssh &amp;lt;server user@server ip&amp;gt;&lt;br /&gt;
 eg: ssh mick@192.168.1.1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 ssh$ DISPLAY=&amp;lt;client ip&amp;gt;:&amp;lt;client display&amp;gt;; export DISPLAY&lt;br /&gt;
 eg: DISPLAY=192.168.1.2:0; export DISPLAY&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 ssh$ xcalc &amp;amp;&lt;br /&gt;
&lt;br /&gt;
This should display on your client&lt;br /&gt;
&lt;br /&gt;
==Running a whole X Windows Session (XDM)==&lt;br /&gt;
This sets up a server so that you can share your X session with any clients which want to connect.  (Simular to Terminal Services under windows)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===server===&lt;br /&gt;
edit:&lt;br /&gt;
 /usr/X11R6/lib/X11/xdm/xdm-config&lt;br /&gt;
&lt;br /&gt;
comment out with a '!' the request line&amp;lt;br&amp;gt;&lt;br /&gt;
 DisplayManager.requestPort: 0&lt;br /&gt;
&lt;br /&gt;
edit:&amp;lt;br&amp;gt;&lt;br /&gt;
 /usr/X11R6/lib/X11/xdm/Xaccess&lt;br /&gt;
&lt;br /&gt;
to have a single asterisk any where in the file, so the contents should be one asterisk and the rest commented out.&lt;br /&gt;
&lt;br /&gt;
Make sure your firewall has all traffic for you lan.  (Need to know which exact ports to allow).&lt;br /&gt;
&lt;br /&gt;
create ~/.xsession for each user which requires access and enter your start up for x &lt;br /&gt;
eg:&lt;br /&gt;
&lt;br /&gt;
 shell#!/bin/sh&amp;lt;br&amp;gt;&lt;br /&gt;
 startkde&lt;br /&gt;
&lt;br /&gt;
run xdm on server as root&lt;br /&gt;
&lt;br /&gt;
===client===&lt;br /&gt;
make sure your not in X&lt;br /&gt;
&lt;br /&gt;
type this command:&lt;br /&gt;
&lt;br /&gt;
 shell# X -broadcast&lt;br /&gt;
&lt;br /&gt;
This assumes that you are running only one server.&lt;br /&gt;
Otherwise use:&lt;br /&gt;
&lt;br /&gt;
 shell# X -query 192.168.1.2&lt;br /&gt;
&lt;br /&gt;
==GRUB Floppy boot==&lt;br /&gt;
&lt;br /&gt;
(would like to compile this ourselves later)&lt;br /&gt;
To get started we downloaded the image from www.hp.uab.edu/~ed/grub-net&lt;br /&gt;
&lt;br /&gt;
 shell# dd if=/data/grub-net.img of=/dev/fd0&lt;br /&gt;
&lt;br /&gt;
Then we mounted it as msdos&lt;br /&gt;
Remove/rename menu.1st from the grub directory as it was doing something funny with it.  We think that it was looking for a tftp server through our dhcp and we don't have a the dhcp setup correctly here, so we wanted to do it manually.&lt;br /&gt;
&lt;br /&gt;
Reboot off the floppy now..&lt;br /&gt;
&lt;br /&gt;
 grub&amp;gt; ifconfig --address=192.168.1.2 --mask=255.255.255.0 --gateway=192.168.1.1&lt;br /&gt;
 --server=192.168.1.2&lt;br /&gt;
&lt;br /&gt;
OR you can use dhcp&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 grub&amp;gt; dhcp&amp;lt;br&amp;gt; &lt;br /&gt;
 grub&amp;gt; tftpserver 192.168.1.2&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Setup tftp on your server, we created a directory /tftpboot. &lt;br /&gt;
&lt;br /&gt;
===Install and setup dhcp===&lt;br /&gt;
Server setup.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
install /usr/ports/net/isc-dhcp3-server&lt;br /&gt;
&lt;br /&gt;
We do this so we can define the root path for the diskless system.&lt;br /&gt;
&lt;br /&gt;
edit /usr/local/etc/dhcpd.conf&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
option domain-name &amp;quot;iinet.net.au&amp;quot;;&lt;br /&gt;
option domain-name-servers 203.0.178.191;&lt;br /&gt;
&lt;br /&gt;
# The shared root file system of diskless workstation&lt;br /&gt;
option root-path &amp;quot;192.168.1.2:/diskless_ro&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
# The server from which to upload the initial boot-file (loads tftp server)&lt;br /&gt;
next-server 192.168.1.2;&lt;br /&gt;
&lt;br /&gt;
default-lease-time 3600;&lt;br /&gt;
max-lease-time 86400;&lt;br /&gt;
ddns-update-style none;&lt;br /&gt;
&lt;br /&gt;
subnet 192.168.1.0 netmask 255.255.255.0 {&lt;br /&gt;
        range 192.168.1.10 192.168.1.30;&lt;br /&gt;
&lt;br /&gt;
        # Set up default gateway&lt;br /&gt;
        option routers 192.168.1.1;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
shell# dhcpd&lt;br /&gt;
&lt;br /&gt;
===Setting NFS===&lt;br /&gt;
Network File System.  Here we share all the directories from the server so that the diskless clients see these drives as if those directories were the diskless client's.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# mkdir /diskless_ro&lt;br /&gt;
# chmod 444 /diskless_ro&lt;br /&gt;
&lt;br /&gt;
# mkdir /diskless_rw&lt;br /&gt;
# chmod 777 diskless_rw&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make directories for each IP for your clients&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /diskless_rw&lt;br /&gt;
# mkdir 192.168.1.XXX&lt;br /&gt;
# cd 192.168.1.XXX&lt;br /&gt;
# mkdir etc var&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enable NFS /etc/rc.conf&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rpcbind_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
nfs_server_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
nfs_server_flags=&amp;quot;-u -t -n 20 -h 192.168.1.2&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Configure /etc/exports&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# file systems accessible only for reading:&lt;br /&gt;
/usr -ro -maproot=0 -network 192.168.1.0 -mask 255.255.255.0&lt;br /&gt;
/diskless_ro -ro -maproot=0 -network 192.168.1.0&lt;br /&gt;
        -mask 255.255.255.0&lt;br /&gt;
&lt;br /&gt;
# file systems accessible for writing. All the resources&lt;br /&gt;
# given to every diskless station are specified by one line:&lt;br /&gt;
#&lt;br /&gt;
# Diskless-20&lt;br /&gt;
/diskless_rw/192.168.1.20/etc /diskless_rw/192.168.1.20/var \&lt;br /&gt;
        -mapall=root 192.168.1.20&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Starting NFS&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
data# rpcbind&lt;br /&gt;
data# nfsd -u -t -n 20 -h 192.168.1.2&lt;br /&gt;
data# mountd -r&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Testing to see if the exports are correct&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
data# showmount -e&lt;br /&gt;
Exports list on localhost:&lt;br /&gt;
/usr                               192.168.1.0&lt;br /&gt;
/diskless_rw/192.168.1.20/var      192.168.1.20&lt;br /&gt;
/diskless_rw/192.168.1.20/etc      192.168.1.20&lt;br /&gt;
/diskless_ro                       192.168.1.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Starting diskless system through GRUB===&lt;br /&gt;
This is an alternative boot loader.  You can use this for testing, if you don't have a pxeboot chip, otherwise skip this section.&lt;br /&gt;
&lt;br /&gt;
These commands are half working...&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 grub&amp;gt; root (nd)&amp;lt;br&amp;gt;&lt;br /&gt;
 grub&amp;gt; kernel /kernel root=ad0s1a&amp;lt;br&amp;gt;&lt;br /&gt;
 grub&amp;gt; pxeboot&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Completely Diskless System (PXEBOOT ROM)==&lt;br /&gt;
&lt;br /&gt;
Running completely diskless by booting from a Network ROM Chip.&lt;br /&gt;
&lt;br /&gt;
We have now got a Intel GD82559 Etherexpress pro/100 Card.&lt;br /&gt;
&lt;br /&gt;
When we boot up on the client machine with that card it displays:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Intel UNDI, PXE-2.0 (build 067)&amp;lt;br /&amp;gt;&lt;br /&gt;
Copyright (C) 1997-1998 Intel Corporation&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Which we cannot get working so we have read that you have to update this version to Build 82.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
copy /boot/pxeboot to /tftpboot directory we made before&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
- Downloaded proboot.exe from support.intel.com and unpacked into a windows box.&amp;lt;br /&amp;gt;&lt;br /&gt;
- Copied ibautil.exe onto a windows 98 boot disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
- Rebooted the test box after disabling network boot on the nic (otherwise it'll kick in before the floppy).&amp;lt;br /&amp;gt;&lt;br /&gt;
- Ran ibautil -iv to see what embedded image versions were available:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Intel(R) Boot Agent XG v1.0.09&amp;lt;br /&amp;gt;&lt;br /&gt;
Intel(R) Boot Agent GE v1.2.36&amp;lt;br /&amp;gt;&lt;br /&gt;
Intel(R) Boot Agent FE v4.1.19&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
- Ran ibautil -up to perform the image upgrade.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
It's interesting to note that no version showed up for out intel nic when initially running ibautil. After the upgrade, however, the version corectly showed as 4.1.19.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I made sure that I had simular features to this in my dhcpd.conf file:&amp;lt;br /&amp;gt;&lt;br /&gt;
option broadcast-address 192.168.254.255;&amp;lt;br /&amp;gt;&lt;br /&gt;
option domain-name-servers 192.168.254.3;&amp;lt;br /&amp;gt;&lt;br /&gt;
option domain-name &amp;quot;simerson.net&amp;quot;;&amp;lt;br /&amp;gt;&lt;br /&gt;
option routers 192.168.254.1;&amp;lt;br /&amp;gt;&lt;br /&gt;
option subnet-mask 255.255.255.0;&amp;lt;br /&amp;gt;&lt;br /&gt;
server-name &amp;quot;pxe-gw&amp;quot;;&amp;lt;br /&amp;gt;&lt;br /&gt;
server-identifier 192.168.254.3;&amp;lt;br /&amp;gt;&lt;br /&gt;
next-server 192.168.254.3;&amp;lt;br /&amp;gt;&lt;br /&gt;
default-lease-time -1;&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
subnet 192.168.254.0 netmask 255.255.255.0 {&amp;lt;br /&amp;gt;&lt;br /&gt;
range 192.168.254.32 192.168.254.99;&amp;lt;br /&amp;gt;&lt;br /&gt;
option root-path &amp;quot;/usr/local/export/pxe&amp;quot;;&amp;lt;br /&amp;gt;&lt;br /&gt;
filename &amp;quot;pxeboot&amp;quot;;&amp;lt;br /&amp;gt;&lt;br /&gt;
}&amp;lt;br /&amp;gt;&lt;br /&gt;
host cm.simerson.net {&amp;lt;br /&amp;gt;&lt;br /&gt;
hardware ethernet 00:e0:18:98:f0:cc;&amp;lt;br /&amp;gt;&lt;br /&gt;
fixed-address 192.168.254.126;&amp;lt;br /&amp;gt;&lt;br /&gt;
}&amp;lt;br /&amp;gt;&lt;br /&gt;
host c1.simerson.net {&amp;lt;br /&amp;gt;&lt;br /&gt;
hardware ethernet 00:60:97:0e:bb:a7;&amp;lt;br /&amp;gt;&lt;br /&gt;
fixed-address 192.168.254.131;&amp;lt;br /&amp;gt;&lt;br /&gt;
}&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==links==&lt;br /&gt;
&lt;br /&gt;
http://people.freebsd.org/~alfred/pxe/en_US.ISO8859-1/articles/pxe/article.html&lt;br /&gt;
&lt;br /&gt;
http://www.the-labs.com/FreeBSD/Diskless/&lt;br /&gt;
&lt;br /&gt;
http://www.nber.org/sys-admin/FreeBSD-diskless.html&lt;br /&gt;
&lt;br /&gt;
http://www.onlamp.com/pub/a/bsd/2004/09/09/diskless_server.html&lt;br /&gt;
&lt;br /&gt;
http://www.onlamp.com/pub/a/bsd/2004/09/30/diskless_clients.html&lt;br /&gt;
&lt;br /&gt;
File Examples:&lt;br /&gt;
&lt;br /&gt;
http://www.watson.org/~robert/freebsd/pxe/&lt;br /&gt;
&lt;br /&gt;
[[Category:FreeBSD_for_Workstations]]&lt;/div&gt;</summary>
		<author><name>165.228.0.35</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/X_Windows_Terminal</id>
		<title>X Windows Terminal</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/X_Windows_Terminal"/>
				<updated>2006-06-22T02:00:48Z</updated>
		
		<summary type="html">&lt;p&gt;165.228.0.35: /* Install and setup dhcp */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Advantages==&lt;br /&gt;
X Windows can be used in a Server-Client relationship.  By setting up your X Windows Server you allow the use of all the programs on that computer to all the client PC's.  &lt;br /&gt;
&lt;br /&gt;
There are many advantages of running client computers in this manner:&lt;br /&gt;
* They don't even need a hard drive.  &lt;br /&gt;
* It's silent as there are no moving parts&lt;br /&gt;
* The solution saves power as your computers are very thin.&lt;br /&gt;
* Everything can be backed up centrally.&lt;br /&gt;
* Boot times for client PC's are the fastest around.&lt;br /&gt;
* Clients don't need much CPU speed, memory, etc.  Because of this they would be very cheap.  You could get away with using a Pentium 100Mhz with 32MB ram, no hard drive, no CD-ROM, no Floppy and a fanless power supply.  You just need a ethernet card with a PXEBOOT ROM.&lt;br /&gt;
&lt;br /&gt;
==Running a single application==&lt;br /&gt;
&lt;br /&gt;
To get started I have my server setup running FreeBSD, with X-Windows and a few applications.  Nothing too special.  Then I have my client PC, which to start off I used the freesbie 1.1 boot CD to perform these initial tests.  You can get this from www.freesbie.org.  I entered into fluxbox, but you could equally use xfce4.&lt;br /&gt;
&lt;br /&gt;
 client# xhost +&lt;br /&gt;
&lt;br /&gt;
This allows all computers to start applications on your client PC.  It's dangerous but good for testing everything is setup correctly.&lt;br /&gt;
&lt;br /&gt;
 client# ssh &amp;lt;server user@server ip&amp;gt;&lt;br /&gt;
 eg: ssh mick@192.168.1.1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 ssh$ DISPLAY=&amp;lt;client ip&amp;gt;:&amp;lt;client display&amp;gt;; export DISPLAY&lt;br /&gt;
 eg: DISPLAY=192.168.1.2:0; export DISPLAY&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 ssh$ xcalc &amp;amp;&lt;br /&gt;
&lt;br /&gt;
This should display on your client&lt;br /&gt;
&lt;br /&gt;
==Running a whole X Windows Session (XDM)==&lt;br /&gt;
&lt;br /&gt;
===server===&lt;br /&gt;
edit:&lt;br /&gt;
 /usr/X11R6/lib/X11/xdm/xdm-config&lt;br /&gt;
&lt;br /&gt;
comment out with a '!' the request line&amp;lt;br&amp;gt;&lt;br /&gt;
 DisplayManager.requestPort: 0&lt;br /&gt;
&lt;br /&gt;
edit:&amp;lt;br&amp;gt;&lt;br /&gt;
 /usr/X11R6/lib/X11/xdm/Xaccess&lt;br /&gt;
&lt;br /&gt;
to have a single asterisk any where in the file, so the contents should be one asterisk and the rest commented out.&lt;br /&gt;
&lt;br /&gt;
Make sure your firewall has all traffic for you lan.  (Need to know which exact ports to allow).&lt;br /&gt;
&lt;br /&gt;
create ~/.xsession for each user which requires access and enter your start up for x &lt;br /&gt;
eg:&lt;br /&gt;
&lt;br /&gt;
 shell#!/bin/sh&amp;lt;br&amp;gt;&lt;br /&gt;
 startkde&lt;br /&gt;
&lt;br /&gt;
run xdm on server as root&lt;br /&gt;
&lt;br /&gt;
===client===&lt;br /&gt;
make sure your not in X&lt;br /&gt;
&lt;br /&gt;
type this command:&lt;br /&gt;
&lt;br /&gt;
 shell# X -broadcast&lt;br /&gt;
&lt;br /&gt;
This assumes that you are running only one server.&lt;br /&gt;
Otherwise use:&lt;br /&gt;
&lt;br /&gt;
 shell# X -query 192.168.1.2&lt;br /&gt;
&lt;br /&gt;
==GRUB Floppy boot==&lt;br /&gt;
&lt;br /&gt;
(would like to compile this ourselves later)&lt;br /&gt;
To get started we downloaded the image from www.hp.uab.edu/~ed/grub-net&lt;br /&gt;
&lt;br /&gt;
 shell# dd if=/data/grub-net.img of=/dev/fd0&lt;br /&gt;
&lt;br /&gt;
Then we mounted it as msdos&lt;br /&gt;
Remove/rename menu.1st from the grub directory as it was doing something funny with it.  We think that it was looking for a tftp server through our dhcp and we don't have a the dhcp setup correctly here, so we wanted to do it manually.&lt;br /&gt;
&lt;br /&gt;
Reboot off the floppy now..&lt;br /&gt;
&lt;br /&gt;
 grub&amp;gt; ifconfig --address=192.168.1.2 --mask=255.255.255.0 --gateway=192.168.1.1&lt;br /&gt;
 --server=192.168.1.2&lt;br /&gt;
&lt;br /&gt;
OR you can use dhcp&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 grub&amp;gt; dhcp&amp;lt;br&amp;gt; &lt;br /&gt;
 grub&amp;gt; tftpserver 192.168.1.2&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Setup tftp on your server, we created a directory /tftpboot. &lt;br /&gt;
&lt;br /&gt;
===Install and setup dhcp===&lt;br /&gt;
Server setup.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
install /usr/ports/net/isc-dhcp3-server&lt;br /&gt;
&lt;br /&gt;
We do this so we can define the root path for the diskless system.&lt;br /&gt;
&lt;br /&gt;
edit /usr/local/etc/dhcpd.conf&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
option domain-name &amp;quot;iinet.net.au&amp;quot;;&lt;br /&gt;
option domain-name-servers 203.0.178.191;&lt;br /&gt;
&lt;br /&gt;
# The shared root file system of diskless workstation&lt;br /&gt;
option root-path &amp;quot;192.168.1.2:/diskless_ro&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
# The server from which to upload the initial boot-file (loads tftp server)&lt;br /&gt;
next-server 192.168.1.2;&lt;br /&gt;
&lt;br /&gt;
default-lease-time 3600;&lt;br /&gt;
max-lease-time 86400;&lt;br /&gt;
ddns-update-style none;&lt;br /&gt;
&lt;br /&gt;
subnet 192.168.1.0 netmask 255.255.255.0 {&lt;br /&gt;
        range 192.168.1.10 192.168.1.30;&lt;br /&gt;
&lt;br /&gt;
        # Set up default gateway&lt;br /&gt;
        option routers 192.168.1.1;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
shell# dhcpd&lt;br /&gt;
&lt;br /&gt;
===Setting NFS===&lt;br /&gt;
Network File System.  Here we share all the directories from the server so that the diskless clients see these drives as if those directories were the diskless client's.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# mkdir /diskless_ro&lt;br /&gt;
# chmod 444 /diskless_ro&lt;br /&gt;
&lt;br /&gt;
# mkdir /diskless_rw&lt;br /&gt;
# chmod 777 diskless_rw&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make directories for each IP for your clients&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /diskless_rw&lt;br /&gt;
# mkdir 192.168.1.XXX&lt;br /&gt;
# cd 192.168.1.XXX&lt;br /&gt;
# mkdir etc var&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enable NFS /etc/rc.conf&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rpcbind_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
nfs_server_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
nfs_server_flags=&amp;quot;-u -t -n 20 -h 192.168.1.2&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Configure /etc/exports&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# file systems accessible only for reading:&lt;br /&gt;
/usr -ro -maproot=0 -network 192.168.1.0 -mask 255.255.255.0&lt;br /&gt;
/diskless_ro -ro -maproot=0 -network 192.168.1.0&lt;br /&gt;
        -mask 255.255.255.0&lt;br /&gt;
&lt;br /&gt;
# file systems accessible for writing. All the resources&lt;br /&gt;
# given to every diskless station are specified by one line:&lt;br /&gt;
#&lt;br /&gt;
# Diskless-20&lt;br /&gt;
/diskless_rw/192.168.1.20/etc /diskless_rw/192.168.1.20/var \&lt;br /&gt;
        -mapall=root 192.168.1.20&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Starting NFS&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
data# rpcbind&lt;br /&gt;
data# nfsd -u -t -n 20 -h 192.168.1.2&lt;br /&gt;
data# mountd -r&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Testing to see if the exports are correct&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
data# showmount -e&lt;br /&gt;
Exports list on localhost:&lt;br /&gt;
/usr                               192.168.1.0&lt;br /&gt;
/diskless_rw/192.168.1.20/var      192.168.1.20&lt;br /&gt;
/diskless_rw/192.168.1.20/etc      192.168.1.20&lt;br /&gt;
/diskless_ro                       192.168.1.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Starting diskless system through GRUB===&lt;br /&gt;
This is an alternative boot loader.  You can use this for testing, if you don't have a pxeboot chip, otherwise skip this section.&lt;br /&gt;
&lt;br /&gt;
These commands are half working...&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 grub&amp;gt; root (nd)&amp;lt;br&amp;gt;&lt;br /&gt;
 grub&amp;gt; kernel /kernel root=ad0s1a&amp;lt;br&amp;gt;&lt;br /&gt;
 grub&amp;gt; pxeboot&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Completely Diskless System (PXEBOOT ROM)==&lt;br /&gt;
&lt;br /&gt;
Running completely diskless by booting from a Network ROM Chip.&lt;br /&gt;
&lt;br /&gt;
We have now got a Intel GD82559 Etherexpress pro/100 Card.&lt;br /&gt;
&lt;br /&gt;
When we boot up on the client machine with that card it displays:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Intel UNDI, PXE-2.0 (build 067)&amp;lt;br /&amp;gt;&lt;br /&gt;
Copyright (C) 1997-1998 Intel Corporation&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Which we cannot get working so we have read that you have to update this version to Build 82.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
copy /boot/pxeboot to /tftpboot directory we made before&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
- Downloaded proboot.exe from support.intel.com and unpacked into a windows box.&amp;lt;br /&amp;gt;&lt;br /&gt;
- Copied ibautil.exe onto a windows 98 boot disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
- Rebooted the test box after disabling network boot on the nic (otherwise it'll kick in before the floppy).&amp;lt;br /&amp;gt;&lt;br /&gt;
- Ran ibautil -iv to see what embedded image versions were available:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Intel(R) Boot Agent XG v1.0.09&amp;lt;br /&amp;gt;&lt;br /&gt;
Intel(R) Boot Agent GE v1.2.36&amp;lt;br /&amp;gt;&lt;br /&gt;
Intel(R) Boot Agent FE v4.1.19&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
- Ran ibautil -up to perform the image upgrade.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
It's interesting to note that no version showed up for out intel nic when initially running ibautil. After the upgrade, however, the version corectly showed as 4.1.19.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I made sure that I had simular features to this in my dhcpd.conf file:&amp;lt;br /&amp;gt;&lt;br /&gt;
option broadcast-address 192.168.254.255;&amp;lt;br /&amp;gt;&lt;br /&gt;
option domain-name-servers 192.168.254.3;&amp;lt;br /&amp;gt;&lt;br /&gt;
option domain-name &amp;quot;simerson.net&amp;quot;;&amp;lt;br /&amp;gt;&lt;br /&gt;
option routers 192.168.254.1;&amp;lt;br /&amp;gt;&lt;br /&gt;
option subnet-mask 255.255.255.0;&amp;lt;br /&amp;gt;&lt;br /&gt;
server-name &amp;quot;pxe-gw&amp;quot;;&amp;lt;br /&amp;gt;&lt;br /&gt;
server-identifier 192.168.254.3;&amp;lt;br /&amp;gt;&lt;br /&gt;
next-server 192.168.254.3;&amp;lt;br /&amp;gt;&lt;br /&gt;
default-lease-time -1;&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
subnet 192.168.254.0 netmask 255.255.255.0 {&amp;lt;br /&amp;gt;&lt;br /&gt;
range 192.168.254.32 192.168.254.99;&amp;lt;br /&amp;gt;&lt;br /&gt;
option root-path &amp;quot;/usr/local/export/pxe&amp;quot;;&amp;lt;br /&amp;gt;&lt;br /&gt;
filename &amp;quot;pxeboot&amp;quot;;&amp;lt;br /&amp;gt;&lt;br /&gt;
}&amp;lt;br /&amp;gt;&lt;br /&gt;
host cm.simerson.net {&amp;lt;br /&amp;gt;&lt;br /&gt;
hardware ethernet 00:e0:18:98:f0:cc;&amp;lt;br /&amp;gt;&lt;br /&gt;
fixed-address 192.168.254.126;&amp;lt;br /&amp;gt;&lt;br /&gt;
}&amp;lt;br /&amp;gt;&lt;br /&gt;
host c1.simerson.net {&amp;lt;br /&amp;gt;&lt;br /&gt;
hardware ethernet 00:60:97:0e:bb:a7;&amp;lt;br /&amp;gt;&lt;br /&gt;
fixed-address 192.168.254.131;&amp;lt;br /&amp;gt;&lt;br /&gt;
}&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==links==&lt;br /&gt;
&lt;br /&gt;
http://people.freebsd.org/~alfred/pxe/en_US.ISO8859-1/articles/pxe/article.html&lt;br /&gt;
&lt;br /&gt;
http://www.the-labs.com/FreeBSD/Diskless/&lt;br /&gt;
&lt;br /&gt;
http://www.nber.org/sys-admin/FreeBSD-diskless.html&lt;br /&gt;
&lt;br /&gt;
http://www.onlamp.com/pub/a/bsd/2004/09/09/diskless_server.html&lt;br /&gt;
&lt;br /&gt;
http://www.onlamp.com/pub/a/bsd/2004/09/30/diskless_clients.html&lt;br /&gt;
&lt;br /&gt;
File Examples:&lt;br /&gt;
&lt;br /&gt;
http://www.watson.org/~robert/freebsd/pxe/&lt;br /&gt;
&lt;br /&gt;
[[Category:FreeBSD_for_Workstations]]&lt;/div&gt;</summary>
		<author><name>165.228.0.35</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/X_Windows_Terminal</id>
		<title>X Windows Terminal</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/X_Windows_Terminal"/>
				<updated>2006-06-22T02:00:16Z</updated>
		
		<summary type="html">&lt;p&gt;165.228.0.35: /* Starting diskless system through GRUB */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Advantages==&lt;br /&gt;
X Windows can be used in a Server-Client relationship.  By setting up your X Windows Server you allow the use of all the programs on that computer to all the client PC's.  &lt;br /&gt;
&lt;br /&gt;
There are many advantages of running client computers in this manner:&lt;br /&gt;
* They don't even need a hard drive.  &lt;br /&gt;
* It's silent as there are no moving parts&lt;br /&gt;
* The solution saves power as your computers are very thin.&lt;br /&gt;
* Everything can be backed up centrally.&lt;br /&gt;
* Boot times for client PC's are the fastest around.&lt;br /&gt;
* Clients don't need much CPU speed, memory, etc.  Because of this they would be very cheap.  You could get away with using a Pentium 100Mhz with 32MB ram, no hard drive, no CD-ROM, no Floppy and a fanless power supply.  You just need a ethernet card with a PXEBOOT ROM.&lt;br /&gt;
&lt;br /&gt;
==Running a single application==&lt;br /&gt;
&lt;br /&gt;
To get started I have my server setup running FreeBSD, with X-Windows and a few applications.  Nothing too special.  Then I have my client PC, which to start off I used the freesbie 1.1 boot CD to perform these initial tests.  You can get this from www.freesbie.org.  I entered into fluxbox, but you could equally use xfce4.&lt;br /&gt;
&lt;br /&gt;
 client# xhost +&lt;br /&gt;
&lt;br /&gt;
This allows all computers to start applications on your client PC.  It's dangerous but good for testing everything is setup correctly.&lt;br /&gt;
&lt;br /&gt;
 client# ssh &amp;lt;server user@server ip&amp;gt;&lt;br /&gt;
 eg: ssh mick@192.168.1.1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 ssh$ DISPLAY=&amp;lt;client ip&amp;gt;:&amp;lt;client display&amp;gt;; export DISPLAY&lt;br /&gt;
 eg: DISPLAY=192.168.1.2:0; export DISPLAY&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 ssh$ xcalc &amp;amp;&lt;br /&gt;
&lt;br /&gt;
This should display on your client&lt;br /&gt;
&lt;br /&gt;
==Running a whole X Windows Session (XDM)==&lt;br /&gt;
&lt;br /&gt;
===server===&lt;br /&gt;
edit:&lt;br /&gt;
 /usr/X11R6/lib/X11/xdm/xdm-config&lt;br /&gt;
&lt;br /&gt;
comment out with a '!' the request line&amp;lt;br&amp;gt;&lt;br /&gt;
 DisplayManager.requestPort: 0&lt;br /&gt;
&lt;br /&gt;
edit:&amp;lt;br&amp;gt;&lt;br /&gt;
 /usr/X11R6/lib/X11/xdm/Xaccess&lt;br /&gt;
&lt;br /&gt;
to have a single asterisk any where in the file, so the contents should be one asterisk and the rest commented out.&lt;br /&gt;
&lt;br /&gt;
Make sure your firewall has all traffic for you lan.  (Need to know which exact ports to allow).&lt;br /&gt;
&lt;br /&gt;
create ~/.xsession for each user which requires access and enter your start up for x &lt;br /&gt;
eg:&lt;br /&gt;
&lt;br /&gt;
 shell#!/bin/sh&amp;lt;br&amp;gt;&lt;br /&gt;
 startkde&lt;br /&gt;
&lt;br /&gt;
run xdm on server as root&lt;br /&gt;
&lt;br /&gt;
===client===&lt;br /&gt;
make sure your not in X&lt;br /&gt;
&lt;br /&gt;
type this command:&lt;br /&gt;
&lt;br /&gt;
 shell# X -broadcast&lt;br /&gt;
&lt;br /&gt;
This assumes that you are running only one server.&lt;br /&gt;
Otherwise use:&lt;br /&gt;
&lt;br /&gt;
 shell# X -query 192.168.1.2&lt;br /&gt;
&lt;br /&gt;
==GRUB Floppy boot==&lt;br /&gt;
&lt;br /&gt;
(would like to compile this ourselves later)&lt;br /&gt;
To get started we downloaded the image from www.hp.uab.edu/~ed/grub-net&lt;br /&gt;
&lt;br /&gt;
 shell# dd if=/data/grub-net.img of=/dev/fd0&lt;br /&gt;
&lt;br /&gt;
Then we mounted it as msdos&lt;br /&gt;
Remove/rename menu.1st from the grub directory as it was doing something funny with it.  We think that it was looking for a tftp server through our dhcp and we don't have a the dhcp setup correctly here, so we wanted to do it manually.&lt;br /&gt;
&lt;br /&gt;
Reboot off the floppy now..&lt;br /&gt;
&lt;br /&gt;
 grub&amp;gt; ifconfig --address=192.168.1.2 --mask=255.255.255.0 --gateway=192.168.1.1&lt;br /&gt;
 --server=192.168.1.2&lt;br /&gt;
&lt;br /&gt;
OR you can use dhcp&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 grub&amp;gt; dhcp&amp;lt;br&amp;gt; &lt;br /&gt;
 grub&amp;gt; tftpserver 192.168.1.2&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Setup tftp on your server, we created a directory /tftpboot. &lt;br /&gt;
&lt;br /&gt;
===Install and setup dhcp===&lt;br /&gt;
install /usr/ports/net/isc-dhcp3-server&lt;br /&gt;
&lt;br /&gt;
We do this so we can define the root path for the diskless system.&lt;br /&gt;
&lt;br /&gt;
edit /usr/local/etc/dhcpd.conf&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
option domain-name &amp;quot;iinet.net.au&amp;quot;;&lt;br /&gt;
option domain-name-servers 203.0.178.191;&lt;br /&gt;
&lt;br /&gt;
# The shared root file system of diskless workstation&lt;br /&gt;
option root-path &amp;quot;192.168.1.2:/diskless_ro&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
# The server from which to upload the initial boot-file (loads tftp server)&lt;br /&gt;
next-server 192.168.1.2;&lt;br /&gt;
&lt;br /&gt;
default-lease-time 3600;&lt;br /&gt;
max-lease-time 86400;&lt;br /&gt;
ddns-update-style none;&lt;br /&gt;
&lt;br /&gt;
subnet 192.168.1.0 netmask 255.255.255.0 {&lt;br /&gt;
        range 192.168.1.10 192.168.1.30;&lt;br /&gt;
&lt;br /&gt;
        # Set up default gateway&lt;br /&gt;
        option routers 192.168.1.1;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
shell# dhcpd&lt;br /&gt;
&lt;br /&gt;
===Setting NFS===&lt;br /&gt;
Network File System.  Here we share all the directories from the server so that the diskless clients see these drives as if those directories were the diskless client's.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# mkdir /diskless_ro&lt;br /&gt;
# chmod 444 /diskless_ro&lt;br /&gt;
&lt;br /&gt;
# mkdir /diskless_rw&lt;br /&gt;
# chmod 777 diskless_rw&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make directories for each IP for your clients&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /diskless_rw&lt;br /&gt;
# mkdir 192.168.1.XXX&lt;br /&gt;
# cd 192.168.1.XXX&lt;br /&gt;
# mkdir etc var&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enable NFS /etc/rc.conf&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rpcbind_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
nfs_server_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
nfs_server_flags=&amp;quot;-u -t -n 20 -h 192.168.1.2&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Configure /etc/exports&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# file systems accessible only for reading:&lt;br /&gt;
/usr -ro -maproot=0 -network 192.168.1.0 -mask 255.255.255.0&lt;br /&gt;
/diskless_ro -ro -maproot=0 -network 192.168.1.0&lt;br /&gt;
        -mask 255.255.255.0&lt;br /&gt;
&lt;br /&gt;
# file systems accessible for writing. All the resources&lt;br /&gt;
# given to every diskless station are specified by one line:&lt;br /&gt;
#&lt;br /&gt;
# Diskless-20&lt;br /&gt;
/diskless_rw/192.168.1.20/etc /diskless_rw/192.168.1.20/var \&lt;br /&gt;
        -mapall=root 192.168.1.20&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Starting NFS&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
data# rpcbind&lt;br /&gt;
data# nfsd -u -t -n 20 -h 192.168.1.2&lt;br /&gt;
data# mountd -r&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Testing to see if the exports are correct&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
data# showmount -e&lt;br /&gt;
Exports list on localhost:&lt;br /&gt;
/usr                               192.168.1.0&lt;br /&gt;
/diskless_rw/192.168.1.20/var      192.168.1.20&lt;br /&gt;
/diskless_rw/192.168.1.20/etc      192.168.1.20&lt;br /&gt;
/diskless_ro                       192.168.1.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Starting diskless system through GRUB===&lt;br /&gt;
This is an alternative boot loader.  You can use this for testing, if you don't have a pxeboot chip, otherwise skip this section.&lt;br /&gt;
&lt;br /&gt;
These commands are half working...&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 grub&amp;gt; root (nd)&amp;lt;br&amp;gt;&lt;br /&gt;
 grub&amp;gt; kernel /kernel root=ad0s1a&amp;lt;br&amp;gt;&lt;br /&gt;
 grub&amp;gt; pxeboot&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Completely Diskless System (PXEBOOT ROM)==&lt;br /&gt;
&lt;br /&gt;
Running completely diskless by booting from a Network ROM Chip.&lt;br /&gt;
&lt;br /&gt;
We have now got a Intel GD82559 Etherexpress pro/100 Card.&lt;br /&gt;
&lt;br /&gt;
When we boot up on the client machine with that card it displays:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Intel UNDI, PXE-2.0 (build 067)&amp;lt;br /&amp;gt;&lt;br /&gt;
Copyright (C) 1997-1998 Intel Corporation&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Which we cannot get working so we have read that you have to update this version to Build 82.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
copy /boot/pxeboot to /tftpboot directory we made before&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
- Downloaded proboot.exe from support.intel.com and unpacked into a windows box.&amp;lt;br /&amp;gt;&lt;br /&gt;
- Copied ibautil.exe onto a windows 98 boot disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
- Rebooted the test box after disabling network boot on the nic (otherwise it'll kick in before the floppy).&amp;lt;br /&amp;gt;&lt;br /&gt;
- Ran ibautil -iv to see what embedded image versions were available:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Intel(R) Boot Agent XG v1.0.09&amp;lt;br /&amp;gt;&lt;br /&gt;
Intel(R) Boot Agent GE v1.2.36&amp;lt;br /&amp;gt;&lt;br /&gt;
Intel(R) Boot Agent FE v4.1.19&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
- Ran ibautil -up to perform the image upgrade.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
It's interesting to note that no version showed up for out intel nic when initially running ibautil. After the upgrade, however, the version corectly showed as 4.1.19.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I made sure that I had simular features to this in my dhcpd.conf file:&amp;lt;br /&amp;gt;&lt;br /&gt;
option broadcast-address 192.168.254.255;&amp;lt;br /&amp;gt;&lt;br /&gt;
option domain-name-servers 192.168.254.3;&amp;lt;br /&amp;gt;&lt;br /&gt;
option domain-name &amp;quot;simerson.net&amp;quot;;&amp;lt;br /&amp;gt;&lt;br /&gt;
option routers 192.168.254.1;&amp;lt;br /&amp;gt;&lt;br /&gt;
option subnet-mask 255.255.255.0;&amp;lt;br /&amp;gt;&lt;br /&gt;
server-name &amp;quot;pxe-gw&amp;quot;;&amp;lt;br /&amp;gt;&lt;br /&gt;
server-identifier 192.168.254.3;&amp;lt;br /&amp;gt;&lt;br /&gt;
next-server 192.168.254.3;&amp;lt;br /&amp;gt;&lt;br /&gt;
default-lease-time -1;&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
subnet 192.168.254.0 netmask 255.255.255.0 {&amp;lt;br /&amp;gt;&lt;br /&gt;
range 192.168.254.32 192.168.254.99;&amp;lt;br /&amp;gt;&lt;br /&gt;
option root-path &amp;quot;/usr/local/export/pxe&amp;quot;;&amp;lt;br /&amp;gt;&lt;br /&gt;
filename &amp;quot;pxeboot&amp;quot;;&amp;lt;br /&amp;gt;&lt;br /&gt;
}&amp;lt;br /&amp;gt;&lt;br /&gt;
host cm.simerson.net {&amp;lt;br /&amp;gt;&lt;br /&gt;
hardware ethernet 00:e0:18:98:f0:cc;&amp;lt;br /&amp;gt;&lt;br /&gt;
fixed-address 192.168.254.126;&amp;lt;br /&amp;gt;&lt;br /&gt;
}&amp;lt;br /&amp;gt;&lt;br /&gt;
host c1.simerson.net {&amp;lt;br /&amp;gt;&lt;br /&gt;
hardware ethernet 00:60:97:0e:bb:a7;&amp;lt;br /&amp;gt;&lt;br /&gt;
fixed-address 192.168.254.131;&amp;lt;br /&amp;gt;&lt;br /&gt;
}&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==links==&lt;br /&gt;
&lt;br /&gt;
http://people.freebsd.org/~alfred/pxe/en_US.ISO8859-1/articles/pxe/article.html&lt;br /&gt;
&lt;br /&gt;
http://www.the-labs.com/FreeBSD/Diskless/&lt;br /&gt;
&lt;br /&gt;
http://www.nber.org/sys-admin/FreeBSD-diskless.html&lt;br /&gt;
&lt;br /&gt;
http://www.onlamp.com/pub/a/bsd/2004/09/09/diskless_server.html&lt;br /&gt;
&lt;br /&gt;
http://www.onlamp.com/pub/a/bsd/2004/09/30/diskless_clients.html&lt;br /&gt;
&lt;br /&gt;
File Examples:&lt;br /&gt;
&lt;br /&gt;
http://www.watson.org/~robert/freebsd/pxe/&lt;br /&gt;
&lt;br /&gt;
[[Category:FreeBSD_for_Workstations]]&lt;/div&gt;</summary>
		<author><name>165.228.0.35</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/X_Windows_Terminal</id>
		<title>X Windows Terminal</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/X_Windows_Terminal"/>
				<updated>2006-06-22T01:58:48Z</updated>
		
		<summary type="html">&lt;p&gt;165.228.0.35: /* Setting NFS */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Advantages==&lt;br /&gt;
X Windows can be used in a Server-Client relationship.  By setting up your X Windows Server you allow the use of all the programs on that computer to all the client PC's.  &lt;br /&gt;
&lt;br /&gt;
There are many advantages of running client computers in this manner:&lt;br /&gt;
* They don't even need a hard drive.  &lt;br /&gt;
* It's silent as there are no moving parts&lt;br /&gt;
* The solution saves power as your computers are very thin.&lt;br /&gt;
* Everything can be backed up centrally.&lt;br /&gt;
* Boot times for client PC's are the fastest around.&lt;br /&gt;
* Clients don't need much CPU speed, memory, etc.  Because of this they would be very cheap.  You could get away with using a Pentium 100Mhz with 32MB ram, no hard drive, no CD-ROM, no Floppy and a fanless power supply.  You just need a ethernet card with a PXEBOOT ROM.&lt;br /&gt;
&lt;br /&gt;
==Running a single application==&lt;br /&gt;
&lt;br /&gt;
To get started I have my server setup running FreeBSD, with X-Windows and a few applications.  Nothing too special.  Then I have my client PC, which to start off I used the freesbie 1.1 boot CD to perform these initial tests.  You can get this from www.freesbie.org.  I entered into fluxbox, but you could equally use xfce4.&lt;br /&gt;
&lt;br /&gt;
 client# xhost +&lt;br /&gt;
&lt;br /&gt;
This allows all computers to start applications on your client PC.  It's dangerous but good for testing everything is setup correctly.&lt;br /&gt;
&lt;br /&gt;
 client# ssh &amp;lt;server user@server ip&amp;gt;&lt;br /&gt;
 eg: ssh mick@192.168.1.1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 ssh$ DISPLAY=&amp;lt;client ip&amp;gt;:&amp;lt;client display&amp;gt;; export DISPLAY&lt;br /&gt;
 eg: DISPLAY=192.168.1.2:0; export DISPLAY&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 ssh$ xcalc &amp;amp;&lt;br /&gt;
&lt;br /&gt;
This should display on your client&lt;br /&gt;
&lt;br /&gt;
==Running a whole X Windows Session (XDM)==&lt;br /&gt;
&lt;br /&gt;
===server===&lt;br /&gt;
edit:&lt;br /&gt;
 /usr/X11R6/lib/X11/xdm/xdm-config&lt;br /&gt;
&lt;br /&gt;
comment out with a '!' the request line&amp;lt;br&amp;gt;&lt;br /&gt;
 DisplayManager.requestPort: 0&lt;br /&gt;
&lt;br /&gt;
edit:&amp;lt;br&amp;gt;&lt;br /&gt;
 /usr/X11R6/lib/X11/xdm/Xaccess&lt;br /&gt;
&lt;br /&gt;
to have a single asterisk any where in the file, so the contents should be one asterisk and the rest commented out.&lt;br /&gt;
&lt;br /&gt;
Make sure your firewall has all traffic for you lan.  (Need to know which exact ports to allow).&lt;br /&gt;
&lt;br /&gt;
create ~/.xsession for each user which requires access and enter your start up for x &lt;br /&gt;
eg:&lt;br /&gt;
&lt;br /&gt;
 shell#!/bin/sh&amp;lt;br&amp;gt;&lt;br /&gt;
 startkde&lt;br /&gt;
&lt;br /&gt;
run xdm on server as root&lt;br /&gt;
&lt;br /&gt;
===client===&lt;br /&gt;
make sure your not in X&lt;br /&gt;
&lt;br /&gt;
type this command:&lt;br /&gt;
&lt;br /&gt;
 shell# X -broadcast&lt;br /&gt;
&lt;br /&gt;
This assumes that you are running only one server.&lt;br /&gt;
Otherwise use:&lt;br /&gt;
&lt;br /&gt;
 shell# X -query 192.168.1.2&lt;br /&gt;
&lt;br /&gt;
==GRUB Floppy boot==&lt;br /&gt;
&lt;br /&gt;
(would like to compile this ourselves later)&lt;br /&gt;
To get started we downloaded the image from www.hp.uab.edu/~ed/grub-net&lt;br /&gt;
&lt;br /&gt;
 shell# dd if=/data/grub-net.img of=/dev/fd0&lt;br /&gt;
&lt;br /&gt;
Then we mounted it as msdos&lt;br /&gt;
Remove/rename menu.1st from the grub directory as it was doing something funny with it.  We think that it was looking for a tftp server through our dhcp and we don't have a the dhcp setup correctly here, so we wanted to do it manually.&lt;br /&gt;
&lt;br /&gt;
Reboot off the floppy now..&lt;br /&gt;
&lt;br /&gt;
 grub&amp;gt; ifconfig --address=192.168.1.2 --mask=255.255.255.0 --gateway=192.168.1.1&lt;br /&gt;
 --server=192.168.1.2&lt;br /&gt;
&lt;br /&gt;
OR you can use dhcp&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 grub&amp;gt; dhcp&amp;lt;br&amp;gt; &lt;br /&gt;
 grub&amp;gt; tftpserver 192.168.1.2&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Setup tftp on your server, we created a directory /tftpboot. &lt;br /&gt;
&lt;br /&gt;
===Install and setup dhcp===&lt;br /&gt;
install /usr/ports/net/isc-dhcp3-server&lt;br /&gt;
&lt;br /&gt;
We do this so we can define the root path for the diskless system.&lt;br /&gt;
&lt;br /&gt;
edit /usr/local/etc/dhcpd.conf&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
option domain-name &amp;quot;iinet.net.au&amp;quot;;&lt;br /&gt;
option domain-name-servers 203.0.178.191;&lt;br /&gt;
&lt;br /&gt;
# The shared root file system of diskless workstation&lt;br /&gt;
option root-path &amp;quot;192.168.1.2:/diskless_ro&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
# The server from which to upload the initial boot-file (loads tftp server)&lt;br /&gt;
next-server 192.168.1.2;&lt;br /&gt;
&lt;br /&gt;
default-lease-time 3600;&lt;br /&gt;
max-lease-time 86400;&lt;br /&gt;
ddns-update-style none;&lt;br /&gt;
&lt;br /&gt;
subnet 192.168.1.0 netmask 255.255.255.0 {&lt;br /&gt;
        range 192.168.1.10 192.168.1.30;&lt;br /&gt;
&lt;br /&gt;
        # Set up default gateway&lt;br /&gt;
        option routers 192.168.1.1;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
shell# dhcpd&lt;br /&gt;
&lt;br /&gt;
===Setting NFS===&lt;br /&gt;
Network File System.  Here we share all the directories from the server so that the diskless clients see these drives as if those directories were the diskless client's.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# mkdir /diskless_ro&lt;br /&gt;
# chmod 444 /diskless_ro&lt;br /&gt;
&lt;br /&gt;
# mkdir /diskless_rw&lt;br /&gt;
# chmod 777 diskless_rw&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make directories for each IP for your clients&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /diskless_rw&lt;br /&gt;
# mkdir 192.168.1.XXX&lt;br /&gt;
# cd 192.168.1.XXX&lt;br /&gt;
# mkdir etc var&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enable NFS /etc/rc.conf&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rpcbind_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
nfs_server_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
nfs_server_flags=&amp;quot;-u -t -n 20 -h 192.168.1.2&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Configure /etc/exports&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# file systems accessible only for reading:&lt;br /&gt;
/usr -ro -maproot=0 -network 192.168.1.0 -mask 255.255.255.0&lt;br /&gt;
/diskless_ro -ro -maproot=0 -network 192.168.1.0&lt;br /&gt;
        -mask 255.255.255.0&lt;br /&gt;
&lt;br /&gt;
# file systems accessible for writing. All the resources&lt;br /&gt;
# given to every diskless station are specified by one line:&lt;br /&gt;
#&lt;br /&gt;
# Diskless-20&lt;br /&gt;
/diskless_rw/192.168.1.20/etc /diskless_rw/192.168.1.20/var \&lt;br /&gt;
        -mapall=root 192.168.1.20&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Starting NFS&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
data# rpcbind&lt;br /&gt;
data# nfsd -u -t -n 20 -h 192.168.1.2&lt;br /&gt;
data# mountd -r&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Testing to see if the exports are correct&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
data# showmount -e&lt;br /&gt;
Exports list on localhost:&lt;br /&gt;
/usr                               192.168.1.0&lt;br /&gt;
/diskless_rw/192.168.1.20/var      192.168.1.20&lt;br /&gt;
/diskless_rw/192.168.1.20/etc      192.168.1.20&lt;br /&gt;
/diskless_ro                       192.168.1.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Starting diskless system through GRUB===&lt;br /&gt;
These commands are half working...&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 grub&amp;gt; root (nd)&amp;lt;br&amp;gt;&lt;br /&gt;
 grub&amp;gt; kernel /kernel root=ad0s1a&amp;lt;br&amp;gt;&lt;br /&gt;
 grub&amp;gt; pxeboot&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Completely Diskless System (PXEBOOT ROM)==&lt;br /&gt;
&lt;br /&gt;
Running completely diskless by booting from a Network ROM Chip.&lt;br /&gt;
&lt;br /&gt;
We have now got a Intel GD82559 Etherexpress pro/100 Card.&lt;br /&gt;
&lt;br /&gt;
When we boot up on the client machine with that card it displays:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Intel UNDI, PXE-2.0 (build 067)&amp;lt;br /&amp;gt;&lt;br /&gt;
Copyright (C) 1997-1998 Intel Corporation&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Which we cannot get working so we have read that you have to update this version to Build 82.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
copy /boot/pxeboot to /tftpboot directory we made before&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
- Downloaded proboot.exe from support.intel.com and unpacked into a windows box.&amp;lt;br /&amp;gt;&lt;br /&gt;
- Copied ibautil.exe onto a windows 98 boot disk.&amp;lt;br /&amp;gt;&lt;br /&gt;
- Rebooted the test box after disabling network boot on the nic (otherwise it'll kick in before the floppy).&amp;lt;br /&amp;gt;&lt;br /&gt;
- Ran ibautil -iv to see what embedded image versions were available:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Intel(R) Boot Agent XG v1.0.09&amp;lt;br /&amp;gt;&lt;br /&gt;
Intel(R) Boot Agent GE v1.2.36&amp;lt;br /&amp;gt;&lt;br /&gt;
Intel(R) Boot Agent FE v4.1.19&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
- Ran ibautil -up to perform the image upgrade.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
It's interesting to note that no version showed up for out intel nic when initially running ibautil. After the upgrade, however, the version corectly showed as 4.1.19.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I made sure that I had simular features to this in my dhcpd.conf file:&amp;lt;br /&amp;gt;&lt;br /&gt;
option broadcast-address 192.168.254.255;&amp;lt;br /&amp;gt;&lt;br /&gt;
option domain-name-servers 192.168.254.3;&amp;lt;br /&amp;gt;&lt;br /&gt;
option domain-name &amp;quot;simerson.net&amp;quot;;&amp;lt;br /&amp;gt;&lt;br /&gt;
option routers 192.168.254.1;&amp;lt;br /&amp;gt;&lt;br /&gt;
option subnet-mask 255.255.255.0;&amp;lt;br /&amp;gt;&lt;br /&gt;
server-name &amp;quot;pxe-gw&amp;quot;;&amp;lt;br /&amp;gt;&lt;br /&gt;
server-identifier 192.168.254.3;&amp;lt;br /&amp;gt;&lt;br /&gt;
next-server 192.168.254.3;&amp;lt;br /&amp;gt;&lt;br /&gt;
default-lease-time -1;&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
subnet 192.168.254.0 netmask 255.255.255.0 {&amp;lt;br /&amp;gt;&lt;br /&gt;
range 192.168.254.32 192.168.254.99;&amp;lt;br /&amp;gt;&lt;br /&gt;
option root-path &amp;quot;/usr/local/export/pxe&amp;quot;;&amp;lt;br /&amp;gt;&lt;br /&gt;
filename &amp;quot;pxeboot&amp;quot;;&amp;lt;br /&amp;gt;&lt;br /&gt;
}&amp;lt;br /&amp;gt;&lt;br /&gt;
host cm.simerson.net {&amp;lt;br /&amp;gt;&lt;br /&gt;
hardware ethernet 00:e0:18:98:f0:cc;&amp;lt;br /&amp;gt;&lt;br /&gt;
fixed-address 192.168.254.126;&amp;lt;br /&amp;gt;&lt;br /&gt;
}&amp;lt;br /&amp;gt;&lt;br /&gt;
host c1.simerson.net {&amp;lt;br /&amp;gt;&lt;br /&gt;
hardware ethernet 00:60:97:0e:bb:a7;&amp;lt;br /&amp;gt;&lt;br /&gt;
fixed-address 192.168.254.131;&amp;lt;br /&amp;gt;&lt;br /&gt;
}&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==links==&lt;br /&gt;
&lt;br /&gt;
http://people.freebsd.org/~alfred/pxe/en_US.ISO8859-1/articles/pxe/article.html&lt;br /&gt;
&lt;br /&gt;
http://www.the-labs.com/FreeBSD/Diskless/&lt;br /&gt;
&lt;br /&gt;
http://www.nber.org/sys-admin/FreeBSD-diskless.html&lt;br /&gt;
&lt;br /&gt;
http://www.onlamp.com/pub/a/bsd/2004/09/09/diskless_server.html&lt;br /&gt;
&lt;br /&gt;
http://www.onlamp.com/pub/a/bsd/2004/09/30/diskless_clients.html&lt;br /&gt;
&lt;br /&gt;
File Examples:&lt;br /&gt;
&lt;br /&gt;
http://www.watson.org/~robert/freebsd/pxe/&lt;br /&gt;
&lt;br /&gt;
[[Category:FreeBSD_for_Workstations]]&lt;/div&gt;</summary>
		<author><name>165.228.0.35</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/CUPS</id>
		<title>CUPS</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/CUPS"/>
				<updated>2006-03-28T22:12:52Z</updated>
		
		<summary type="html">&lt;p&gt;165.228.0.35: /* Error you will get */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;CUPS (Common Unix Printing System)&lt;br /&gt;
This makes it easy to add printers to your system and programs such as firefox will pick up the printer list automatically.&lt;br /&gt;
&lt;br /&gt;
==Installing CUPS==&lt;br /&gt;
 # pkg_add -r cups&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
 # cd /usr/ports/print/cups&lt;br /&gt;
 # make install clean&lt;br /&gt;
&lt;br /&gt;
==CUPS to PDF==&lt;br /&gt;
CUPS can also be used to print directly from any program to a PDF file.&lt;br /&gt;
&lt;br /&gt;
 # pkg_add -r cups-pdf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==CUPS mimics lpr==&lt;br /&gt;
If you have old programs which use lpr to print then you should install CUPS-lpr&lt;br /&gt;
 &lt;br /&gt;
 # pkg_add -r cups-lpr&lt;br /&gt;
&lt;br /&gt;
==CUPS and Gnome Warning==&lt;br /&gt;
I've installed CUPS on a few machines and found everytime I do I cannot print though any gnome based application.  If you like to use gnome applications to print your work, don't install CUPS just use LPD.&lt;br /&gt;
&lt;br /&gt;
programs which crashed right out when printing were:&lt;br /&gt;
gedit, abiword, gnumeric, inkscape.&lt;br /&gt;
&lt;br /&gt;
===Error you will get===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(gdb) run&lt;br /&gt;
Starting program: /usr/X11R6/bin/gnumeric&lt;br /&gt;
&lt;br /&gt;
Program received signal SIGBUS, Bus error.&lt;br /&gt;
[Switching to Thread 3 (LWP 100326)]&lt;br /&gt;
0x29dfd450 in ippWriteIO (dst=0x8542000, cb=0x29dfa3bc &amp;lt;httpWrite&amp;gt;,&lt;br /&gt;
    blocking=1, parent=0x0, ipp=0x8517880) at ipp.c:1418&lt;br /&gt;
1418    ipp.c: No such file or directory.&lt;br /&gt;
        in ipp.c&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==links==&lt;br /&gt;
http://forums.bsdnexus.com/viewtopic.php?id=36&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Ports and Packages]]&lt;/div&gt;</summary>
		<author><name>165.228.0.35</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/CUPS</id>
		<title>CUPS</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/CUPS"/>
				<updated>2006-03-28T22:12:26Z</updated>
		
		<summary type="html">&lt;p&gt;165.228.0.35: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;CUPS (Common Unix Printing System)&lt;br /&gt;
This makes it easy to add printers to your system and programs such as firefox will pick up the printer list automatically.&lt;br /&gt;
&lt;br /&gt;
==Installing CUPS==&lt;br /&gt;
 # pkg_add -r cups&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
 # cd /usr/ports/print/cups&lt;br /&gt;
 # make install clean&lt;br /&gt;
&lt;br /&gt;
==CUPS to PDF==&lt;br /&gt;
CUPS can also be used to print directly from any program to a PDF file.&lt;br /&gt;
&lt;br /&gt;
 # pkg_add -r cups-pdf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==CUPS mimics lpr==&lt;br /&gt;
If you have old programs which use lpr to print then you should install CUPS-lpr&lt;br /&gt;
 &lt;br /&gt;
 # pkg_add -r cups-lpr&lt;br /&gt;
&lt;br /&gt;
==CUPS and Gnome Warning==&lt;br /&gt;
I've installed CUPS on a few machines and found everytime I do I cannot print though any gnome based application.  If you like to use gnome applications to print your work, don't install CUPS just use LPD.&lt;br /&gt;
&lt;br /&gt;
programs which crashed right out when printing were:&lt;br /&gt;
gedit, abiword, gnumeric, inkscape.&lt;br /&gt;
&lt;br /&gt;
===Error you will get===&lt;br /&gt;
(gdb) run&lt;br /&gt;
Starting program: /usr/X11R6/bin/gnumeric&lt;br /&gt;
&lt;br /&gt;
Program received signal SIGBUS, Bus error.&lt;br /&gt;
[Switching to Thread 3 (LWP 100326)]&lt;br /&gt;
0x29dfd450 in ippWriteIO (dst=0x8542000, cb=0x29dfa3bc &amp;lt;httpWrite&amp;gt;,&lt;br /&gt;
    blocking=1, parent=0x0, ipp=0x8517880) at ipp.c:1418&lt;br /&gt;
1418    ipp.c: No such file or directory.&lt;br /&gt;
        in ipp.c&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==links==&lt;br /&gt;
http://forums.bsdnexus.com/viewtopic.php?id=36&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Ports and Packages]]&lt;/div&gt;</summary>
		<author><name>165.228.0.35</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/Amarok</id>
		<title>Amarok</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/Amarok"/>
				<updated>2006-01-17T04:44:13Z</updated>
		
		<summary type="html">&lt;p&gt;165.228.0.35: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Amarok is one of the best media players for Freebsd allowing you to organise your library and much much more.  Some of the features are:&amp;lt;br /&amp;gt;&lt;br /&gt;
-Podcasting&amp;lt;br /&amp;gt;&lt;br /&gt;
-wikipedia built-in for artist lookup&amp;lt;br /&amp;gt;&lt;br /&gt;
-auto DJ&amp;lt;br /&amp;gt;&lt;br /&gt;
-library of all your music&amp;lt;br /&amp;gt;&lt;br /&gt;
-save and restore playlists&amp;lt;br /&amp;gt;&lt;br /&gt;
-connect to ipod or other mp3 devices and sync content&amp;lt;br /&amp;gt;&lt;br /&gt;
-easy to use&amp;lt;br /&amp;gt;&lt;br /&gt;
-burn your playlist from amarok (calls k3b)&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
It rocks!&amp;lt;br /&amp;gt;&lt;br /&gt;
pkg_add -r amarok&amp;lt;br /&amp;gt;&lt;/div&gt;</summary>
		<author><name>165.228.0.35</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/Amarok</id>
		<title>Amarok</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/Amarok"/>
				<updated>2006-01-17T04:43:48Z</updated>
		
		<summary type="html">&lt;p&gt;165.228.0.35: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Amarok is one of the best media players for Freebsd allowing you to organise your library and much much more.  Some of the features are:&lt;br /&gt;
-Podcasting&lt;br /&gt;
-wikipedia built-in for artist lookup&lt;br /&gt;
-auto DJ&lt;br /&gt;
-library of all your music&lt;br /&gt;
-save and restore playlists&lt;br /&gt;
-connect to ipod or other mp3 devices and sync content&lt;br /&gt;
-easy to use&lt;br /&gt;
-burn your playlist from amarok (calls k3b)&lt;br /&gt;
&lt;br /&gt;
It rocks!&lt;br /&gt;
pkg_add -r amarok&lt;/div&gt;</summary>
		<author><name>165.228.0.35</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/Talk:Samba</id>
		<title>Talk:Samba</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/Talk:Samba"/>
				<updated>2005-11-08T03:03:07Z</updated>
		
		<summary type="html">&lt;p&gt;165.228.0.35: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Is there a good samba GUI viewer?&lt;br /&gt;
&lt;br /&gt;
I've tried LinNeighbourhood, xsmbrowser and xfce4's samba viewer but their all lacking and don't work properly, is there something for rox-filer or simular?&lt;br /&gt;
&lt;br /&gt;
What do people use?&lt;/div&gt;</summary>
		<author><name>165.228.0.35</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/MySQL,_Adding_Users</id>
		<title>MySQL, Adding Users</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/MySQL,_Adding_Users"/>
				<updated>2005-08-16T03:30:55Z</updated>
		
		<summary type="html">&lt;p&gt;165.228.0.35: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;To add new users to mysql use the following commands (if you haven't set a password for the mysql root user, leave off the '''-p'''):&lt;br /&gt;
&lt;br /&gt;
 oyabun# '''mysql -u root mysql -p'''&lt;br /&gt;
 password:&lt;br /&gt;
 &amp;gt; GRANT ALL PRIVILEGES ON *.* TO user@localhost IDENTIFIED BY 'pass' WITH GRANT OPTION;&lt;br /&gt;
&lt;br /&gt;
Note: that command grants full privileges on ALL databases to &amp;quot;user@localhost&amp;quot;, effectively creating a new mysql root user, which is usually not what you want.  More frequently, you will want to '''GRANT ALL PRIVILEGES ON &amp;lt;nowiki&amp;gt;[[databasename]]&amp;lt;/nowiki&amp;gt;.*''' or something similar.&lt;br /&gt;
&lt;br /&gt;
==External Links==&lt;br /&gt;
&lt;br /&gt;
http://dev.mysql.com/doc/mysql/en/adding-users.html&lt;br /&gt;
&lt;br /&gt;
http://sunsite.mff.cuni.cz/MIRRORS/ftp.mysql.com/doc/en/Adding_users.html&lt;br /&gt;
&lt;br /&gt;
[[Category:Common Tasks]]&lt;/div&gt;</summary>
		<author><name>165.228.0.35</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/MySQL,_Adding_Users</id>
		<title>MySQL, Adding Users</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/MySQL,_Adding_Users"/>
				<updated>2005-08-16T03:28:48Z</updated>
		
		<summary type="html">&lt;p&gt;165.228.0.35: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;To add new users to mysql use the following commands (if you haven't set a password for the mysql root user, leave off the '''-p'''):&lt;br /&gt;
&lt;br /&gt;
 oyabun# '''mysql --user=root mysql -p'''&lt;br /&gt;
 password:&lt;br /&gt;
 &amp;gt; GRANT ALL PRIVILEGES ON *.* TO user@localhost IDENTIFIED BY 'pass' WITH GRANT OPTION;&lt;br /&gt;
&lt;br /&gt;
Note: that command grants full privileges on ALL databases to &amp;quot;user@localhost&amp;quot;, effectively creating a new mysql root user, which is usually not what you want.  More frequently, you will want to '''GRANT ALL PRIVILEGES ON &amp;lt;nowiki&amp;gt;[[databasename]]&amp;lt;/nowiki&amp;gt;.*''' or something similar.&lt;br /&gt;
&lt;br /&gt;
==External Links==&lt;br /&gt;
&lt;br /&gt;
http://dev.mysql.com/doc/mysql/en/adding-users.html&lt;br /&gt;
&lt;br /&gt;
http://sunsite.mff.cuni.cz/MIRRORS/ftp.mysql.com/doc/en/Adding_users.html&lt;br /&gt;
&lt;br /&gt;
[[Category:Common Tasks]]&lt;/div&gt;</summary>
		<author><name>165.228.0.35</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/MySQL,_Simple_Installation</id>
		<title>MySQL, Simple Installation</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/MySQL,_Simple_Installation"/>
				<updated>2005-08-16T01:22:18Z</updated>
		
		<summary type="html">&lt;p&gt;165.228.0.35: /* '''Adding new users''' */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article will walk you through a simple installation of MySQL server, for usage via localhost in a local environment. (For example, for use in conjunction with Apache and PHP in a web-database related role, with no direct foreign connections to the MySQL server. All connections will be made internally.)&lt;br /&gt;
&lt;br /&gt;
See also:  [[MySQL]]&lt;br /&gt;
&lt;br /&gt;
=='''Overview'''==&lt;br /&gt;
&lt;br /&gt;
For this article, I'll be installing MySQL Server and Client, version 4.0.20 (current in my ports tree.) The steps listed here will very likely work for newer versions available when you read this, but you may want to google to make sure.&lt;br /&gt;
&lt;br /&gt;
'''Install MySQL from ports'''&lt;br /&gt;
&lt;br /&gt;
First, we need to install the port. Make sure you're logged in as [[root]], and as always, update your ports tree with [[CVSUP]] before doing any major software installations.&lt;br /&gt;
&lt;br /&gt;
 oyabun# cd /usr/ports/databases/mysql40-server/&lt;br /&gt;
 oyabun# make install clean&lt;br /&gt;
 &lt;br /&gt;
This will download the source for MySQL Server, compile it, and also install mysql40-client, as it is a dependency. This process will very likely take a decent amount of time. ''Oyabun'' is my BSD server, and it's an AthlonXP 2000+, compiling MySQL from source usually takes about 15 - 25 minutes. (Guesstimating, I've never actually timed it.)&lt;br /&gt;
&lt;br /&gt;
When the installation is done, you'll see something very similar to this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre name=&amp;quot;I used pre on this because this is a lot of text.&amp;quot;&amp;gt;&lt;br /&gt;
To start mysqld at boot time you have to copy support-files/mysql.server&lt;br /&gt;
to the right place for your system&lt;br /&gt;
&lt;br /&gt;
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !&lt;br /&gt;
To do so, start the server, then issue the following commands:&lt;br /&gt;
/usr/local/bin/mysqladmin -u root password 'new-password'&lt;br /&gt;
/usr/local/bin/mysqladmin -u root -h oyabun.n3s.local password 'new-password'&lt;br /&gt;
See the manual for more instructions.&lt;br /&gt;
&lt;br /&gt;
You can start the MySQL daemon with:&lt;br /&gt;
cd /usr/local ; /usr/local/bin/mysqld_safe &amp;amp;&lt;br /&gt;
&lt;br /&gt;
You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory:&lt;br /&gt;
cd sql-bench ; perl run-all-tests&lt;br /&gt;
&lt;br /&gt;
Please report any problems with the /usr/local/bin/mysqlbug script!&lt;br /&gt;
&lt;br /&gt;
The latest information about MySQL is available on the web at&lt;br /&gt;
http://www.mysql.com&lt;br /&gt;
Support MySQL by buying support/licenses at https://order.mysql.com&lt;br /&gt;
mysql:*:88:&lt;br /&gt;
You already have a group &amp;quot;mysql&amp;quot;, so I will use it.&lt;br /&gt;
mysql:*:88:88::0:0:MySQL Daemon:/var/db/mysql:/sbin/nologin&lt;br /&gt;
You already have a user &amp;quot;mysql&amp;quot;, so I will use it.&lt;br /&gt;
Changed home directory of &amp;quot;mysql&amp;quot; to &amp;quot;/var/db/mysql&amp;quot;&lt;br /&gt;
===&amp;gt;   Compressing manual pages for mysql-server-4.0.20&lt;br /&gt;
===&amp;gt;   Registering installation for mysql-server-4.0.20&lt;br /&gt;
===&amp;gt; SECURITY REPORT:&lt;br /&gt;
      This port has installed the following files which may act as network&lt;br /&gt;
      servers and may therefore pose a remote security risk to the system.&lt;br /&gt;
/usr/local/bin/ndb_drop_table&lt;br /&gt;
/usr/local/bin/ndb_delete_all&lt;br /&gt;
/usr/local/libexec/ndbd&lt;br /&gt;
/usr/local/bin/ndb_restore&lt;br /&gt;
/usr/local/bin/ndb_cpcd&lt;br /&gt;
/usr/local/libexec/ndb_mgmd&lt;br /&gt;
/usr/local/bin/ndb_select_all&lt;br /&gt;
/usr/local/bin/ndb_drop_index&lt;br /&gt;
/usr/local/bin/ndb_desc&lt;br /&gt;
/usr/local/lib/mysql/libndbclient.so.0&lt;br /&gt;
/usr/local/bin/ndb_show_tables&lt;br /&gt;
/usr/local/bin/ndb_waiter&lt;br /&gt;
/usr/local/bin/ndb_select_count&lt;br /&gt;
&lt;br /&gt;
      This port has installed the following startup scripts which may cause&lt;br /&gt;
      these network services to be started at boot time.&lt;br /&gt;
/usr/local/etc/rc.d/mysql-server.sh&lt;br /&gt;
&lt;br /&gt;
      If there are vulnerabilities in these programs there may be a security&lt;br /&gt;
      risk to the system. FreeBSD makes no guarantee about the security of&lt;br /&gt;
      ports included in the Ports Collection. Please type 'make deinstall'&lt;br /&gt;
      to deinstall the port if this is a concern.&lt;br /&gt;
&lt;br /&gt;
      For more information, and contact details about the security&lt;br /&gt;
      status of this software, see the following webpage:&lt;br /&gt;
http://www.mysql.com/&lt;br /&gt;
===&amp;gt;  Cleaning for mysql-client-4.0.20&lt;br /&gt;
===&amp;gt;  Cleaning for libtool-1.5.8&lt;br /&gt;
===&amp;gt;  Cleaning for mysql-server-4.0.20&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The really important parts are those about '''setting a MySQL password for your root account''', and the addition of a mysql group and a mysql user to your base system. You'll notice in my example that I already had a mysql user and group, but you likely won't.&lt;br /&gt;
&lt;br /&gt;
You'll also notice that the install added a startup script to /usr/local/etc/rc.d/, meaning MySQL server will start with every boot now. Let's move on to configuration and finish up this installation.&lt;br /&gt;
&lt;br /&gt;
=='''Configuration'''==&lt;br /&gt;
&lt;br /&gt;
MySQL is now installed, so let's get it ready for use.&lt;br /&gt;
&lt;br /&gt;
First, we have to [[rehash]] your shell's PATH and start the server.&lt;br /&gt;
&lt;br /&gt;
 oyabun# '''rehash'''&lt;br /&gt;
 oyabun# '''/usr/local/etc/rc.d/mysql-server.sh start'''&lt;br /&gt;
 mysqloyabun#&lt;br /&gt;
&lt;br /&gt;
You'll notice mysql's startup script notified you that it started by saying &amp;quot;''mysql'' - there's no carriage return after a startup script calls out its notification like that, so instead of seeing a completely separate line, you see &amp;quot;mysqloyabun#&amp;quot; instead of &amp;quot;oyabun#&amp;quot; as the next command prompt.&lt;br /&gt;
&lt;br /&gt;
Note: by default, your new MySQL installation does not have a root password set.  If you want to keep [[shell users]] from logging into it as root, or if you want remote SQL clients to be able to authenticate themselves as root, you'll need to [[MySQL:_set_root_password|set a root password]] now.&lt;br /&gt;
&lt;br /&gt;
=='''Testing the installation'''==&lt;br /&gt;
&lt;br /&gt;
We're going to get into a little bit of mysql syntax here. For more in-depth documentation, you should visit http://www.mysql.com or google the particular command you're having trouble with, using 'mysql grant syntax' as the search argument for example.&lt;br /&gt;
&lt;br /&gt;
 oyabun# mysql -p&lt;br /&gt;
 Enter password:&lt;br /&gt;
 Welcome to the MySQL monitor.  Commands end with ; or \g.&lt;br /&gt;
 Your MySQL connection id is 31 to server version: 4.0.20&lt;br /&gt;
 Type 'help;' or '\h' for help. Type '\c' to clear the buffer.&lt;br /&gt;
 mysql&amp;gt; create database testing;&lt;br /&gt;
 Query OK, 1 row affected (0.00 sec)&lt;br /&gt;
 mysql&amp;gt; grant all on testing.* to 'user'@'localhost' identified by 'password';&lt;br /&gt;
 Query OK, 0 rows affected (0.02 sec)&lt;br /&gt;
 mysql&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First, you'll notice that all commands in the mysql client have to be terminated with ''';'''. If you forget and hit enter, you can just enter a lone ''';''' on a new line, and it will work provided the syntax of the command is correct.&lt;br /&gt;
&lt;br /&gt;
If both of those commands worked, then you just created a database named testing, and assigned full read/write priviledges to a user name 'user' with password 'password'.&lt;br /&gt;
&lt;br /&gt;
To delete a database, issue the following command:&lt;br /&gt;
&lt;br /&gt;
 mysql&amp;gt; drop database testing;&lt;br /&gt;
 Query OK, 0 rows affected (0.00 sec)&lt;br /&gt;
&lt;br /&gt;
That's it! You now have MySQL added to your machine, and you begin using php scripts or other MySQL tools.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Adding new users'''==&lt;br /&gt;
&lt;br /&gt;
To add new users to mysql use the followings commands:&lt;br /&gt;
&lt;br /&gt;
shell# mysql --user=root mysql&lt;br /&gt;
(Add -p to that command if you have set a password for root access to mysql)&lt;br /&gt;
&lt;br /&gt;
This next command will allow full access to the new user&lt;br /&gt;
&lt;br /&gt;
&amp;gt; GRANT ALL PRIVILEGES ON *.* TO user@localhost IDENTIFIED BY 'pass' WITH GRANT OPTION;&lt;br /&gt;
&lt;br /&gt;
**Warning  You may not want full access to this user therefore you will have to limit what privileges that user has.  Refer to the GRANT command with these links:&lt;br /&gt;
&lt;br /&gt;
[http://dev.mysql.com/doc/mysql/en/adding-users.html link Mysql-adding-users]&lt;br /&gt;
[http://sunsite.mff.cuni.cz/MIRRORS/ftp.mysql.com/doc/en/Adding_users.html link Mysql-adding-users2]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category : Common Tasks]]&lt;/div&gt;</summary>
		<author><name>165.228.0.35</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/MySQL,_Simple_Installation</id>
		<title>MySQL, Simple Installation</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/MySQL,_Simple_Installation"/>
				<updated>2005-08-16T01:18:01Z</updated>
		
		<summary type="html">&lt;p&gt;165.228.0.35: /* '''Adding new users''' */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article will walk you through a simple installation of MySQL server, for usage via localhost in a local environment. (For example, for use in conjunction with Apache and PHP in a web-database related role, with no direct foreign connections to the MySQL server. All connections will be made internally.)&lt;br /&gt;
&lt;br /&gt;
See also:  [[MySQL]]&lt;br /&gt;
&lt;br /&gt;
=='''Overview'''==&lt;br /&gt;
&lt;br /&gt;
For this article, I'll be installing MySQL Server and Client, version 4.0.20 (current in my ports tree.) The steps listed here will very likely work for newer versions available when you read this, but you may want to google to make sure.&lt;br /&gt;
&lt;br /&gt;
'''Install MySQL from ports'''&lt;br /&gt;
&lt;br /&gt;
First, we need to install the port. Make sure you're logged in as [[root]], and as always, update your ports tree with [[CVSUP]] before doing any major software installations.&lt;br /&gt;
&lt;br /&gt;
 oyabun# cd /usr/ports/databases/mysql40-server/&lt;br /&gt;
 oyabun# make install clean&lt;br /&gt;
 &lt;br /&gt;
This will download the source for MySQL Server, compile it, and also install mysql40-client, as it is a dependency. This process will very likely take a decent amount of time. ''Oyabun'' is my BSD server, and it's an AthlonXP 2000+, compiling MySQL from source usually takes about 15 - 25 minutes. (Guesstimating, I've never actually timed it.)&lt;br /&gt;
&lt;br /&gt;
When the installation is done, you'll see something very similar to this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre name=&amp;quot;I used pre on this because this is a lot of text.&amp;quot;&amp;gt;&lt;br /&gt;
To start mysqld at boot time you have to copy support-files/mysql.server&lt;br /&gt;
to the right place for your system&lt;br /&gt;
&lt;br /&gt;
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !&lt;br /&gt;
To do so, start the server, then issue the following commands:&lt;br /&gt;
/usr/local/bin/mysqladmin -u root password 'new-password'&lt;br /&gt;
/usr/local/bin/mysqladmin -u root -h oyabun.n3s.local password 'new-password'&lt;br /&gt;
See the manual for more instructions.&lt;br /&gt;
&lt;br /&gt;
You can start the MySQL daemon with:&lt;br /&gt;
cd /usr/local ; /usr/local/bin/mysqld_safe &amp;amp;&lt;br /&gt;
&lt;br /&gt;
You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory:&lt;br /&gt;
cd sql-bench ; perl run-all-tests&lt;br /&gt;
&lt;br /&gt;
Please report any problems with the /usr/local/bin/mysqlbug script!&lt;br /&gt;
&lt;br /&gt;
The latest information about MySQL is available on the web at&lt;br /&gt;
http://www.mysql.com&lt;br /&gt;
Support MySQL by buying support/licenses at https://order.mysql.com&lt;br /&gt;
mysql:*:88:&lt;br /&gt;
You already have a group &amp;quot;mysql&amp;quot;, so I will use it.&lt;br /&gt;
mysql:*:88:88::0:0:MySQL Daemon:/var/db/mysql:/sbin/nologin&lt;br /&gt;
You already have a user &amp;quot;mysql&amp;quot;, so I will use it.&lt;br /&gt;
Changed home directory of &amp;quot;mysql&amp;quot; to &amp;quot;/var/db/mysql&amp;quot;&lt;br /&gt;
===&amp;gt;   Compressing manual pages for mysql-server-4.0.20&lt;br /&gt;
===&amp;gt;   Registering installation for mysql-server-4.0.20&lt;br /&gt;
===&amp;gt; SECURITY REPORT:&lt;br /&gt;
      This port has installed the following files which may act as network&lt;br /&gt;
      servers and may therefore pose a remote security risk to the system.&lt;br /&gt;
/usr/local/bin/ndb_drop_table&lt;br /&gt;
/usr/local/bin/ndb_delete_all&lt;br /&gt;
/usr/local/libexec/ndbd&lt;br /&gt;
/usr/local/bin/ndb_restore&lt;br /&gt;
/usr/local/bin/ndb_cpcd&lt;br /&gt;
/usr/local/libexec/ndb_mgmd&lt;br /&gt;
/usr/local/bin/ndb_select_all&lt;br /&gt;
/usr/local/bin/ndb_drop_index&lt;br /&gt;
/usr/local/bin/ndb_desc&lt;br /&gt;
/usr/local/lib/mysql/libndbclient.so.0&lt;br /&gt;
/usr/local/bin/ndb_show_tables&lt;br /&gt;
/usr/local/bin/ndb_waiter&lt;br /&gt;
/usr/local/bin/ndb_select_count&lt;br /&gt;
&lt;br /&gt;
      This port has installed the following startup scripts which may cause&lt;br /&gt;
      these network services to be started at boot time.&lt;br /&gt;
/usr/local/etc/rc.d/mysql-server.sh&lt;br /&gt;
&lt;br /&gt;
      If there are vulnerabilities in these programs there may be a security&lt;br /&gt;
      risk to the system. FreeBSD makes no guarantee about the security of&lt;br /&gt;
      ports included in the Ports Collection. Please type 'make deinstall'&lt;br /&gt;
      to deinstall the port if this is a concern.&lt;br /&gt;
&lt;br /&gt;
      For more information, and contact details about the security&lt;br /&gt;
      status of this software, see the following webpage:&lt;br /&gt;
http://www.mysql.com/&lt;br /&gt;
===&amp;gt;  Cleaning for mysql-client-4.0.20&lt;br /&gt;
===&amp;gt;  Cleaning for libtool-1.5.8&lt;br /&gt;
===&amp;gt;  Cleaning for mysql-server-4.0.20&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The really important parts are those about '''setting a MySQL password for your root account''', and the addition of a mysql group and a mysql user to your base system. You'll notice in my example that I already had a mysql user and group, but you likely won't.&lt;br /&gt;
&lt;br /&gt;
You'll also notice that the install added a startup script to /usr/local/etc/rc.d/, meaning MySQL server will start with every boot now. Let's move on to configuration and finish up this installation.&lt;br /&gt;
&lt;br /&gt;
=='''Configuration'''==&lt;br /&gt;
&lt;br /&gt;
MySQL is now installed, so let's get it ready for use.&lt;br /&gt;
&lt;br /&gt;
First, we have to [[rehash]] your shell's PATH and start the server.&lt;br /&gt;
&lt;br /&gt;
 oyabun# '''rehash'''&lt;br /&gt;
 oyabun# '''/usr/local/etc/rc.d/mysql-server.sh start'''&lt;br /&gt;
 mysqloyabun#&lt;br /&gt;
&lt;br /&gt;
You'll notice mysql's startup script notified you that it started by saying &amp;quot;''mysql'' - there's no carriage return after a startup script calls out its notification like that, so instead of seeing a completely separate line, you see &amp;quot;mysqloyabun#&amp;quot; instead of &amp;quot;oyabun#&amp;quot; as the next command prompt.&lt;br /&gt;
&lt;br /&gt;
Note: by default, your new MySQL installation does not have a root password set.  If you want to keep [[shell users]] from logging into it as root, or if you want remote SQL clients to be able to authenticate themselves as root, you'll need to [[MySQL:_set_root_password|set a root password]] now.&lt;br /&gt;
&lt;br /&gt;
=='''Testing the installation'''==&lt;br /&gt;
&lt;br /&gt;
We're going to get into a little bit of mysql syntax here. For more in-depth documentation, you should visit http://www.mysql.com or google the particular command you're having trouble with, using 'mysql grant syntax' as the search argument for example.&lt;br /&gt;
&lt;br /&gt;
 oyabun# mysql -p&lt;br /&gt;
 Enter password:&lt;br /&gt;
 Welcome to the MySQL monitor.  Commands end with ; or \g.&lt;br /&gt;
 Your MySQL connection id is 31 to server version: 4.0.20&lt;br /&gt;
 Type 'help;' or '\h' for help. Type '\c' to clear the buffer.&lt;br /&gt;
 mysql&amp;gt; create database testing;&lt;br /&gt;
 Query OK, 1 row affected (0.00 sec)&lt;br /&gt;
 mysql&amp;gt; grant all on testing.* to 'user'@'localhost' identified by 'password';&lt;br /&gt;
 Query OK, 0 rows affected (0.02 sec)&lt;br /&gt;
 mysql&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First, you'll notice that all commands in the mysql client have to be terminated with ''';'''. If you forget and hit enter, you can just enter a lone ''';''' on a new line, and it will work provided the syntax of the command is correct.&lt;br /&gt;
&lt;br /&gt;
If both of those commands worked, then you just created a database named testing, and assigned full read/write priviledges to a user name 'user' with password 'password'.&lt;br /&gt;
&lt;br /&gt;
To delete a database, issue the following command:&lt;br /&gt;
&lt;br /&gt;
 mysql&amp;gt; drop database testing;&lt;br /&gt;
 Query OK, 0 rows affected (0.00 sec)&lt;br /&gt;
&lt;br /&gt;
That's it! You now have MySQL added to your machine, and you begin using php scripts or other MySQL tools.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Adding new users'''==&lt;br /&gt;
&lt;br /&gt;
To add new users to mysql use the followings commands:&lt;br /&gt;
shell# mysql --user=root mysql&lt;br /&gt;
(Add -p to that command if you have set a password for root access to mysql)&lt;br /&gt;
&lt;br /&gt;
This next command will allow full access to the new user&lt;br /&gt;
&amp;gt; GRANT ALL PRIVILEGES ON *.* TO user@localhost IDENTIFIED BY 'pass' WITH GRANT OPTION;&lt;br /&gt;
&lt;br /&gt;
**Warning  You may not want full access to this user therefore you will have to limit what privileges that user has.  Refer to the GRANT command with these links:&lt;br /&gt;
&lt;br /&gt;
[http://dev.mysql.com/doc/mysql/en/adding-users.html link Mysql-adding-users]&lt;br /&gt;
[http://sunsite.mff.cuni.cz/MIRRORS/ftp.mysql.com/doc/en/Adding_users.html link Mysql-adding-users2]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category : Common Tasks]]&lt;/div&gt;</summary>
		<author><name>165.228.0.35</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/MySQL,_Simple_Installation</id>
		<title>MySQL, Simple Installation</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/MySQL,_Simple_Installation"/>
				<updated>2005-08-16T01:17:15Z</updated>
		
		<summary type="html">&lt;p&gt;165.228.0.35: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article will walk you through a simple installation of MySQL server, for usage via localhost in a local environment. (For example, for use in conjunction with Apache and PHP in a web-database related role, with no direct foreign connections to the MySQL server. All connections will be made internally.)&lt;br /&gt;
&lt;br /&gt;
See also:  [[MySQL]]&lt;br /&gt;
&lt;br /&gt;
=='''Overview'''==&lt;br /&gt;
&lt;br /&gt;
For this article, I'll be installing MySQL Server and Client, version 4.0.20 (current in my ports tree.) The steps listed here will very likely work for newer versions available when you read this, but you may want to google to make sure.&lt;br /&gt;
&lt;br /&gt;
'''Install MySQL from ports'''&lt;br /&gt;
&lt;br /&gt;
First, we need to install the port. Make sure you're logged in as [[root]], and as always, update your ports tree with [[CVSUP]] before doing any major software installations.&lt;br /&gt;
&lt;br /&gt;
 oyabun# cd /usr/ports/databases/mysql40-server/&lt;br /&gt;
 oyabun# make install clean&lt;br /&gt;
 &lt;br /&gt;
This will download the source for MySQL Server, compile it, and also install mysql40-client, as it is a dependency. This process will very likely take a decent amount of time. ''Oyabun'' is my BSD server, and it's an AthlonXP 2000+, compiling MySQL from source usually takes about 15 - 25 minutes. (Guesstimating, I've never actually timed it.)&lt;br /&gt;
&lt;br /&gt;
When the installation is done, you'll see something very similar to this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre name=&amp;quot;I used pre on this because this is a lot of text.&amp;quot;&amp;gt;&lt;br /&gt;
To start mysqld at boot time you have to copy support-files/mysql.server&lt;br /&gt;
to the right place for your system&lt;br /&gt;
&lt;br /&gt;
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !&lt;br /&gt;
To do so, start the server, then issue the following commands:&lt;br /&gt;
/usr/local/bin/mysqladmin -u root password 'new-password'&lt;br /&gt;
/usr/local/bin/mysqladmin -u root -h oyabun.n3s.local password 'new-password'&lt;br /&gt;
See the manual for more instructions.&lt;br /&gt;
&lt;br /&gt;
You can start the MySQL daemon with:&lt;br /&gt;
cd /usr/local ; /usr/local/bin/mysqld_safe &amp;amp;&lt;br /&gt;
&lt;br /&gt;
You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory:&lt;br /&gt;
cd sql-bench ; perl run-all-tests&lt;br /&gt;
&lt;br /&gt;
Please report any problems with the /usr/local/bin/mysqlbug script!&lt;br /&gt;
&lt;br /&gt;
The latest information about MySQL is available on the web at&lt;br /&gt;
http://www.mysql.com&lt;br /&gt;
Support MySQL by buying support/licenses at https://order.mysql.com&lt;br /&gt;
mysql:*:88:&lt;br /&gt;
You already have a group &amp;quot;mysql&amp;quot;, so I will use it.&lt;br /&gt;
mysql:*:88:88::0:0:MySQL Daemon:/var/db/mysql:/sbin/nologin&lt;br /&gt;
You already have a user &amp;quot;mysql&amp;quot;, so I will use it.&lt;br /&gt;
Changed home directory of &amp;quot;mysql&amp;quot; to &amp;quot;/var/db/mysql&amp;quot;&lt;br /&gt;
===&amp;gt;   Compressing manual pages for mysql-server-4.0.20&lt;br /&gt;
===&amp;gt;   Registering installation for mysql-server-4.0.20&lt;br /&gt;
===&amp;gt; SECURITY REPORT:&lt;br /&gt;
      This port has installed the following files which may act as network&lt;br /&gt;
      servers and may therefore pose a remote security risk to the system.&lt;br /&gt;
/usr/local/bin/ndb_drop_table&lt;br /&gt;
/usr/local/bin/ndb_delete_all&lt;br /&gt;
/usr/local/libexec/ndbd&lt;br /&gt;
/usr/local/bin/ndb_restore&lt;br /&gt;
/usr/local/bin/ndb_cpcd&lt;br /&gt;
/usr/local/libexec/ndb_mgmd&lt;br /&gt;
/usr/local/bin/ndb_select_all&lt;br /&gt;
/usr/local/bin/ndb_drop_index&lt;br /&gt;
/usr/local/bin/ndb_desc&lt;br /&gt;
/usr/local/lib/mysql/libndbclient.so.0&lt;br /&gt;
/usr/local/bin/ndb_show_tables&lt;br /&gt;
/usr/local/bin/ndb_waiter&lt;br /&gt;
/usr/local/bin/ndb_select_count&lt;br /&gt;
&lt;br /&gt;
      This port has installed the following startup scripts which may cause&lt;br /&gt;
      these network services to be started at boot time.&lt;br /&gt;
/usr/local/etc/rc.d/mysql-server.sh&lt;br /&gt;
&lt;br /&gt;
      If there are vulnerabilities in these programs there may be a security&lt;br /&gt;
      risk to the system. FreeBSD makes no guarantee about the security of&lt;br /&gt;
      ports included in the Ports Collection. Please type 'make deinstall'&lt;br /&gt;
      to deinstall the port if this is a concern.&lt;br /&gt;
&lt;br /&gt;
      For more information, and contact details about the security&lt;br /&gt;
      status of this software, see the following webpage:&lt;br /&gt;
http://www.mysql.com/&lt;br /&gt;
===&amp;gt;  Cleaning for mysql-client-4.0.20&lt;br /&gt;
===&amp;gt;  Cleaning for libtool-1.5.8&lt;br /&gt;
===&amp;gt;  Cleaning for mysql-server-4.0.20&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The really important parts are those about '''setting a MySQL password for your root account''', and the addition of a mysql group and a mysql user to your base system. You'll notice in my example that I already had a mysql user and group, but you likely won't.&lt;br /&gt;
&lt;br /&gt;
You'll also notice that the install added a startup script to /usr/local/etc/rc.d/, meaning MySQL server will start with every boot now. Let's move on to configuration and finish up this installation.&lt;br /&gt;
&lt;br /&gt;
=='''Configuration'''==&lt;br /&gt;
&lt;br /&gt;
MySQL is now installed, so let's get it ready for use.&lt;br /&gt;
&lt;br /&gt;
First, we have to [[rehash]] your shell's PATH and start the server.&lt;br /&gt;
&lt;br /&gt;
 oyabun# '''rehash'''&lt;br /&gt;
 oyabun# '''/usr/local/etc/rc.d/mysql-server.sh start'''&lt;br /&gt;
 mysqloyabun#&lt;br /&gt;
&lt;br /&gt;
You'll notice mysql's startup script notified you that it started by saying &amp;quot;''mysql'' - there's no carriage return after a startup script calls out its notification like that, so instead of seeing a completely separate line, you see &amp;quot;mysqloyabun#&amp;quot; instead of &amp;quot;oyabun#&amp;quot; as the next command prompt.&lt;br /&gt;
&lt;br /&gt;
Note: by default, your new MySQL installation does not have a root password set.  If you want to keep [[shell users]] from logging into it as root, or if you want remote SQL clients to be able to authenticate themselves as root, you'll need to [[MySQL:_set_root_password|set a root password]] now.&lt;br /&gt;
&lt;br /&gt;
=='''Testing the installation'''==&lt;br /&gt;
&lt;br /&gt;
We're going to get into a little bit of mysql syntax here. For more in-depth documentation, you should visit http://www.mysql.com or google the particular command you're having trouble with, using 'mysql grant syntax' as the search argument for example.&lt;br /&gt;
&lt;br /&gt;
 oyabun# mysql -p&lt;br /&gt;
 Enter password:&lt;br /&gt;
 Welcome to the MySQL monitor.  Commands end with ; or \g.&lt;br /&gt;
 Your MySQL connection id is 31 to server version: 4.0.20&lt;br /&gt;
 Type 'help;' or '\h' for help. Type '\c' to clear the buffer.&lt;br /&gt;
 mysql&amp;gt; create database testing;&lt;br /&gt;
 Query OK, 1 row affected (0.00 sec)&lt;br /&gt;
 mysql&amp;gt; grant all on testing.* to 'user'@'localhost' identified by 'password';&lt;br /&gt;
 Query OK, 0 rows affected (0.02 sec)&lt;br /&gt;
 mysql&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First, you'll notice that all commands in the mysql client have to be terminated with ''';'''. If you forget and hit enter, you can just enter a lone ''';''' on a new line, and it will work provided the syntax of the command is correct.&lt;br /&gt;
&lt;br /&gt;
If both of those commands worked, then you just created a database named testing, and assigned full read/write priviledges to a user name 'user' with password 'password'.&lt;br /&gt;
&lt;br /&gt;
To delete a database, issue the following command:&lt;br /&gt;
&lt;br /&gt;
 mysql&amp;gt; drop database testing;&lt;br /&gt;
 Query OK, 0 rows affected (0.00 sec)&lt;br /&gt;
&lt;br /&gt;
That's it! You now have MySQL added to your machine, and you begin using php scripts or other MySQL tools.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Adding new users'''==&lt;br /&gt;
&lt;br /&gt;
To add new users to mysql use the followings commands:&lt;br /&gt;
# mysql --user=root mysql&lt;br /&gt;
(Add -p to that command if you have set a password for root access to mysql)&lt;br /&gt;
&lt;br /&gt;
This next command will allow full access to the new user&lt;br /&gt;
&amp;gt; GRANT ALL PRIVILEGES ON *.* TO user@localhost IDENTIFIED BY 'pass' WITH GRANT OPTION;&lt;br /&gt;
&lt;br /&gt;
**Warning**  You may not want full access to this user therefore you will have to limit what privileges that user has.  Refer to the GRANT command with these links:&lt;br /&gt;
&lt;br /&gt;
[http://dev.mysql.com/doc/mysql/en/adding-users.html link Mysql-adding-users]&lt;br /&gt;
[http://sunsite.mff.cuni.cz/MIRRORS/ftp.mysql.com/doc/en/Adding_users.html link Mysql-adding-users2]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category : Common Tasks]]&lt;/div&gt;</summary>
		<author><name>165.228.0.35</name></author>	</entry>

	</feed>