old-www/LDP/LG/issue38/veselosky.html

334 lines
16 KiB
HTML

<!--startcut ==========================================================-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<title>Windows/Linux Dual Boot LG #38</title>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#0000AF"
ALINK="#FF0000">
<!--endcut ============================================================-->
<H4>
"Linux Gazette...<I>making Linux just a little more fun!</I>"
</H4>
<P> <HR> <P>
<!--===================================================================-->
<font color="navy">A <I>Linux Journal</I> Preview</font>:
This article will appear in the April 1998 issue of <I>Linux
Journal</I> due out this month.
<P> <HR> <P>
<center>
<H1><font color="maroon">Windows/Linux Dual Boot</font></H1>
<H4>By <a href="mailto:vince@control-escape.com">Vince Veselosky</a></H4>
</center>
<P> <HR> <P>
So you've heard great things about Linux: faster, cheaper,
more efficient, more stable. Sounds good. You'd like to try
it out, but probably have a lot of time and data invested in Windows
and can't afford to be down while figuring out how to use
Linux for your daily tasks.
Windows and Linux can live comfortably on the same computer, even on
the same hard drive. The choice of operating system can be made
when you power on. This is commonly called a ``dual boot''
configuration, and one of the most common questions among new Linux users
is how to set it up.
<p>
My system is a Pentium II 400MHz with 128MB of RAM and an 11GB EIDE
(actually Ultra-DMA 33 ATAPI, for you hardware gurus) hard drive.
The hard drive had Windows 95 ``C'' on one big FAT32-formatted
C: drive, which is a typical factory configuration. I tested installs
of Red Hat Linux 5.1 and SuSE Linux 5.2.
<p>
Before starting, there are two terms you need to be familiar with:
<i>partition</i> and <i>file system</i>. The disk can be divided into smaller, separate
pieces which can belong to different owners. For dual booting, Windows
will own some and Linux will own others. The word ``partition''
does not refer to the wall; it refers to the separated space. Thus,
we say Windows is installed ``on'' the first partition.
The <i>file system</i> is a method of organization. Your hard drive can
have different file systems. The operating system provides the <i>directory
tree</i> (also referred to as ``the file system'')
as a catalog of available files. Every operating system has its
own type of file system, and other operating systems often don't
know how to read it. Lucky for us, Linux is a versatile operating system
and it does understand the file system used by Windows 95 and Windows 98.
<p>
<h3>Making Room for Linux</h3>
<p>
Most factory-installed Windows installations take up all the space
on your hard drive, leaving no room for installing Linux. The first and
most difficult thing we must do is clear some space where Linux can be
installed. Linux needs to have partitions of its own, but Windows does
not have the ability to resize partitions. Ordinarily, this would mean
you would have to delete your existing partition (and everything on it)
to make room on the drive and then create partitions of smaller sizes
and reinstall. You can still do this, but there is a better way.
<p>
<h3>What You Need</h3>
<p>
Most Linux distributions come with a special tool to allow you
to resize or divide hard drive partitions. Called FIPS, the First
(non-destructive) Interactive Partition Splitter, it is normally found on
your Linux CD in a directory called /dosutils. You will also need a blank,
formatted floppy disk to use as a boot disk. For most older Windows
installations, that should be all. However, if you have Windows 98 or a
recent version of Windows 95 with a large hard drive (bigger than 2GB),
you may need some additional tools if you are using the FAT32 file system.
<p>
To check what type of file system Windows is using, open Windows
Explorer, right click on the C: drive and choose Properties. If
you see ``File System: FAT32'' on the General tab, you will
need some additional tools to support this newer file system.
<p>
<h3>FAT32 Support Requirements</h3>
<p>
To adjust your partitions, you will need version 2.0 or higher of FIPS.
If the version included with your Linux distribution is older than this,
the latest version is available for download from the FIPS home page
at http://www.igd.fhg.de/~aschaefe/fips/. If you want to share files
between Windows and Linux (a good idea), you will also need to
have version 2.0.34 or higher of the Linux kernel. Table 1 is a list of
Linux distributions known to support FAT32. If your distribution does
not include support, you will need to upgrade the kernel. Upgrading a
kernel is beyond the scope of this article, so check the
documentation included with your distribution or your distributor's
web site for information about how to do that.
<p>
<h3>Table 1. Distributions with FAT32 Support</h3>
<table>
<tr>
<td>Distribution:</td>
<td>Earliest Version with FAT32 support</td>
</tr><tr>
<td>Red Hat Linux:</td>
<td>Version 5.1 (kernel 2.0.34)</td>
</tr><tr>
<td>SuSE Linux:</td>
<td>Version 5.3 (kernel 2.0.35)</td>
</tr><tr>
<td>Debian GNU/Linux:</td>
<td>Version 2.0 (kernel 2.0.34)</td>
</tr>
</table>
<h3>Preparing Your Drive</h3>
<p>
Before you can resize your Windows partition, a few steps must
be taken to ensure that the process goes smoothly. First, delete any
files from your hard drive that are not being used; for example, any old
files in the C:\windows\temp folder, and then empty your recycle
bin. Next, check your file system for errors using Scandisk, and compact
your hard drive using Defrag. I'll assume you Windows users know
how to do this. When running Scandisk, be sure to check the box next to
``Automatically Fix Errors''. Defragmentation consolidates
all your data at the ``front'' of the drive to make room at
the ``back'' of the drive for your new partition.
<p>
When both are finished, it would be wise to note how much space is
available on the disk. If this number is less than the amount required
to load Linux (check your distribution's documentation for space
requirements), you'll need to delete more files or uninstall some
software to make room.
<p>
<h3>Using FIPS</h3>
<p>
Before using FIPS, you <i>must</i> read the FIPS.DOC text file
which accompanies the program. The use of the program is not entirely
obvious, and you may need the background information the documentation
provides. Also, while running FIPS you should carefully read all the
messages it displays. They will provide valuable information on the
steps you will need to take next. Most importantly, FIPS comes with no
warranty. Although it has been used safely many times, there is
always the chance it could damage the data on your hard drive. If
you value your data, <i>back it up</i> before you begin.
<p>
For safety, create a DOS or Windows boot disk to work from. To do
this, click Start <tt>-></tt> Settings
<tt>-></tt> Control
Panel. Double click ``Add/Remove Programs'' and select the
tab called Startup Disk. Press the button and follow the instructions.
<p>
Next, copy the working files for FIPS to the floppy. The files FIPS.EXE,
RESTORRB.EXE and ERRORS.TXT are mandatory. You may also want to copy
the documentation files included with FIPS. When your data is backed
up, restart your computer and boot from the new floppy.
<p>
When you arrive at the <tt>A:></tt> prompt, type
<tt>FIPS</tt> and press enter. A warning will appear
about using FIPS in multitasking environments like Windows. Since we
booted from a floppy, we are safe, so press enter. FIPS
will analyze your existing partitions. It may pause for a long time at
``Checking FAT'' and ``Searching for Free Space'';
this is perfectly normal, so just wait. The bigger your hard drive,
the longer it will take. When FIPS is done with its analysis, it will
display the results. You may get a warning of something being wrong with your
FAT. If you read the message carefully, you will find that this is normal
with large hard drives and will not prevent FIPS from working properly.
<p>
FIPS will then demonstrate how it plans to split the existing partition
and you will have the opportunity to make changes. Do <i>not</i> just press
enter. By default, FIPS will take <i>all</i> of the available
free space for the new partition it creates, leaving your Windows
partition with no free space at all. Windows will not run if it has no
free drive space, so you <i>must</i> adjust the partitions. Use the up
and down arrow keys to make large changes (ten cylinders at a time) and
the left and right arrow keys for small adjustments (one cylinder at a
time). The size of the existing partition is shown on the left and the
size of your new empty partition is on the right. In the middle is the
cylinder number where the split will take place. I left about 1500MB
for my own Windows partition. Adjust yours according to your needs,
but I would recommend using at least 1024MB for Windows.
<p>
When you are satisfied, press enter. FIPS displays
information on the new partitions and asks permission to write
it to disk. Your hard drive has not been altered at this point. You
may choose to write this configuration to disk or re-edit the
partition table. On my machine, when I chose to re-edit I received
an error message that said FIPS couldn't find some files it needed.
If this happens to you, just press
<tt>ctrl-alt-delete</tt> to reboot from
the floppy and start over. This did not cause me any trouble.
<p>
When you choose to write the new partitions, FIPS will offer to make
a backup of your existing boot sector--you should definitely do
this. The backup file it creates is only 1KB in size and will be
invaluable if anything goes wrong.
<p>
After FIPS completes its work, it will display another message stating
that you should run scandisk on your old partition. I found that Windows
will sometimes miscalculate the used and free space on your drive
after using FIPS, and Scandisk will correct this problem. If you choose
to restore your original partition scheme using the RESTORRB utility,
you should run Scandisk after this as well.
<p>
After FIPS was done, I received another error. This one said ``Memory
Allocation Error, Unable to Load COMMAND.COM''. If you see this, just
press <tt>ctrl-alt-delete</tt>
to reboot and all is well. This should not affect your hard drive.
<p>
Finally, you may want to run the Windows FDISK program from your
floppy. This is not necessary, since Linux has its own fdisk program
for manipulating partitions. You will find that your hard drive now
contains two ``Primary Partitions'' (or ``Primary DOS
Partitions''). The second one was created by FIPS out of the free
space on your drive. For Linux installation, delete this second partition,
freeing up the space for allocating Linux partitions. (Be careful not
to delete the first one, where Windows lives.)
<p>
<h3>Linux Install Tips for Large Drives</h3>
<p>
Once you've made room for Linux on your drive with FIPS, you should
be able to install Linux by following the steps in the installation
guide that accompanied your Linux distribution. Here are a few tips
that should help you with the areas where dual booting might make
a difference.
<p>
<h3>Planning your Partitions</h3>
<p>
Both the Red Hat and SuSE installation guides have excellent chapters
on how to divide up your hard drive for use by Linux. Personally,
I favor the ``Keep It Simple'' principle, especially for
beginners. I let Windows keep the first partition, create a second
for the entire Linux install, a third for Linux swap space and
the fourth for my /home directory (where data is kept). Having /home
on a separate partition will make things much easier, if you ever have
to reinstall Linux. The size of each partition will depend on your
individual situation, but this should suffice for most folks. However,
if your hard drive is larger than 8GB, there is something else to
think about--LILO.
<p>
<h3>Booting with LILO</h3>
<p>
The usual and recommended method to boot into Linux is using LILO (the
LInux LOader). LILO can install itself in your boot sector and allows
you to choose which operating system you would like at boot time.
Due to a technical limitation, LILO is unable to read data
from the hard drive past the 1024th cylinder--the 8GB mark for modern
LBA (Logical Block Addressing) hard drives.
<p>
Does this mean you can't use the rest of your drive? Not at all. What
it does mean is that your <i>boot partitions</i> must all live <i>below</i> the
8GB mark, that is, below cylinder 1024. Thus, if you want Windows to
use the first 9GB of your fancy new 18GB drive, you won't be able
to use LILO to boot Linux. Because of this limitation, Red Hat's Disk
Druid tool for partitioning the hard drive will not allow you to create
your Linux boot partition past cylinder 1024. You can still create
the partitions using fdisk, but Red Hat setup will not install LILO
if you do.
<p>
<h3>Booting from Floppy</h3>
<p>
It is possible to avoid the entire problem of the 8GB barrier by booting
from a floppy disk. Although this may sound inefficient, it actually
works quite well. The kernel loads into memory from the floppy
disk and never accesses the floppy again, so loading the kernel is
slower; but after that, the system runs the same as if it had booted
from the hard drive. The Linux kernel has no difficulty accessing
the end of large hard drives, so it can still reach all the files
of your Linux installation.
<p>
The setup program for your distribution will almost certainly ask you to
create a boot floppy during installation. Even if you don't plan to
boot from floppy regularly, you should definitely make a boot disk.
If for some reason LILO fails to install or becomes corrupted, you
will have no other way to access the files on your Linux installation.
<p>
<h3>Booting with Loadlin</h3>
<p>
Loadlin is a program that runs under DOS (or Windows 95 in MSDOS mode).
It can load the Linux kernel into memory from the DOS partition. Because
it loads the Linux kernel from the hard drive, there is still a possibility
the 8GB barrier could cause problems, but only if your Windows
partition is larger than 8GB and is almost full. That's not likely
at the time of this writing, but who knows--the next release of Windows
might take up that much space by itself.
<p>
Frankly, I wouldn't recommend Loadlin to Linux novices because it can
be difficult to configure correctly. If you simply must use it,
an excellent Loadlin + Win95 Mini-HOWTO document available from the
Linux Documentation Project should get you up and running.
<p>
<h3>Conclusion</h3>
<p>
Giving Linux a try does not mean you have to buy a whole new computer
or even a new hard drive. With just a little extra effort, you can
run both Linux and Windows without losing any data or any productivity
while you learn Linux. I think you will find it is well worth
the effort.
<p><HR> <P>
<h3>Resources</h3>
<p>
The FIPS home page: http://www.igd.fhg.de/~aschaefe/fips/
<p>
The Linux Documentation Project: http://sunsite.unc.edu/LDP/
<p>
The Loadlin + Win95 Mini-HOWTO: http://sunsite.unc.edu/LDP/HOWTO/mini/Loadlin+Win95.html
<p>
The Linux + Win 95 Mini-HOWTO: http://sunsite.unc.edu/LDP/HOWTO/mini/Linux+Win95.html
<p>
Moving from MS Windows to Linux: http://www.geocities.com/SiliconValley/Grid/2272/
<P> <EM>Contact the author through his web site,
<A HREF="http://www.control-escape.com/">http://www.control-escape.com</A>.
<!--===================================================================-->
<P> <hr> <P>
<center><H5>Copyright &copy; 1999, Vince Veselosky <BR>
Published in Issue 38 of <i>Linux Gazette</i>, March 1999</H5></center>
<!--===================================================================-->
<P> <hr> <P>
<A HREF="./index.html"><IMG ALIGN=BOTTOM SRC="../gx/indexnew.gif"
ALT="[ TABLE OF CONTENTS ]"></A>
<A HREF="../index.html"><IMG ALIGN=BOTTOM SRC="../gx/homenew.gif"
ALT="[ FRONT PAGE ]"></A>
<A HREF="./kidd.html"><IMG SRC="../gx/back2.gif"
ALT=" Back "></A>
<A HREF="./lg_backpage38.html"><IMG SRC="../gx/fwd.gif" ALT=" Next "></A>
<P> <hr> <P>
<!--startcut ==========================================================-->
</BODY>
</HTML>
<!--endcut ============================================================-->