From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <3F049FFF.5000204@Princeton.EDU> From: Martin Harriss User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.02 MIME-Version: 1.0 To: 9fans@cse.psu.edu Subject: Re: [9fans] dos boot record manglin' References: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 3 Jul 2003 17:28:31 -0400 Topicbox-Message-UUID: e7ccd47a-eacb-11e9-9e20-41e7f4b1d025 From the horses mouth: http://www.microsoft.com/hwdev/download/hardware/fatgen103.pdf Martin Sam wrote: > My laptop has three partitions: fat16, plan9, fat32. > I recently copied a tarfile from /n/ftp to > /n/c: to do some Windows work. I then halted > kfs and powered down. I may have unmounted /n/c: -- > I can't be certain. It was later in the evening before > I came back to actually do said work. > > Next boot, Windows didn't. Mounting the partition > in plan 9 fails with "unknown format." > > It appears that something stepped on the dos boot record > for both the fat16 and fat32 partitions. eg, fat16: > > term% dd -if /dev/sdC0/dos -bs 512 -count 1 | xd -c > 1+0 records in > 1+0 records out > 0000000 13 00 00 00 d ff ff 18 00 00 06 00 9 P 2 > 0000010 0 0 0 00 00 f8 ff 00 ? 00 f0 00 ? 00 00 00 > 0000020 c1 c0 > 00 80 00 ) I k 05 a0 00 O N A > 0000030 M E 00 F A T 1 6 3 c9 > (everything after this looks OK) > > Note the peculiarly placed 9P2000 at byte 13. > > I'm trying to come up to speed on the fat filesystem > format so I can re-establish the dos boot record fields > that have been stamped on. Can anyone offer some > help in this regard? > > For completeness, the dos boot record on the fat32 > partition looks like: > > term% dd -if /dev/sdC0/dos1 -bs 512 -count 1 | xd -c > 1+0 records in > 1+0 records out > 0000000 13 00 00 00 d ff ff 18 00 00 06 00 9 P 2 > 0000010 0 0 0 00 00 f8 00 00 ? 00 f0 00 ? 00 00 00 > 0000020 f1 2 ~ 00 dc > 00 00 00 00 00 00 02 00 00 00 > 0000030 01 00 06 00 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 > 0000040 80 00 ) \t x c2 = > 0000050 F A T 3 2 f6 f6 f6 f6 f6 f6 > > > Cheers, > > Sam > >