Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 9 Jun 2000 18:40:13 +0100
From:      Mark Ovens <mark@ukug.uk.freebsd.org>
To:        "Jasper O'Malley" <jooji@nickelkid.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Active partition problems with FreeBSD 4.0/NT dual-boot
Message-ID:  <20000609184013.B233@parish>
In-Reply-To: <Pine.BSF.4.21.0006091158460.32719-100000@cornflake.nickelkid.com>; from jooji@nickelkid.com on Fri, Jun 09, 2000 at 12:24:10PM -0400
References:  <Pine.BSF.4.21.0006091158460.32719-100000@cornflake.nickelkid.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Jun 09, 2000 at 12:24:10PM -0400, Jasper O'Malley wrote:
> 
> I have a completely aggravating problem on my hand.
> 
> I've got NT 4.0 installed on a the first partition (NTFS) on da0, and
> FreeBSD 4.0 installed on the first partition of da1. When I installed
> FreeBSD, I instructed it to install a bootloader on da1, but not da0, with
> the intention of allowing NTLDR handle the OS selection. After installation,
> I FTPed /boot/boot0 to another box (since I don't have any FAT partitions
> on my machine) and rebooted. I got the NTLDR screen, booted into NT, FTPed
> boot0 back to the NTFS partition, renamed it bootsect.bsd, and added the
> following line to C:\boot.ini:
> 
> C:\BOOTSECT.BSD="FreeBSD 4.0"
> 
> When I rebooted, I selected "FreeBSD 4.0" from the list, and got the
> FreeBSD loader with a single option:
> 
> F5  Drive 1
> 
> I hit F5, and got a second loader menu:
> 
> F1  FreeBSD
> F5  Drive 0
> 
> I hit F1 to boot into FreeBSD, and I thought all was well. However, when I
> rebooted to get back into NT, I was presented with the following error
> message:
> 
> Not found any [active partition] in HDD
> 

Oh shit (not to put too fine a point on it). boot0 has overwritten
your Partition Table. I did *exactly* the same thing earlier this week
(although in a slightly different way). The good news is that I
managed to rebuild my PT without losing a single byte of data.

OK, what happened was this. When you selected FreeBSD from NTLDR, it
ran C:\BOOTSECT.BSD, aka boot0, which then gave you the FreeBSD boot
menu. boot0 "remembers" the last OS booted, which it does by setting
the active byte on the relevant entry in the PT.

Now, I don't know the intimate details of exactly what happens because
boot0 is written in assembler, but it appears that it writes this
change to the MBR by changing the active flag on the in-memory copy
and writing the whole 512 bytes back to disk. Since *your* boot0 is
from /boot it has no PT. If you had installed it then the installer
would have copied the PT before updating the MBR.

Your PT probably looks like this now.

000001a0  4c 69 6e 75 f8 46 72 65  65 42 53 c4 90 90 90 90  |LinuøFreeBSÄ....|
000001b0  90 90 44 72 69 76 65 20  00 00 80 0f b6 00 00 00  |..Drive ....¶...|
000001c0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
000001d0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
000001e0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
000001f0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 55 aa  |..............Uª|

Boot from kern.flp and mfsroot.flp and select the Fixit option (you'll
need the Fixit floppy), then type:

     # dd if=/dev/rda0 bs=512 count=1

and see if what comes out.

OK, how to fix it. Well, if neither the NT or FreeBSD partitions
contain important data then re-installing both maybe the quickest
option. If this isn't an option then you will need to rebuild your PT,
but since you only have one OS on each disk it should be easier than
mine was since I have 3 OS on one disk, with NT in an extended
partition.

As I have just gone through all this myself (successfully) I'll gladly
assist you if you wish (perhaps this would be best done off list).

> I booted from a Win98 startup floppy,

Do you have a copy of Norton's DISKEDIT?

> used fdisk to set the first
> partition on da0 active, and rebooted again. This time, I was presented
> with the following loader menu:
> 
> F1  ??
> F5  Drive 1
> 
> I thought this was weird, since I never explicitly installed the FreeBSD
> loader onto da0.  Pressing F1 brought me to the NTLDR screen, as I 
> expected, and I was able to boot into NT again. When I rebooted, I got the
> save loader menu again, and this time I hit F5, then F1 to boot into
> FreeBSD. Upon a reboot, bam, back to:
> 
> Not found any [active partition] in HDD
> 
> After doing some reading, I'm guessing the problem is that I've a
> brain-dead Award BIOS variant on my GA-686LX4 motherboard that assumes
> you're using an M$ OS and checks for active partitions on the lowest
> numbered BIOS disk present (da0, in this case) before it hands control
> over to any MBR bootloader. If there aren't any active partitions, the
> BIOS craps out with the above error.
> 
> Now, for the questions:
> 
> 1) How did the FreeBSD loader find its way onto the MBR of da0? It
>    obviously wasn't there before I selected "FreeBSD 4.0" from the
>    NTLDR menu the first time, but it seems that it's been there ever
>    since. Is this by design?
> 
> 2) Is there any way to keep whatever is clearing the "active" flag on
>    the first partition of da0 from doing so? I tried upgrading the BIOS
>    for the motherboard to the latest version, but the active partition
>    checking "feature" is still present.
> 
> Thanks,
> Mick
> 
> 
> 
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message

-- 
        ...and on the eighth day God created UNIX
________________________________________________________________
      FreeBSD - The Power To Serve http://www.freebsd.org
      My Webpage http://ukug.uk.freebsd.org/~mark/
mailto:mark@ukug.uk.freebsd.org             http://www.radan.com



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000609184013.B233>