* Re: mount dos-partition bug
[not found] <3A788CDE.D3D53194@philosys.de>
@ 2001-01-31 23:39 ` Andries Brouwer
2001-02-01 8:48 ` Rogier Wolff
0 siblings, 1 reply; 2+ messages in thread
From: Andries Brouwer @ 2001-01-31 23:39 UTC (permalink / raw)
To: Andreas Huppert; +Cc: Andries.Brouwer, linux-kernel
Andreas Huppert wrote:
> > I have been trying to mount the dos-partition /dev/hdb1 on /dos/d for
> > three years and it fails:
Yes. It has 805998 data sectors, which require 50374 clusters,
but the fat16 has room only to describe 39168 clusters.
The kernel mount code considers this an error.
You can remove the check in linux/fs/fat/inode.c
and write something like
error = !sbi->fats || (sbi->dir_entries & (MSDOS_DPS-1))
#if 0
|| sbi->clusters+2 > fat_clusters+ MSDOS_MAX_EXTRA
#endif
|| (logical_sector_size & (SECTOR_SIZE-1))
|| !b->secs_track || !b->heads;
(the current layout is somewhat uglier).
I would expect that afterwards things work.
If you use this under Windows, do you get over 400 MB on this disk?
Or was part of this partition effectively lost?
Andries
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: mount dos-partition bug
2001-01-31 23:39 ` mount dos-partition bug Andries Brouwer
@ 2001-02-01 8:48 ` Rogier Wolff
0 siblings, 0 replies; 2+ messages in thread
From: Rogier Wolff @ 2001-02-01 8:48 UTC (permalink / raw)
To: Andries Brouwer; +Cc: Andreas Huppert, linux-kernel
Andries Brouwer wrote:
> Andreas Huppert wrote:
>
> > > I have been trying to mount the dos-partition /dev/hdb1 on /dos/d for
> > > three years and it fails:
>
> Yes. It has 805998 data sectors, which require 50374 clusters,
> but the fat16 has room only to describe 39168 clusters.
> The kernel mount code considers this an error.
>
> You can remove the check in linux/fs/fat/inode.c
> and write something like
>
> error = !sbi->fats || (sbi->dir_entries & (MSDOS_DPS-1))
> #if 0
> || sbi->clusters+2 > fat_clusters+ MSDOS_MAX_EXTRA
> #endif
> || (logical_sector_size & (SECTOR_SIZE-1))
> || !b->secs_track || !b->heads;
>
> (the current layout is somewhat uglier).
> I would expect that afterwards things work.
>
> If you use this under Windows, do you get over 400 MB on this disk?
> Or was part of this partition effectively lost?
I'd expect that IF you try to use more than 39k clusters, your
filesystem will be toast. Even if Windows doesn't have the "sanity
check" that Linux has.
Roger.
--
** R.E.Wolff@BitWizard.nl ** http://www.BitWizard.nl/ ** +31-15-2137555 **
*-- BitWizard writes Linux device drivers for any device you may have! --*
* There are old pilots, and there are bold pilots.
* There are also old, bald pilots.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-02-01 8:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <3A788CDE.D3D53194@philosys.de>
2001-01-31 23:39 ` mount dos-partition bug Andries Brouwer
2001-02-01 8:48 ` Rogier Wolff
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox