<?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"
	>

<channel>
	<title>tek-ops &#187; Docs</title>
	<atom:link href="http://www.tek-ops.com/archives/category/docs/feed" rel="self" type="application/rss+xml" />
	<link>http://www.tek-ops.com</link>
	<description></description>
	<pubDate>Thu, 13 Nov 2008 12:13:49 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
	<language>en</language>
			<item>
		<title>Thumbdrive for redundant boot device (OpenSolaris)</title>
		<link>http://www.tek-ops.com/archives/22</link>
		<comments>http://www.tek-ops.com/archives/22#comments</comments>
		<pubDate>Mon, 28 Jul 2008 02:46:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Docs]]></category>

		<guid isPermaLink="false">http://www.tek-ops.com/?p=22</guid>
		<description><![CDATA[



First disable automating; this may be volfs or hal depending on the version of solaris 10/11
 # svcadm disable volfs 
Now plug in the thumbdrive and determine the location for the logical node

bash-3.00# rmformat -l

Looking for devices...

1. Logical Node: /dev/rdsk/c0t0d0p0

Physical Node: /pci@0,0/pci-ide@1f,1/ide@0/sd@0,0

Connected Device: TEAC     CD-224E-N       [...]]]></description>
			<content:encoded><![CDATA[<p><script type="text/javascript"><!--
google_ad_client = "pub-7319789373804221";
/* 468x60, created 8/7/08 */
google_ad_slot = "9116165127";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<h4>First disable automating; this may be volfs or hal depending on the version of solaris 10/11</h4>
<pre> # svcadm disable volfs </pre>
<h4>Now plug in the thumbdrive and determine the location for the logical node</h4>
<pre>
bash-3.00# rmformat -l

Looking for devices...

1. Logical Node: <strong>/dev/rdsk/c0t0d0p0</strong>

Physical Node: /pci@0,0/pci-ide@1f,1/ide@0/sd@0,0

Connected Device: TEAC     CD-224E-N        1.AA

Device Type: CD Reader

2. Logical Node: <strong>/dev/rdsk/c4t0d0p0</strong>

Physical Node: /pci@0,0/pci15d9,7980@1d,7/hub@5/storage@1/disk@0,0

Connected Device: Corsair  Flash Voyager    1.00

Device Type: Removable

bash-3.00#
</pre>
<p><strong>/dev/rdsk/c4t0d0</strong> will be the root of what we&#8217;re working with in this example</p>
<p>Now run:</p>
<pre>
# fdisk -B /dev/rdsk/c4t0d0s0
</pre>
<h4>Now you can get the geometry using the following:</h4>
<pre>
# fdisk -W - /dev/rdsk/c4t0d0s0
</pre>
<p>Now, look at output from previous step and find max MB (MAXSIZE) of usable storage. You do this by multiplying bytes/sector (usually 512 at the top) with num sectors at the bottom of output (in my case, a 4 GB drive had roughly 7.9Million sections or so) divide by (1024*1024) to yield MB (should be 3900 MB or so for a 4GB flash stick.</p>
<pre>
slices: 0 = 2MB, {$MAXSIZE-3}MB, "wm", "root" :

1 = 0, 1MB, "wu", "boot" :

2 = 0, {$MAXSIZE - 1}MB, "wm", "backup"
</pre>
<h4>Here is a &#8220;slices.txt&#8221; file for a 256 mb thumbdrive</h4>
<pre>
slices: 0 = 2MB, 244MB, "wm", "root" :

1 = 0, 1MB, "wu", "boot" :

2 = 0, 246MB, "wm", "backup"
</pre>
<h4>Now put this label to the drive</h4>
<pre>
# rmformat -s ./path/to/slices.txt /dev/rdsk/c4t0d0p0
</pre>
<p>Now to refresh Solaris devices:</p>
<pre>
# devfsadm; devfsadm -C
</pre>
<h4>Now to create the filesystem, mount it and copy the necessary files</h4>
<pre>
# newfs /dev/rdsk/c4t0d0s0
# mkdir /mnt/backup
# mount /dev/dsk/c4t0d0s0 /mnt/backup
# cd /mnt/backup
# cp -r /boot ./boot
# cp -r /platform ./platform
</pre>
<h4>Now lets make this bootable</h4>
<pre>
# fdisk /dev/rdsk/c4t0d0p0
</pre>
<p>Set partition 1 active using option 2</p>
<pre>
# cd /mnt/backup/boot/grub/
# installgrub stage1 stage2 /dev/rdsk/c4t0d0s0
</pre>
<p>Now safely unmount</p>
<pre> # cd /;umount /mnt/backup
</pre>
<h4>references:</h4>
<ul>
<li><a href="http://blogs.sun.com/PotstickerGuru/entry/giving_usb_the_boot_install"> Giving USB the boot - install </a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.tek-ops.com/archives/22/feed</wfw:commentRss>
		</item>
		<item>
		<title>AppleTalk on Solaris (AFP)</title>
		<link>http://www.tek-ops.com/archives/20</link>
		<comments>http://www.tek-ops.com/archives/20#comments</comments>
		<pubDate>Mon, 28 Jul 2008 02:45:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Docs]]></category>

		<guid isPermaLink="false">http://www.tek-ops.com/?p=20</guid>
		<description><![CDATA[AppleTalk has been quite a popular choice for networking computers mainly because it&#8217;s, well, made by Apple. It was supposedly made solely for Apple computers but the Internet folks have never been one to settle for should be&#8217;s and would rather run after could be&#8217;s. If cheap mobile phones today can be hacked to become [...]]]></description>
			<content:encoded><![CDATA[<p>AppleTalk has been quite a popular choice for networking computers mainly because it&#8217;s, well, made by Apple. It was supposedly made solely for Apple computers but the Internet folks have never been one to settle for should be&#8217;s and would rather run after could be&#8217;s. If <a href="http://www.o2.co.uk">cheap mobile phones</a> today can be hacked to become as efficient as high-end phones, why not try making AppleTalk work on other operating systems right? That&#8217;s what we&#8217;re aiming to do on this page, make AppleTalk work on Solaris.<br />
<script type="text/javascript"><!--
google_ad_client = "pub-7319789373804221";
/* 468x60, created 8/7/08 */
google_ad_slot = "9116165127";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<h4>[Taken from:  <a href="http://www.unixzone.dk/unix/20060122/appletalk-on-solaris/"> www.unixzone.dk</a>]</h4>
<p>Netatalk 2.0.3 requires some patching to compile on Solaris 10 (or OpenSolaris)</p>
<ul>Requirements:</p>
<li><a href="http://netatalk.sourceforge.net/">netatalk</a></li>
<li><a href="http://www.oracle.com/technology/software/products/berkeley-db/db/index.html">Berkeley DB 4.2.52</a></li>
<li>GCC compiler, Sun Studio didn&#8217;t work for me</li>
<li><a href="http://tek-ops.com/files/patches.tar.gz">Patches</a>:       netatalk-2.0.3/sys/netatalk/at.h and netatalk-2.0.3/sys/solaris/tpi.c</li>
</ul>
<h3>Click <a href="http://tek-ops.com/txts/build_db.html">&lt;HERE&gt;</a> for build instructions       for DB</h3>
<p>On Solaris we don&#8217;t use ranlib, LDFLAGS adds /usr/local/lib to the<br />
library search path where my Berkeley DB libs are , rest of the options<br />
are self-explanatory.</p>
<pre> # gzip -cd netatalk-2.0.3.tar.gz | tar xf -
# gzip -cd patches.tar.gz | tar xf -
# cd netatalk-2.0.3
# RANLIB=echo CC=gcc LDFLAGS=-R/usr/local/BerkeleyDB.4.2/lib
./configure --prefix=/opt/netatalk --with-ssl-dir=/usr/sfw
--with-bdb=/usr/local/BerkeleyDB.4.2 --without-pam --disable-ddp
--disable-tcp-wrappers  --disable-srvloc --with-cnid-dbd-backend
# echo "#define SOLARIS2 10" &gt;&gt;config.h</pre>
<p>Depending on the version of your Solaris installation, you&#8217;ll want to<br />
change this to match, ie. 8, 9, 10, or 11 for OpenSolaris.</p>
<h4>Patch the source to support x64 Solaris</h4>
<pre> # patch -i ../patches/at.h.patch sys/netatalk/at.h
Looks like a unified context diff.
done
#  patch -i ../patches/config.h.patch ./config.h
Looks like a normal diff.
done
# patch -i ../patches/endian.h.patch sys/netatalk/endian.h
Looks like a normal diff.
done
# patch -i ../patches/tpi.c.patch sys/solaris/tpi.c
Looks like a unified context diff.
done</pre>
<h4>Build and install the software</h4>
<pre> # make
# make install</pre>
<p>Under Solaris, you must create atalkd.conf, since Solaris provides no<br />
method for determining the names of the available interfaces. It is<br />
sufficent to name the available interfaces in atalkd.conf, one per line.<br />
E.g.<br />
eri0<br />
on a line by itself on many Suns, hme0 on Ultras etc. See atalkd(8).</p>
<h4>Create init script and add to Sun&#8217;s svc system</h4>
<pre> # cp distrib/initscripts/rc.atalk.sysv /opt/local/lib/svc/method/netatalk</pre>
<p>Place <a href="http://tek-ops.com/files/netatalk.xml">netatalk.xml</a> somewhere on the file system</p>
<pre> # svccfg import /path/to/netatalk.xml
# svcadm enable netatalk
# rm /path/to/netatalk.xml</pre>
<h4>Now for configuration:</h4>
<pre> # cd /opt/netatalk/etc/netatalk/
# ls -l
total 96
-rw-r--r--   1 root     root       5066   Apr  4 15:21 AppleVolumes.default
-rw-r--r--   1 root     root       25124  Apr  2 14:49 AppleVolumes.system
-rw-r--r--   1 root     root       11259  Apr  4 14:59 afpd.conf
-rw-r--r--   1 root     root       1059   Apr  4 11:57 atalkd.conf
-rw-r--r--   1 root     root       1429   Apr  4 15:01 netatalk.conf
-rw-r--r--   1 root     root       1479   Apr  2 14:49 papd.conf
drwxr-xr-x   2 root     root       512    Apr  3 11:49 uams
#</pre>
<h4>Add the following to &#8220;afpd.conf&#8221;:</h4>
<pre> "Solaris AFP" -uamlist uams_guest.so -loginmesg "Welcome, $u!" -transall -noddp -tcp</pre>
<h4>Configure “netatalk.conf” as seen here:</h4>
<pre> # Appletalk configuration
# Change this to increase the maximum number of clients that can connect:
AFPD_MAX_CLIENTS=50

# Change this to set the machine’s atalk name and zone, the latter containing
# the ‘@’ sign as first character — compare with nbp_name(3) if in doubt
#
# NOTE: If Netatalk should register AppleTalk services in the standard zone
#       then you need not to specify a zone name here.

#
#       If your zone has spaces in it, you’re better off specifying
#       it in afpd.conf if you realize that your distribution doesn’t
#       handle spaces correctly in the startup script. Remember to use
#       quotes here if the zone name contains spaces.
#
#ATALK_ZONE=”@some zone”
ATALK_NAME=`echo ${HOSTNAME}|cut -d. -f1`
# specify the Mac and unix charsets to be used

ATALK_MAC_CHARSET=’MAC_ROMAN’
ATALK_UNIX_CHARSET=’LOCALE’
# specify this if you don’t want guest, clrtxt, and dhx
# available options: uams_guest.so, uams_clrtxt.so, uams_dhx.so,
#                    uams_randnum.so
#AFPD_UAMLIST=”-U uams_clrtxt.so,uams_dhx.so”
# Change this to set the id of the guest user
AFPD_GUEST=nobody
# Set which daemons to run (papd is dependent upon atalkd):

ATALKD_RUN=no
PAPD_RUN=no
CNID_METAD_RUN=yes
AFPD_RUN=yes
TIMELORD_RUN=no
A2BOOT_RUN=no
# Control whether the daemons are started in the background
ATALK_BGROUND=no
# export the charsets, read form ENV by apps

export ATALK_MAC_CHARSET
export ATALK_UNIX_CHARSET</pre>
<h4>Add the following to “AppleVolumes.default”:</h4>
<pre> :DEFAULT: cnidscheme:dbd
/Storage "Storage" rwlist:nobody</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.tek-ops.com/archives/20/feed</wfw:commentRss>
		</item>
	</channel>
</rss>
