NetBSD-5.0.2/share/man/man8/man8.i386/w95boot.8

Compare this file to the similar file:
Show the results in this format:

.\"   $NetBSD: w95boot.8,v 1.9 2008/04/30 13:10:58 martin Exp $
.\"
.\" Copyright (c) 1997 The NetBSD Foundation, Inc.
.\" All rights reserved.
.\"
.\" Author: Ty Sarna <tsarna@endicor.com> for Endicor Technologies, Inc.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd December 7, 1997
.Os
.Dt W95BOOT 8 i386
.Sh NAME
.Nm w95boot
.Nd procedure for booting NetBSD/i386 from Windows 95
.Sh DESCRIPTION
.Xr dosboot 8
is a program that can boot
.Nx
from DOS. However, it must be run
under real DOS, and not an emulated DOS session. As a result, it can not
be directly run from Windows 95. Windows does, however, have the ability
to run a program in ``DOS Mode'', which is to say, Windows can reboot
itself into stand-alone DOS and execute a program. One difficulty of
this method is that Windows expects the program to exit, so it can
restore the system to boot into Windows. Since
.Xr dosboot 8
takes over the computer, Windows will be unable to clean up after it,
and as a result the next attempt to start Windows will also result in
booting
.Nx .
.Pp
This manual page describes how to set up Windows to boot
.Nx ,
in such
a way as to avoid the problem described above. It assumes that Windows
is the default OS on your multiboot system, since if
.Nx
were the
default, you could simply use the Reboot option of the Windows shutdown
menu.
.Pp
Begin by creating the directory
.Pa C:\eNetBSD
on your Windows system. You may use another name if you prefer; just be
sure to edit the paths in the instructions below accordingly.
In that directory, place a copy of
.Pa DOSBOOT.COM ,
which can be found on your
.Nx
system as
.Pa /usr/mdec/dosboot.com .
You can use
.Xr ftp 1
or the msdosfs
file system (see
.Xr mount_msdos 8 )
to transfer the file from
.Nx
to Windows.
.Pp
Next create the script
.Pa GoNetBSD.BAT
in that directory, containing the following lines:
.Bd -literal -offset indent
@ECHO OFF
IF EXIST C:\\NetBSD\\BOOTED GOTO towin
ECHO \*[Gt]C:\\NetBSD\\BOOTED
CHOICE /C+ /N /T+,5
C:\\NetBSD\\DOSBOOT -u
ECHO Error booting NetBSD
CHOICE /C+ /N /T+,60

:towin
DEL C:\\NetBSD\\BOOTED
ECHO Y \*[Gt]C:\\NetBSD\\Y
CHOICE /C+ /N /T+,5
C:\\WINDOWS\\WIN.COM \*[Lt]Y
.Ed
.Pp
Now, double click the icon for the
.Xr dosboot 8
program. Windows will bring up a requester entired ``Program Requires
MS-DOS Mode''. Select ``Yes'' to create a shortcut. Turn off the
``Mouse'' checkmark on the window that appears and click ``OK''.
.Pp
Now right-click the
.Pa dosboot.pif
file that was created. This will be the icon that says
.Pa dosboot
with the MS-DOS logo.
Choose ``rename'' and change the name to
.Pa GoNetBSD .
.Pp
Right click this newly-renamed icon again and select ``Properties''.
Click to the ``Program'' tab. Edit the first text field to
``GoNetBSD''. Edit the ``Cmd line'' text field to read
.Dq Pa C:\eNetBSD\eGoNetBSD.BAT .
Ensure the ``Batch file'' field is blank.
Click on the ``Advanced'' button. Make sure ``MS-DOS Mode'' is checked.
Uncheck the ``Warn before entering MS-DOS Mode'' checkbox if you intend
to use the GoNetBSD script from another program, such as the Microsoft
Plus! System Agent. Click ``OK'' to exit the ``Advanced Program Settings''
window. Click ``OK'' to exit the ``Properties'' window.
.Pp
Now you can click the GoNetBSD.BAT icon to boot into
.Nx .
.Sh MICROSOFT PLUS! SYSTEM AGENT
You may also use GoNetBSD.BAT from other programs. For example, it
could be scheduled to run under the System Agent (similar to the way
Scandisk is invoked, for example) to have the computer automatically
switch itself to
.Nx
at certain times. In this event, it is
necessary to uncheck the ``Warn before entering MS-DOS Mode'' setting as
described above.
.Pp
To set up GoNetBSD to run under System Agent, follow these steps. First,
double click the System Agent icon on the taskbar tray. This will open
the System Agent window. Select ``Schedule a New Program'' from the
``Program'' menu. In the ``Program'' text field, enter the complete path
to the GoNetBSD batch file, for example
.Dq C:\eNetBSD\eGoNetBSD.BAT .
In the ``Description'' text field, enter a descriptive name for the
scheduled event, such as ``Reboot system under NetBSD''.
.Pp
Now click the ``When to Run program'' and select the time schedule for
the switch to
.Nx .
It is advisable to use the ``Wait until I haven't
used my computer for...'' feature to prevent the switch if someone is
actively using windows at the time the switch is to occur. Now click on
the ``Advanced'' button, and set a deadline that is shortly after (say,
two minutes) the start time. If you return from
.Nx
before the
deadline, System Agent will believe that the program did not complete
successfully, and switch you back to
.Nx .
Setting a very short deadline will prevent this.
.Pp
Now click ``OK'' in that window and the previous window to get back to
the System Agent main window, and then close System Agent. Your system
will now automatically switch to
.Nx
at the specified time or times.
.Pp
If you wish to have
.Nx
reboot to Windows after some amount of time,
the
.Xr cron 8
or
.Xr at 1
programs in conjunction with
.Xr reboot 8
or
.Xr shutdown 8
may be useful.
.Sh SEE ALSO
.Xr at 1 ,
.Xr crontab 1 ,
.Xr ftp 1 ,
.Xr cron 8 ,
.Xr dosboot 8 ,
.Xr mount_msdos 8 ,
.Xr reboot 8 ,
.Xr shutdown 8