w95boot(8) - NetBSD Manual Pages

W95BOOT(8)            NetBSD/i386 System Manager's Manual           W95BOOT(8)


NAME
w95boot -- procedure for booting NetBSD/i386 from Windows 95
DESCRIPTION
dosboot(8) is a program that can boot NetBSD 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 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 NetBSD. This manual page describes how to set up Windows to boot NetBSD, 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 NetBSD were the default, you could simply use the Reboot option of the Windows shutdown menu. Begin by creating the directory C:\NetBSD 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 DOSBOOT.COM, which can be found on your NetBSD system as /usr/mdec/dosboot.com. You can use ftp(1) or the msdosfs file system (see mount_msdos(8)) to transfer the file from NetBSD to Windows. Next create the script GoNetBSD.BAT in that directory, containing the following lines: @ECHO OFF IF EXIST C:\NetBSD\BOOTED GOTO towin ECHO >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 >C:\NetBSD\Y CHOICE /C+ /N /T+,5 C:\WINDOWS\WIN.COM <Y Now, double click the icon for the 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''. Now right-click the dosboot.pif file that was created. This will be the icon that says dosboot with the MS-DOS logo. Choose ``rename'' and change the name to GoNetBSD. 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 ``C:\NetBSD\GoNetBSD.BAT''. Ensure the ``Batch file'' field is blank. Click on the ``Advanced'' but- ton. 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. Now you can click the GoNetBSD.BAT icon to boot into NetBSD. 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 NetBSD at certain times. In this event, it is necessary to uncheck the ``Warn before entering MS-DOS Mode'' setting as described above. 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 ``C:\NetBSD\GoNetBSD.BAT''. In the ``Description'' text field, enter a descriptive name for the sched- uled event, such as ``Reboot system under NetBSD''. Now click the ``When to Run program'' and select the time schedule for the switch to NetBSD. 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 NetBSD before the dead- line, System Agent will believe that the program did not complete suc- cessfully, and switch you back to NetBSD. Setting a very short deadline will prevent this. 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 NetBSD at the specified time or times. If you wish to have NetBSD reboot to Windows after some amount of time, the cron(8) or at(1) programs in conjunction with reboot(8) or shutdown(8) may be useful.
SEE ALSO
at(1), crontab(1), ftp(1), cron(8), dosboot(8), mount_msdos(8), reboot(8), shutdown(8) NetBSD 3.1.1 December 7, 1997 NetBSD 3.1.1

Powered by man-cgi (2024-08-26). Maintained for NetBSD by Kimmo Suominen. Based on man-cgi by Panagiotis Christias.