9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Martin Harriss <martin@Princeton.EDU>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] dos boot record manglin'
Date: Thu,  3 Jul 2003 17:28:31 -0400	[thread overview]
Message-ID: <3F049FFF.5000204@Princeton.EDU> (raw)
In-Reply-To: <Pine.LNX.4.30.0307031533270.32598-100000@athena>

 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
> <snip!> (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
> <snip!>
>
> Cheers,
>
> Sam
>
>




      reply	other threads:[~2003-07-03 21:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-03 20:13 Sam
2003-07-03 21:28 ` Martin Harriss [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3F049FFF.5000204@Princeton.EDU \
    --to=martin@princeton.edu \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).