MBR problem
Vitalis
vitalis at numericable.fr
Sun Sep 28 01:32:01 PDT 2003
On Sun, 2003-09-28 at 04:17, Dan Strick wrote:
> On Sat, 27 Sep 2003, vitalis at numericable.fr wrote:
> > There are 2 partitions on my hard drive, one for FreeBSD and the other
> > one for XP. I had to reinstall Windows and of course it blew the MBR up.
> > I've reinstalled FreeBSD's boot manager with:
> > boot0cfg -B ad0
> >
> > Now when I boot, the manager lists the 2 OS, but when I choose to boot
> > FreeBSD, nothing happens.
> >
> > Any idea?
> >
> > #FreeBSD 5.1-CURRENT
> >
> > bash-2.05b# fdisk ad0
> > ******* Working on device /dev/ad0 *******
> > parameters extracted from in-core disklabel are:
> > cylinders=232581 heads=16 sectors/track=63 (1008 blks/cyl)
> >
> > Figures below won't work with BIOS for partitions not in cyl 1
> > parameters to be used for BIOS calculations are:
> > cylinders=232581 heads=16 sectors/track=63 (1008 blks/cyl)
> >
> > Media sector size is 512
> > Warning: BIOS sector numbering starts with sector 1
> > Information from DOS bootblock is:
> > The data for partition 1 is:
> > sysid 7 (0x07),(OS/2 HPFS, NTFS, QNX-2 (16 bit) or Advanced UNIX)
> > start 63, size 117210177 (57231 Meg), flag 0
> > beg: cyl 0/ head 1/ sector 1;
> > end: cyl 1023/ head 254/ sector 63
> > The data for partition 2 is:
> > sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
> > start 117210240, size 117226305 (57239 Meg), flag 80 (active)
> > beg: cyl 1023/ head 0/ sector 1;
> > end: cyl 1023/ head 254/ sector 63
>
> I don't see any smoking guns. I know the basic concept, booting via
> an MBR installed with boot0cfg on a FreeBSD 5.1 system with XP in the
> first slice works, works. I did it just a couple of days ago.
>
> I do see a potential problem. The boot0 MBR will by default use the
> legacy CHS int-13 BIOS services, even if the "extended" services are
> available. (At least this is how I read the source code. This is
> contrary to at least some of the boot0/boot0cfg documentation.)
>
> Your XP slice is just a teensy bit larger than 1024*255*63 sectors long,
> pushing the bootstrap program in your FreeBSD slice just beyond the point
> at which it could be successfully loaded with a legacy int-13 disk read.
>
> If possible, do "boot0cfg -v ad0" and see if the "packet" option is set.
> If not, see if setting it with "boot0cfg -v -o packet ad0" fixes your
> problem. I expect that you are using a modern motherboard whose BIOS
> implements the modern "EDDS" int-13 disk functions, perhaps the Asus
> P4P800 you just mentioned in a previous posting to freebsd-questions.
>
> Caveat: I have not yet tried the boot0cfg packet option and don't
> know for sure that it works. I also wonder how the boot0 program worked
> for you before you installed XP. I gather that it did and that suggests
> your problem is something else. Still, it is worth a try.
>
> Dan Strick
> strick at covad.net
>
Hi Dan!
You were right, it works now with the 'packet' option.
Thanks a lot!
More information about the freebsd-questions
mailing list