Netboot OS9

Hello all,

Before posting here I did realize full well that this might not be the right place to pose my question, but maybe somebody could redirect me to the right spot. I initially posted this query in the OS9 section, but I received the advice that posting in the OS X server forum(s) might yield more results, even though I feel a little 'off-topic', because I 'hardly' use OS X in this setup. I suppose when I get this thing working, I'll see whether I can achieve something similar for OS X.

I'm having some trouble with the following setup: I have a Debian based NFS/TFTP/DHCP server which I use for netbooting clients and embedded systems from. Currently I have a number of DOS versions, Memtest, Windows PE and a Linux thin client system running (more or less like the LTSP system) and this is working fine. Recently I got myself an iMac G3 trayloading system with 96MB RAM and a PowerMac G4 with 256MB RAM. Both are running OpenFirmware 3.x (3.0 on the iMac and 3.4 on the PowerMac). According to the specsheets, and my own testing both machines are netboot capable. I'm trying to get OS9.1 to boot over ethernet. I found that the documentation available for this is a great help, but there is little help if something didn't quite work like the howto described. Anyway, back to the setup: As I understand this (please correct me if I'm wrong; I'm new to the Mac-world) the OpenFirmware contains a DHCP (actually BOOTP) client, a TFTP client and an AppleTalk client with plain auth facilities.
When I for instance boot my iMac into the OpenFirmware prompt and enter
Code:

0 > boot enet:0

the client nicely contacts my DHCP/BOOTP server and gets and IP, together with the DHCP options 66 and 67 (next-server and filename). I placed the "Mac OS ROM" file from a working OS9.1 install in my tftproot, and this is being retrieved perfectly. The client then continues to boot, but never gets to read it's system disk, application disk or 'private/scratch disk'.
I've patched the source to the DHCP server (ISC DHCPd 3.0.4) to include the Mac-specific directives, and these are being received by the client and calculated all the hexadecimal representations of the paths, files and IP's that one needs to supply the client with.

To be more specific, this is an excerpt from my dhcpd.conf:

Code:

snip
allow bootp
authorative
end snip

host imac01 {
hardware ethernet 00:05:02:8B:64:C3; fixed-address 192.168.3.110;
filename "Mac OS ROM";
next-server 192.168.3.13;
server-name "192.168.3.13";

# MAC SPECIFIC OPTIONS:
option mac-version 0:0:0:0;
#This specifies the protocol version?

option mac-machine-name "imac01";
#specifies the machine name

option mac-user-name "macint";
#this specifies the user name which clients will use to log on to the server

option mac-password "macmac";
#this specifies the password which clients will use to log on to the server

option mac-nb-img c0:a8:3:d:2:24:7:6D:61:63:62:6F:6F:74:0:0:0:0:2:7:6F:73:39:0:68:64:31;
#option mac-nb-img c0:a8:03:0d:02:24:07:d:61:63:62:6f:6f:74:0:0:0:0:2:07:6f:73:39:0:68:64:31;
#this specifies the path to the shared HD image.

option mac-apps-img c0:a8:3:d:2:24:7:6D:61:63:62:6F:6F:74:0:0:0:0:2:7:6F:73:39:0:68:64:32;
#this specifies the path to the Applications HD image. I point this to a blank image.

option mac-client-nb-img c0:a8:3:d:2:24:7:6D:61:63:62:6F:6F:74:0:0:0:0:2:7:6F:73:39:0:68:64:33;
#this specifies the path to the client's private disk image. this must be unique.
}

I have compared my configuration to a couple of other people's on the net, and I see no inherent differences that would prevent it from working. With a quick
Code:

tail -n50 /var/log/syslog

I can see that the booting client does "access the volume" (I think is the Apple-speak way of saying 'mounting the share'), however it doesn't download/open anything. See following excerpt from syslog:

Code:

May 17 10:00:26 pxeboot dhcpd: Received BootP request from Macintosh netboot client
May 17 10:00:26 pxeboot dhcpd: BOOTREQUEST from 00:05:02:8b:64:c3 via eth0
May 17 10:00:26 pxeboot dhcpd: BOOTREPLY for 192.168.3.110 to imac01 (00:05:02:8b:64:c3) via eth0
May 17 10:00:43 pxeboot afpd20250: ASIP session:548(6) from 192.168.3.110:3151(8)
May 17 10:00:43 pxeboot afpd20250: cleartext login: macint
May 17 10:00:44 pxeboot afpd20250: login macint (uid 1000, gid 1000) AFP2.2
May 17 10:00:44 pxeboot afpd20250: Warning: No CNID scheme for volume /var/lib/macboot. Using default.
May 17 10:00:44 pxeboot afpd20250: Setting uid/gid to 1000/1000
May 17 10:00:44 pxeboot afpd20250: CNID DB initialized using Sleepycat Software: Berkeley DB 4.2.52: (December 3, 2003)
May 17 10:00:44 pxeboot afpd20250: logout macint
May 17 10:00:44 pxeboot afpd20250: 0.22KB read, 0.18KB written
May 17 10:00:44 pxeboot afpd19590: server_child[1] 20250 done
May 17 10:00:52 pxeboot afpd20252: ASIP session:548(6) from 192.168.3.110:3151(8)
May 17 10:00:52 pxeboot afpd20252: cleartext login: macint
May 17 10:00:52 pxeboot afpd20252: login macint (uid 1000, gid 1000) AFP2.2
May 17 10:00:52 pxeboot afpd20252: Warning: No CNID scheme for volume /var/lib/macboot. Using default.
May 17 10:00:52 pxeboot afpd20252: Setting uid/gid to 1000/1000
May 17 10:00:52 pxeboot afpd20252: CNID DB initialized using Sleepycat Software: Berkeley DB 4.2.52: (December 3, 2003)
May 17 10:00:52 pxeboot afpd20252: logout macint
May 17 10:00:53 pxeboot afpd20252: 0.22KB read, 0.18KB written
May 17 10:00:53 pxeboot afpd19590: server_child[1] 20252 done
May 17 10:01:01 pxeboot afpd20263: ASIP session:548(6) from 192.168.3.110:3151(8)
May 17 10:01:01 pxeboot afpd20263: cleartext login: macint
May 17 10:01:01 pxeboot afpd20263: login macint (uid 1000, gid 1000) AFP2.2
May 17 10:01:01 pxeboot afpd20263: Warning: No CNID scheme for volume /var/lib/macboot. Using default.
May 17 10:01:01 pxeboot afpd20263: Setting uid/gid to 1000/1000
May 17 10:01:01 pxeboot afpd20263: CNID DB initialized using Sleepycat Software: Berkeley DB 4.2.52: (December 3, 2003)
May 17 10:01:01 pxeboot afpd20263: logout macint
May 17 10:01:02 pxeboot afpd20263: 0.22KB read, 0.18KB written
May 17 10:01:02 pxeboot afpd19590: server_child[1] 20263 done
May 17 10:01:10 pxeboot afpd20292: ASIP session:548(6) from 192.168.3.110:3151(8)
May 17 10:01:10 pxeboot afpd20292: cleartext login: macint
May 17 10:01:10 pxeboot afpd20292: login macint (uid 1000, gid 1000) AFP2.2
May 17 10:01:10 pxeboot afpd20292: Warning: No CNID scheme for volume /var/lib/macboot. Using default.
May 17 10:01:10 pxeboot afpd20292: Setting uid/gid to 1000/1000
May 17 10:01:10 pxeboot afpd20292: CNID DB initialized using Sleepycat Software: Berkeley DB 4.2.52: (December 3, 2003)
May 17 10:01:10 pxeboot afpd20292: logout macint
May 17 10:01:10 pxeboot afpd20292: 0.22KB read, 0.18KB written
May 17 10:01:10 pxeboot afpd19590: server_child[1] 20292 done

If I don't pass the user, pass and path options via DHCP/BOOTP, the client does not contact the AppleTalk (netatalk) share at all. The share itself works fine from an OS8.5 client (this iMac from HDD), and OS9.1 client (the G4) and Mac OSX 10.2 (again, the G4, it's a dual boot). Just to make things clear(er); I've netbooted both the boxes, and the behaviour is exactly the same, so this is not a quirky OpenFirmware version, or a duff ROM somewhere. I'm looking into the 'CNID scheme' thing, but apparently, as long as a 10.5 client has not 'tainted' the metadata with it's indexing, it shouldn't matter. I've however removed the .AppleDB and .AppleDouble files which the clients automatically make when mounting the drive and booting with the share in a clean state. Same results apply. Now there is one very odd thing that I noticed on the G4, and will be testing on the iMac as well, and that is that the ethernet link comes up before getting the TFTP file when booting from network (obviously), the file is retrieved perfectly, but then the ethernet goes down, comes back up, the client mounts the share, then ethernet goes down again, up again, mounts the share, etc. This can be seen in the logs above (at least, the fact that it re-mounts the share). Is this normal? Is it trying to determine something? It's not 'just trying a few line speed/duplex modes', it correctly sees 100Mbit FD first time round. Following attempts are made at the same link speed/duplex, anyway.
Irrelevant but funny information: I have MacOS 8.5 installed on the iMac's HDD, and when the client is done 'trying' to find it's system disk on the network, it tries to boot from the internal disk and bombs out with an 'unimplemented trap'. I guess this is because of the OS9.1 ROM and the OS8.5 install, but I could be wrong.

I created the system disk image from a working 9.1 install on the G4 (installed from a 'universal' CD, not one 'only for that G4') under OS9 booted from CD (see http://frank.gwc.org.uk/~ali//nb/ <- he's been a lot of help). The client disk image and apps image are just blank files that I
Code:

touch

ed, Locked (from GetInfo in Finder) and then zeroed out with a
Code:

cat /dev/null > $FILE

. As I understand it, the apps and 'scratch' disks are required, but are not required to be functional, or have a filesystem. Again, please correct me if I'm wrong, and this is one of the things I will trying later on.

If I missed any vital info please let me know, if you have any tips, ideas, input, examples, howtos, readmes or feedback at all, please inform me as well.

kind regards and thanks in advance

PelliX

PS: I'm using the packaged version of netatalk (2.0.3-4+etch2) under Debian which has the SSL libraries/compile flags/option disabled due to licensing, but as the OpenFirmware only understands plaintext I guess this doesn't make a difference.

PPS: This is my basic calculation of the paths (and according to the afpd/syslog they would appear to be correct):

Code:

192.168.3.13 --hex--> 00:c0:00:a8:00:03:00:0d
c0:a8:03:0d

548 (tcp port) --hex--> 2:24

7 char (macboot) --length(hex)--> 07

macboot --hex--> 6d:61:63:62:6f:6f:74

this is always the same --> 0:0:0:0:2

7 char (OS9:hd1) --hex--> 07

os9 --hex--> 6F:73:39

hd1 --hex--> 68:64:31

result:

c0:a8:03:0d:02:24:07:d:61:63:62:6f:6f:74:0:0:0:0:2:07:6f:73:39:0:68:64:31

hd2 --hex--> 68:64:32

hd3 --hex--> 68:64:33

PPPS: I have tried forcing the client to use DHCP instead of BOOTP (by disabling the allow bootp directive in the dhcpd.conf) but the effect was the same.

UPDATE: I have tested the iMac while monitoring the switch and it shows the ethernet link going up and down as well. This appears to be inherent, I guess.

----

I've narrowed down the cause of the failure (or excluded certain possibilities, rather). I downloaded the Netboot9.dmg file from the Apple website and mounted it under Mac OS X, then opened the .pkg file, extracted the .pax.gz file to the desktop. Ungzipped the pax.gz file, and continued to extract the contents with Pacifist. So far, so good. Now I've replaced the OS9.1 Mac OS ROM file in the tftpboot folder with the one supplied in the netboot package, and the HD images on the AppleTalk share, however the 'scratch disk' is still the same. I renamed the files to fit in my current naming scheme (hd1 = OS, hd2 = Applications, hd3 = scratch). I tried to boot the G4 from these files (over ethernet), but encountered the exact same problem. I'm losing hair here. Anybody got any bright ideas, or even not so bright ones ?


Note: judging by the transfer sizes (0.22KB read, 0.18KB written) I would say it looks more like the client is retrieving the 'Apple metadata' in the folder(s) but not much more than that. These 'meta info' files point to the correct paths, and have been generated from scratch a number of times with different settings (AppleDouble support, no AppleDouble support, etc).

UPDATE: On a more positive note, I've knocked up a quick ppc linux kernel and basic environment for netbooting, and it works like a charm on both machines. That was a half an hours work including coffee...

EDIT: after reading the last bit I added to this reply, I would just like to clarify that I'm still trying to get the OS9 image to boot on the Macs, the fling with ppc-linux was just a proof of concept invoked by frustration. 🙂

So basically, does anybody have any fun ideas for me to try? I'm not asking that somebody holds my hand while I make the whole thing work, but I need a quick pointer here. Thanks in advance.

PelliX

G3/G4, Mac OS 9.2.x, Linux server/Mac clients

Posted on May 24, 2009 11:26 PM

Reply
17 replies

May 26, 2009 10:14 PM in response to Andbrowny

Yes, I must say that this has crossed my mind, too. Unfortunately, I don't have access to such a machine, and I have the 10.4 install CD's (my G4 has a CD ROM drive), but first I would like to test disk imaging and restoration for OSX (I have 10.2 installed now, but no install media for it).
However, the concept of netbooting OS9 was around before Mac OSX hit the scene, as far as I can tell, so theoretically it should be possible without bootmania(or another comparable product for OSX). I have to some extent actually gone down this path by getting the 'official' Netboot.dmg from the Apple main website, and using the images contained in this dmg file. The reaction has been identical, so my guess is that the error lies not with the system/application/client image(s) but in the Mac OS ROM, or the AppleTalk communication itself (even though this works fine from both OS9 and OSX).
I'm used to using *nix mainly for netbooting, where one has verbose output when required. I'm pretty sure that I could have this setup running, if only I knew where to start digging.
Thanks anyway for the suggestion, if (read: when) I'm forced down this path I'll let you/this forum know the outcome.

PS: did you take a look at http://frank.gwc.org.uk/~ali//nb/ ? This guy did it without Mac OS X at all (this was my plan, even though I have Jaguar at my disposal).

May 27, 2009 12:48 PM in response to PelliX

i have no experience doing what you're attempting, but could there be a problem with the underlying filesystem's lack of support for resource forks? maybe the boot rom or other system files required to boot os 9 have their resource forks stripped when moved to the host filesystem, thus rendering them useless. that's just a guess, though…

May 27, 2009 2:07 PM in response to foilpan

Hello foilpan,

thanks for your input!

"could there be a problem with the underlying filesystem's lack of support for resource forks?"

The way I see it is that the images themselves (homebrew or extracted from Netboot.dmg) contain the correct filesystem and can be mounted under OS9/OSX/Linux with hfsutils (the HFS driver for Linux). The transport for the data is what matters for the access to the share, AppleTalk (or AppleFilingSystem) over TCP. The Linux server holding the images inherently only sees these files as large strings of bytes, unless I mount them. As far as I understand, netatalk basically substitutes the special filesystem tags and so on with hidden files (they start with a period, followed by the filename), and the image itself, which is what is being used as a bootvolume and system partition is HFS+.
The Mac OS ROM file is intended to be transferred by TFTP, so the client does not access that filesystem directly either, anyway. Also, the ROM seems to "work" because the keyboard and mouse light up, it mentions "DO-QUIESCE" and "LOADING ELF", switches to a more enhanced graphics mode and then enables the mouse driver just before the "large mac booting logo" of OS9 should appear.

What I'm not entirely sure about is the warning in the netatalk logs. I'm not an expert on this, and I couldn't really find much information about this on the internet, but is this CNID maybe the failing element?

May 27, 2009 2:22 PM in response to Andbrowny

I agree with your approach of isolating the issue, however, there are one or two things I would like to point out.
- assuming that the author of the aforementioned article is documenting this correctly, homebrew boot images would work. This also makes sense from an administrative point of view for customized setups. There are no inherent differences anywhere in the result up to this point. The authentic Apple images react identically, too. Also, In my opinion the ~20k of data that are being retrieved by the client over AFP are not part of the image.
- I've checksummed the ROM (one gets desperate late at night..) and it's identical to the extracted file on my OSX desktop (this step is part of the official procedure for netbooting from OSX). Still no difference.
- A real Mac DHCP server would be running. True. But again, this will not make a difference. I am aware of the required directives and wireshark backs me up on the fact that my patch to the dhcpd source was successful. I have .pcap files if you're interested.

Now, I will do one thing when I have a couple of hours, and that I simply set up a real Mac 'boot file server', as in, a real AppleTalk box on my G4 (OS X), change the AFP server directives in the DHCP lease and boot the iMac...

If that fails, I'll go the 10.4 install. Could I actually use Mac OS 10.4 for x86 for this task? This would save me reinstalling the PowerMac and then going back to Jaguar.

May 27, 2009 3:05 PM in response to PelliX

You should make sure you have the latest (last, really) firmware updates applied
(do so from within OS 9.x on the machines themselves), esp. if trying to use DHCP.
The iMac probably requires bootp.

See
http://docs.info.apple.com/article.html?artnum=120243

The image files themselves should be fine hosted on another filesystem, HOWEVER,
this is certainly off the beaten path.

I'd shudder at seeing OS 9 used in anything approaching any king of mission-critical work or even close. For fun and with no required performance & reliability & for historical research, ok 😉

For troubleshooting be sure to see
http://www.bombich.com/mactips/bootpd.html

For linux & netbooting Macs, be sure to read
http://www.afp548.com/article.php?story=20061220102102611

May 27, 2009 10:37 PM in response to davidh

Hello davidh,

I just read your reply, and can set your mind at ease hopefully; this is not a mission critical production setup, just something I'm doing in my spare time in my lounge, hehe. Once this configuration is working, though, I see no reason not to use it in production. I would guess it's just as reliable as running a real Mac OS X server, if using decent hardware, but potentially more compatible with other platforms.

You're right about the iMac G3 using BOOTP, but it's already running OF 3.0.xx (I forget the exact version right now), which uses DHCP. I could also use BOOTP if required; the DHCP server does support it.

"this is certainly off the beaten path."

Yes, I've noticed, hehe. But then again, the beaten path is, like the name implies; beaten. I'm trying to clear an alternative path which once existed, but has been abandoned since then...

I've read the article at http://docs.info.apple.com/article.html?artnum=120243 and as I previously mentioned, also tried the images extracted from that dmg file. The reaction is the same, but I also don't think the images themselves are the problem (yet).

Don't understand me wrong, I'm very appreciative for any light that can be shed on this matter, but the other two links are actually unrelated, as they focus on netbooting OSX and using BDSP, which OS9 is blissfully unaware of. One can server OS9 images from an OSX server running BDSP and NFS, etc, but it wouldn't make any difference. OS9 only uses AFPoTCP to mount the system image, apart from that, the only thing it asks the server for is a renewal of the DHCP lease every now and again. I've looked into the BDSP/OSX thing, and I will definitely set this up in the future, but this could be a somewhat more distant future, as my fastest Mac is a G4 with 256MB RAM.
Hopefully I'll be able to test the idea I previously mentioned with the PowerMac as a file server and the iMac as a client this evening. Of course I'll post the outcome here 🙂

PelliX

May 27, 2009 11:15 PM in response to slowfranklin

Thanks for clearing that up! I didn't think so either, but then again, I only picked up a Mac for the first time a few weeks ago...
Since you're a netatalk developer, I would like to ask one very simple question; are you aware of any potential or inherent problems with serving the images the way I do, when it comes to netbooting? I know that I must use plaintext auth, and this is configured, meaning I can connect to the AFS shares using a 'local' OS9 or OSX operating system authenticating by plaintext (OSX even warns me of this fact). This is also confirmed by the fact that the netbooting client(s) do(es) access the share, and log in correctly (see log in first post).

May 28, 2009 2:51 AM in response to slowfranklin

Thanks, great stuff!

I'll send you the capture this evening, that will be in approx 6-7 hours. The captures I made and still have are not filtered by TCP port, but by host itself. In other words it includes the response from the DHCP server (the box that was also running tshark) in which the AFS directives are supplied to the client, the TFTP transfer of the ROM file and the AFSoverTCP communication. Should I make you fresh captures, or will these, containing the other information do?

PelliX

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Netboot OS9

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.