mounting msdosfs
Tim Robbins
tjr at freebsd.org
Sat May 1 18:58:20 PDT 2004
On Sun, Apr 25, 2004 at 06:15:31PM +0200, Christer Solskogen wrote:
> On Sun, 2004-04-18 at 05:44, Tim Robbins wrote:
>
> > That fix looks reasonable. I'll see if I can get around to merging
> > this and any other useful fixes from NetBSD later tonight.
> >
>
> I just upgraded to CURRENT, and it seems like my problem is not fixed.
> The NetBSD import did not the trick :/
>
> If I can help you with some info, please tell me.
Apologies for the late reply. Can you apply this patch & show me the
output of running fsck_msdosfs on the partitions that failed the backup
boot block check?
==== //depot/user/tjr/freebsd-tjr/src/sbin/fsck_msdosfs/boot.c#3 - /home/tim/p4/src/sbin/fsck_msdosfs/boot.c ====
@@ -56,6 +56,7 @@
u_char fsinfo[2 * DOSBOOTBLOCKSIZE];
u_char backup[DOSBOOTBLOCKSIZE];
int ret = FSOK;
+ int i, j;
if (read(dosfs, block, sizeof block) < sizeof block) {
perror("could not read boot block");
@@ -159,6 +160,23 @@
perror("could not read backup bootblock");
return FSFATAL;
}
+ printf("Boot block:\n");
+ for (i = j = 0; i < 512; i++) {
+ j += printf("%02x ", block[i]);
+ if (j > 70) {
+ putchar('\n');
+ j = 0;
+ }
+ }
+ printf("Backup block:\n");
+ for (i = j = 0; i < 512; i++) {
+ j += printf("%02x%c", backup[i],
+ backup[i] == block[i] ? ' ' : '*');
+ if (j > 70) {
+ putchar('\n');
+ j = 0;
+ }
+ }
backup[65] = block[65]; /* XXX */
if (memcmp(block + 11, backup + 11, 79)) {
/* Correct? XXX */
More information about the freebsd-current
mailing list