Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Nov 1998 10:25:33 +0800
From:      Christopher Hall <hsw@acm.org>
To:        Robert Nordier <rnordier@nordier.com>
Cc:        mike@smith.net.au, freebsd-current@FreeBSD.ORG
Subject:   boot0, was /boot/loader what to set rootdev to?
Message-ID:  <199811260225.KAA21774@hsw.generalresources.com>
In-Reply-To: Message of "Sat, 25 Nov 1998 12:47:02 %2B0200." <199811251047.MAA15178@ceia.nordier.com>

next in thread | previous in thread | raw e-mail | index | archive | help

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 <hsw@email.generalresources.com>

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



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