<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>OpenBSD and FreeBSD resources &#187; System</title>
	<atom:link href="http://purebsd.com/category/openbsd/system/feed" rel="self" type="application/rss+xml" />
	<link>http://purebsd.com</link>
	<description></description>
	<lastBuildDate>Tue, 01 Jun 2010 06:01:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Cron / crontab</title>
		<link>http://purebsd.com/cron-crontab.html</link>
		<comments>http://purebsd.com/cron-crontab.html#comments</comments>
		<pubDate>Mon, 31 May 2010 23:10:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[OpenBSD]]></category>
		<category><![CDATA[System]]></category>
		<category><![CDATA[cron]]></category>

		<guid isPermaLink="false">http://purebsd.com/?p=12</guid>
		<description><![CDATA[System crontab The system&#8217;s crontab is, unlike on many other Unix flavors, not located in /etc/crontab, but in /var/cron/tabs/root. In other words, the system&#8217;s crontab is seen on OpenBSD as a user&#8217;s crontab. Specifically: as the crontab of the user root. If you&#8217;d like to view the crontab of root, run as user root: crontab -l If [...]]]></description>
			<content:encoded><![CDATA[<p><strong>System crontab</strong></p>
<p>The system&#8217;s crontab is, unlike on many other Unix flavors, not located in <code>/etc/crontab</code>, but in <code>/var/cron/tabs/root</code>. In other words, the system&#8217;s crontab is seen on OpenBSD as a user&#8217;s crontab. Specifically: as the crontab of the user root.</p>
<ul>
<li>If you&#8217;d like to view the crontab of root, run as user root:
<p><code>crontab -l</code></li>
<li>If you&#8217;d like to edit the crontab of root, for intance to change the time the /etc/daily, /etc/weekly and /etc/monthly scripts are run, do as user root:
<p><code>crontab -e</code></p>
<p>Edit the then presented file to your own liking. When you&#8217;re done save and quit vi. The new crontab will automaticly be activated.</li>
<li>If you&#8217;d like to <strong>remove</strong> the crontab of root, run as user root:
<p><code>crontab -r</code></p>
<p>But you probably <strong>never want to do this</strong>!</li>
</ul>
<p>If you&#8217;d like cron to backup your root filesystem (<code>/</code>) each day, do the following:</p>
<ul>
<li>Edit the system&#8217;s crontab:<br />
<code>crontab -e</code></li>
<li>Insert the following line near the other variables:<br />
<code>ROOTBACKUP=1</code></li>
<li>Edit <code>/etc/fstab</code> to have a line like this:<br />
<code>/dev/wd1a /altroot ffs xx 0 0</code><br />
You must only change &#8220;/dev/wd1a&#8221; to reflect the filesystem where the backup should be copied to. Make sure it has enough room to hold the complete <code>/</code> filesystem.</li>
</ul>
<p><strong>Permissions</strong></p>
<p>The crontab files of users are located in <code>/var/cron/tabs</code>. Whether normal users are allowed to use crontab is determined by two files:</p>
<ul>
<li><code>/var/cron/cron.allow</code>:<br />
If this file exists, users listed here (one username per line) are allowed to use cron. All other users are disallowed to use cron.</li>
<li><code>/var/cron/cron.deny</code>:<br />
If this file exists but the <code>/var/cron/cron.allow</code> not, users listed here (one username per line) are disallowed to use cron. All other users are allowed to use cron.</li>
</ul>
<p>If both files do not exist, only root can use crontab. If they exist, but are not readable by crontab, users will be disallowed to use crontab.</p>
<p><strong>Normal users</strong></p>
<p>Normal users can use crontab in the same way as root does. They can also create a file in the correct crontab format and load it by running:</p>
<p><code>crontab &lt;filename&gt;</code></p>
<p>Actually, the systems crontab can be loaded in the very same way, but generally the <code>crontab -e</code> method is preferred.</p>
]]></content:encoded>
			<wfw:commentRss>http://purebsd.com/cron-crontab.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Building a custom kernel</title>
		<link>http://purebsd.com/building-a-custom-kernel.html</link>
		<comments>http://purebsd.com/building-a-custom-kernel.html#comments</comments>
		<pubDate>Mon, 31 May 2010 23:09:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[OpenBSD]]></category>
		<category><![CDATA[System]]></category>
		<category><![CDATA[building]]></category>
		<category><![CDATA[kernel]]></category>

		<guid isPermaLink="false">http://purebsd.com/?p=10</guid>
		<description><![CDATA[Configuring the kernel Copy these two files to a directory where you have write access as a normal user: cp /usr/src/sys/arch/i386/conf/GENERIC /home/alex/MYCENE/MYCENE cp /usr/src/sys/conf/GENERIC /home/alex/MYCENE/MYCENE-common Edit the line in the new file called MYCENE that reads: include "../../../conf/GENERIC" and replace it by: include "/home/alex/MYCENE/MYCENE-common" The directory /home/alex is my home directory, the directory /home/alex/MYCENE is the name of [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Configuring the kernel</strong></p>
<p>Copy these two files to a directory where you have write access as a normal user:</p>
<p><code> cp /usr/src/sys/arch/i386/conf/GENERIC /home/alex/MYCENE/MYCENE<br />
cp /usr/src/sys/conf/GENERIC /home/alex/MYCENE/MYCENE-common<br />
</code><br />
Edit the line in the new file called <code>MYCENE</code> that reads:</p>
<p><code> include "../../../conf/GENERIC"</code></p>
<p>and replace it by:</p>
<p><code> include "/home/alex/MYCENE/MYCENE-common"</code></p>
<p>The directory <code>/home/alex</code> is my home directory, the directory <code>/home/alex/MYCENE</code> is the name of the machine for which we&#8217;ll build a new kernel. In that directory we just copied the kernel configuration files <code>MYCENE</code> and <code>MYCENE-common</code>. The file <code>MYCENE</code> lists the machine dependend kernel configuration options. In <code>MYCENE-common</code> are some platform independend options. Edit those two files to your own liking and the machine&#8217;s needs.</p>
<p>More info on this follows soon..</p>
<p><strong>Compiling the kernel</strong></p>
<p>Now, in the directory <code>/home/alex/MYCENE/</code>, we create a directory called build for the necessary files to build a working kernel and then we issue the following configuration command to create all the necessary files in the previously created <code>build/</code> directory:</p>
<p><code> config -s /sys -b build MYCENE</code></p>
<p>After that, we change directory to <code>build/</code> and create the <code>.depend</code> files necessary for the success of compilation process:</p>
<p><code> make depend</code></p>
<p>Only then, we can start to compile our neat little kernel and eat some pizza:</p>
<p><code> make</code></p>
<p><strong>Installing the kernel</strong></p>
<p>Now, if we&#8217;re lucky, <code>make</code> has made us a shiny new kernel, located in <code>build/</code> as <code>bsd</code>.<br />
<code>su</code> to root, save <code>/bsd</code> to <code>/bsd-dist</code> if the current <code>/bsd</code> kernel image is the one installed by the installation process. Else save it as <code>/bsd-old</code>. This way we&#8217;ll be able to boot a working kernel if our new one is broken in some way.<br />
Finally, we can safely copy <code>~alex/MYCENE/build/bsd</code> over the old <code>/bsd</code> kernel image and issue a <code>reboot</code> to test it.</p>
<p><code> # su<br />
# cd /<br />
# cp bsd bsd-dist<br />
# cp ~alex/MYCENE/build/bsd .<br />
# reboot</code></p>
]]></content:encoded>
			<wfw:commentRss>http://purebsd.com/building-a-custom-kernel.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>important files in etc</title>
		<link>http://purebsd.com/important-files-in-etc.html</link>
		<comments>http://purebsd.com/important-files-in-etc.html#comments</comments>
		<pubDate>Mon, 31 May 2010 07:57:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[OpenBSD]]></category>
		<category><![CDATA[System]]></category>
		<category><![CDATA[configuration]]></category>
		<category><![CDATA[etc]]></category>
		<category><![CDATA[files]]></category>

		<guid isPermaLink="false">http://purebsd.com/?p=8</guid>
		<description><![CDATA[Important files in /etc Some important OpenBSD configuration files in the /etc directory: /etc/fstab file system table entries. /etc/hostname.&#60;network-id&#62; configuration directives for your network card. I added a Realtek 8139 based network card to my system and edited my /etc/hostname.ne1 to tell that NE2000 PnP ISA card (ne1) that it got a new job. ne1 first [...]]]></description>
			<content:encoded><![CDATA[<table border="0" cellspacing="0" cellpadding="0" width="700" align="center">
<tbody>
<tr>
<td width="572" valign="top"><strong>Important files in /etc</strong><br />
Some important OpenBSD configuration files in the /etc directory:</p>
<ol type="1">
<li>/etc/fstab<br />
file system table entries.</li>
<li>/etc/hostname.&lt;network-id&gt;<br />
configuration directives for your network card.</p>
<p>I added a Realtek 8139 based network card to my system and edited my /etc/hostname.ne1 to tell that NE2000 PnP ISA card (<em>ne1</em>) that it got a new job. <em>ne1</em> first listened to 192.168.0.8, now it should listen for trafic heading for 10.0.0.8.<br />
The info for that Realtek card is located in /etc/hostname.rl0 for my specific system setup. So I edited that file to let <em>rl0</em> know it should intercept any trafic directed at 192.168.0.8.</li>
<li>/etc/rc<br />
I edited this file as to remove the automatic insertion of a info line into /etc/motd each time the system boots up.<br />
Search for the line that reads &#8220;<code># patch /etc/motd</code>&#8220;</li>
<li>/etc/rc.conf<br />
system startup configuration entries.</li>
<li>/etc/shells<br />
contains a list of valid shells available on the system.</p>
<p>I added <em>/usr/local/bin/tcsh</em>, so that I&#8217;d be able to use tcsh (:</li>
<li>/etc/<br />
working on this one.. have patience</li>
</ol>
</td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://purebsd.com/important-files-in-etc.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

