"Cloning" a NeXTstep system?

Started by Jenne, September 09, 2006, 01:31:27 pm

Previous topic - Next topic



I got a "new" 9GB HD SCSI 50 pin, IBM DNES-309170, internal terminated and I would like to know if there is any known issue with this HD

Thanks for the Help


I've finally figured out how to take a cheap ebay 4Gb drive, clone all of my NeXT software onto it, and have it work as a 2Gb boot drive with a desktop visible spare 2GB partition for storage. This is a long post because I tried to be complete so someone like me who is not a Unix user can do it. Any corrections or additions to this procedure are welcome.

This is my recipe for making a NeXTStep 3.3 hard drive from the dirt-cheap and readily available Seagate ST15150N (they are almost always available from ebay for less than $10). The method I give below yields a boot drive with two partitions, each with 2GB. It does include the dreaded "disktab file mod", but I found I needed to modify the disktab file in order to have the drive partitioned into 2, 2GB partitions rather than 3 equal partitions of less than 2 GB each.

1) Make a fresh install of NS3.3 with patches on computer in boot drive. I did this with a set of install disks I bought through ebay. My apparent 'clone of a clone of a clone' (a hard drive one of my NeXTstations came with, the hard drive was named "Kimba", I've seen that name somewhere else?) which had NS3.2 updated by me to NS3.3 then patched with Apple patch 3 may have been corrupted. I didn't seem to be able to get the 'disk' command to work properly until I made a clean install of NS3.3 on a reformatted drive. It could have been some other problem, like sloppy command entry, but my ability to get a 4GB drive formatted to two 2GB drives coincided with my fresh install of NS3.3 and Apple patch #3.

2) The convention for NeXT hardware is to have the boot drive identified as SCSI id "1" (so the computer will boot from an external drive with SCSI id 0 if needed). Make sure the drive (SCSI id 1, boot drive) is terminated. Make sure your highest SCSI drive is also terminated and no other SCSI device is terminated. SCSI id 1, boot drive, is the drive that you want to 'clone'. Its OS and all other content will be cloned to an external drive that can then be immediately tested as the boot drive when its id is set to "0". The goal is to have the clone drive work as the boot drive when installed in this (or another) NeXT computer.

3) Mount a Seagate ST15150N (4.4 GB) drive that you want to make into a bootable clone mounted in an external case with the SCSI id "2". If this is the only other SCSI device in the chain, terminate it. If not, be sure to terminate the highest numbered SCSI device in your chain of SCSI devices connected to the NeXT computer.

4) While on the subject of terminators (which can include setting jumpers at disk drives) I find "terminator power from SCSI bus" is a jumper setting that works for disk drives I have installed in NeXT machines and external enclosures. I don't know what other terminator power settings work or don't work.

5) Turn on the external drive FIRST. Power on NeXT computer. Log in as Root, and make sure you are in unix expert mode (select from preferences menu). After you log in "disk drive is unreadable" will appear, select "ignore".

6) Find the unix id of your drives (devices='dev') by looking at the device info found from /usr/adm/messages. Your boot drive will probably be "/dev/sd0" and your external drive will probably be "/dev/sd1" depending on their order in the SCSI chain.

7) If the drive is mounted you can also confirm its id by entering "df" in the console:

localhost:1# df
Filesystem            kbytes    used   avail capacity  Mounted on
/dev/sd0a            2036476  557648 1275180    30%    /
/dev/sd0b            2036476       9 1832819    00%    /disk2
/private/vm/swapfile 2036476  557648 1275180    30%    /private/vm/swapfile.front
/dev/sd1a            1441632  557638  739830    43%    /Disk
/dev/rsd2h             98080    3108   94972     3%    /blankzip

8 ) Even if not mounted (i.e. have not run 'disk' command yet) do scsimodes to see the disk is there (and to check for the number of bytes per sector).

localhost:2# scsimodes /dev/rsd1a
SCSI information for /dev/rsd1a
Drive type: SEAGATE ST15150N
520 bytes per sector
106 sectors per track
21 tracks per cylinder
3712 cylinder per volume (including spare cylinders)
9 spare sectors per cylinder
21 alternate tracks per volume
8242658 usable sectors on volume

9) I ran into problems with trying to format and partition my drive since it had been formatted to 520 bytes/sector. The following is a comment from the NeXTstep 3.3 disktab entry. It gives a clue to why I was unable to partition my drive with the "disk" command:

"#   ss   sector size -- MUST ALWAYS BE DEV_BSIZE (1024) FOR NOW"

To complicate things further, the NS3.3 'sdform' was not able to change the format of the 520 byte/sector drive to the requisite 1024 byte/sector required to use the 'disk' command. Fortunately I was able to download the freeware program 'sdformat' (available from http://sounds.wa.com/additional.html and NeXT archive sites). 'sdformat' is designed to do a low level format with sector size of your choice.

10) Install sdformat and use the 'chmod' command to change permissions so that you can actually use the 'sdformat' command.

localhost:4# ls -l /usr/local/bin/sdformat
-rw-r--r--  1 root      139264 Jan 14  2003 /usr/local/bin/sdformat
localhost:5# chmod 777 /usr/local/bin/sdformat
localhost:6# ls -l /usr/local/bin/sdformat
-rwxrwxrwx  1 root      139264 Jan 14  2003 /usr/local/bin/sdformat*

11) 'umount' disk to format. If the disk is mounted 'sdformat' cannot format the disk.

localhost:3# umount /dev/sd1a

12) As is commented into the original NS3.3 disktab entry, a 1024 bytes/sector format is needed if "disk" is used to initialize the disk, partition it, and add a boot block. To format the drive to 1024 bytes/sector, in console, enter:

localhost:4# /usr/local/bin/sdformat -i2 -b1024 -f

where '-i2' indicates scsi id number is set to '2' on the drive (by jumper or switch on external drive case). -b1024 shows that I want to change sector size to 1024 bytes. Formating the entire 4GB disk with my NeXT turbo took just about one hour.

13) scsimodes now shows the drive has been formatted with the requisite 1024 bytes per sector.

localhost:2# scsimodes /dev/rsd1a
SCSI information for /dev/rsd1a
Drive type: SEAGATE ST15150N
1024 bytes per sector
56 sectors per track
21 tracks per cylinder
3712 cylinder per volume (including spare cylinders)
9 spare sectors per cylinder
21 alternate tracks per volume
4388759 usable sectors on volume

14) Write or find the correct disktab file for your drive. This example is for 2*2GB partitions of Seagate ST15150N drive, pretty much written as in web source of disktab files (http://deadstart.net/NeXT/disktab/). This differs from the published disktab entry in that I have used a different label for the disk. The label I use is more consistent with what is written in NeXTanswers article #1849, "Adding On without Flipping Out" by Mark Tacchi ("1849_Adding_Disks"  from http://next.68k.org/nextstuff/otto/html/pub/NeXTanswers/AsciiFiles/Journals/1849_Adding_Disks.txt). More importantly, the third partition is not included in my version because I found the third partition sometimes wouldn't 'take' for some reason with some attempts. I don't know why. It could have been due to some inconsistency on my part.


ST15150N|ST15150N-1024|SEAGATE ST15150N-1024:\

15)initialize disk with the following command:

localhost:3# disk -i -t ST15150N /dev/rsd1a

The 'disk' command uses the disktab file to initialize the drive so it has 2 partitions (2*2GB) and also adds a boot block (according to the manual, see 'man disk'). However, use disk a second time with the '-b' qualifier since I did use the above command a few times and no boot block was written. [Again, I don't know why there was an inconsistency, perhaps I was inconsistent in my technique.] I use the following command to write a boot block on the new drive:

localhost:3#  disk -b /dev/rsd1a

It may be that NS3.3 Makedisk can make a disk with 2*2GB only if the total capacity of the drive is exactly 4GB. If it is 4.01 GB for instance, it might try but it cannot. I have not had any luck making a disk with Makedisk on a drive of more than 4.00 GB. I have sacrificed about 200MB of useful disk space on the Seagate drive, as I have mentioned, because I was having problems getting a third partition with some disks for some reason I couldn't easily figure out.

16) At reboot with external drive attached, "Disk" icon appears and says that it has 1.75GB available. Note that only the first partition of the 2 partition disk is mounted. I used Kenjay's excellent directions (that appear earlier in this thread) for writing the fstab file so that both partitions appear on the desktop when the computer is booted.

17) Next I used nextchef's method to clone the boot drive including NS OS to the external drive, as shown below.

18 ) Make a directory called 'drive 2' on the boot drive.

localhost:7# mkdir drive2

19) Use the umount command if the disk is already mounted because you did a reboot after initializing the disk.

localhost:8# umount /dev/sd1a

Mount the freshly formatted and initialized external drive to "/drive2".

localhost:9# mount /dev/sd1a /drive2

20) Now that the drive is mounted, I use 'df' to make sure.

localhost:10# df
Filesystem            kbytes    used   avail capacity  Mounted on
/dev/sd0b            1441633       9 1297460    00%    /disk2
/dev/sd0a            1441632  557641  739827    43%    /
/private/vm/swapfile 1441632  557641  739827    43%    /private/vm/swapfile.front
/dev/sd0c            1441633       9 1297460    00%    /disk3
/dev/rsd2h             98080    3084   94996     3%    /blankzip
/dev/sd1a            2036476       9 1832819    00%    /drive2

df shows that the drive is mounted (first partition only) as sd1a, a 2GB partition which will be the root drive when cloning is finished. The second 2GB partion has not yet been mounted so it does not show up from the df command. It does not need to be mounted yet because the clone of NS3.3 will be made onto the first partition only.

21) Change directory to 'drive2' and do a dump|restore to clone drive.

localhost:11# cd /drive2
localhost:12# dump 0f - /dev/sd0a | restore -rf -
 DUMP: Date of this level 0 dump: Sun Jan 21 01:29:05 2007
 DUMP: 15.69% done, finished in 1:12
 DUMP: DUMP: 579743 tape blocks on 1 tape(s)

22) Shut down computer and turn off external drive. Change SCSI id of external drive to "0" and terminate it. It needs to be terminated because now only the old boot drive (SCSI id #1) and the clone of it (SCSI id 0) exist in the SCSI  chain and the highest and lowest in the chain must be terminated. Now reboot and the clone of the original drive should boot up the computer. Now you need to modify the /etc/fstab file to automatically mount the second 2GB partition at boot.

23) As mentioned, I used Kenjay's partition automount technique to make the second 2GB partition show up on the desktop automatically. Works like a charm.

To create additional space on a 4.3GB hard drive [NeXT] -

( Notes: 0 is a zero in all cases - text after # is a comment, don't type it) .

1. Boot
2. Login in as root
3. Open a terminal window.
4. Type the following in the terminal window:
cd / # make sure you are in root
mkdir disk2 # create the mount point
cd /etc # get into the etc directory
cp fstab fstab.old # make a backup of fstab
chmod 644 fstab # change permissions on fstab to make it writeable

5. edit the fstab file

To edit the fstab file do the following:

1. In File Viewer click on the etc folder

  • 2. In the etc directory structure double click on fstab file [the first one - with no extension]
    3. This should bring up the NeXT edit program and the fstab file will be displayed in the edit window as follows:

    # This file contains information used to mount local hard disks.
    # Consult your Network and System Administration manual
    # for information on adding local disks. Information on the format
    # of entries in this file can also be found in the fstab man page.
    /dev/sd0a / 4.3 rw,noquota,noauto 0 1

    Add the following line after the last line above:

    /dev/sd0b /disk2 4.3 rw,noquota 0 2

    Save the file [save - not "save as"] and quit the NeXT edit program.

    6. Type the following in the terminal window:
    chmod 444 /etc/fstab # change permissions back to read only

    7. Reboot the system in verbose mode. Watch to see if the /dev/sd0b partition is mounted on /disk2 and note errors [if any].
    8. Login as root.
    9. Double Click on the disk2 folder in the file manager and it should tell you that you have +/- 2GB of space available.
    10. Optionally open a terminal window and type: df to get information on the mounted drives.
    11. Additionally you may want to run a fsck on the new partition to verify its integrity. Type: fsck /dev/sd0b in a terminal window.

  • You must enable the Unix Expert mode [in preferences] to see the etc folder.

    Do the following:

    1. In File Viewer click NextApps
    2. In the NeXTApps directory tree double click Preferences.app
    3. In the Preferences window scroll the bar right until you see the Unix tab
    4. In the Unix selection check Unix Expert and Large File system
    5. Close/Hide the Prefernces app and you should now see the etc directory in your root file system directory.

    NOTE: *** [To name the new "disk" to as you wish - change the name of "disk2' to whatever you want.

    IF you have already created a name [in this case - disk2, and you wish to change it - do the following:

    1. Edit the fstab file first. Change /disk2 to /whatever
    2. Type: mkdir /whatever in a terminal window
    3. reboot
    The partition will now be mounted on the /whatever folder and you
    can delete the now empty /disk2 folder.]***

24) By looking at the device info found from /usr/adm/messages I have found that the computer thinks the freshly made 2x2GB boot partition has "Disk Capacity 189MB, Device Block 1024". The workspace info panel from "File Viewer" in NS OS" indicates "Disk: 0.150MB". Obviously the figures are wrong and the actual size of the disk is seen by clicking on the icon for the disk in File Viewer and reading "1.21 GB available on hard disk" for the NS 3.3 partition and "1.75 GB available on hard disk" for the "disk2" icon (for the other partition of the 4 GB disk). Other than the false "disk capacity" message, the 2x2GB Seagate ST15150N works perfectly and I have had no problems loading and using software on the with the disks. I've made five disks with this method - that should be a lifetime supply for my NeXT computers.



wow! *claps* nice post.

site admins, we really need a 'tutorials' section of the main site. could list off all the posts like this one and the overclock ones and such.


Nice post idylukewild, and great detective work on your part.

I will have to grab that version of sdform and play around with my ST15150N drives when I get a chance.  Kinda busy with my new "pile o next" stuff at the moment.

I second the request for a tutorials section that helf made, as it would be a good place for guides like this and the more common questions asked.

Great work idylukewild



Yeah, that's some interesting findings there idylukewild!

I'm still perplexed to hell with the "520" bytes per sector thing. I wonder if that meant that almost half the drive space was wasted (before you formatted it with 1024 byte sectors) ?! Or perhaps it was like "overclocking" the storage and getting 8bytes more out of each sector (like in the old DOS days using MaxiSomething to get 440KB disks out of 360KB 5.25" disks).


Evidently the drives could have been salvaged from an IBM AS/400 system since they use the 520 bytes/sector format. I bought 5 drives for $20.00 and, if I remember correctly ~$7 shipping. The reformatted and cloned hard drives have been working perfectly in my NeXT computers.


Well, what I meant is: is it even possible to low level format a drive with 520byte sectors? I thought only 512 and 1024 was possible...


Hi all,

thanks to all of the participants in this thead and especially to nextchef! Following your instructions, I was able to clone my NextStep 3.3 install from a Quantum LPS540 500 MB Hard Disk to a IBM DDRS 34560 4.5 GB Hard Disk.

I hooked the disk up to the internal SCSI-Port chain with the original drive still in place using a multi-point-SCSI cable and an external enclosure for power supply.

The IBM drive was placed between the Controller and the original QUANTUM drive and I set SCSI ID to 4 with no termination. The disk was immediately recognized by the Nextstation, but with a capacity of only 261 MB.

So I first tried to reconfigure the initial /etc/disktab entry for the SEAGATE ST15150N drive according to the technical specifications found at http://www.hgst.com/tech/techlib.nsf/techdocs/85256AB8006A31E587256AA400595BA0/$file/ddrs_spw.pdf. But the disk was still not recognized by disk tool, once the OS booted.

After that I finally found a 14 year old post on the comp.sys.next.sysadmin group: https://groups.google.com/forum/?fromgroups=#!topic/comp.sys.next.sysadmin/pMB-3TZTkTs

IBM DDRS-34560:\

I copied the disktab to the nextstation and disk utility was able to init the disk, copy over the boot sectors and finally I started the dump process. I left office at the evening, and when I returned this morning, a friendly message "DUMP succeeded" made me happy.

Rebooting the system, it shows still 261 MB during bootup but once booted, I can access all 4.5 GB in three partitions.

Thanks again and I hope this information might be helpful for other people trying to clone their existing NextStep Setup to a larger IBM DDRS 34560 (which are quite common against the hard to get SEAGATE ST15150N).