{"id":130,"date":"2010-11-10T12:25:57","date_gmt":"2010-11-10T19:25:57","guid":{"rendered":"http:\/\/peterwong.net\/blog\/?page_id=130"},"modified":"2010-11-10T12:25:57","modified_gmt":"2010-11-10T19:25:57","slug":"apple-iigs-network-netatalk","status":"publish","type":"page","link":"https:\/\/peterwong.net\/blog\/apple-iigs-network-netatalk\/","title":{"rendered":"Apple IIgs Network: Netatalk"},"content":{"rendered":"<h5>Hardware Setup.<\/h5>\n<p>The standard Apple IIgs has a LocalTalk port for AppleTalk networking.&#160; To bridge to Ethernet and connect to a Linux system, you would need a LocalTalk-Ethernet bridge or router.&#160; I am currently using a Farallon EtherWave adapter, but others may work as well.&#160; Some adapters and routers that *may* also work are:<\/p>\n<ul>\n<li>Asante AsanteTalk <\/li>\n<li>Cayman Systems Gatorbox <\/li>\n<li>Shiva FastPath <\/li>\n<li>Compatible Systems EtherRoute TCP <\/li>\n<li>Compatible Systems RISC Router 3000-E <\/li>\n<\/ul>\n<p>&#160;<\/p>\n<h5>Netatalk Setup.<\/h5>\n<p>Install the netatalk package in your Linux system.&#160; From a Debian distribution (and similar ones like Ubuntu and its variants), this is done through the Advanced Packaging Tool:<\/p>\n<pre class=\"brush: plain;\">    apt-get install netatalk<\/pre>\n<p>The AppleTalk daemon needs to be enabled in \/etc\/default\/netatalk.&#160; Look for the ATALKD_RUN setting and set it to \u201cyes\u201d.&#160; You will also need to modify the configuration file \/etc\/netatalk\/atalkd.conf.&#160; Mine has the following: <\/p>\n<pre class=\"brush: plain;\">    eth0 -router -phase 2 -net 0-65534 -addr 1.30 -zone &quot;Default&quot;<\/pre>\n<p>The \u201c1.30\u201d is the AppleTalk node address I assigned to my Linux system, and \u201cDefault\u201d is the AppleTalk zone.&#160; Some LocalTalk-Ethernet bridges have an AppleTalk zone setting.&#160; The bridge I am using uses \u201cDefault\u201d as the zone name, and that is also what I have configured here.<\/p>\n<p>In the standard package installation, netatalk only listens on TCP\/IP (similar to what the AppleShare\/IP product does) and not on DDP\/EtherTalk.&#160; The configuration file \/etc\/netatalk\/afpd.conf needs to be edited.&#160; I have the following:<\/p>\n<pre class=\"brush: plain;\">    - -tcp -ddp -uamlist uams_dhx2.so,uams_clrtxt.so,uams_guest.so -nosavepassword -uservolfirst<\/pre>\n<p>The \u201c-ddp\u201d is what enables the afpd daemon to listen on DDP\/EtherTalk.&#160; You can also combine both \u201c-tcp\u201d and \u201c-ddp\u201d options into a single \u201c-transall\u201d option.<\/p>\n<p>You&#8217;d also want to create your additional users who will be allowed to attach to netatalk, unless you only need guest access.&#160; If guest access is desired, the AFPD_GUEST setting in \/etc\/default\/netatalk should pertain to a valid user that has a home directory.<\/p>\n<p>Login (using SSH, for example) into the Linux system as a valid user and create an AppleVolumes file in your home directory.&#160; My AppleVolumes file contains:<\/p>\n<pre class=\"brush: plain;\">    ~\/A2BOOT\/       &quot;A2BOOT&quot; casefold:toupper options:prodos \n    \/media\/usb0\/    &quot;USB0&quot;<\/pre>\n<p>As the valid user, I create an A2BOOT directory under my home directory.&#160; The first entry points to my A2BOOT directory which will be exported by netatalk as the \u201cA2BOOT\u201d volume.&#160; I have another entry that points to the first mount point of a USB drive that I subsequently attach to the Linux system and mounted automatically by the Linux usbmount package.&#160; This volume \u201cUSB0\u201d becomes another way for my Apple IIgs to transfer files to and from my PC through the USB drive. <\/p>\n<p>Once all the configuration has been completed, issue the following to restart netatalk:<\/p>\n<pre class=\"brush: plain;\">    \/etc\/init.d\/netatalk restart<\/pre>\n<p>&#160;<\/p>\n<h5>Apple IIgs Setup.<\/h5>\n<p>The Apple IIgs uses one of only two authentication mechanisms: Clrtxt or Randnum.<\/p>\n<p>To attach to a netatalk volume using cleartext authentication, use <a href=\"\/\/peterwong.net\/files\/apple2\/Asmj21h.shk\" target=\"_blank\" rel=\"noopener\">Marsha Jackson&#8217;s patched AppleTalk CDEV<\/a>.&#160; The standard CDEV that comes with System 6.0.1 sends the password incorrectly across the network and netatalk returns an authentication failure.<\/p>\n<p>To attach to a netatalk volume using Randnum authentication, you need to have the Randnum UAMS available in netatalk.&#160; The current binary distribution of netatalk does not have Randnum authentication, so you&#8217;ll need to find pre-built binaries for it or recompile the netatalk source package.<\/p>\n<p>&#160;<\/p>\n<h5>Compiling Netatalk.<\/h5>\n<p>Netatalk needs to be recompiled if you need the Randnum UAMS (authentication module) or the a2boot (netbooting) capabilities.&#160; The Randnum UAMS, and the corresponding afppasswd utility to set the password, are dependent on cryptographic libraries.&#160; This is usually provided by the openssl library package, which certain Linux packages are reluctant to link to.&#160; I&#8217;ve got some source patches to use libgcrypt instead of openssl, but they have yet to be sent upstream and included in the standard distributions.<\/p>\n<p>For the meantime, the netatalk package can be compiled and installed (with Linux root privileges) using:<\/p>\n<pre class=\"brush: plain;\">    apt-get update\n    apt-get source netatalk\n    apt-get build-dep netatalk\n    DEB_CONFIGURE_USER_FLAGS=&quot;--with-openssl --enable-a2boot&quot; dpkg-buildpackage -us -uc\n    cp .\/debian\/netatalk\/usr\/lib\/netatalk\/uams_randnum.so \/usr\/lib\/netatalk\/\n    cp .\/debian\/netatalk\/usr\/bin\/afppasswd \/usr\/bin\/\n    chmod +s \/usr\/bin\/afppasswd\n    cp .\/debian\/netatalk\/usr\/sbin\/a2boot \/usr\/sbin\/<\/pre>\n<p>You can also apply Steven Hirsch\u2019s file timestamp fix by commenting out line 827 (as of the netatalk source package 2.1.2) of etc\/afpd\/file.c where the value of the change_date variable is being set during the AFP FILPBIT_ATTR command before building the package.<\/p>\n<p>I have pre-built binaries for the Seagate DockStar (armel architecture) running the Debian \u201csqueeze\u201d distribution at <a href=\"\/\/peterwong.net\/files\/apple2\/netatalk-armel-files.tar.gz\">\/\/peterwong.net\/files\/apple2\/netatalk-armel-files.tar.gz<\/a> <\/p>\n<p>&#160;<\/p>\n<h5>Randnum Authentication.<\/h5>\n<p>If the Randnum UAMS is available, then the initial \/etc\/netatalk\/afppasswd file can be created by logging in with root privileges and running \u201cafppasswd -c\u201d.&#160; Standard users can then log in and set their own password entry in the \/etc\/netatalk\/afppasswd file by using the \u201cafppasswd\u201d utility.<\/p>\n<p>The Apple IIgs will always prefer Randnum authentication over cleartext authentication if the Randnum UAMS is available on the server.<\/p>\n<p>&#160;<\/p>\n<h5>Netbooting.<\/h5>\n<p>To accommodate netbooting, the a2boot daemon should be found in \/usr\/sbin\/a2boot and needs to be enabled in \/etc\/default\/netatalk.&#160; Look for the A2BOOT_RUN setting and set it to &quot;yes&quot;.&#160; Create the \/etc\/netatalk\/a2boot directory and copy the IIe and IIgs network boot blocks into that directory.&#160; The boot blocks can be found in <a href=\"\/\/peterwong.net\/files\/apple2\/troika-3.tar.gz\">\/\/peterwong.net\/files\/apple2\/troika-3.tar.gz<\/a><\/p>\n<p>Modify the \/etc\/init.d\/netatalk script to invoke the a2boot daemon.&#160; A sample modified script is included in <a href=\"\/\/peterwong.net\/files\/apple2\/netatalk-armel-files.tar.gz\">\/\/peterwong.net\/files\/apple2\/netatalk-armel-files.tar.gz<\/a><\/p>\n<p>Issue the following to restart netatalk:<\/p>\n<pre class=\"brush: plain;\">    \/etc\/init.d\/netatalk restart<\/pre>\n<p>To netboot an Apple IIgs, we need to temporarily create an AppleShare boot disk and perform a Network Server Startup installation from the System 6.0.1 installer.&#160; An AppleShare boot disk can be created from the installer itself, but pre-made disk images, updated with Marsha Jackson&#8217;s patched AppleShare CDEV are available at <a href=\"\/\/peterwong.net\/files\/AppleIIgsBootDisks\/AppleShare-ROM1.zip\">\/\/peterwong.net\/files\/AppleIIgsBootDisks\/AppleShare-ROM1.zip<\/a> (for ROM1 machines) and <a href=\"\/\/peterwong.net\/files\/AppleIIgsBootDisks\/AppleShare-ROM3.zip\">\/\/peterwong.net\/files\/AppleIIgsBootDisks\/AppleShare-ROM3.zip<\/a> (for ROM3 machines).<\/p>\n<p>Boot with the AppleShare boot disk, then attach the A2BOOT volume using the AppleShare CDEV.&#160; Run the Installer from the System 6.0.1 Install disk, selecting a Network Server Startup installation.&#160; It will copy files from the Install, SystemTools1, and SystemTools2 disks into the A2BOOT volume.<\/p>\n<p>Aside from the patched AppleShare CDEV, the AppleTalk-related \u201cStart\u201d application found in the System 6.0.1 SystemTools2 disk should also be patched in the same way.&#160; Geoff Body has provided the patch information and a patched \u201cStart\u201d file is available at <a href=\"\/\/peterwong.net\/files\/apple2\/AT.START.SHK\">\/\/peterwong.net\/files\/apple2\/AT.START.SHK<\/a>.&#160; The \u201cStart\u201d file gets installed in the SYSTEM folder on the A2BOOT volume.<\/p>\n<p>An additional file needed during netbooting is the user&#8217;s ATINIT file.&#160; This informs GS\/OS what startup program to launch.&#160; I&#8217;ve provided an example <a href=\"\/\/peterwong.net\/files\/apple2\/ATINIT\" target=\"_blank\" rel=\"noopener\">ATINIT<\/a> file that simply launches the GS\/OS Finder application located in the System folder of the A2BOOT volume.&#160; You can edit this file using a binary file utility and change the startup application and the startup prefix.&#160; Note the string length value on the byte preceding the actual strings.&#160; The Apple IIgs Technical Note #77 describes the ATINIT file format.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; border-right-width: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px\" title=\"ATINIT\" border=\"0\" alt=\"ATINIT\" src=\"\/\/peterwong.net\/blog\/wp-content\/uploads\/2010\/11\/ATINIT.png\" width=\"672\" height=\"467\" \/><\/p>\n<p>For example, using the A2BOOT volume of the user \u201cpeter\u201d, I create the ~\/A2BOOT\/USERS\/PETER\/SETUP directory and place the file in here.&#160; Note the directory name corresponding to the user name.&#160; You can either place the file from either within Linux or within the GS\/OS mounted volume (from booting the AppleShare boot disk).&#160; In the Linux system, the full directory path could be like \/home\/peter\/A2BOOT\/USERS\/PETER\/SETUP.<\/p>\n<p>The need for the ATINIT file is because of the AppleTalk-related \u201cStart\u201d boot application that gets installed with the Network Server Startup installation.&#160; If you don\u2019t want to bother with the ATINIT stuff, merely copy a valid boot application into the \u201cStart\u201d boot application.&#160; An example is replacing the SYSTEM\/START file in the A2BOOT volume with a copy of the Finder application.&#160; Another example is replacing the SYSTEM\/START file in the A2BOOT volume with the \u201cStart\u201d boot application found in the System 6.0.1 Installer disk, which consults the SetStart setting in the control panel for the boot application to chain to.<\/p>\n<p>Pictures of the Apple IIgs netbooting from netatalk:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; border-right-width: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px\" title=\"SeagateDockStarNetatalk-1\" border=\"0\" alt=\"SeagateDockStarNetatalk-1\" src=\"\/\/peterwong.net\/blog\/wp-content\/uploads\/2010\/11\/SeagateDockStarNetatalk-1.jpg\" width=\"724\" height=\"481\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; border-right-width: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px\" title=\"SeagateDockStarNetatalk-2\" border=\"0\" alt=\"SeagateDockStarNetatalk-2\" src=\"\/\/peterwong.net\/blog\/wp-content\/uploads\/2010\/11\/SeagateDockStarNetatalk-2.jpg\" width=\"724\" height=\"481\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; border-right-width: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px\" title=\"SeagateDockStarNetatalk-3\" border=\"0\" alt=\"SeagateDockStarNetatalk-3\" src=\"\/\/peterwong.net\/blog\/wp-content\/uploads\/2010\/11\/SeagateDockStarNetatalk-3.jpg\" width=\"724\" height=\"481\" \/><\/p>\n<p>&#160;<\/p>\n<h5>Acknowledgements.<\/h5>\n<p>Thanks to Steven Hirsch for his efforts in getting Apple II support in netatalk; to Geoff Body for his great insight into AppleTalk and AppleShare, and Ivan Drucker for his work in Apple IIe netbooting that inspired me to investigate the same for the Apple IIgs.&#160; A simplified description of netbooting an Apple IIgs from AppleShare 3.x running on a Mac can be found at <a title=\"http:\/\/www.vintagemacworld.com\/iigs_rb.html\" href=\"http:\/\/www.vintagemacworld.com\/iigs_rb.html\">http:\/\/www.vintagemacworld.com\/iigs_rb.html<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hardware Setup. The standard Apple IIgs has a LocalTalk port for AppleTalk networking.&#160; To bridge to Ethernet and connect to a Linux system, you would need a LocalTalk-Ethernet bridge or router.&#160; I am currently using a Farallon EtherWave adapter, but &hellip; <a href=\"https:\/\/peterwong.net\/blog\/apple-iigs-network-netatalk\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"open","ping_status":"open","template":"","meta":{"footnotes":""},"class_list":["post-130","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/peterwong.net\/blog\/wp-json\/wp\/v2\/pages\/130","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/peterwong.net\/blog\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/peterwong.net\/blog\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/peterwong.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/peterwong.net\/blog\/wp-json\/wp\/v2\/comments?post=130"}],"version-history":[{"count":0,"href":"https:\/\/peterwong.net\/blog\/wp-json\/wp\/v2\/pages\/130\/revisions"}],"wp:attachment":[{"href":"https:\/\/peterwong.net\/blog\/wp-json\/wp\/v2\/media?parent=130"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}