Skip site navigation (1)Skip section navigation (2)
Date:      02 Dec 1998 19:57:20 -0600
From:      Joel Ray Holveck <joelh@gnu.org>
To:        Mike Smith <mike@smith.net.au>
Cc:        "Jordan K. Hubbard" <jkh@zippy.cdrom.com>, Marius Bendiksen <Marius.Bendiksen@scancall.no>, Robert Nordier <rnordier@nordier.com>, hsw@email.generalresources.com, hsw@acm.org, abial@nask.pl, freebsd-current@FreeBSD.ORG
Subject:   Re: /boot/loader what to set rootdev to?
Message-ID:  <86g1ay6l8f.fsf@detlev.UUCP>
In-Reply-To: Mike Smith's message of "Wed, 25 Nov 1998 09:17:08 -0800"
References:  <199811251717.JAA00911@dingo.cdrom.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Sorry it took me so long to reply; I've been out of town.

>>> Ummm.  Rebooting into DOS is *not* the same problem as booting into
>>> FreeBSD, though you seem to be under the mistaken impression that it
>>> is.  If you don't believe me, just try constructing a PIF file for
>>> fbsdboot.exe and launch the procedure from your desktop.  You will not
>>> shut down gracefully to DOS and be presented with a freebsd login
>>> prompt a few minutes later, as you would hope and expect.  The kinds
>>> of things you need to do in order to properly shut down Windows and
>>> launch the FreeBSD kernel are simply different.
>> Jordan, we've been over this before.  Did you ever actually *try* what
>> the rest of the list said?
> Yes.  It doesn't work.  Have YOU?

Yes, I did, and had good results.  However, it appears I owe you an
apology.  The method I used apparently did not get posted to -current
or -hackers; I didn't notice anything on those lists to describe the
correct .pif file to use.

Mike said:
> Yes, we have been over this before.  Would you care to explain how you 
> plan to reinstate the vectors that the DOS7 kernel replaces so that 
> vm86 BIOS calls from the FreeBSD kernel will work?
> Please understand that there are some really fundamental issues which 
> absolutely preclude starting FreeBSD once DOS has been started.

We may have a different definition of "DOS7 kernel".  I typically use
that phrase to refer to IO.SYS alone.  The vectors seem to be modified
by HIMEM.SYS instead.  By default, IO.SYS will load HIMEM.SYS and
prevent the kernel from loading.  However, the line "DOS=NOAUTO" in
the config.sys will cause IO.SYS to skip that step.  I have had
success loading FreeBSD by using that line in the PIF's specified
CONFIG.SYS myself.

I just now went through the procedure from scratch to make sure it's
still valid.  The following description has been simplified, to-wit:
the FBSDBOOT.ING code in the PIF's AUTOEXEC.BAT was added after the
initial trial.  The results should be the same.

* Materials

Computer: i486, 32MB RAM, AHA-1542C.  Windows on da0s1, FreeBSD root
on da1s1a, other BSD partitions on da1s1 and da2s1.

FreeBSD: cvsup'd approx. 23 Nov 1998.

Windows: Windows 95 4.00.950.  IO.SYS dated 11 Jul 1995, size 223148,
MD5 checksum 5a18167042bdf9823ef7f70ca7af805b.

FBSDBOOT.EXE: Recently downloaded from ftp.freebsd.org; size 22487,
MD5 checksum 5b8f1d7d1e806bc8b1ae2cf12a4ee5e0.

kernel: My normal config file, with the "config kernel" line updated
to reflect my current root drive.  Sources cvsup'd as -current
approx. 23 Nov 1998.

* Methods

The only box I have with both FreeBSD and Win95 boots BSD from da1,
which FBSDBOOT does not examine.  (This is discussed more later.)
This means I had to create a kernel that specifies the correct root,
using the line:
    config		kernel	root on da1s1a
in my kernel config file and recompiling.  The cvsup I used was from
late November.  The resulting kernel was placed on my Win95 drive, as
"C:\KERNEL".

I then created a shortcut (using Windows 95's New:Shortcut command) on
the desktop, and specified "C:\FBSDBOOT.EXE -r -D" as the command
line.  I edited the file (Properties), and under the
"Program:Advanced" section, specified to run in MS-DOS mode.  I then
specified, in the PIF, the following CONFIG.SYS:

  DOS=SINGLE,NOAUTO

and AUTOEXEC.BAT:

  SET CONFIG=Standard
  if not exist c:\fbsdboot.ing goto goahead
  del c:\fbsdboot.ing
  c:\windows\win.com /wx
  :goahead
  copy \autoexec.bat \fbsdboot.ing

(The SET CONFIG was an error on my part; it is not necessary.)  The
AUTOEXEC.BAT was necessary because Windows does not have the
opportunity to restore its CONFIG.SYS and AUTOEXEC.BAT without being
explicitly told to do so.  The "WIN /WX" causes Windows to return
those files to their previous contents, prepare to update the PIF with
the files' current contents if necessary (the actual update is done
later), and reboot.  The resultant PIF file is attached.

I then tested the PIF file.  FreeBSD loaded and started X as normal.
Little operational testing was done at this time.  The sysctl variable
"kern.bootfile" was "c:\kernel".  This is discussed later.

I then performed a normal shutdown of FreeBSD.  The system rebooted
into DOS 7, and immediately rebooted again, this time into Windows 95.
(This was the FBSDBOOT.ING code having its effect.)  Windows 95
appeared to be operating normally (or, at least, as normal as it ever
does).  At this point, I noticed my normal 2k AUTOEXEC.BAT had by that
point been replaced with a near-trival one.  However, strong evidence
suggests that this had taken place prior to my experiment.

* Conclusions

FBSDBOOT can be made to work with Windows 95 (original release) with
our current kernel.  The key factor (DOS=NOAUTO) was not, to my
knowledge, described in the previous discussion on -current, so
sufficient experimentation has not been performed.  The most likely
key factor is the version of Windows 95.  In particular, more
experimentation with Win95 OSR2 and Win98 is warranted.

Another possible issue to study is the use of -r -D.  FBSDBOOT only
searches drive 0x80.  Because the experiment's platform does not have
a FreeBSD partition on that drive, the use of -r -D coupled with a
kernel on the DOS was necessary.  This caused an illegal value in
kern.bootfile.  This may be fixable by hacking /etc/rc.  Further
experimentation regarding the use of -r -D is also warranted.
Modification to FBSDBOOT to allow booting off of other devices would
also be useful.

I would be very interested in hearing other people's results.

Happy hacking,
joelh

-----cut here-----
begin 777 freebsd.pif
M`'A&0E-$0D]/5"`@("`@("`@("`@("`@("`@("`@(""``@``0SI<1D)31$)/
M3U0N15A%````````````````````````````````````````````````````
M````````````$`!#.EP`````````````````````````````````````````
M````````````````````````````````````````+7(@+40`````````````
M````````````````````````````````````````````````````````````
M```````!`/\94```!P``````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````34E#4D]33T94(%!)1D58`(<!``!Q`5=)3D1/5U,@,S@V(#,N
M,``%`IT!:`"``@``9``R`/__``#__P```A""!!\`````````````````````
M````+7(@+40`````````````````````````````````````````````````
M`````````````````````````````%=)3D1/5U,@5DU-(#0N,`#'`QL"K`$`
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````4$E&
M34=2+D1,3```````````````````````````````````````````````````
M```````````````````````````````````````````)``(`````````````
M`#(``0```````````````0````4`&0`#`,@`Z`,"``H``0`````````<````
M``````````!497)M:6YA;````````````````````````````````$QU8VED
M82!#;VYS;VQE```````````````````````````#````````````````````
M%@``````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M```````````````````````````!`$-/3D9)1R`@4UE3(#0N,`#P`]T#$P!$
M3U,]4TE.1TQ%+$Y/05543PT*05543T5814-"050@-"XP`/__!@29`%-%5"!#
M3TY&24<]4W1A;F1A<F0-"FEF(&YO="!E>&ES="!C.EQF8G-D8F]O="YI;F<@
M9V]T;R!G;V%H96%D#0ID96P@8SI<9F)S9&)O;W0N:6YG#0IC.EQW:6YD;W=S
M7'=I;BYC;VT@+W=X#0HZ9V]A:&5A9`T*8V]P>2!<875T;V5X96,N8F%T(%QF
-8G-D8F]O="YI;F<-"@HZ
`
end
-----cut here-----

-- 
Joel Ray Holveck - joelh@gnu.org
   Fourth law of programming:
   Anything that can go wrong wi
sendmail: segmentation violation - core dumped

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?86g1ay6l8f.fsf>