Disk partitioning for Openstep

Started by rjbrown99, August 10, 2020, 05:23:42 PM

Previous topic - Next topic

rjbrown99

Currently trying to partition for OpenStep 4.2 x86. I have a 7647mb disk (CF card, reported as an IDE disk). This is below the 8063mb maximum size for a disk as I understand it. My goal is to create two usable disk areas, one for the root/installer and the second for data, let's call this /opt or something similar. Ideally split rather equally between the available space.

Everything I have read explains the following:

  • OpenStep has a maximum of a single partition on an IDE disk but you can create more than one BSD 'slice'.
  • The 'disk' command is what is used to create slices.
  • There can be two types of partitions, 1) a traditional fdisk partition where you have a NEXTSTEP partition visible in fdisk, or 2) a "non-partition" approach where OpenStep does not create any type of fdisk partition and just uses your disk directly with no traditional partition table.

Questions I have that are unanswered as of this post.

1) How do you use the 'disk' command in the installer? Selecting an advanced install, selecting the IDE disk, and advanced installation just pops up fdisk.

2) After I create a single NEXTSTEP partition in the installer, I'm returned to the prior menu asking if I want to proceed with the install and use my entire disk or allocate some space for DOS. Using the entire disk blows away my fdisk partition and makes one ~4GB slice on the disk. Choosing the DOS option makes two partitions, which I then can't use for a second ufs partition.

3) Creating a single fdisk partition in Linux and assigning partition type to NEXTSTEP also didn't work. That has the same effect as me doing it in the installer's fdisk.

4) If I allow the installer to use the entire disk and it removes the partition table, it does create a bootable working system. Can I then create the second slice with the disk command, and if so how?

rjbrown99

Maybe I stand corrected..?

localhost:12# df
Filesystem    kbytes    used   avail  capacity  Mounted on
/dev/hd0a    7691279  189696 6732455      3%    /

7691279 kb = 7691 megabytes.

Is that telling me that it created a single usable partition of 7691mb? How could that be given all that I read about the partition limits?

Nitro

I haven't partitioned a disk for OPENSTEP in years, so I'm pulling this from (questionable) memory.  :)  Some of the disk utilities on the OPENSTEP CD are badly broken (disk, fdisk and mkfs as I remember). You can read through the release notes of the various OPENSTEP patches to see which utilities were affected and what issues were fixed. It's a chicken and egg problem; you really need a patched OPENSTEP system to properly create partitions with OPENSTEP, especially at a large offset from the beginning of the disk.

I used to use a GParted live CD to partition the disks with Linux. Create an MSDOS partition table, and then create a boot partition of 2GB. Remaining data-only partitions can be up to 4GB. Although the boot partition can be up to 4GB, some operating system programs have trouble with partitions that big, so it's best to limit the boot partition to 2GB. Then open a terminal window in GParted and use fdisk to change the partition ID's to 'a7'.

Don't trust that 7691MB partition that OPENSTEP created; it will probably work fine up to the point where you try to fill it with data beyond the 4GB partition limit.
Hope that helps.
Nitro

Morgon


To create multiply OpenStep partitions fdisk won't help. You need to use the disk command, but prior to using it you have to create an appropriate new entry in /etc/disktab as OpenStep partitions are created within a single partition table partition. But if you don't intend to have a multi booting system you don't need a MBR partition table at all.

The entries of disktab are explained in the corresponding manual page. To construct an entry you need to know some informations like sector size, number of cylinders, tracks, sectors,....

Following is my disktab with several entries (some with multi boot, some not) I constructed over the years:

NEXT|IBM DDYS-T18350N S93EDY:\
    :ty=fixed_rw_scsi:nc#15110:nt#6:ns#399:rm#3600:\
    :fp#320:bp#0:ng#0:gs#0:ga#0:ao#:\
    :os=mach_kernel:z0#127:z1#255:hn=localhost:ro=a:\
    :pa#63:sa#4194304:ba#8192:fa#1024:ca#8:da#4096:ra#10:oa=time:\
    :ia:ta=4.3BSD:\
    :pb#4194367:sb#4194304:bb#8192:fb#1024:cb#8:db#4096:rb#10:ob=time:\
    :ib:tb=4.3BSD:\
    :pc#8388671:sc#4194304:bc#8192:fc#1024:cc#8:dc#4096:rc#10:oc=time:\
    :ic:tc=4.3BSD:\
    :pd#12582975:sd#2276352:bd#8192:fd#1024:cd#8:dd#4096:rd#10:od=time:\
    :id:td=4.3BSD:

NEXT|VMware Virtual IDE Hard 2GB:\
    :ty=fixed_rw_scsi:nc#3952:nt#16:ns#63:rm#3600:ss#512:\
    :fp#320:bp#0:ng#0:gs#0:ga#0:ao#:\
    :os=mach_kernel:z0#64:z1#192:hn=localhost:ro=a:\
    :pa#0:sa#3983296:ba#8192:fa#1024:ca#8:da#4096:ra#10:oa=time:\
    :ia:ta=4.3BSD:

NEXT|SAMSUNG SP0812N:\
    :ty=fixed_rw_ide:nc#16383:nt#16:ns#63:rm#7200:ss#512:\
    :fp#320:bp#0:ng#0:gs#0:ga#0:ao#:\
    :os=mach_kernel:z0#3919924:z1#3920052:hn=localhost:ro=b:\
    :pa#3919860:sa#4194304:ba#8192:fa#1024:ca#16:da#4096:ra#10:oa=time:\
    :ia:ta=4.3BSD:\
    :pb#8114164:sb#4194304:bb#8192:fb#1024:cb#16:db#4096:rb#10:ob=time:\
    :ib:tb=4.3BSD:\
    :pc#12308468:sc#4109642:bc#8192:fc#1024:cc#16:dc#4096:rc#10:oc=time:\
    :ic:tc=4.3BSD:


NEXT|HDD 2_4GB:\
    :ty=fixed_rw_ide:nc#16383:nt#16:ns#63:ss#512:rm#3600:\
    :fp#320:bp#0:ng#0:gs#0:ga#0:ao#:\
    :os=mach_kernel:z0#3695014:z1#3695142:hn=localhost:ro=a:\
    :pa#3694950:sa#4194304:ba#8192:fa#1024:ca#16:da#4096:ra#10:oa=time:\
    :ia:ta=4.3BSD:\
    :pb#7889254:sb#8384271:bb#8192:fb#1024:cb#16:db#4096:rb#10:ob=time:\
    :ib:tb=4.3BSD:

NEXT|IBM-DTTA-350840:\
    :ty=fixed_rw_ide:nc#16383:nt#16:ns#63:rm#3600:ss#512:\
    :fp#320:bp#0:ng#0:gs#0:ga#0:ao#:\
    :os=mach_kernel:z0#3919924:z1#3920052:hn=localhost:ro=a:\
    :pa#3919860:sa#4192911:ba#8192:fa#1024:ca#8:da#4096:ra#10:oa=time:\
    :ia:ta=4.3BSD:\
    :pb#8112771:sb#2104249:bb#8192:fb#1024:cb#8:db#4096:rb#10:ob=time:\
    :ib:tb=4.3BSD:

If using a MBR partition table you have to make sure the partitions specified in disktab don't extend beyond the MBR partition as disk does not know anything about these and will overwrite everything already there.

See man disk how to use the different entries.

redsun

I'm doing a fresh new install since I need to convert some WingZ files.  I'm not going to use the complex disk partition command.  I have some old notes, but I can't even understand what I wrote 20 years ago.

Right now, I just use the entire 8GB disk out of a 40GB WDC IDE drive.  I could have one DOS FAT disk and one NEXTSTEP disk.  But that does not even serve much purpose.  I can still re-install if I want to try something new.  I have several IDE HDs sitting around.
Asus P4S533 P4 512MB RAM Matrox G400 3Com 905 Adaptec 2940 Deltis 230MB WinXP/Win7
Foxconn KM400 Athlon XP 2800+ 1G RAM Stealth 3D 2000 WinXP/Win7

milanojess

Questions about disktab

What are reasons for partition a starting block not zero? I see from examples above one had 63, some 0, one at huge number like 3919860?

I read a diff doc where boot blocks are usually z0#32 and z1#96 where you had 64/192 respectively. What made to change to double up these?

Also front port of 320 vs 160, which i don't quite understand what it is from description...

Appreciate shedding some lights on these areas.

I have so far used scsimodes to get cylinder/track/sector etc to build a disktab. While its recognized, mkfs failed about boot block overlays labels, with last iteration resulting complaining about cylinder group too large at 16 ( max 7 ) when i had ca#32 in the disktab so I am a bit confused..

I am testing a borrowed scsi2sd v6 2020d

Thanks!
NeXTcube 030 1990 with 040 upgrade - no longer
NeXTstation Color Turbo - Current.

Nitro

Nitro

Morgon

Quote from: milanojess on May 17, 2021, 06:35:32 PMQuestions about disktab

What are reasons for partition a starting block not zero? I see from examples above one had 63, some 0, one at huge number like 3919860?

I read a diff doc where boot blocks are usually z0#32 and z1#96 where you had 64/192 respectively. What made to change to double up these?

Also front port of 320 vs 160, which i don't quite understand what it is from description...

Appreciate shedding some lights on these areas.

I have so far used scsimodes to get cylinder/track/sector etc to build a disktab. While its recognized, mkfs failed about boot block overlays labels, with last iteration resulting complaining about cylinder group too large at 16 ( max 7 ) when i had ca#32 in the disktab so I am a bit confused..

I am testing a borrowed scsi2sd v6 2020d

Thanks!

For the partition layouts with the first partition not starting at zero but a high number I had a multi-boot system with Windows where Windows did reside in the empty area before the first partition. For the ones starting at 0 there was no MBR at all, but the whole disk was NeXT-partioned with only boot stage 1. For 63 there had been a MBR with boot stage 0 (MBR boot program) and 1 from NeXT.

IIRC the doubling of the values fp, z0 and z1 depend on the sector size (512 byte vs. 1k) of the drive as the values are given in sectors instead of bytes.

It's quite a while though since I last made new partition entries. Hope the information helps anyway.

Best regards
Morgon

milanojess

Thanks Nitro!
Though following the first link, that's pretty much what I have

SCSI2SD 2GB:\
        :ty=fixed_rw_scsi:nc#261:nt#255:ns#63:ss#512:rm#7200:\
        :fp#320:bp#0:ng#0:gs#0:ga#0:ao#0:\
        :os=sdmach:z0#64:z1#192:ro=a:\
        :pa#0:sa#4194302:ba#8192:fa#1024:ca#32:da#4096:ra#10:oa=time:\
        :ia:ta=4.3BSD:
scsimodes /dev/rsd1a
SCSI information for /dev/rsd1a
Drive type: SCSI2SD 2GB
512 bytes per sector
63 sectors per track
255 tracks per cylinder
261 cylinder per volume (including spare cylinders)
Host bad block handling
0 alternate tracks per volume
4194302 usable sectors on volume

and mkfs failed

disk -t 2GB -i /dev/rsd1a
disk name: 2GB
disk type: fixed_rw_scsi
writing disk label
Writing /usr/standalone/boot
creating new filesystem on /dev/rsd1a
/usr/etc/newfs -n -v /dev/rsd1a
/etc/mkfs /dev/rsd1a 2096991 32 255 8192 1024 16 10 60 4096 t
cylinder group too large (16 cylinders); max: 7 cylinders per group
/usr/etc/newfs /dev/rsd1a failed (status 1)

ideas? Thanks!
NeXTcube 030 1990 with 040 upgrade - no longer
NeXTstation Color Turbo - Current.

Nitro

The total size of all partitions plus the front porch has to be less than or equal to the total usable sectors on the volume. I think you'll need to shrink the partition by at least 320 sectors to leave room for the front porch. Try changing the partition size in your disktab to:  sa#4193982

One other thing to check is that you have OPENSTEP 4.2 patch 4 applied, as the versions of "disk" and "mkfs" that shipped on the original CD were broken.

Hope that helps.
Nitro

Rob Blessin Black Hole

Hello : You have a scsi2sd Version 6 2020 card? How is the XML file configured for the card ?

 
   <scsiSectors>4194304</scsiSectors>
   <bytesPerSector>512</bytesPerSector>
   <sectorsPerTrack>139</sectorsPerTrack>
   <headsPerCylinder>4</headsPerCylinder>
Rob Blessin President computerpowwow ebay  [email protected] http://www.blackholeinc.com
303-741-9998 Serving the NeXT Community  since 2/9/93

milanojess

@Nitro, I tried reducing partition size, that didn't help unfortunately.

How do I tell if I have patch 4 installed? Its been way too long and I don't recall if mine was ever patched...

@Rob let me get back to you in a little, i am away from it. Yes, a borrowed 2020d v6.


I did make a breakthrough!

Previously
disk -t 2GB -i /dev/rsd1a
disk name: 2GB
disk type: fixed_rw_scsi
writing disk label
Writing /usr/standalone/boot
creating new filesystem on /dev/rsd1a
/usr/etc/newfs -n -v /dev/rsd1a
/etc/mkfs /dev/rsd1a 2096991 32 255 8192 1024 16 10 60 4096 t
cylinder group too large (16 cylinders); max: 7 cylinders per group
/usr/etc/newfs /dev/rsd1a failed (status 1)

I took the mkfs command above from running disk command and changed it to 7 cylinder groups. Viola! it completed with success. Further newfs ran on rsd1a also completed successfully. I was able to mount the new disk, did some copying with tar, all seemed well.

/etc/mkfs /dev/rsd1a 2096991 32 255 8192 1024 7 10 60 4096 t

I am not sure what difference that made, but everything seems to work. I'd love to hear if anyone can share knowledge of the cylinder group setting.

I'll continue building it up replicating my existing 4GB drive, with goal to replace it and installing it internally.



NeXTcube 030 1990 with 040 upgrade - no longer
NeXTstation Color Turbo - Current.

milanojess

#12
@Rob
<scsiSectors>4194303</scsiSectors>
<bytesPerSector>512</bytesPerSector>
<sectorsPerTrack>63</sectorsPerTrack>
<headsPerCylinder>255</headsPerCylinder>

oh wait, did you mean replace mine with what you shared? so I tried it and that went thru! No more half baked work-around. The disk command now successfully mkfs and newfs file system. I am still getting a scsi err

May 19 21:36:30 musica mach: sd1 (2,0): ERROR op:0x2a sd_state:4 scsi status:0x0
May 19 21:36:30 musica mach: sd1 (2,0): sense key:0x5  additional sense code:0x21
May 19 21:36:30 musica mach:     SCSI Block in error = 192 (front porch)

But otherwise it seems to be working fine. I am dumping some data and see how it goes. Thanks!
NeXTcube 030 1990 with 040 upgrade - no longer
NeXTstation Color Turbo - Current.

milanojess

So I have successfully created working SCSI2SD with 1 8GB SanDisk UltraII, proper disktab with 4 partitions, dump/tar the two partitions from old HDD to new scsiSD.
When changed to Target 0 ( internal drive is Target 1 ) and machine booted normally.

I then moved it to internal slot. It took 4 loops but eventually fully started with UI login. I was able to login without problem.

Observations so far:
1. It works... but feels slower than the old Seagate drive.
2. While in a shell ( in a terminal window ), it hangs from time to time for like a minute and resumed fine. There's no error message in the messages file nor console.

Is there a build in disk performance tool that can be used to compare disk performances?  I am puzzled about the intermittent hanging... I'll probably just reboot a few more time and keep it running for a while and see if I can figure out something. But it did work! Thanks for all the helps and suggestions. I sure learned and re-learned a lot! :) that was fun :)

NeXTcube 030 1990 with 040 upgrade - no longer
NeXTstation Color Turbo - Current.

Nitro

Check out the Drive Performance benchmark. I'd be interested in seeing the performance difference between the two drives as well.

http://www.nextcomputers.org/NeXTfiles/Software/OPENSTEP/Apps/Benchmarks/
Nitro