Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > by-pkgid > 5ae6a2e3416d2e2f9756d0910c807f6f > files > 113

howto-sgml-en-2006-5mdv2010.0.noarch.rpm

<!DOCTYPE LINUXDOC SYSTEM>

<ARTICLE>
<TITLE>The Loadlin+Win95/98/ME mini-HOWTO
<AUTHOR>Authored by: Chris Fischer, <HTMLURL
URL="mailto:protek@firstlinux.net" NAME="protek@firstlinux.net">
<DATE>v1.5.2, 21 Feb 2001

<ABSTRACT>This document describes how to use Loadlin with Windows 95/98/ME to
boot to Linux.</ABSTRACT>

<TOC>
	
<SECT>Introduction
<P>
	This document describes a simple three step procedure for using Loadlin
	to dual boot between Linux and Windows 95/98/ME. If you prefer to use
	the LILO boot manager, please consult the <HTMLURL
	URL="http://metalab.unc.edu/LDP/HOWTO/mini/Linux+Win95.html"
	NAME="Linux+Win95 Mini-HOWTO">.
	
<P>
	This version of this mini-HOWTO has been completely rewritten with
	major differences from the previous version (1.4.6). The following
	highlight the major differences:
	
<ITEMIZE>
	<ITEM>
	Name change. The Loadlin+Win95/98/ME mini-HOWTO was formerly known as "The
	Loadlin+Win95 mini-HOWTO. The change was made to more accurately
	reflect the topic covered herein.</ITEM></ITEMIZE>
<ITEMIZE>
	<ITEM>
	The focus has changed from Win95 to Win98, and as a result this
	mini-HOWTO is simpler and easier to follow. Microsoft made some changes
	in the way Windows boots in Win98, which has made most of the dual boot
	methods for Win95 incompatable with Win98. If you still wish to see the
	Win95 specific mini-HOWTO you can view it 
	<HTMLURL URL="http://www.eskimo.com/~praxis/" NAME="here."> </ITEM>
	</ITEMIZE>
<ITEMIZE>
	<ITEM>
	Change in copyright status from version 1.4.6</ITEM></ITEMIZE>

<SECT1>Copyright
<P>

	Copyright (c) 1997-2001 Protek Computer Solutions. Permission is
	granted to copy, distribute and/or modify this document under the terms
	of the <HTMLURL URL="http://www.gnu.org/copyleft/fdl.html#SEC1"
	NAME="GNU Free Documentation License">, Version 1.1 or any later
	version published by the Free Software Foundation; with with the
	Invariant Sections being only "The Loadlin+Win95/98/ME mini-HOWTO".
 

<SECT1>New Versions Of This Document
<P>
	This mini-HOWTO is posted first at <URL
	URL="http://www.eskimo.com/~praxis" NAME="The Linux+Windows 95
	Reference Page">, so check there to make sure you have the most recent
	revision of this mini-HOWTO.

<SECT1>Feedback
<P>
	Questions, comments, and suggestions are welcome. I am always looking
	for ways to improve and expand this mini-HOWTO. I rely heavily on
	feedback to make improvements, and will do my best to be prompt
	with a helpful response. I can be reached at <HTMLURL
	URL="mailto:protek@firstlinux.net" NAME="protek@firstlinux.net">.

<SECT1>Disclaimer
<P>
	Every attempt has been made to ensure that the information presented
	in this mini-HOWTO is safe and accurate. However, this information
	is given without any warranty, either expressed or implied, as to its
	suitability for a particular use. It is generally considered a
	GoodThing(TM) to make backups of your system files before changing
	system configurations and/or files. I suggest you take this precaution
	"just in case".

<SECT>About Loadlin
<P>

<SECT1>What is Loadlin?
<P>
	Loadlin is a simple DOS based utility that loads the Linux kernel into
	memory from DOS. Loadlin was written by <URL 
	URL="http://elserv.ffm.fgan.de/~lermen/" NAME="Hans Lermen">. See the
	<URL URL="http://elserv.ffm.fgan.de/~lermen/manual.txt"
	NAME="Loadlin-1.6 User's Guide"> for further details about Loadlin's
	features and how to use Loadlin.

<SECT>IMPORTANT: Preliminary Information and Setup
<P>

<SECT1>Windows ME Users
<P>
	Before your read any further, I should mention that this mini-howto
	has some limitations with Windows ME. Based on feedback from Windows ME
	users, the menuing system described in the next section will
	only work from a Windows boot floppy instead of from the hard drive.
	Thanks to Olivier Guichard for pointing me to the relevant <URL
	URL="http://support.microsoft.com/support/kb/articles/Q274/6/46.ASP"
	NAME="Microsoft article">.
<P>
	Note that only the <TT>config.sys</TT> and <TT>autoexec.bat</TT> files
	need to be on the floppy disk. All other files mentioned may reside on
	the hard drive.
<P>
	If booting from a floppy is not an option for you, then please see the 
	<REF ID="FAQ" NAME="FAQ"> section for alternatives to LILO and Loadlin.
	
<P>
	Any Windows ME users who can find a better way than using a floppy,
	please <HTMLURL
	URL="mailto:protek@firstlinux.net" NAME="let me know"> your solution
	so I can include it in this mini-howto.

<SECT1>Things that are assumed:
<P>
<ITEMIZE>
    	<ITEM>You have successfully installed Windows 95/98/ME.
        <ITEM>Windows 95/98/ME is installed on Drive C.
        <ITEM>You have successfully installed Linux.
        <ITEM>You know what partition Linux is installed on. 
        <ITEM>LILO is NOT installed on your hard drive.

</ITEMIZE>

<SECT1>Items you need before you start:
<P>
<ITEMIZE>
 	<ITEM>The Loadlin.exe program file
 	<ITEM>Your kernel image file, usually bzImage or vmlinuz. (See the <REF
	ID="FAQ" NAME="FAQ"> for info).
</ITEMIZE>

<SECT>Getting started:
<P>

<SECT1>
Step One:

<P>
Edit (or create) <TT>config.sys</TT> on the root of Drive C. The contents should
be similar to the following:

<TSCREEN><CODE>
[menu]
menuitem=Linux, Mandrake Linux 7.2
menuitem=Win98, Windows 98
menucolor=15,1
menudefault=Win98, 10

[linux]

[win98]

</CODE></TSCREEN>

If your system already has a <TT>config.sys</TT> file, put those contents under
the <TT>[win98]</TT> section. The <TT>[linux]</TT> section is left blank
intentionally.


<SECT1>
Step Two:
<P>

Edit (or create) <TT>autoexec.bat</TT> on the root of Drive C. The contents
should be similar to the following:

<TSCREEN><CODE>
goto %config%

:linux
call c:\linux.bat

:win98 
</CODE></TSCREEN>

As above, if you aready have an <TT>autoexec.bat</TT> file, put those contents
under the <TT>:win98</TT> section.

<SECT1>

Step Three:

<P>
	Create a file called: <TT>linux.bat</TT>. Putting it in the root of
	Drive C is as good as place as any (but it can go anywhere so long
	as you reference the	path or location). The contents should be
	similar to the following:

<TSCREEN>
<CODE>
@echo off
c:\loadlin c:\vmlinuz root=/dev/hda3 ro 
</CODE></TSCREEN>

The above example assumes that <TT>loadlin.exe</TT> and <TT>vmlinuz</TT> are
located in the root of Drive C (or C:\) and that linux is installed on the
/dev/hda3 partition. Your configuration may be different.

<P>
	The important thing here is to make sure that loadlin and your linux
	kernel file are properly referenced. Finished!

<P>
	That should work for you, as that is how I have things set up on my
	system, which dual boots with Win98.

<SECT>Frequently Asked Questions:<LABEL ID="FAQ">
<P>
<SECT1>Where can I find more information on using Loadlin?<LABEL ID="Section 4.1">
<p>
<ITEMIZE>
	<ITEM>Loadlin can be found on your favorite distibution's installation
	CD. Just do a search for 'loadlin'.</ITEMIZE>

<ITEMIZE>
	<ITEM>The Loadlin-1.6 User's Guide is available for download at: 
</ITEMIZE>

<TSCREEN>
	<URL URL="http://elserv.ffm.fgan.de/~lermen/manual.txt"
	NAME="http://elserv.ffm.fgan.de/~lermen/manual.txt">
</TSCREEN>
<P> or
<TSCREEN>
	<HTMLURL URL="ftp://ftp.eskimo.com/u/p/praxis/manual.txt" 
	NAME="ftp://ftp.eskimo.com/u/p/praxis/manual.txt">
</TSCREEN>

<ITEMIZE>
	<ITEM>You might also try visiting the <URL 
	URL="http://elserv.ffm.fgan.de/~lermen/" NAME="Loadlin Home Page">
</ITEMIZE>

<ITEMIZE>
	<ITEM>Additional information is available at:
</ITEMIZE>

<TSCREEN>
	<HTMLURL
	URL="http://metalab.unc.edu/LDP/HOWTO/BootPrompt-HOWTO-2.html#ss2.2"
	NAME="http://metalab.unc.edu/LDP/HOWTO/BootPrompt-HOWTO-2.html#ss2.2">
</TSCREEN>

<SECT1>I am not sure what partition Linux is installed on. How do I find out?
<P>
<ITEMIZE>
	<ITEM>At a Linux shell prompt, run the <TT/df/ utility. If you see a
	line with <TT>/boot</TT>, then it will be quite obvious. If you do not
	see a line with <TT>/boot</TT>, then look on the line with a single
	"<TT>/</TT>".
</ITEMIZE>

<SECT1>Where do I find the kernel image file and how do I copy it to my MS-DOS 
partition?
<P>
<ITEMIZE>
	<ITEM>The kernel image file is usually called <TT>vmlinuz</TT> and
	should be located in the '/boot' directory. Often <TT>vmlinuz</TT> is a
	symbolic link to the actual kernel. If all else fails type:

<TSCREEN>

	<CODE>
	find / -name vmlinuz*</CODE>
</TSCREEN>

	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.
<P>
	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.
<P>
	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:

<TSCREEN>
	<CODE>

	mount /dev/fd0 /mnt/floppy</CODE>
</TSCREEN>

	at a Linux shell prompt. Then change to the directory your kernel image
	file is in and type:

<TSCREEN>
	<CODE>

	cp vmlinuz /mnt/floppy</CODE>
</TSCREEN>

	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.

<P>
	Alternatively, if you have the <TT>mtools</TT> utilities you could
	type:
<P>	
<TSCREEN>
	<CODE>
	
	mcopy vmlinuz a:</CODE>
</TSCREEN>
<P>
</ITEMIZE>

<SECT1>Does it matter if I install Linux or Windows 95/98/ME first?
<P>
<ITEMIZE>
	<ITEM>Technically no. However, it would be <em>much</em> simpler to
	install Windows 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.
</ITEMIZE>

<SECT1>I currently have LILO installed, but I want to use Loadlin instead. How
do I remove LILO?
<P>
<ITEMIZE>
        <ITEM>You will need to restore the Win95 MBR (Master Boot Record) that
	LILO overwrote when you installed LILO. At a DOS prompt type: </ITEMIZE>
<TSCREEN>
        <CODE>

        fdisk /mbr</CODE>
</TSCREEN>

<SECT1>What if I already dual boot between Windows 95 and Windows 3.x, and I
want to boot to Linux using this method?
<P>
 <ITEMIZE>
	<ITEM>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).
</ITEMIZE>

<SECT1>Is it possible to initiate Linux from the Windows 95/98/ME desktop?
<P>
<ITEMIZE>
	<ITEM>Yes. First, create a batch file called "linux.bat", for example.
	Edit the file to contain a Loadlin command such as:</ITEMIZE>

<TSCREEN>
	<CODE>

	loadlin f:\vmlinuz root=/dev/hdc2 ro</CODE>
</TSCREEN>

	Now save the file on your Windows desktop. 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.
<P>
	<BF/NOTE:/ You must be in MS-DOS mode in order to use Loadlin. Please
	see the manual.txt file mentioned in <REF ID="Section 4.1" 
	NAME="Section 4.1"> of this <REF ID="FAQ" NAME="FAQ"> for more 
	information.


<SECT1>Where can I get a plain text version of this document?
<P>
<ITEMIZE>
	<ITEM>You can get a plain text version of this document at:
<TSCREEN>
	<HTMLURL URL="ftp://ftp.eskimo.com/u/p/praxis/loadlin.txt"
	NAME="ftp://ftp.eskimo.com/u/p/praxis/loadlin.txt">
</TSCREEN>
</ITEMIZE>

<SECT1>Is Loadlin the only alternative to LILO?
<P>
<ITEMIZE>
	<ITEM>No. There are other utilities you could use for dual booting:
<TSCREEN>
	<HTMLURL URL="http://www.gnu.org/software/grub/grub.html"
	NAME="GRUB">: The GNU GRand Unified Bootloader
</TSCREEN>
<TSCREEN>
	<HTMLURL URL="http://www.xosl.org/"
	NAME="XOSL">: Extended Operating System Loader
</TSCREEN>
<TSCREEN>
	<HTMLURL URL="http://freshmeat.net/search/?q=boot+loader"
	NAME="Other Bootloaders and Related Links">
</TSCREEN>
</ITEMIZE>

<SECT>Internationalization
<P>
	Currently there is an <URL
	URL="http://www.eskimo.com/~praxis/Loadlin+Win95-98-ME-Italian.html"
	NAME="Italian translation"> of version 1.5.0 of this mini-HOWTO,
	translated by <HTMLURL URL="mailto:mmartiradonna@madeinlinux.com" 
	NAME="Michele Martiradonna">.
<P>	
	Any effort to translate this mini-HOWTO into other
	languages will be greatly appreciated. If you are interested in taking 
	on such a task, please e-mail me at: <HTMLURL
	URL="mailto:protek@firstlinux.net" NAME="protek@firstlinux.net">.
	
</ARTICLE>