This document describes how to easily use a combination of Windows 95's Boot Menu and Loadlin.exe to autoboot Linux using the F4 Function Key. This procedure should work with Windows 95 versions 4.00.950 and 4.00.950a, and all versions of Linux that support Loadlin. If you prefer to use the LILO boot manager, please consult the Linux+Win95 Mini-HOWTO.
This mini-HOWTO is posted first at The Linux+Windows 95 Reference Page, so check there to make sure you have the most recent revision of this mini-HOWTO.
** A Special Note for Windows 95 OSR2 (version 4.00.950b) users: **
Do NOT attempt dual booting with Windows 95 without first consulting the Windows 95 OSR2 FAQ. The FAQ also contains a great deal of information regarding FAT32. In a nutshell, if you have OSR2 and are using a FAT16 file system, you can still dual boot using the F4 Function Key.
NOTE: If you have Windows 95 OSR2, and are using a FAT32 file system, then the dual booting methods in this mini-HOWTO will not work and should not be attempted.
However, there are a couple of alternate methods you can use to automate booting Linux at startup, which are discussed in Section 9.
NOTE: If your hard drive already contains the autoexec.dos, config.dos, io.dos, msdos.dos, and command.dos files, then you will not need the floppy. You can check by typing: dir and dir /ah at the root of Drive C. Also, if you installed the Upgrade version of Windows 95, then it is likely that you have them.
NOTE: If you have Windows 95 version 4.00.950b, make certain you are not using the FAT32 file system. Double click the My Computer icon, then right click the Drive C icon. Left click on Properties. On the General tab, the "Type:" line will indicate whether or not you have a FAT32 file system. If you are using the FAT32 file system, then go directly to Section 9.Otherwise, continue with letter B.
NOTE: If your hard drive already contains the *.dos files mentioned in the "NOTE:" of section 3A, then skip to the "NOTE:" between letters F and G. Otherwise, continue with letter D.
NOTE: If you do not have Windows 95 OSR2 (version 4.00.950b), please skip Section G.
NOTE: If you are using a DOS 6.x boot disk skip to section 5, otherwise continue with letter H.
Loadlin DriveLetter:\LinuxKernelFile root=/dev/LinuxBootPartition ro
Loadlin f:\vmlinuz root=/dev/hdc2 ro
NOTE: The kernel, as well as the Loadlin.exe, file may be anywhere on your hard drive as long as you reference the correct path. For example, if your kernel file was located in the directory e:\linux\kernels and Loadlin.exe was located in the directory c:\utils, you would use:
c:\utils\loadlin e:\linux\kernels\vmlinuz root=/dev/hdc2 ro
Please skip section 5 and go to section 6.
shell=loadlin.exe LinuxKernelFile root=/dev/LinuxBootPartition ro
shell=f:\loadlin.exe f:\vmlinuz root=/dev/hdc2 ro
NOTE: The loadlin and kernel file may be anywhere on your hard drive as long as you reference the correct path. For example, if your loadlin file was in the directory f:\utils and the kernel file was located in the directory e:\linux\kernels you would use:
shell=f:\utils\loadlin.exe e:\linux\kernels\vmlinuz root=/dev/hdc2 ro
[Options] BootMulti=1
Now all you have to do is reboot (Don't forget to remove the floppy disk). When you see "Starting Windows 95...", press the F4 Function Key and Linux should boot right up.
Windows 95 has a built in Boot Menu. By default you do not see it at startup (although you can change that if you wish), but you can get to it by pressing the F8 Function Key when you see "Starting Windows 95...". On the menu you will see several options. The last option is "Previous version of MS-DOS". Instead of pressing F8 and then selecting "Previous version of MS-DOS", you can use the F4 shortcut by pressing F4 when "Starting Windows 95..." appears on the screen. When Windows 95 boots to the previous version of MS-DOS, it uses the files that end in the .dos file extension. This is why it is important to have a 0K Config.dos file if you are initiating Linux from the Autoexec.dos file. If Windows 95 does not find the files with a .dos extension while trying to boot the previous operating system, it will load the Windows 95 startup files. Therefore, if you do not have a Config.dos file, Windows 95 will load all the drivers in your Config.sys file. While this will not prevent Linux from loading, it will take longer. Having a 0K Config.dos file prevents Windows 95 from reading your Config.sys file while booting to the previous version of MS-DOS.
This section will work for all versions of Windows 95 to date, regardless of whether you have a FAT32 file system. There are two methods I will discuss in this section. First, I'll start with the simplest.
This method uses the Autoexec.bat file to call (or execute) another batch file named Linux.bat, during boot up.
@echo off cls echo. echo. echo. echo. choice /t:y,5 "Do you wish to boot Linux? " if errorlevel 2 goto End c:\loadlin c:\vmlinuz root=/dev/hdc2 ro :End
NOTE: You will have to modify the line that boots Linux to match your configuration. Please see Section 4.I for examples of how to configure Loadlin to boot to Linux.
call c:\linux
call c:\batch\linux
This method is a bit more involved, but offers the greatest flexibility. What this method does it create your own custom boot menu, though it does not replace the Windows 95 boot menu. You will need a Config.sys and an Autoexec.bat file.
[menu] menuitem=Linux, Boot to Linux (This defines a Menu Block and gives it a description). menuitem=Win95, Boot to Windows 95 menucolor=15,1 (This gives a blue background with bright white text) menudefault=Linux, 15 (This sets the default menuitem and waits up to 15 seconds for input).[linux] shell=f:\loadlin.exe f:\vmlinuz root=/dev/hdc2 ro (Please see Section 5 for examples and syntax).[win95] (Include the normal contents of your config.sys file here. If you did not have a config.sys file before now, then leave this section blank).
goto %config%:linux (Leave this area blank. It's just here because it was defined in Config.sys).:win95 (Include the normal contents of your autoexec.bat file here. If you did not have an autoexec.bat file before now, then leave this section blank).
A: The Slackware 96 CD contains a file named loadlin.tgz in the \slackware\A5 directory. Unarchive the file and look in the \docs directory for a file named manual.txt. I do not know about earlier versions of Slackware.
The RedHat 4.2 CD contains a file named loadlin16.tgz in the \dosutils directory. Unarchive the file and look in the \docs directory for a file named manual.txt. RedHat 4.1 does not seem to have this archive. The manual.txt is also available for download at:
Additional info. is available at:
http://sunsite.unc.edu/LDP/HOWTO/BootPrompt-HOWTO-2.html#ss2.2
A: At a Linux shell prompt, run the fdisk utility and press "p". From there you should be able to tell. If you need additional help using fdisk, please consult the man pages.
A: To find your linux kernel file type:
find / -name vmlinuz
at a Linux shell prompt. This will search all Linux partitions for the vmlinuz file. If you have multiple vmlinuz files, then make sure you use the correct one. If you are not sure, then the safest bet would be to use the most recent one.
To copy your linux kernel file to your DOS partition, you need to make your DOS partition visible to Linux, then mount the partition if it is not already. Generally, this should have been set up when you installed Linux. All you need to do next is change to the directory the vmlinuz file is in and copy it over to DOS using the cp command.
However, if Linux was not set up to recognize your DOS partition, then copy vmlinuz to a floppy. Take any DOS formatted floppy (with enough disk space to hold your kernel image file) and insert it into your floppy drive. Type:
mount /dev/fd0 /tmp
at a Linux shell prompt. Then change to the directory your kernel image file is in and type:
cp vmlinuz /tmp
This will copy vmlinuz to your floppy disk and it will be readable by DOS. Shutdown Linux, boot to DOS, then copy vmlinuz to whichever directory you choose. If you recompile your kernel, do not forget to copy the new kernel image file to your DOS partition. This will overwrite your old file, so it might be a good idea to rename the old file first just in case the new one does not work properly.
A: Technically no. However, it would be much simpler to install Win95 first. That way it is easier to setup Linux to recognize your DOS partition(s) as you can usually do this during the Linux installation..
A: Frankly, if you want to do this I would recommend using LILO. However, if you really do not want to use LILO, you will have to boot to Win 3.x first, then issue the Loadlin command. (Make sure Windows 3.x is NOT running, but that you are in DOS 5.0 or 6.x).
A: Yes. First create a batch file called linux.bat. For example, edit the file to contain a Loadlin command such as:
loadlin f:\vmlinuz root=/dev/hdc2 ro
Now save the file in the \windows\desktop directory. Next, right click on the Linux.bat icon, then left click on Properties. Now click on the Program tab, then click on the Advanced button. Click on the box next to MS-DOS mode and make sure the box next to "Warn before entering MS-DOS mode is checked". Click OK, then click on OK again. Now when you double click on the Linux icon, a warning box will appear before going into MS-DOS mode. If you click on Yes, then Windows enters MS-DOS mode and executes the Linux.bat file.
NOTE: You must be in MS-DOS mode in order to use Loadlin. Please see the manual.txt file mentioned in question A of this FAQ for more information.
A:You can get a plain text version of this document at:
A special thanks to Fred Harris and Norm Jacobowitz for helping me sort out the Windows 95 OSR2 issues and for helping me improve this mini-HOWTO.
Questions, comments, and suggestions are welcome.
Contact information:
Chris Fischer
Protek Computer Solutions
protek@brigadoon.com or
praxis@eskimo.com
Copyright © 1997 Protek Computer Solutions.