NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: bin/37656: fdisk segfault on invalid MBR entries on non-x86 geometry detection
On May 25, 7:34am, Eric Auge wrote:
} John Nemeth wrote:
} > The following reply was made to PR bin/37656; it has been noted by GNATS.
} >
} > From: jnemeth%victoria.tc.ca@localhost (John Nemeth)
} > Date: Wed, 2 Jan 2008 03:20:39 -0800
} >
} > } Can fdisk fail in writing this magic number ?
} >
} > Only if there is a serious bug.
} >
} > } This is an fdisk generated MBR partitioning on the cobalt, all tests
} > } I've done were reporting this bad magic number.
} >
} > If that is the case, then it shouldn't have been using the
} > partition table to guess the disk geometry.
}
} yep but using what as we are not on x86 arch ? I don't think there is
} BIOS calls on cobalt, I'm no expert though.
I don't know how it would work on that platform.
} > } But it now successfully boot, what the purpose of this "magic number" ?
} >
} > To let the BIOS know that it is a valid boot sector. If the
} > number isn't there, then the machine shouldn't boot at all.
}
} My previous post was including an fdisk output showing the "bad magic
} number" on each partition reported by fdisk but still the cobalt boot
} normally.
I went back and looked at your previous post. Some explanation is
in order here. MBR type systems use a multi-stage boot. First, the
BIOS reads the first sector of disk, verifies the "magic number" and
jumps to beginning of the sector. This code looks through the
partition table for the first partition with the "active" flag set,
loads the first sector of that partition, verifies the "magic number"
in that sector, and then jumps to the beginning of that sector. That
code is responsible for booting the OS in that partition. The errors
you are seeing indicate that the "magic number" in the partition boot
sectors are invalid, not the "magic number" for the MBR. This could be
because the partition table is messed up and pointing to the wrong
sector or because the partition boot sectors are messed up.
} fdisk was the tool used to build the partition.
}
}-- End of excerpt from Eric Auge
Home |
Main Index |
Thread Index |
Old Index