Booting FreeBSD-5.3 from NTLDR

Rakhesh Sasidharan rakhesh.s at gmail.com
Mon Jan 31 22:04:16 PST 2005


On Mon, 31 Jan 2005 16:06:39 +0000, Mark Ovens <marko at freebsd.org> wrote:

> Hehe! I did it the hard way; I manually recreated the partition table -
> 3 partitions! In fact.....[roots around in drawer]......yes, still got
> the printout of the spreadsheet I used to calculated the start and end
> CHS values - don't know why, the disk was replaced ages ago :-)

Hehe! How did u manually recreate the partition table? U had the sizes
and sectors etc stored somewhere? On my previous machine, I used to
have fdisk listings of all my disks as a printout -- coz I've done
this kind of goofups many a times, and so usually have been careful to
keep a listing of the sector values etc. But this time, I was on my
parents' machine, and since I hadn't really started using it big time,
I was careless enough not to take a precaution like this. (But I guess
I was not thaaat careless enough to not take backups either, hehe!)

I was lucky to find this demo program called Active Partition UnEraser
or something. Being demo, it would only show me the starting and
ending sectors of all the partitions -- but that was fine with me coz
once I got those values, it was just a matter of noting them down and
then booting into Linux (coz that's what I had apart from FreeBSD) and
recreating the tables using its fdisk program. :))

> IRCC, boot0 is the MBR and boot1 is the boot sector (of the FreeBSD
> partition (slice)) and they only ontain info about the local disk, i.e.
> _relative_ info in effect, so if FreeBSD is on your second disk and you
> copy boot1 to C:\BOOTSECT.BSD and add an entry for it in BOOT.INI then
> NTLDR has know way of knowing that it refers to the second HDD and so
> can't boot because the info doesn't match the layout of the first HDD.
> Remember boot0 and boot1 are restricted to 512bytes - one sector. That
> is the reason as far as remember.

Oh yeah ... doh! Silly me! Ofcourse boot1 contains the info relative
to the FreeBSD disk, so copying it across to C:\BOOTSECT.BSD wont
help! Silly me! :)) So that's why copying boot1 and loader didn't help
-- coz they were all relative to the FreeBSD disk. And copying boot0
too didnt help coz of the MBR re-writing thingy. :p

What magic does BootPart do, I still wonder! I mean, if its just
extracting the bootsectors as the program says, then an alternative
way of extracting (like "dd" etc) too should work! But they dont --
meaning, BootPart does more than just extracting, I guess.

-- 
				-- Rakhesh
				   rax at rakhesh.com


More information about the freebsd-questions mailing list