Re: [PATCH] zip drives

From: Riley Williams (
Date: Wed Mar 15 2000 - 17:05:33 EST

Hi Manfred.

>>>> Another point to add is that some (newer?) ZIP drives have
>>>> a jumper on them which enables some cheat mode for MSDOS
>>>> which actually hides some sectors from the device driver.

> Both WinNT and Windows 95 need the cheat mode: IIRC they
> don't analyze the partition table if the device reports
> itself as ATAPI FLOPPY.

>>>> That is, block 0 on the drive actually moves along with the
>>>> partition table, and perhaps also the reported capacity.

> Fixed 32 blocks, they don't analyze the partition table.

>> Load first sector. Is it an MBR/partition table, or a boot
>> sector? If the former, add an offset of 32 sectors to all
>> subsequent accesses. This way, we get consistent behaviour
>> from both types of drive. You then always mount /dev/sda
>> (or whatever).

> What if you have a partition table with != 32 sectors?

As far as MSDOS and Windoze is concerned, the partition table is
ONE sector in length - it consists of offsets 447 to 510 of the
first sector of the disk, with offsets 0 to 446 comprising the
Master Boot Record and offsets 511 to 512 being the boot block

The reason for the 32 sector offset to the start of the partition
on zip disks is because DOS and Windoze require the partition to
start on a track boundary - zipdisks declare 32 sectors per
track. Software such as PartitionMagic and the like take
advantage of this by storing their boot code in those otherwise
unused sectors.

> Just try to mount an hfs formatted disk, the length of the
> partition table depends on the version of the formatter :-(

I don't know HFS so can't comment thereon...

> But it possible to disable this mode with some special
> ATAPI commands, IIRC my brother told me that he send them
> to a linux developer a few months ago.

If it is, that'd certainly be the best choice.

Best wishes from Riley.

 * Copyright (C) 2000, Memory Alpha Systems.
 * All rights and wrongs reserved.

| There is something frustrating about the quality and speed of Linux |
| development, ie., the quality is too high and the speed is too high, |
| in other words, I can implement this XXXX feature, but I bet someone |
| else has already done so and is just about to release their patch. |

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

This archive was generated by hypermail 2b29 : Thu Mar 23 2000 - 21:00:18 EST