9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] Plan 9 boot block question
@ 2000-06-14 19:05 Jean Mehat
  0 siblings, 0 replies; 2+ messages in thread
From: Jean Mehat @ 2000-06-14 19:05 UTC (permalink / raw)
  To: 9fans



If I understand things correctly, the 512 first bytes of the Plan 9
partition contain some code that loads a secondary boot (9load).
But if I compare these bytes with /386/pbs or /386/pbslba via cmp,
there is a difference. Is it normal ? If I write /386/pbs or
/386/pbslba on this sector, will I still be able to boot ? If
I crunch this block, what is the clean way to restore it ?

(A mail bounce later: writing /386/pbs on this sector makes the
partition un-bootable. saving this block under another unix and
writing it back after the failure is not enough to restore things).



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [9fans] Plan 9 boot block question
@ 2000-06-14 19:16 Russ Cox
  0 siblings, 0 replies; 2+ messages in thread
From: Russ Cox @ 2000-06-14 19:16 UTC (permalink / raw)
  To: 9fans

The first sector of the Plan 9 partition
contains both the beginning of the 9fat
partition (a BIOS parameter block (BPB))
and the partition boot sector (PBS).
The PBS begins with a three-byte intel
jump instruction that jumps over the BPB
to address 0x3E, which is where the PBS
code really starts.

The files /386/pbs and /386/pbslba have
bytes 0x03-0x03D (inclusive) zeroed; disk/format
takes care of writing the BPB when formatting
the disk, and can be used to install a new PBS
without hurting the extant BPB.

Saving the single 512-byte sector at the
beginning of your Plan 9 partition and then
restoring it should have been enough to
get you back up and running.

Russ



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2000-06-14 19:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-06-14 19:05 [9fans] Plan 9 boot block question Jean Mehat
2000-06-14 19:16 Russ Cox

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).