IDE Disktab Fun

NeXT Computer, Inc. -> Intel White Hardware

Title: IDE Disktab Fun
Post by: Apple2guy on November 10, 2024, 11:21:40 AM
I was messing around last night with IDE and Openstep, and due to limitations with the ide drivers we are limited to 8063 MB.
Even when it detected the 32GB CF cards geometry writing past 8063 MB failed.

I was able to initialize an IDE drive only if the boot sector/partition table was blanked. (ymmv)
1st is a True hdd
2nd entry is for a 32 GB CF card (the driver detects this CF cards geometry as more then 9063 mb)

here are the disktab entrys I used.
6L250R0|Maxtor 6L250R0|Maxtor 6L250R0-512:\
:ty=fixed_rw_ide:nc#16383:nt#16:ns#63:ss#512:rm#7200:\
:fp#320:bp#0:ng#0:gs#0:ga#0:ao#0:\
:os=mach_kernel:z0#64:z1:192:hn=mordor:ro=a:\
:pa#63:sa#8388608:ba#8192:fa#1024:ca#4:da#4096:ra#10:oa=time:\
:ia:ta=4.3BSD:aa:\
:pb#8388671:sb#8122368:bb#8192:fb#1024:cb#4:db#4096:rb#10:ob=time:\
:ib:tb=4.3BSD:ab:
SM2236AB|SILICONMOTION SM2236AB|SILICONMOTION SM2236AB 20151127-512:\
:ty=fixed_rw_ide:nc#62041:nt#16:ns#63:ss#512:rm#7200:\
:fp#320:bp#0:ng#0:gs#0:ga#0:ao#0:\
:os=mach_kernel:z0#64:z1:192:hn=mordor:ro=a:\
:pa#63:sa#8388608:ba#8192:fa#1024:ca#4:da#4096:ra#10:oa=time:\
:ia:ta=4.3BSD:aa:\
:pb#8388671:sb#8122368:bb#8192:fb#1024:cb#4:db#4096:rb#10:ob=time:\
:ib:tb=4.3BSD:ab:

Hope this can help someone.
Title: Re: IDE Disktab Fun
Post by: pTeK on November 15, 2024, 04:14:21 AM
I'm trying to get my HDD working with NS3.3.

How do the two volume names work? I'm looking at the following for your /etc/disktab. Are these optional? Did you make these yourself or are they from your /usr/adm/messages file?

Quote from: Apple2guy on November 10, 2024, 11:21:40 AM6L250R0|Maxtor 6L250R0|Maxtor 6L250R0-512:\
SM2236AB|SILICONMOTION SM2236AB|SILICONMOTION SM2236AB 20151127-512:\
Or are those two lines from the 256 words (512 bytes) of information that gets returned with the IDE IDENTIFY command? (https://tldp.org/HOWTO/Large-Disk-HOWTO-10.html) Want to know what would happen if I type them wrong and they do have to be exact?

OffsetDescriptionExample
10-19Serial Number in ASCIIG8067TME
23-26Firmware revision (in ASCII)GAK&1B0
27-46Model name (in ASCII)Maxtor 4G160J8

Here is what is showing up in my log.
hc0: ATA command 20 failed. Retrying...
hc0: ATA Command: error=0x1 secCnt=0x1 secNum=0x1 cyl=0xeb14 drhd=0xe0 status=0x0
hc0: Resetting drives..
hc0: ATA command 20 failed. Retrying...
hc0: ATA Command: error=0x1 secCnt=0x1 secNum=0x1 cyl=0xeb14 drhd=0xe0 status=0x0
hc0: Resetting drives...
hd0: No Valid Disk Label
hd0: Device Block Size: 512 bytes
hd0: Device Capacity: 8032 MB
hc1: PIIX4 PCI IDE Controller at Dev:31 Func:1 Bus:0
hc1: PCI bus master DMA: Disabled
hc1: device detected at port 0x170 irq 15
hc1: Checking for ATA drive 0... Detected
hc1: Checking for ATA drive 1...
hc1: Checking for ATAPI drive 1..
hc1: Resetting drives...
Registering: hc1
hd1: IC25N060ATMR04-0 MO3OAD0A
hd1: 16383 cylinders, 16 heads, 63 spt (disk geometry)
hd1: using multisector (16) transfers.
Registering: hd1
hd1: Device Block Size: 512 bytes
hd1: Device Capacity: 3967 MB
hd1: Disk Label: Disk

So I would use like your example (6L250R0|Maxtor 6L250R0|Maxtor 6L250R0-512:\) above
MO3OAD0A|Hitachi MO3OAD0A|Hitachi MO3OAD0A-512:\

I also see above I have hd1: 16383 cylinders, 16 heads, 63 spt (disk geometry) which means from the site https://tldp.org/HOWTO/Large-Disk-HOWTO-4.html (https://tldp.org/HOWTO/Large-Disk-HOWTO-4.html)

Quote from: https://tldp.org/HOWTO/Large-Disk-HOWTO-4.htmlHard drives over 8.4 GB are supposed to report their geometry as 16383/16/63. This in effect means that the `geometry' is obsolete, and the total disk size can no longer be computed from the geometry, but is found in the LBA capacity field returned by the IDENTIFY command.
Thanks :)

*ugh* don't know how to add a border to the table :/
Title: Re: IDE Disktab Fun
Post by: Apple2guy on November 15, 2024, 07:13:34 AM
Quote6L250R0|Maxtor 6L250R0|Maxtor 6L250R0-512:\
SM2236AB|SILICONMOTION SM2236AB|SILICONMOTION SM2236AB 20151127-512:\
it is from /usr/adm/messages
6L250R0 is the short name I use with disk. (# disk -i -t 6L250R0 /dev/rhd1h)

I did have to zero out the first block or disk would fail when trying to initialize the drive.
I even used fdisk to ensure the mbr partition table was empty, still disk would fail.

Nextanswers 1849 (https://fsck.technology/software/NeXT/next.68k.org%20Archive/otto/html/pub/NeXTanswers/AsciiFiles/Journals/1849_Adding_Disks.txt) is a big help.

Here is the snip from my messages file during IDE detection.
Nov 15 04:47:01 peethree mach: hc0: PIIX4 PCI IDE Controller at Dev:7 Func:1 Bus:0
Nov 15 04:47:01 peethree mach: hc0: PCI bus master DMA: Disabled
Nov 15 04:47:01 peethree mach: hc0: device detected at port 0x1f0 irq 14
Nov 15 04:47:01 peethree mach: hc0: Checking for ATA drive 0...  Detected
Nov 15 04:47:01 peethree mach: hc0: Checking for ATA drive 1...  Detected
Nov 15 04:47:01 peethree mach: hc0: Resetting drives...
Nov 15 04:47:01 peethree mach: hc0: Drive 0: PIO Mode 4
Nov 15 04:47:01 peethree mach: hc0: Drive 1: PIO Mode 4
Nov 15 04:47:01 peethree mach: Registering: hc0
Nov 15 04:47:01 peethree mach: hd0: Maxtor 6E030L0 NAR61HA0
Nov 15 04:47:01 peethree mach: hd0: 16383 cylinders, 16 heads, 63 spt (disk geometry)
Nov 15 04:47:01 peethree mach: hd0: using multisector (16) transfers.
Nov 15 04:47:01 peethree mach: Registering: hd0
Nov 15 04:47:01 peethree mach: hd0: Device Block Size: 512 bytes
Nov 15 04:47:01 peethree mach: hd0: Device Capacity:   8063 MB
Nov 15 04:47:01 peethree mach: hd0: Disk Label:        UntitledDisk
Nov 15 04:47:01 peethree mach: hd1: Maxtor 6L250R0 BAH41F90
Nov 15 04:47:01 peethree mach: hd1: 16383 cylinders, 16 heads, 63 spt (disk geometry)
Nov 15 04:47:01 peethree mach: hd1: using multisector (16) transfers.
Nov 15 04:47:01 peethree mach: Registering: hd1
Nov 15 04:47:01 peethree mach: hd1: Device Block Size: 512 bytes
Nov 15 04:47:01 peethree mach: hd1: Device Capacity:   8063 MB
Nov 15 04:47:01 peethree mach: hd1: Disk Label:        Users
Nov 15 04:47:01 peethree mach: hc1: PIIX4 PCI IDE Controller at Dev:7 Func:1 Bus:0
Nov 15 04:47:01 peethree mach: hc1: PCI bus master DMA: Disabled
Nov 15 04:47:01 peethree mach: hc1: device detected at port 0x170 irq 15
Nov 15 04:47:01 peethree mach: hc1: Checking for ATA drive 0...  Detected
Nov 15 04:47:01 peethree mach: hc1: Checking for ATA drive 1... 
Nov 15 04:47:01 peethree mach: hc1: Checking for ATAPI drive 1... Detected
Nov 15 04:47:01 peethree mach: hc1: Resetting drives...
Nov 15 04:47:01 peethree mach: hc1: Drive 1: ATAPI CD-ROM (FAST DRQ, REMOVABLE, CMD PKT LEN=12)
Nov 15 04:47:01 peethree mach: hc1: LBA supported.
Nov 15 04:47:01 peethree mach: hc1: IORDY supported.
Nov 15 04:47:01 peethree mach: hc1: Drive 0: PIO Mode 4
Nov 15 04:47:01 peethree mach: hc1: Drive 1: PIO Mode 4
Nov 15 04:47:01 peethree mach: Registering: hc1
Nov 15 04:47:01 peethree mach: hd2: SILICONMOTION SM2236AB 20151127
Nov 15 04:47:01 peethree mach: hd2: 62041 cylinders, 16 heads, 63 spt (disk geometry)
Nov 15 04:47:01 peethree mach: hd2: using multisector (1) transfers.
Nov 15 04:47:01 peethree mach: Registering: hd2
Nov 15 04:47:01 peethree mach: hd2: Device Block Size: 512 bytes
Nov 15 04:47:01 peethree mach: hd2: Device Capacity:   30535 MB
Nov 15 04:47:01 peethree mach: hd2: Disk Label:        Data
Nov 15 04:47:01 peethree mach: Registering: sc0
Nov 15 04:47:01 peethree mach: sd0: LITE-ON LTR-48246S SS04
Nov 15 04:47:01 peethree mach: Registering: sd0 at Target 1 LUN 0 at sc0
Nov 15 04:47:01 peethree mach: sd0: Waiting for drive to come ready..............
Nov 15 04:47:01 peethree mach: sd0: Disk Not Ready

Title: Re: IDE Disktab Fun
Post by: pTeK on November 18, 2024, 12:16:33 PM
Hi can other people please post their /etc/disktab so I have some more working examples. If possible IDE and over 8GB and also with the /usr/adm/messages

Hi does any one else have IDE 8GB+ hard drives with custom /etc/disktab and can you also show the /usr/adm/messages where it is detected i.e

Quote from: Apple2guy on November 15, 2024, 07:13:34 AMNov 15 04:47:01 peethree mach: hc0: PIIX4 PCI IDE Controller at Dev:7 Func:1 Bus:0
Nov 15 04:47:01 peethree mach: hc0: PCI bus master DMA: Disabled
Nov 15 04:47:01 peethree mach: hc0: device detected at port 0x1f0 irq 14
Nov 15 04:47:01 peethree mach: hc0: Checking for ATA drive 0...  Detected
Nov 15 04:47:01 peethree mach: hc0: Checking for ATA drive 1...  Detected
Nov 15 04:47:01 peethree mach: hc0: Resetting drives...
Nov 15 04:47:01 peethree mach: hc0: Drive 0: PIO Mode 4
Nov 15 04:47:01 peethree mach: hc0: Drive 1: PIO Mode 4
Nov 15 04:47:01 peethree mach: Registering: hc0
Nov 15 04:47:01 peethree mach: hd0: Maxtor 6E030L0 NAR61HA0
Nov 15 04:47:01 peethree mach: hd0: 16383 cylinders, 16 heads, 63 spt (disk geometry)
Nov 15 04:47:01 peethree mach: hd0: using multisector (16) transfers.
Nov 15 04:47:01 peethree mach: Registering: hd0
Nov 15 04:47:01 peethree mach: hd0: Device Block Size: 512 bytes
Nov 15 04:47:01 peethree mach: hd0: Device Capacity:   8063 MB
Nov 15 04:47:01 peethree mach: hd0: Disk Label:        UntitledDisk
Nov 15 04:47:01 peethree mach: hd1: Maxtor 6L250R0 BAH41F90
Nov 15 04:47:01 peethree mach: hd1: 16383 cylinders, 16 heads, 63 spt (disk geometry)
Nov 15 04:47:01 peethree mach: hd1: using multisector (16) transfers.
Nov 15 04:47:01 peethree mach: Registering: hd1
Nov 15 04:47:01 peethree mach: hd1: Device Block Size: 512 bytes
Nov 15 04:47:01 peethree mach: hd1: Device Capacity:   8063 MB
Nov 15 04:47:01 peethree mach: hd1: Disk Label:        Users
Thanks (Sorry for hijacking your thread @Apple2guy )
Title: Re: IDE Disktab Fun
Post by: Apple2guy on November 20, 2024, 11:36:20 AM
No problem! I wonder why the CF card is detected at the Actual size, but the 30 GB and the 250 gb drive get reported as 8gb?
Title: Re: IDE Disktab Fun
Post by: pTeK on November 21, 2024, 11:10:12 PM
Hi @Apple2guy after reading NeXT answers 1849: Adding Disks (https://web.archive.org/web/19970412221712/http://www.next.com/NeXTanswers/HTMLFiles/1849.htmld/1849.html) I see that it mentions a command /usr/etc/sdmodes.

These are the results of my IDE HDD when I use the command /usr/etc/idemodes /dev/rhd1h

# /private/etc/idemodes /dev/rhd1h
Drive Name: IC25N060ATMR04-0
Firmware Revision: MO3OAD0
Serial Number:       MRG
Cylinders: 16383, heads: 16, sectors per track: 63.
Capabilities: LBA, IORDY, DMA,
Drive Buffer: type 3, size 15768 sectors.
Data Transfer: PIO Mode 2, DMA Mode 2
Data Transfer (with IORDY): PIO Mode 4
Multiple Sector: upto 16 sectors per transfer.
Drive Capacity: 16514064 sectors of 512 bytes each (total 8063.51 MB)

Can you show me the results of your IDE hard drives?

Thanks  :)

Source code for /usr/etc/idemodes https://github.com/evolver56k/Darwin-0.3/blob/master/drvEIDE-1/idemodes.tproj/idemodes.c (https://github.com/evolver56k/Darwin-0.3/blob/master/drvEIDE-1/idemodes.tproj/idemodes.c)
Title: Re: IDE Disktab Fun
Post by: Apple2guy on November 23, 2024, 02:48:15 AM
Capacitor plague killed my MB will be a bit until I swap out the mb. Went to power it on and got no video and no beep.. checked the caps and let's say "Spandex Is a Privilege Not a Right" with these capacitors.
Title: Re: IDE Disktab Fun
Post by: Apple2guy on November 23, 2024, 05:45:42 AM
This is with a Primary/Secondary IDE driver.

-bash-2.05b# idemodes /dev/rhd0h
Drive Name: Maxtor 6E030L0                        
Firmware Revision: NAR61HA
Serial Number: E15VRVAN
Cylinders: 16383, heads: 16, sectors per track: 63.
Capabilities: LBA, IORDY, DMA,
Drive Buffer: type 3, size 4096 sectors.
Data Transfer: PIO Mode 2, DMA Mode 0
Data Transfer (with IORDY): PIO Mode 4
Multiple Sector: upto 16 sectors per transfer.
Drive Capacity: 16514064 sectors of 512 bytes each (total 8063.51 MB).
-bash-2.05b# idemodes /dev/rhd1h
Drive Name: Maxtor 6L250R0                        
Firmware Revision: BAH41F9
Serial Number: L50FMJDH
Cylinders: 16383, heads: 16, sectors per track: 63.
Capabilities: LBA, IORDY, DMA,
Drive Buffer: type 3, size 32768 sectors.
Data Transfer: PIO Mode 2, DMA Mode 0
Data Transfer (with IORDY): PIO Mode 4
Multiple Sector: upto 16 sectors per transfer.
Drive Capacity: 16514064 sectors of 512 bytes each (total 8063.51 MB).
Title: Re: IDE Disktab Fun
Post by: pTeK on November 23, 2024, 02:44:38 PM
Thank you for this @Apple2guy You must be very good with a soldering iron to repair your mother board that fast, I envy your skills 8)

EDIT: When did you create and add these /etc/disktab files? Is this during the install process or after? Did you have to boot up in single user mode?
EDIT2:
Quote from: Apple2guy on November 20, 2024, 11:36:20 AMNo problem! I wonder why the CF card is detected at the Actual size, but the 30 GB and the 250 gb drive get reported as 8gb?

I'm guessing only the bootable drive that is supported by the BIOS and is on hc0 has to follow the ATA standards? I'm guess that because your SD Card is on hc1 and not read by the BIOS it doesn't matter? Newer ATA standards?

From NeXTanswers 1650: Large IDE Drive Problems with NEXTSTEP 3.2 (https://web.archive.org/web/19970412195933/http://www.next.com/NeXTanswers/HTMLFiles/1650.htmld/1650.html)
QuoteYour motherboard's BIOS may report translated IDE drive geometry that confuses the NEXTSTEP 3.2 IDE driver and causes a kernel panic. Most BIOSes will fake the actual geometry for disks that exceed the imposed limitations by performing a translation. As an example, if the disk is actually 2048 cylinders, 16 heads, and 63 sectors per track, the BIOS may translate this to 1024 cylinders, 32 heads, and 63 sectors per track.

The geometry limitation of 1024 cylinders, 16 heads, and 63 sectors per track stems from a combination of both the ATA specification and your BIOS's limits. The IDE limitations are set in the original ATA specification (see https://www.scs.stanford.edu/10wi-cs140/pintos/specs/ata-3-std.pdf Annex B: Identify device data for ATA devices below 8 GB) . BIOS limits come from the INT 13 read/write calls that combine a 10 bit cylinder value with a 6 bit sector value into a 16 bit register. The following table demonstrates how each contributes to the limitation.

BIOS IDE Limitation
Maximum Cylinders
1024
65536
1024
Maximum Heads
255
16
16
Maximum Sectors/Track
63
255
63
Maximum Capacity
7.84GB
127.5GB
504MB

Thanks
Title: Re: IDE Disktab Fun
Post by: Apple2guy on November 23, 2024, 10:36:05 PM
I just swapped to a spare mb its not the same mb.
Title: Re: IDE Disktab Fun
Post by: pTeK on November 24, 2024, 02:12:33 AM
Quote from: Apple2guy on November 23, 2024, 10:36:05 PMI just swapped to a spare mb its not the same mb.
Ok, good to know thanks  :)
Title: Re: IDE Disktab Fun
Post by: Apple2guy on November 25, 2024, 01:56:11 AM
Quote from: pTeK on November 23, 2024, 02:44:38 PMI'm guessing only the bootable drive that is supported by the BIOS and is on hc0 has to follow the ATA standards? I'm guess that because your SD Card is on hc1 and not read by the BIOS it doesn't matter? Newer ATA standards?
I swapped the Industrial CF card for spinning rust and that drive reported the limited size. It is on the secondary IDE channel as master.

localhost:2# idemodes /dev/rhd0h
Drive Name: Maxtor 6E030L0                        
Firmware Revision: NAR61HA
Serial Number: E15VRVAN
Cylinders: 16383, heads: 16, sectors per track: 63.
Capabilities: LBA, IORDY, DMA,
Drive Buffer: type 3, size 4096 sectors.
Data Transfer: PIO Mode 2, DMA Mode 0
Data Transfer (with IORDY): PIO Mode 4
Multiple Sector: upto 16 sectors per transfer.
Drive Capacity: 16514064 sectors of 512 bytes each (total 8063.51 MB).
localhost:3# idemodes /dev/rhd1h
Drive Name: Maxtor 6L250R0                        
Firmware Revision: BAH41F9
Serial Number: L50FMJDH
Cylinders: 16383, heads: 16, sectors per track: 63.
Capabilities: LBA, IORDY, DMA,
Drive Buffer: type 3, size 32768 sectors.
Data Transfer: PIO Mode 2, DMA Mode 0
Data Transfer (with IORDY): PIO Mode 4
Multiple Sector: upto 16 sectors per transfer.
Drive Capacity: 16514064 sectors of 512 bytes each (total 8063.51 MB).
localhost:1# idemodes /dev/rhd2h
Drive Name: Maxtor 6E040L0                        
Firmware Revision: NAR61HA
Serial Number: E16NCGYN
Cylinders: 16383, heads: 16, sectors per track: 63.
Capabilities: LBA, IORDY, DMA,
Drive Buffer: type 3, size 4096 sectors.
Data Transfer: PIO Mode 2, DMA Mode 0
Data Transfer (with IORDY): PIO Mode 4
Multiple Sector: upto 16 sectors per transfer.
Drive Capacity: 16514064 sectors of 512 bytes each (total 8063.51 MB).
Title: Re: IDE Disktab Fun
Post by: pTeK on November 25, 2024, 12:17:10 PM
Quote from: Apple2guy on November 25, 2024, 01:56:11 AMI swapped the Industrial CF card for spinning rust and that drive reported the limited size. It is on the secondary IDE channel as master.

localhost:2# idemodes /dev/rhd0h
Drive Name: Maxtor 6E030L0                         
Firmware Revision: NAR61HA
Serial Number: E15VRVAN
Cylinders: 16383, heads: 16, sectors per track: 63.
Capabilities: LBA, IORDY, DMA,
Drive Buffer: type 3, size 4096 sectors.
Data Transfer: PIO Mode 2, DMA Mode 0
Data Transfer (with IORDY): PIO Mode 4
Multiple Sector: upto 16 sectors per transfer.
Drive Capacity: 16514064 sectors of 512 bytes each (total 8063.51 MB).
localhost:3# idemodes /dev/rhd1h
Drive Name: Maxtor 6L250R0                         
Firmware Revision: BAH41F9
Serial Number: L50FMJDH
Cylinders: 16383, heads: 16, sectors per track: 63.
Capabilities: LBA, IORDY, DMA,
Drive Buffer: type 3, size 32768 sectors.
Data Transfer: PIO Mode 2, DMA Mode 0
Data Transfer (with IORDY): PIO Mode 4
Multiple Sector: upto 16 sectors per transfer.
Drive Capacity: 16514064 sectors of 512 bytes each (total 8063.51 MB).
localhost:1# idemodes /dev/rhd2h
Drive Name: Maxtor 6E040L0                         
Firmware Revision: NAR61HA
Serial Number: E16NCGYN
Cylinders: 16383, heads: 16, sectors per track: 63.
Capabilities: LBA, IORDY, DMA,
Drive Buffer: type 3, size 4096 sectors.
Data Transfer: PIO Mode 2, DMA Mode 0
Data Transfer (with IORDY): PIO Mode 4
Multiple Sector: upto 16 sectors per transfer.
Drive Capacity: 16514064 sectors of 512 bytes each (total 8063.51 MB).


Thank you for posting this :) . I'm still trying to build a working disktab for my 2.5" IDE Hitachi IC25N060ATMR04-0. (https://hddfaqs.com/hitachi-ic25n060atmr04-0/) And when I finish it hopefully I will release it in the following standards which were posted on this old disk tab page (https://web.archive.org/web/20100618194420/http://www.deadstart.net/NeXT/disktab/), which I posted in this old thread (https://www.nextcomputers.org/forums/index.php?msg=32892).

link for old disktab page: https://web.archive.org/web/20100618194420/http://www.deadstart.net/NeXT/disktab/ (https://web.archive.org/web/20100618194420/http://www.deadstart.net/NeXT/disktab/)

Having trouble trying to calculate the sectors for the 60GB drive as the technical sites (as I posted above) do not have them.

Once again thanks for posting your /etc/disktab @Apple2guy
Title: Re: IDE Disktab Fun
Post by: pTeK on November 26, 2024, 03:18:47 AM
I managed to find the number of sectors from the Hitachi Travelstar manual some great person uploaded to www.manualslib.com. Found this data table on page 25/214. The other technical sites didn't have it listed  :( Added here in case people google it.

4.0 Drive characteristics

4.1 Formatted capacity
Table 1: Formatted capacities

80GB model
60GB model
40GB model
30GB model
20GB model
Model NameIC25N080ATMR04IC25N060ATMR04IC25N040ATMR04IC25N030ATMR04IC25N020ATMR04
Physical Layout
Bytes per sector
512
512
512
512
512
Sectors per track
392-952
392-952
392-952
392-952
392-952
Number of heads
4
3
2
2
1
Number of disks
2
2
1
1
1
Logical layout
Number of Cylinders
16,383
16,383
16,383
16,383
16,383
Number of Heads
16
16
16
16
16
Number of Sectors/track
63
63
63
63
63
Number of sectors
156,301,488
117,210,240
78,140,160
58,605,120
39,070,080
Total logical data bytes
80,026,361,856
60,011,642,880
40,007,761,920
30,005,821,440
20,003,880,960

Rotational Speed (RPM) = 4,200

Will need some help with the fp and z(0-1) parts of the disk tab.

[1] Hitachi. (19/September/2003). Hard Disk Drive Specification - Travelstar 80GN - 2.5 inch ATA/IDE hard disk drive (Revision 2.0).https://www.manualslib.com/download/574158/Hitachi-Ic25n040atmr04-0-Travelstar-40gb-Laptop-Hard-Drive-9-5mm-2-5-Inch-Notebook-Hdd.html (https://www.manualslib.com/download/574158/Hitachi-Ic25n040atmr04-0-Travelstar-40gb-Laptop-Hard-Drive-9-5mm-2-5-Inch-Notebook-Hdd.html)
Title: Re: IDE Disktab Fun
Post by: Apple2guy on December 07, 2024, 10:01:40 AM
I was messing around and did a test install of openstep 4.2 and found something interesting...

First I installed Dos on the first partition 2 GB..
Then I booted Openstep 4.2 install and created a 4095mb partition and installed onto it.
After the install finished I opened terminal and typed df. I noticed hd0a was 1 GB in size..
So on a whim I type mount /dev/hd0b /Test and it mounted.. So did hd0c and hd0d... so we could mount hd0b as /LocalApps in fstab, hd0c as /LocalDeveloper for your source files...

So now I have a 32 gb IDE hdd with a 2 gb Dos partition, 4 gb Next partition (Divided into 4 slices), And 3rd partition Filling the rest of the disk os BeOS.
Title: Re: IDE Disktab Fun
Post by: pTeK on December 22, 2024, 03:15:49 PM
Interesting by commenting out the last bit from Source code for /usr/etc/idemodes https://github.com/evolver56k/Darwin-0.3/blob/master/drvEIDE-1/idemodes.tproj/idemodes.c (https://github.com/evolver56k/Darwin-0.3/blob/master/drvEIDE-1/idemodes.tproj/idemodes.c)

    /* Drive capacity */
    if (ideInfo->capabilities & IDE_CAP_LBA_SUPPORTED) {
    capacity = ideInfo->userAddressableSectors;
    } else {
capacity = ideInfo->cylinders * ideInfo->heads *
ideInfo->sectorsPerTrack;
    }

    /*
     * Some disks that support LBA have bogus info in userAddressableSectors
     * field.
     */
/* Comment out this routine so that it follow through on the above one as before
    capacity = ideInfo->cylinders * ideInfo->heads *
    ideInfo->sectorsPerTrack;
END OF COMMENT */
   
    printf("Drive Capacity: %lu sectors of 512 bytes each (total %7.2f MB).\n",
    capacity, (float) (capacity*512.0)/(1024*1024));
and then recompile it I was able to get the correct amount of sectors as listed in the above table.

# ./idemodes /dev/rhd1h
Drive Name: IC25N060ATMR04-0
Firmware Revision: MO3OAD0
Serial Number:       MRG
Cylinders: 16383, heads: 16, sectors per track: 63.
Capabilities: LBA, IORDY, DMA,
Drive Buffer: type 3, size 15768 sectors.
Data Transfer: PIO Mode 2, DMA Mode 2
Data Transfer (with IORDY): PIO Mode 4
Multiple Sector: upto 16 sectors per transfer.
Drive Capacity: 117210240 sectors of 512 bytes each (total 57231.56 MB)

There is also a debug mode by setting printall = 1; in function void print_ide_info(ideIdentifyInfo_t *ideInfo) it dumps the result of IDENTIFY_DEVICE
Title: Re: IDE Disktab Fun
Post by: pTeK on April 30, 2025, 01:48:01 PM
Quote from: Apple2guy on December 07, 2024, 10:01:40 AMI was messing around and did a test install of openstep 4.2 and found something interesting...

First I installed Dos on the first partition 2 GB..
Then I booted Openstep 4.2 install and created a 4095mb partition and installed onto it.
After the install finished I opened terminal and typed df. I noticed hd0a was 1 GB in size..
So on a whim I type mount /dev/hd0b /Test and it mounted.. So did hd0c and hd0d... so we could mount hd0b as /LocalApps in fstab, hd0c as /LocalDeveloper for your source files...

So now I have a 32 gb IDE hdd with a 2 gb Dos partition, 4 gb Next partition (Divided into 4 slices), And 3rd partition Filling the rest of the disk os BeOS.

@Apple2guy when you create these disktab files can you show me the result of fdisk as well? as I would like to see what the sectors show up.

On my IBM ThinkPad I have MS-DOS as the first 1.2GB and then NeXTSTEP 3.3 as the next partition, I need to figure out how to add extra 2GB partitions before I install NetBSD and Windows XP at the end of the HDD.
Title: Re: IDE Disktab Fun
Post by: Apple2guy on May 03, 2025, 01:37:19 AM
When using disktabs fdisk doesn't show any partitions.

-bash-2.05b# fdisk /dev/rhd0h
NeXT fdisk v1.02a

Device: /dev/rhd0h
No partitions in use

  Unused Blocks    Start  Size
  -------------------------------
  Free Space          0    8189

Fdisk main menu
----------------
1) Create a new partition
2) Delete a partition
3) Set the active partition
4) Show disk information
5) Quit without saving changes
6) Save changes and quit

Enter 1-6: 4

Partition Table
----------------
  Act  H  S Cyl  Id  H  S Cyl    Begin      Size
  ---  -  - ---  --  -  - ---    -----      ----
  0  0  0  0    0  0  0  0        0        0
  0  0  0  0    0  0  0  0        0        0
  0  0  0  0    0  0  0  0        0        0
  0  0  0  0    0  0  0  0        0        0


Disk Information
-----------------
Disk statistics according to device driver and bios:
    device: 8189 Megabytes, 16777152 sectors
    bios:  8189 Megabytes, 16777152 sectors
        cylinders = 1044, heads = 255, sectors/track = 63

CF8GB|CF8GB|CF8GB-512:\
    :ty=fixed_rw_ide:nc#16644:nt#16:ns#64:ss#512:rm#5400:\
    :fp#320:bp#0:ng#0:gs#0:ga#0:ao#0:\
    :os=mach_kernel:z0#64:z1#192:hn=emulate:ro=a:\
    :pa#63:sa#8388608:ba#8192:fa#1024:ca#4:da#4096:ra#10:oa=time:\
    :ia:ta=4.3BSD:aa:\
    :pb#8388671:sb#8380416:bb#8192:fb#1024:cb#4:db#4096:rb#10:ob=time:\
    :ib:tb=4.3BSD:ab:
Title: Re: IDE Disktab Fun
Post by: pTeK on May 04, 2025, 01:52:04 PM
Thanks for that @Apple2guy.
Title: Re: IDE Disktab Fun
Post by: Apple2guy on May 09, 2025, 03:12:16 AM
This is a 2 GB CF Card partitioned in the Openstep 4.2 installer as a 974 Mb Dos and a 973 Mb Next partition.

I interrupted the installer after it formatted the drive.
then did fsck and deleted all the unneeded installer bits.
Here is the cf mounted on my Mac

output of diskutil list

/dev/disk6 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *2.0 GB     disk6
   1:                 DOS_FAT_16 FAT16                   1.0 GB     disk6s1
   2:         Apple_Rhapsody_UFS                         1.0 GB     disk6s2


and the CF disklabel on my Openstep 4.2 Machine

NEXTSTEP partition base = 1992060       NEXTSTEP partition size = 1992060
disk name: SanDisk SDCFH-2048
disk type: fixed_rw_ide
Disk utility

disk> l
label information: print, write? p
current label information on disk:
disk label version #3
disk label: Disk
disk name: Type 255-512
disk type: fixed_rw_ide
ncyls 3970 ntrack 16 nsect 63 rpm 3600
sector_size 512 front_porch 320 back_porch 0
ngroups 0 ag_size 0 ag_alts 0 ag_off 0
boot blocks: #1 at 1992124 #2 at 1992252
bootfile: mach_kernel
host name: localhost
root partition: a
read/write partition: b
part   base   size bsize fsize cpg density minfree newfs optim automount type
a    1992060 1991740  8192  1024  16    4096     10%   yes  time       yes 4.3BSD

DD image of CF card Zipped ~ 4mb Google Drive Link (https://drive.google.com/file/d/1Oj4ujfeJwG4aGn6yYJZt3vLLojlAVxJW/view?usp=share_link)
Title: Re: IDE Disktab Fun
Post by: rjnf on May 14, 2025, 05:09:12 PM
I'll post mine tomorrow but I'm using nextstep 3.3 so I'm limited to 4 partitions 2gb each because hd0h is reserved for system. I have hd0a system disk, hd0b for /localapps hd0c for /Users and hd0d for general /storage where i keep a copy of drivers.
Fdisk does not help it only helps to create the primary for boot and -all sectors should be used
Then you need to create the label forn each partition and then it will read the fstab.
I remember I have to use two disks. You cannot use only one to achieve several slices bsd
Title: Re: IDE Disktab Fun
Post by: pTeK on May 27, 2025, 01:58:57 PM
I've just created a disk tab to add another 3 disk partitions, but I don't know how to format them :/
I don't want to use:

# disk -i /dev/rhd0h

As I don't know if it will initialise the whole disk or just initialise /dev/hd0b /dev/hd0c and /dev/hd0d. I can't risk initialising /dev/hd0a as that is the one with all my OpenStep files on, I was hoping I could use newfs but no luck there.

Also because I was being sneaky and using SCSI when I was installing and then swapping to IDE on virtual box now it has SCSI settings on the image when I use the disk command.

grrrh.
Title: Re: IDE Disktab Fun
Post by: Apple2guy on June 01, 2025, 10:18:52 AM
Quote from: pTeK on May 27, 2025, 01:58:57 PM# disk -i /dev/rhd0h

That will format the listed partitions dev/hd0a hd0b hd0c hd0d but it will also wipe the MBR.

Go to top  Forum index