Bug in EZ-Drive remapping code (ide.c)

Jochen Hoenicke (Jochen.Hoenicke@Informatik.Uni-Oldenburg.DE)
Fri, 30 Mar 2001 12:21:31 +0200 (MET DST)


Hello,

The EZ-Drive remapping code remaps to many sectors, if they are read
together with sector 0 in one bunch. This is even documented:

/* Yecch - this will shift the entire interval,
possibly killing some innocent following sector */

This problem hit a GRUB user using linux-2.4.2 but it exists for a
long time; the remapping code is already in 2.0.xx. The reason that
nobody cares is probably because there are only a few programs that
access /dev/hda directly.

GRUB is a boot loader that normally runs under plain BIOS but there is
also a wrapper to run it under linux and other unixes. Because it
shares most code with its BIOS derivate it accesses the disk the hard
way, reading directly from /dev/hda and interpreting the file system
with its own (read-only) file system drivers.

This is what happened: Grub reads the first track in one bunch and
since a track has an odd number of sectors, linux adds the first
sector of the next track to this bunch. This sector contains the boot
sector of the first FAT partition. The result of the remapping is
that grub can't access that partition.

Please CC me on reply.

Jochen
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/