From owner-freebsd-current Wed Nov 25 18:29:46 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id SAA14013 for freebsd-current-outgoing; Wed, 25 Nov 1998 18:29:46 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from hsw.generalresources.com ([203.79.17.12]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id SAA13990 for ; Wed, 25 Nov 1998 18:29:15 -0800 (PST) (envelope-from hsw@email.generalresources.com) Received: from hsw.generalresources.com (localhost.generalresources.com [127.0.0.1]) by hsw.generalresources.com (8.9.1/8.9.1) with ESMTP id KAA21774; Thu, 26 Nov 1998 10:25:33 +0800 (CST) (envelope-from hsw@hsw.generalresources.com) Message-Id: <199811260225.KAA21774@hsw.generalresources.com> To: Robert Nordier cc: mike@smith.net.au, freebsd-current@FreeBSD.ORG From: Christopher Hall Reply-to: Christopher Hall Subject: boot0, was /boot/loader what to set rootdev to? In-reply-to: Message of "Sat, 25 Nov 1998 12:47:02 +0200." <199811251047.MAA15178@ceia.nordier.com> X-Operating-System: FreeBSD 3.0 X-Mailer: exmh 2.0 Date: Thu, 26 Nov 1998 10:25:33 +0800 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message <199811251047.MAA15178@ceia.nordier.com>, Robert Nordier writes: >Christopher Hall wrote: > >> Another question: Is there any way to boot DOS from /boot/loader? >> Perhaps using some Forth code? > >I'm curious why you should want to do this (ie. rather than use a >partition manager such as boot0/booteasy or some free or commercial >alternative). I simply wanted to take an already installed/working FreeBSD system on a single IDE disk. (only has has one FreeBSD partition, no space left to install bootmanager partitions). Take it to a clients site - they have one pc with Win95 installed (disk is almost full). I would move the Win95 to slave, put the FreeBSD as master and still allow booting back into Win95. I will see if boot0 works, I did not see any reference to it in man boot. However, a quick look at the code suggests that it does not show the partitions on the second drive until F5 is pressed. This may be confusing for the user. >There's currently no way, though. The boot/loader, with Forth >itself, runs in userland (i386 protected mode ring 3). So you'd >have to add a BTX syscall, at least, in addition to the Forth code. I looked at BTX code and found system call, so it would have to invoke the 'exit' switch back to real mode code. Then instead of INT 0x19 would use BIOS disk services to load the selected boot block. The the drive/partition to load would be passed in a register to system call. Finally jump to the loaded boot block. For this to work after switching back to real mode, the machine state must the same as the just booted condition. i.e. Are all the bios vectors set back to normal? > >-- >Robert Nordier > --- Christopher Hall To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message