Date: Sun, 2 May 2004 11:57:41 +1000 From: Tim Robbins <tjr@freebsd.org> To: Christer Solskogen <solskogen@carebears.mine.nu> Cc: current@freebsd.org Subject: Re: mounting msdosfs Message-ID: <20040502015741.GA88260@cat.robbins.dropbear.id.au> In-Reply-To: <1082909731.28762.1.camel@funshine.carebears.net> References: <1082192214.23944.14.camel@funshine.carebears.net> <20040418034411.GB5419@cat.robbins.dropbear.id.au> <1082909731.28762.1.camel@funshine.carebears.net>
next in thread | previous in thread | raw e-mail | index | archive | help
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 */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040502015741.GA88260>