• Updated 2023-07-12: Hello, Guest! Welcome back, and be sure to check out this follow-up post about our outage a week or so ago.

NetBoot OS 9 from a Modern Linux Server

saybur

Well-known member
I figured out a method to net-boot early New World ROM systems into OS 9 using modern server software. Instructions for how to do it are here:

https://github.com/saybur/kea-mboot

This is quite useful if you need to bootstrap an old Mac without a functional optical drive, or if you want to run one without a hard drive at all.

Nothing revolutionary here, this was being done in production environments many years ago. However the patches required to get it working were all for ancient versions of the ISC DHCP server; the code and config examples at the above link can (hopefully) let other people netboot using the modern ISC Kea DHCP server, alongside Netatalk and a TFTP service. The page also has some general information and links. The netboot process is a bit… involved, and much of the existing knowledge was tailored more for institutional IT folks rather than retro computing enthusiasts. Suggestions, or even better, PRs, are welcome.

From what I've read this is implementing “NetBoot 1.0” (BOOTP with vendor additions) and will only work with the New World ROM systems from before, roughly, the summer of 1999 (from the first iMac through the earliest revisions of the iBook). Later models use DHCP/BDSP aka “NetBoot 2.0,” which requires a different approach. I suppose it might be possible to write a Kea hooks library to implement BDSP, but since this current setup has solved my immediate problem (and I’m quite unfamiliar with C++) that's a problem someone else will have to solve instead.

On an interesting historical note, the payload of BOOTP option 221, sent by the Mac to start the netboot process, is “Apple MacNC” Presumably a reference or salvaged code from the canceled/vaporware Mac NC project?

Anyone who manages to get this working, please feel free to comment here: the process is finicky enough I'd like to verify it works on someone else's network!
 

Snial

Well-known member
<snip> net-boot early New World ROM systems into OS 9 using modern<snip>:

https://github.com/saybur/kea-mboot

<snip> the code and config examples at the above link can (hopefully) let other people netboot using the modern ISC Kea DHCP server, alongside Netatalk and a TFTP service. The page also has some general information and links. <snip> only work with the New World ROM systems from <snip> the first iMac through the earliest revisions of the iBook).
Excellent, thanks and perhaps useful for me as I'm hoping to get a B&W G3 before too long & I'll let you know once I've tried it (though the CD may work). Note: the first iMac was summer 1998.
Later models use DHCP/BDSP aka “NetBoot 2.0,” which requires a different approach
Later machines also can boot from USB.
<snip> canceled/vaporware Mac NC project?
Network Computers were very much a Oracle/Java/Ellison thing in the late 1990s, but they did sound exciting. There were a few made, e.g. the Sun Network computer and the Acorn Network Computer, which was the initial reference platform. In some sense, web tablets are the nearest mainstream fulfilment of NCs, but it's certainly true that a few Sun workstations were launched as diskless workstations a number of years earlier. I discussed an NC-based Mac in the thread about fantasy 88K Macs that could have predated PowerMacs by a couple of years.

1727863029749.png
Early M88K based Macs would have been expensive, because performance is pricey, but the R41/25 is the student-oriented, bare-bones of a diskless M88K Mac that could hook up to a higher-speed AppleTalk university network or a home-based Mac network. It has battery backup for the RAM for transporting when powered off and enough RAM (4MB) for an app or two + a network oriented System 7.1.
 

slipperygrey

Well-known member
This is wild! I was asking around about this very thing only a few days ago, based on memories of Macs being netbooted back in the days. I was (obviously) curious if AFP was involved somehow. You are doing important work in documenting and demonstrating how this can be achieved.

One convenient option to install recent Netatalk releases on Debian Bookworm is to download the deb packages that I have been building and attaching to the release notes. See the deb file attached here for instance: https://github.com/Netatalk/netatalk/releases/tag/netatalk-4-0-0

BTW, I already broke a URL in your readme, when shifting around the Netatalk installation guide contents in the wiki. The Debian guide has a new URL...
 

saybur

Well-known member
Thanks all for the nice comments! 🙂
Later machines also can boot from USB.
I'll try that on my iMac DV+. I had a heck of a time fiddling with USB in Open Firmware on the original iMac, everything I tried would just lock up OF. I couldn't tell if it was a 'me' problem, something with my USB devices, a computer-specific problem, or just a limitation of the firmware.
One convenient option to install recent Netatalk releases on Debian Bookworm is to download the deb packages that I have been building and attaching to the release notes.
Sweet, I missed you were making those. I've been lazy on updates, I'm still running your original 2.2 fork on my server. Having prebuilt binaries is a good incentive to try out the new version. I'll get the link fixed as well.
 

Arbee

Well-known member
The original iMac hardware was pretty much a repurposing of the NC development, from what I understand. In NC form it wouldn't have had a built-in CRT or optical drive, of course.
 

NJRoadfan

Well-known member
I'm guessing some of this tooling dates from NeXT or early 90s Apple and never updated. DHCP was around for quite some time when the iMac came out.
 

Snial

Well-known member
Thanks all for the nice comments! 🙂
They’re well deserved! Being able to boot up New World Macs without a working CD is a critical task & quite a lot of them have failed in the past 25+ years.
I'll try that on my iMac DV+. I had a heck of a time fiddling with USB in Open Firmware on the original iMac, everything I tried would just lock up OF. I couldn't tell if it was a 'me' problem, something with my USB devices, a computer-specific problem, or just a limitation of the firmware.
Ok I’ll post the content of my Google doc shortly that enabled me to do it.. and it really does work. I was using an iMac DV/400 for this - blueberry, but I don’t think the colour makes any difference 😉!
 

Snial

Well-known member
@saybur, here's the iMac DV/400 and later boot from USB guide. It's a bit scrappy.

I used this YouTube video, but the resolution is pretty poor and the YouTuber goes through the process too quickly.


dev / ls
was the first open firmware command and it lists all the devices. Importantly:

AD_4nXdn45ykMQAcCgZ7_Atj6B3N-rEGqS6z5eQlZpU7eRoQxM7i34rawDZD5esT_1JPvY2DeVqdGXbuQW2ZlrUgAwTvZxevs2WtbJjeptFZXj4B8DE7emupyPYzxfQ70QkF0WXTdBtlFpcUH5ZebW0iOHEiUHf6

then
AD_4nXcCL9lsl5iZMaKbn0VOEa4PAKh3taKiEXNPa1LXVR7DPqyxVMvAbc701T0iBhfkYYSN_iyfus_21WDqKGuB_Aupxxr0vmGjEMdKhMamcULnMcD2VlHeHkONu3BRyVNmqBCB3PH2LlGIbz3m2r26mL0nQ9TU

I may have used this, but I think a lot of the time when booting I just used the complete path for the dir and boot commands. In practice also, I didn't go straight to generating the whole path, I just started off with the dir'ing root directory, and then added each subdirectory in turn.
AD_4nXeR3v4feIY1HyRubK9-nhYQV3CMIJHAPBfMJxU5r9HH2j1ncux4m2OBqjEmWTehdCzm9GNC33cvEhf08VAnQVMDDSSPq1T4_e73g_fF1CkIX_rN5_tHf0ft-rW9em0IjtNiyO7jOl8H8JqK2SLx8LCO6mI
(dir ud:,\ then <cr>, the '_' is just something the CLI added when I pressed <cr>)
AD_4nXfGUMheNYDzZ1AjvXE1DpRCoPtHrUlKfr0DHyjzGyfKimezY4zzoCDO2xX7Pl2XdXRbHf711pBnn1yDUyCueUmPFCcSl9V3DwqpOcwN4sH3KVvRp9T_r_YjLEtm6uCICz4X_hprP2addQ6JI7CgXNyIDeF9
(that's for booting Mac OS X, you can skip that).
Also, you can figure out which usb slot is being used by dev usb0 ls (or dev usb1 ls) with a keyboard plugged in. These resources can help:

https://www.macintoshrepository.org...powermacs-g3-g4-g5-from-a-usb-stick-or-drive-

https://beanzarch.github.io/bootmania/

At one point I was trying to check the right ROM maps, I needed to access this via the wayback machine.
https://support.apple.com/kb/TA22055
I was looking for the right ROM file for Mac OS 9.0.4, which I had an install for.

Mac OS 9.0.3 bundled on iMac (Slot Loading)3.6

Mac OS 9.0.4 Retail/Software Update3.7

But I don't think that worked properly: it got as far as a Happy Mac and then just rebooted (back into Mac OS X 10.3 on HD). I think this was because the iMac DV/400 came out just as Mac OS 9.0 appeared, so they never really ran Mac OS 9.0.4. Instead, they ran Mac OS 9.0.3 via the installation disks and then went to Mac OS 9.1.

In my case, I found a Mac OS 9.1 installer on a Zip disk (now labelled Installers). I either followed the following procedure by installing Classic on my Mac mini, or by installing Classic on the iMac DV which was already running Mac OS 10.3, but both are equivalent.

"I reinstalled Mac OS 9.0 on the USB drive using the Mac OS 9.0 installer on the USB drive; then I installed the Mac OS 9.1 updater (which was on the internal HD at this point), then I could use the boot command above to boot into Mac OS 9.1 (which took a while as it was on USB)."

So, success!

Booting Mac OS 9 would look like this, after going into Open Firmware (Option+Command+O+F as you know, but maybe someone else reading this might not yet) and you do type the %20s and case matters.

boot /pci@f2000000/usb@19/disk@1:,\System%20Folder\Mac%20OS%20ROM

Finally I could boot Mac OS 9.1 from USB.

A bit scrappy, like I said!
 

saybur

Well-known member
Really appreciate you putting that together, I'll give it a go on my system and report back.

It is interesting that Apple apparently didn't expend much effort trying to simplify USB booting. You would think the explosion of external USB peripherals after the iMac came out would have given them a push toward making it a bit more "first class," this stuff is a far cry from "hold down C."
 

Snial

Well-known member
Really appreciate you putting that together, I'll give it a go on my system and report back.
Cool!
It is interesting that Apple apparently didn't expend much effort trying to simplify USB booting. You would think the explosion of external USB peripherals after the iMac came out would have given them a push toward making it a bit more "first class," this stuff is a far cry from "hold down C."
Agreed. It doesn't take much in the way of Open Firmware commands to get it to boot from USB, so it's kinda surprising that Apple didn't support it. However, it's worth bearing in mind that USB flash memory sticks didn't exist until 2000 and even then they were in the region of 32MB, far too small for Mac OS 9. MMC appeared in 1997, but you would have needed a USB MMC reader, and again, they were small. I have an 8MB JVC MMC in my possession, too small for System 7.1.

However, Zip drives did exist and they were popular. The USB Zip drive was reviewed in MacUser UK in the January 22, 1999 edition. But it only stored 100MB, barely enough to squeeze a cut-down version of Mac OS 8.1+. The 250 was a year or so after.

On the third hand, I don't think this is an excuse. Apple should have anticipated that USB drives of one kind or another (including USB CD drives) would reach GB capacities within the lifetimes of even the earliest iMac. Everyone had known about memory and storage capacity increases since Moore's Law in the 1960s and about addressing needs since the 1970s; a classic paper being Gordon Bell's "What we have learned from the PDP-11" in 1977. To quote:

“The biggest (and most common) mistake that can be made in a computer design is that of not providing enough address bits for memory addressing and management. The PDP-11 followed that hallowed tradition...”
 

NJRoadfan

Well-known member
Does this setup interfere with another DHCP server on a network serving addresses, or is kea strictly broadcasting BOOTP packets? I might give this a spin, but don't want it screwing around with address assignments on other devices.
 

saybur

Well-known member
The library should only modify packets with the "netboot" class attached to them. That's added by the option 221 test in the example config file. All other DHCP/BOOTP traffic should be handled normally by Kea.

If you have an existing DCHP server then yes, this setup will interfere with it. You might be able to configure Kea to only respond to netboot packets and no others, but I have not tested that config, and obviously you'd need to configure your existing server to not respond to the netboot stuff (or blacklist those MACs, I suppose).
 

saybur

Well-known member
For @Snial, did some testing today with USB booting on my Summer 2000 iMac DV+ (450MHz). Open Firmware reports this as "PowerMac2,2 3.0f3 BootROM built on 06/13/00" which seems old compared to similar systems on this list. The computer has a good OS 9 install on it already, but I will be needing to do USB booting on it eventually as the system's optical drive is in the process of failing: it frequently will not read disks and can't reliably eject either (I've had to carefully pull disks out with hemostats, scary stuff).

To prepare the flash drive, on my main Linux system I did a simple 'dd' copy from an .iso backup of my physical OS 9.2.1 disk directly to the USB device node, then I popped the drive into the iMac. On a lark instead of invoking Open Firmware I just held down Option on bootup. To my surprise the boot picker showed a hard drive icon with a USB logo below it, alongside the internal drive as a second option. Selecting the USB drive and clicking forward, I got a happy Mac and the system began to boot up! Unfortunately I immediately got an alert that the system file would only work from the CD (not sure why it cares, it's 1:1 with that CD, grumble grumble).

Rather than build a custom system folder, I sat down for a bit with Derez, diff, and ResEdit to do some digging in the install disk System file. After experimentation in Qemu I figured out that all you need to do is delete the 'xboo' resource and it will get rid of that annoying message. Applying that change, the system now boots off the USB flash drive via the Option menu, complete with the nice CD background from the install disk. Pretty slick!

This does make me a bit concerned that there is something 'off' about my setup. Would you be willing to check the Option boot menu approach on your system and see if this is something you can replicate?

Just for fun, I also tried the 'dev / ls' command on my rev B iMac just to check if it was even seeing the USB stick: it was not, the hub was only showing the keyboard/mouse.
 

NJRoadfan

Well-known member
I don't expect the dinky DHCP server in my router to respond to netboot stuff. I was mostly worried about Kea deciding to hijack DHCP duties and start assigning addresses to all my other devices on the network. Forcing Kea to respond to only BOOTP requests would be ideal.
 

saybur

Well-known member
I think you can configure Kea that way using a variant of the following:

"client-classes": [
{
"name": "DROP",
"test": "not member('netboot')"
},
],

Disclaimer: this is untested. I keep my retro systems on a separate VLAN so Kea is handling all address assignment.
 

Snial

Well-known member
For @Snial, did some testing today with USB booting on my Summer 2000 iMac DV+ (450MHz). Open Firmware reports this as "PowerMac2,2 3.0f3 BootROM built on 06/13/00" which seems old compared to similar systems on this list.
Maybe you need to do the Firmware update? Be careful, getting it wrong can disable VGA output to the main monitor (there are workarounds that involve using a second, similar-era Mac, or maybe you can just use the external VGA).
<snip> 'dd' copy from <snip> physical OS 9.2.1 disk <snip> held down Option on bootup. To my surprise the boot picker <snip> Selecting the USB drive <snip> happy Mac <snip> alert that the system file would only work from the CD <snip> sat down for a bit with Derez, diff, and ResEdit <snip> install disk System file <snip> delete the 'xboo' resource <snip> system now boots off the USB flash drive via the Option menu <snip> Pretty slick!
Indeed, impressive!
This does make me a bit concerned that there is something 'off' about my setup. Would you be willing to check the Option boot menu approach on your system and see if this is something you can replicate?
OK, I'll check it out on @CircuitBored 's iMac G3/500. Though being a later model, it might just work anyway. I 'fixed' the CD inject/eject mechanism with some short rubber-bands: there's an odd lag as the bands stretch before achieving traction, and I don't expect it to last forever as the bands will perish, but it's OK for now!
Just for fun, I also tried the 'dev / ls' command on my rev B iMac just to check if it was even seeing the USB stick: it was not, the hub was only showing the keyboard/mouse.
Aaah, OK. So this makes me think you need the firmware update. But I could be wrong. I don't have that iMac G3 DV/400 any more either, so I can't check the firmware version for it sadly.
 

saybur

Well-known member
Aaah, OK. So this makes me think you need the firmware update. But I could be wrong. I don't have that iMac G3 DV/400 any more either, so I can't check the firmware version for it sadly.
I'll have to look, supposedly there are newer versions of the original iMac firmware on the OS install disks. Based on other people's reports I'm kind of suspecting even the newest firmware on the original iMac isn't capable of proper USB booting.

For what it's worth the command itself worked fine on the original iMac, it just didn't see any USB items beyond the input devices. On the later DV+ it did work correctly and showed the USB drive.
 

joevt

Well-known member
Maybe you need to do the Firmware update? Be careful, getting it wrong can disable VGA output to the main monitor (there are workarounds that involve using a second, similar-era Mac, or maybe you can just use the external VGA).
Before doing a firmware update, get a dump of the current firmware. You can use the get-new-world-rom.command in Mac OS X to do that.

Your 3.0f3 is the earliest version I've heard of that is known to be able to boot USB.

The List of Power Macs.txt shows which ROMs that I have that have the usb-ms-class package (for mass storage devices).
The Lombard ROM is interesting because it doesn't have the package but does have code to look for the package.
 

Attachments

  • List of Power Macs.txt
    17.7 KB · Views: 3
  • flashrom-joevt-10.3 and 10.4-ppc.zip
    1 MB · Views: 2
Top