NeXT Computers Forum Index NeXT Computers
www.NeXTComputers.org
 
Log in to check your private messagesLog in to check your private messages

Log inLog in  RegisterRegister


Profile  Search  Memberlist  FAQ  Usergroups
Success in OPENSTEP 4.2 bootable CD for m68k AND i386!

 
Post new topic   Reply to topic    NeXT Computers Forum Index -> NeXT Work Logs
View previous topic :: View next topic  
Author Message
pitz



Joined: 14 Aug 2006
Posts: 122
Location: Oregon, USA

PostPosted: Fri Sep 05, 2008 1:32 pm    Post subject: Success in OPENSTEP 4.2 bootable CD for m68k AND i386! Reply with quote

A month ago, I asked about being able to boot the OPENSTEP CD on black hardware, without needing the install diskettes:
http://www.nextcomputers.org/forums/viewtopic.php?t=1617

The same topic has been around since about two years ago:
http://www.nextcomputers.org/forums/viewtopic.php?t=520
http://www.nextcomputers.org/forums/viewtopic.php?t=601
http://www.nextcomputers.org/forums/viewtopic.php?t=1477

And finally... I now have an OPENSTEP 4.2 install CD for m68k (not needing the install diskette) and an OPENSTEP 4.2 install CD for i386 (again not needing the diskettes).

The NEXTSTEP 3.3 CD is bootable from my Turbo Color machine (ROM 3.3v74). In my setup, the external CDROM drive has a higher SCSI ID than my internal hard disk. From within the monitor, I could type bsd(1,0,0)sdmach -s rootdev=sd1 and NEXTSTEP will boot in single-user mode.

With my OPENSTEP 4.2 CD, typing bsd(1,0,0)sdmach -s rootdev=sd1 gives the following error:
Bad version 0x80000000
Bad cksum
Bad version 0x0
Bad cksum
Bad label

The error is being thrown by the ROM even before the boot program is loaded from the UFS boot blocks. What I found is that the "front porch" contents of the OPENSTEP 4.2 CD is different from that of the NEXTSTEP 3.3 CD. The "front porch" is a number of sectors at the start of the disk that precedes the actual UFS file system layout. This "front porch" is commonly used on BSD-style disk layouts, but I think has become unnecessary with the advent of PC-based MBR-style slicing of the disk.

With NEXTSTEP, there was a separate CD for installation into SPARC and HP-PA platforms. With OPENSTEP, all platforms have been combined into a single installation CD with tri-fat binaries (IIRC, HP-PA was dropped as a platform for OPENSTEP). In the NEXTSTEP m68k/i386 CD, the front porch contained four copies of the disk label, and two identical copies of the boot program. The first copy of the disk label is at sector 0, and this is apparently what the m68k ROM reads for the pointers to locate the boot program.

The first few sectors of the OPENSTEP CD contain a SPARC disk layout (shown by the presence of the magic number 01 03 01 07 at offset 512). The OPENSTEP CD contains the SPARC-based boot blocks starting at offset 512. The CD is apparently bootable on a SPARC workstation. Note that to boot from a CD, SPARC workstations need SCSI CDROM drives that provide 512-byte sectors, instead of the more common 2048-byte sectors. Older drives from Plextor, Yamaha, and Pioneer typically have a jumper that sets the sector size.

A NEXTSTEP/OPENSTEP disk label takes more than 512 bytes and cannot fit into the space preceding the SPARC boot blocks. The m68k ROM, finding that the first few sectors do not contain a valid disk label, gives the boot error.

Continuing through the "front porch" of the OPENSTEP CD, the first copy of the disk label is at offset 0x2000 (block 4). A second copy is at offset 0x3C00 (block 0x1E). The first UFS boot block contains an HP-PA boot program, while the second UFS boot block contains the normal boot program similar to the two identical copies found on the NEXTSTEP CD. I have no clue if the OPENSTEP CD is bootable on the HP-PA platform, because I am far from being knowledgeable with the HP-PA boot process. And as I mentioned, I thought HP-PA was dropped as a platform for OPENSTEP.

To make a bootable "copy" of my OPENSTEP CD for my slab, I first extracted a CD image. I then extracted the first copy of the disk label at offset 0x2000, extracting 7680 bytes to cover the whole label. I patched the extracted label to indicate that it is at block 0, and modified the UFS boot block pointers to point to the second UFS boot block, ignoring the HP-PA boot program. Note that the kernel to be loaded by the boot program is sdmach, since it does not understand the tri-fat mach_kernel binary on the CD (the mach_kernel binary on the floppy is i386-specific and is not tri-fat). Wrote this label back into block 0 of the CD image, burned the image into a CD-R, and I'm off and booting from the CD on my slab. Woot!

The patched 7680-byte label is available at:
http://simplepractices.com/files/OPENSTEP42CD.Block00.lbl

So in case your Turbo Color floppy drive is broken, you can still proceed with OPENSTEP installation right from the CD. Enjoy!

And since we're pushing the limits already... I've also gotten to create an El Torito bootable CD for an i386 install. The steps are more complicated, and I have it described in full at http://simplepractices.com/peter/blog/2008/09/10/openstep42bootableinstallcd/.

/pitz
Back to top
View user's profile Send private message
Harbourmaster



Joined: 07 Nov 2007
Posts: 31
Location: At the Beach!

PostPosted: Thu Sep 25, 2008 7:14 pm    Post subject: Reply with quote

Sweeeeeeeeeeeeeeeeet!
Back to top
View user's profile Send private message AIM Address
mikeboss



Joined: 07 Dec 2011
Posts: 365
Location: berne, switzerland

PostPosted: Sat Feb 04, 2012 5:01 pm    Post subject: Reply with quote

new link to updated step-by-step guide ->
http://peterwong.net/blog/?p=119

new link to the patched bootsectors ->
http://peterwong.net/files/OPENSTEPBootCD/OPENSTEP42CD.Block00.lbl
_________________
October 12, 1988 Computing Advances To The NeXT Level
Back to top
View user's profile Send private message Visit poster's website
itomato



Joined: 27 Dec 2005
Posts: 302
Location: Santa Cruz, CA

PostPosted: Sat Feb 04, 2012 7:39 pm    Post subject: Reply with quote

EDIT: Awesome!
_________________
-itomato
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    NeXT Computers Forum Index -> NeXT Work Logs All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2017 phpBB Group