From owner-freebsd-questions@FreeBSD.ORG Tue Feb 1 12:10:52 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C088D16A4CE; Tue, 1 Feb 2005 12:10:52 +0000 (GMT) Received: from hosea.tallye.com (joel.tallye.com [216.99.199.78]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7B3C543D2F; Tue, 1 Feb 2005 12:10:51 +0000 (GMT) (envelope-from lorenl@alzatex.com) Received: from hosea.tallye.com (hosea.tallye.com [127.0.0.1]) by hosea.tallye.com (8.12.8/8.12.10) with ESMTP id j11CAnYs020242 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 1 Feb 2005 04:10:50 -0800 Received: (from sttng359@localhost) by hosea.tallye.com (8.12.8/8.12.10/Submit) id j11CAnIh020240; Tue, 1 Feb 2005 04:10:49 -0800 X-Authentication-Warning: hosea.tallye.com: sttng359 set sender to lorenl@alzatex.com using -f Date: Tue, 1 Feb 2005 04:10:49 -0800 From: "Loren M. Lang" To: rax@rakhesh.com Message-ID: <20050201121049.GL8619@alzatex.com> References: <38b3f6e4050130033551e43818@mail.gmail.com> <20050130120618.GA21695@alzatex.com> <38b3f6e4050130235957c049c2@mail.gmail.com> <41FDEFE7.1090204@freebsd.org> <38b3f6e40501310216de768e@mail.gmail.com> <20050131103523.GC8619@alzatex.com> <41FE17A7.3030006@freebsd.org> <38b3f6e4050131074327d2e583@mail.gmail.com> <41FE578F.60706@freebsd.org> <38b3f6e405013122047a2b8206@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <38b3f6e405013122047a2b8206@mail.gmail.com> User-Agent: Mutt/1.4.1i X-GPG-Key: ftp://ftp.tallye.com/pub/lorenl_pubkey.asc X-GPG-Fingerprint: B3B9 D669 69C9 09EC 1BCD 835A FAF3 7A46 E4A3 280C cc: freebsd-questions@freebsd.org cc: Mark Ovens Subject: Re: Booting FreeBSD-5.3 from NTLDR X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Feb 2005 12:10:52 -0000 On Tue, Feb 01, 2005 at 10:04:12AM +0400, Rakhesh Sasidharan wrote: > On Mon, 31 Jan 2005 16:06:39 +0000, Mark Ovens 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. I think that you should be able to use boot0 and boot1 as a file once the apropriate fields are filled in. When boot0 and boot1 are written to the disk in their special locations, several bytes of each file are modified to reflex various paramaters like which disk or partition they should use. You should be able to extract them with dd and boot them externally from my understanding of it. boot1 is normally written to the first sector of the partitionthat freebsd is installed on, if that's the first partition on ur second hard drive then: dd if=/dev/ad1s1 of=boot1.img count=1 will extract the file to boot1.img might NTLDR should be able to use. dd if=/dev/ad1 of=boot0.img count=1 Will extract boot0 from the first sector of the second hard drive, otherwise know as the Master Boot Record. If you use boot0, make sure you disable the update feature of it. boot1 on the other hand doesn't modify anything. boot1's sole purpose is to load the second stage boot2 which is stored a little deeper into the slice and is bigger than 1 sector. boot1 is needed to get around a limitation of 512 bytes for the boot sectore of the slice. For NTLDR, you shouldn't need to worry about boot2 though, just extract boot1 as shown above. > > 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@rakhesh.com > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" -- I sense much NT in you. NT leads to Bluescreen. Bluescreen leads to downtime. Downtime leads to suffering. NT is the path to the darkside. Powerful Unix is. Public Key: ftp://ftp.tallye.com/pub/lorenl_pubkey.asc Fingerprint: B3B9 D669 69C9 09EC 1BCD 835A FAF3 7A46 E4A3 280C