* Re: [Bugme-new] [Bug 4054] Linux partition table reading
[not found] <20050117094325.0b54606c.akpm@osdl.org>
@ 2005-01-18 0:25 ` Andries Brouwer
0 siblings, 0 replies; only message in thread
From: Andries Brouwer @ 2005-01-18 0:25 UTC (permalink / raw)
To: Andrew Morton, torvalds; +Cc: linux-fsdevel, linux-kernel
> Date: Mon, 17 Jan 2005 03:21:30 -0800
> From: bugme-daemon@osdl.org
> Subject: [Bugme-new] [Bug 4054]
>
> Problem Description:
> Dane-elec 512MB USB keychain drive (using factory FAT partitions)
> works fine in windows, and on friend's 2.6.10-rc2-mm4 dual Athlon XP,
> but partition won't mount on my K7/K8 machines.
Solution:
You have enabled CONFIG_ACORN_PARTITION_CUMANA. Don't.
Details:
In partitions/check.c the adfspart_check_CUMANA routine
is called earlier than msdos_partition().
This routine adfspart_check_CUMANA() does an adfs_partition() test to see
whether the thing is an adfs partition. That test does adfs_checkbblk()
which checks a checksum. The probability that random garbage will pass
this test is 1 in 256. Disable CONFIG_ACORN_PARTITION_CUMANA unless you
actually have an Acorn and Cumana partitions.
Remarks:
With low frequency people stumble over this problem.
Typically they enable all possible partition types
and do not read any help texts for the various types,
so adding warnings would not help.
Of course it is a bug that the kernel starts doing random partition
recognition. These USB devices all have a DOS-type partition table.
Certainly msdos_partition() should be tried first for them.
And earlier already, it is bad that block_dev.c:do_open() does an
automatic rescan_partitions().
Every now and then I mumble about these things, and usually Linus
disagrees. However, these days we have udev and partx and
blockdev --rereadpt.
I do not really see any reason why the kernel should do
automatic partition guessing for any disk encountered.
(That is just as bad as automatic mounting for any filesystems seen.)
I suppose we should slowly stop doing that, at least for all non-rootfs disks.
Andries
> Jan 17 03:52:00 erg kernel: SCSI device sda: 985088 512-byte hdwr sectors (504 MB)
> Jan 17 03:52:00 erg kernel: sda: Write Protect is off
> Jan 17 03:52:00 erg kernel: /dev/scsi/host11/bus0/target0/lun0: [CUMANA/ADFS]
> p1<5>Attached scsi removable disk sda at scsi11, channel 0, id 0, lun 0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-01-18 0:25 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20050117094325.0b54606c.akpm@osdl.org>
2005-01-18 0:25 ` [Bugme-new] [Bug 4054] Linux partition table reading Andries Brouwer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome