Netbooting a Next Cube from Linux - HOWTO

NeXT Computer, Inc. -> NeXT Black Hardware

Title: Netbooting a Next Cube from Linux - HOWTO
Post by: Khashoggi on November 15, 2011, 12:30:36 PM
How to boot a Nextcube from Linux

I noticed there is no complete reference on how to do this. Lots of bits and pieces, and dead ends. I have put together a solution that works perfectly for me. This requires a fair bit of knowledge of the various pieces, but it is not very complicated. You will need to know how to setup the DHCPD and NAMED servers on your own. I include the relevant additions to the config files for those services. On my setup I use the same linux box as the DHCP, TFTP, bootparam, NFS, and DNS server.

My system feels as fast on net boot as it was on the SCSI disk. And, I have TB's of space!

My setup is listed below. If you make some adjustments to the various procedures, most flavors of linux should work as well as black hardware.

Nextcube 68030
Fedora Core 10 32bit kernel

1. You need the following running on the Linux box- DHCPD, TFTPD, bootparamd, NFSD, NAMED.

2. Cube needs to be in same subnet as Linux box.

3.You need the following config files and directories setup on the linux box:
   dhcpd.conf
   bootparamd.conf
   exports
   tftpboot/
   netboot/

4. You need to image the black hardware you want to net boot. One way to do this is by booting your black hardware and mounting your linux box via a NFS share and then using the "dump" command or tar to transfer over the entire image.

Theory of operation-

When you start the black hardware you enter into monitor before booting up.

Type "ben()mach" to begin the net boot. You can store this as the default boot command in the monitor preferences setting. The command stands for boot ethernet and use mach kernel.

The NeXT requests its IP address from DHCPD on linux. An IP is returned to the NeXT.

The NeXT requests its boot file from the TFTPD on linux. Default file is "boot" which is returned to the NeXT that executes it.

The NeXT requests its kernel from the TFTPD on linux. The file is "mach" which is the name you used in the "ben()mach" net boot command. The mach kernel is returned to the NeXT.

The NeXT requests its root mount and private mount directory locations from the bootparamd on linux. The directory locations are returned and the NeXT kernel mounts them via NFS.

The NeXT kernel proceeds to boot from the NFS shares and your in business!


Config files are located in /etc (CAPS are meant to be replaced by your values) -

dhcpd.conf

host YOUR-NEXT-HOST-NAME {
   hardware ethernet YOUR-NEXT-MAC-ADDRESS (XX:XX:XX:XX:XX:XX FORMAT);
   fixed-address YOUR-NEXT-DESIRED-IP-ADDRESS;
   next-server YOUR-TFTP-SERVER-IP-ADDRESS;
   server-name "YOUR-SERVER-HOST-NAME";
}

bootparams

YOUR-NEXT-HOST-NAME root=YOUR-NFS-SERVER-IP-ADDRESS:/PATH-TO-ROOT-NEXT-IMAGE private=YOUR-NFS-SERVER-IP-ADDRESS:/PATH-TO-ROOT-NEXT-IMAGE/private

* it is important that the host name you choose be reverse mapped to its ip address in your named.conf. You can use the 'dig -x NEXT-IP-ADDRESS' command to check if your DNS entry is properly reverse mapping to the NEXT-HOST-NAME. I ran into problems using a fully qualified NEXT-HOST-NAME so use one without any extensions. If you do not have reverse mapping the bootparamd server will never answer the NeXT box and will show a failure.

exports

PATH-TO-ROOT-NEXT-IMAGE/ *(rw,sync,no_root_squash)

tftpboot

I used a package manager install so you just need to know the default tftpboot directory. In my case it is "/tftpboot"

netboot

Can be any directory. In my case it is "/netboot"


How to image the NeXT-

1. Imaging the NeXT to the linux server requires you to setup the NFS share on your linux box first. Then boot your NeXT and mount the NFS share. Setup the NFS server as shown above and use that location.

2. You can then use the dump command:

dump 0sf 9999 /PATH-TO-NFS-SHARE/image.dump

0 parameter tells dump to make a full dump, the s parameter gives the number of feet of tape (this is a file, so we just want it to be an endless tape) I used 9999 feet to make sure my 100MB drive ended up in one file. The f parameter says use a file as the dump location.

3. On the linux box we need to decompress the image and move files into where they are going to go.

4. Use the restore command:

restore -rf image.dump

this will restore the files from the image into the directory you currently are in which should be your PATH-TO-ROOT-NEXT-IMAGE/ that is stored in your exports file.

5. Go into the following folder of the extracted files:

private/tftpboot/

6. Copy the following files:

copy "boot" and "mach" to your tftpboot directory

cp -a boot /tftpboot
cp -a mach /tftpboot

7. That's it. All the files should be where they need to be. And, once you've set up all the config files and started the various services you are ready to Netboot.
Title: Netbooting a Next Cube from Linux - HOWTO
Post by: Noth on November 15, 2011, 01:41:04 PM
Very good work collating all the information and setting it all out. I'll point out one thing before people start panicking about what version of Linux you used, *any* Linux (and for that matter, *BSD and *NIX) can provide the tools. It's just nice to use a recent release that has all the tools and is easy to setup.
Title: Netbooting a Next Cube from Linux - HOWTO
Post by: Khashoggi on November 15, 2011, 05:43:55 PM
Yes, all the services can be brought up on a more recent, or even older, *nix.

My Fedora Core 10 server is a media server and also netboots other Linux media Frontends.

Part of my requirement was not to break the current NetBoot environment I have for my media Frontends. I had to keep the vintage FC10 Linux intact.

Adding the NeXT to that environment now works and doesn't disrupt the other main reason for the server.
Title: Netbooting a Next Cube from Linux - HOWTO
Post by: Khashoggi on November 22, 2011, 09:38:58 PM
Addendum-

The mount that you are using as the NFS Export must have the following option turned off, if you are using linux. dir_index must be disabled. Some versions of linux enable dir_index as a default.

This must be done, before you do the 'restore' of the dump file.

If your using a new file system, or a loop back, make sure to issue this command before mounting and NFS exporting and Restoring from NeXT.

tune2fs -O^dir_index filemount (or diskimage.img)

The repercussions to this: you will get a clean boot, but apps may or may not launch. Once you correct the linux file flag everything will be O....K....
Title: Netbooting a Next Cube from Linux - HOWTO
Post by: leftofright on November 25, 2011, 02:57:39 PM
Thank you.
Perfect way, it seems, to back up and restore images from old hard-drive to new one.
Title: Netbooting a Next Cube from Linux - HOWTO
Post by: Khashoggi on November 26, 2011, 10:31:40 PM
Quote from: "leftofright"Thank you.
Perfect way, it seems, to back up and restore images from old hard-drive to new one.

Absolutely!

I have the netboot directory tar'd and backed up. I can restore a virgin "image" anytime I want.

Also, I can boot different versions of the OS very easily.

My cube has a 100MB drive which is barely enough for the OS. There are no space restrictions now.
Title: Netbooting a Next Cube from Linux - HOWTO
Post by: leftofright on November 27, 2011, 01:10:47 AM
I am needing to practice this with my own setup.
I have a fully functional Whitebox and several VM's as well.

But I am having the hardest time loading Openstep into a x86 embedded PC.
It uses a SD card for a HD.
I tried using a adapter to load it from my Whitebox but no go.
It would seem that a network load may be my only option.

Thanks again for the steps to do so.
Title: Getting "giving up waiting on executable mach"
Post by: bheron on January 21, 2015, 04:14:32 PM
I followed the instructions to the letter including the Addendum.  It boots up, but then stops with the message:

giving up waiting on executable mach

repeatedly.

GC
Title: Issue with netboot...
Post by: bheron on January 22, 2015, 11:17:25 AM
loginwindow[nnn]: loginwindow: could not find WindowServer port!

I am seeing this now.  I figured out the issue with mach.

Let me know if you guys know what the problem might be here.   At this point I'm going to try the SSD route of getting my NeXT off of the old HDs.

GC
Title: Netbooting a Next Cube from Linux - HOWTO
Post by: Khashoggi on March 08, 2015, 08:36:53 PM
Can you give a little more info as to OS version and hardware and I'll see if I can point out the gotcha.


My NeXT cube stopped booting completely, including nebooting, which I suspect means it needs a recap.

Go to top  Forum index