Port-amiga archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

RDB of media with sector size other than 512



Hello!

After installing NetBSD 1.4, I wondered why it could not find the
partitions on my MO-drive when using media with 2048 bytes/sector.
Instead it reported "partition block with bad id" at boot time.

The reason is that NetBSD block numbers are in DEV_BSIZE units,
but AmigaOS block numbers are in physical units. To fix this,
edit /usr/src/sys/arch/amiga/amiga/disksubr.c, it contains two
lines where

                strat(bp);

is called, insert a line

                bp->b_blkno *= (lp->d_secsize / DEV_BSIZE);

just before each of the two lines and recompile the kernel. The error
message no longer appears, and the disklabel command shows the partitions.

Don't try to use the BFFSFileSystem on such media, it tries to read
512 bytes/sector and my Fujitsu MO just reports a read error in this case.

Since NetBSD with this fix can read at least the RDB partition blocks,
it seems that it correctly makes SCSI transfers with the size of the
physical media sectors, not always with 512 bytes/sector. Otherwise
it would have get a read error like BFFSFileSystem.

To use the partitions with a file system is another thing, I could not
get neither ffs nor adosfs to work with sector sizes other than 512.
Does anybody know if this works on other architectures than amiga in the
mean time?

At www.netbsd.org I found some problem reports that deal with this:

Nr.  Year Subject
-----------------
 495 1994 Non-512 Byte per sector disks don't work
2896 1996 An msdosfs patch to handle disks whose sector size != DEV_BSIZE.
3459 1997 msdosfs_mountfs fails for bigger sector size than 512 bytes
3460 1997 block io unit for sd should be sector size
3790 1997 non-512 bytes/sector media support case 1
3791 1997 non-512 bytes/sector media support case 2
3792 1997 non-512 bytes/sector media support case 3

(Number 3460 is closed, but very interesting)

Since I don't have the time to investigate this further, I hope someone
else can find out what additional changes are necessary now after it's
possible to find the partitions.

Ciao, Detlef
-- 
_ // TetiSoft%apg.lahn.de@localhost
\X/  Detlef Würkner, Gießen




Home | Main Index | Thread Index | Old Index