LDP/LDP/howto/linuxdoc/Linux+DOS+Win95+OS2.sgml

370 lines
16 KiB
Plaintext

<!doctype linuxdoc system>
<article>
<!-- Title information -->
<title>The Linux ``Linux-DOS-Win95-OS2'' mini-HOWTO
<author>Mike Harlan, <tt>r3mdh@raex.com</tt>
<date>v1.3.1, 11 November 1997
<abstract>
This document presents a procedure to make 4 operating systems co-exist on a single hard disk.
</abstract>
<!-- Table of contents -->
<toc>
<!-- Begin the document -->
<p>
<descrip>
<tag>Disclaimer:</tag>
Any damages inflicted on any machine by you as a result of
your reading of this HOWTO is still YOUR FAULT. When you read
about deleting partitions and formatting disks, be smart.
Realize that doing any of the above will result in loss of data.
So, BACKUP SOON, BACKUP OFTEN. This is your second-to-the-last warning.
<tag>Stuff to make the lawyers happy:</tag>
Unless otherwise stated, Linux HOWTO documents are copyrighted by
their respective authors. Linux HOWTO documents may be reproduced and
distributed in whole or in part, in any medium physical or electronic,
as long as this copyright notice is retained on all copies.
Commercial redistribution is allowed and encouraged&semi;
however, the author would like to be notified of any such distributions.
All translations, derivative works, or aggregate works incorporating
Linux HOWTO documents must be covered under this copyright notice.
That is, you may not produce a derivative work from a HOWTO
and impose additional restrictions on its distribution.
Exceptions to these rules may be granted under certain conditions&semi;
please contact the Linux HOWTO coordinator at the address given below.
In short, we wish to promote dissemination of this information through
as many channels as possible. However, we do wish to retain copyright
on the HOWTO documents, and would like to be notified of any plans to
redistribute the HOWTOs.
If you have any questions, please contact Tim Bynum,
the Linux HOWTO coordinator, at
<htmlurl url="mailto:linux-howto@sunsite.unc.edu"
name="linux-howto@sunsite.unc.edu">
via email.
<tag>Updates from v1.3:</tag>
<itemize>
<item>Updated my e-mail address.
My address has changed from
<htmlurl url="mailto:r3mdh@imperium.net"
name="r3mdh@imperium.net">
to
<htmlurl url="mailto:r3mdh@raex.com"
name="r3mdh@raex.com">.
</itemize>
<tag>Updates from v1.0:</tag>
<itemize>
<item>Updated my e-mail address.
My address has changed from
<htmlurl url="mailto:r3mdh@dax.cc.uakron.edu"
name="r3mdh@dax.cc.uakron.edu">
to
<htmlurl url="mailto:r3mdh@imperium.net"
name="r3mdh@imperium.net">.
</itemize>
</descrip>
</p>
<p>
Now...........on with the show!
</p>
<sect>Introduction
<p>
After many days of struggle and frustration,
I finally figured out how to accomplish what I wanted.
I have a 1.2GB HD and 16MB RAM PC. I wanted to have 4 operating systems
on my system: MSDOS v6.22, Windows 95, OS/2, and Linux.
Until now, I have found no Linux HOWTO to perform the task of getting
each and every one of these operating systems on one machine and still
have the ability to boot each (it is possible to write the OSs to different
partitions, but getting them to boot and not hang at the ``Starting MSDOS''
message, for example, is something that I had to figure out.
Well, after much trial and error,
I have come up with the following recipe to perform this feat:
</p>
<p>
Before I begin going through the procedure step-by-step,
let me first clue you in on what I eventually wish to accomplish:
<tscreen>
<verb>
<NAME> <SIZE> <LABEL> <PARTITION NUMBER>
---------------------------------------------------------------------
MSDOS v6.22 11MB P1 Primary Partition 1
---------------------------------------------------------------------
Windows '95 350MB P2 Primary Partition 2
---------------------------------------------------------------------
OS/2 Boot Manager 2MB P3 Primary Partition 3
---------------------------------------------------------------------
DOS/Win Data 511MB E1 Primary Partition 4
OS/2 Warp 3.0 127MB E2 Extended into 4 logical
Linux Slakware 3.2 Swap XMB E3 drives (sub-partitions)
Linux Slakware 3.2 Native 219-XMB E4 labeled E1-E4
---------------------------------------------------------------------
</verb>
</tscreen>
What does all of this mean? Well, let me talk you through it.
First, we need to use up all 4 partitions on our 1 harddrive.
Partitions 1 through 3 are PRIMARY partitions.
We will store MSDOS, Win95 and the OS/2 Boot Manager
(which inefficiently requires its OWN partition) on these partitions,
respectively. We then have 1 partition left.
But, we want to have a drive just for DOS/Win95 data
(this gives us a large place to dump all of those ZIP files
we so often download from the Internet as well as a place to store
Win95 programs and data that we don't have enough room for
on the Win95 partition),
OS/2, and Linux (both a Linux native as well as Linux swap partition).
</p>
<p>
Now, I've been getting a lot of grief through e-mail lately about
why I have a separate partition for Win95 and one for DOS
and one for Win95/DOS data.
Here's my answer: having separate Win95 and DOS partitions isn't for everyone.
Perhaps you don't even use DOS anymore.
Perhaps Windows '95 is your answer for any software written for a Microsoft
platform. Well, there are some people out there who still use DOS and
can't live without it. Whether it's because DOS can run 16-bit applications
faster and more efficient, or because the certain DOS program
that you may use won't run under a Windows environment
(the Gravis Ultrasound soundcard setup program comes to mind),
you simply MUST be able to boot into DOS from time to time.
This HOWTO was written with those people in mind.
If you still have difficulty swallowing the fact that the word
``MSDOS'' is included in this HOWTO, then feel free to sit down and write
a Linux-Win95-OS/2-only HOWTO. :)
</p>
<p>
Now, back to the diagram above.
Like I said, we have 1 partition to cram 4 things onto:
DOS/Win data, OS/2, and Linux native &amp; swap.
This can be done by creating what are called logical drives
(or logical partitions, depending on which book you read)
within the 1 primary partition.
When we create these logical drives within a primary partition,
we refer to this primary partition as an EXTENDED PARTITION
(because it is extended beyond the scope of a single,
primary partition and instead contains up to 3 subpartitions
(logical drives)). Confused? If so, you might want to read the OS/2 manual
about this topic. It will explain it better than I have here.
</p>
<p>
Now, you might be scratching your head saying
``he wants to cram 4 things onto that extended partition,
but he just got done saying we can only have 3 subpartitions to put them on!''
This is true, at least in MS-DOS's and OS/2's reasoning.
But, here one of the many powerful advantages to Linux comes to save the day.
Linux can create more than 3 subpartitions on an extended drive.
Just how many, I don't know. But, I know it can create at LEAST 4
(what we need). So, when we go through the steps of the installation
procedure below, keep in mind that when we create partitions using an MSDOS
or OS/2 program, we will only create 3 logical drives.
Then, when we go to Linux, we will split one of them into two.
Essentially, you can think of it as ``tricking'' MSDOS and OS/2
into seeing only 3 logical drives, but in reality (and to Linux),
there will be 4.
</p>
<sect>The Procedure
<p>
<descrip>
<tag>NOTE:</tag>
Numbers in parentheses were the number of megabytes
that I used on my 1.2GB harddrive.
</descrip>
Now, let's move on to the step-by-step procedure:
<enum>
<item>Run <tt>view.exe</tt> on the Linux Slakware CD
and create the Linux Boot and Linux Root floppies.
For some reason, the Linux bootstrap program calls the Root disk
the Ramdisk floppy. I'll refer to this disk from now on
as the Ramdisk (Root) floppy.
<item>Backup any information that you wish to keep to tape
(or whatever media you have available to you).
<item>Boot your original MSDOS installation floppy, disk 1.
<item>When ``<tt>Starting MSDOS</tt>'' appears,
press F5 to bypass <tt>config.sys</tt> and <tt>autoexec.bat</tt>.
<item>Run <tt>a:&bsol;fdisk.exe</tt>.
<item>Delete all partitions
(you have been warned:
DELETING / MODIFYING OF ANY PARTITION
WILL RESULT IN THE LOSS OF ALL DATA ON THE DISK!).
<item>Add an MSDOS primary partition. (11MB)
<item><tt>Format</tt> this partition.
<item>Run <tt>a:&bsol;setup.exe</tt> to install MSDOS on this partition.
<item>Boot OS/2.
<item>Select Advanced installation.
<item>Run <tt>FDISK</tt>.
(this will eventually popup for you if you run through
the OS/2 installation)
<item>Add 1 primary partition after the MSDOS one.
This will become our Windows 95 partition. (349MB)
<item>Add the Boot Manager to the next primary partition. (2MB)
<item>Add an extended partition.
<item>Add a logical drive to the extended partition.
This will become the data portion of our MSDOS system. (511MB)
<item>Add another logical drive to the extended partition.
This will become our OS/2 HPFS (``High Performance File System'')
partition. (127MB)
<item>Add 1 last logical drive to the extended partition
using the remaining space on the drive.
This will later become 2 partitions under Linux &mdash;
our swap partition and our native Linux partition.
But, since OS/2 (and DOS as well) can only write up to
6 partitions per drive (3 primary and 3 logical drives
housed within 1 extended partition), we have to create only one
at this time. And we DO have to create this partition.
Don't leave this as free space and expect Linux to be able
to create the two partitions. Due to the way that OS/2's FDISK works,
where you add your last logical drive to the extended partition
marks the END of the extended partition.
You can<bf>not</bf> add partitions beyond this point.
So, in other words, creating this one last logical drive serves
as a space-filler for Linux. Later we will delete this partition
and add 2 new ones in the space that it once took up.
<item>Add partitions 1, 2, and 5 to the Boot Manager.
<item>Make partition 5 installable.
Your <tt>FDISK</tt> screen should now look like this
(or something like this):
<tscreen>
<code>
FDISK
Disk 1
___________________________________________________________________________
Partition Information
Name Status Access FS Type MBytes
___________________________________________________________________________
MSDOS Bootable C: Primary FAT 11
WIN 95 Bootable : Primary FAT 350
Startable : Primary BOOT MANAGER 2
None D: Logical Unformatted 511
OS/2 Installable E: Logical FAT 127
None F: Logical Unformatted 219
</code>
</tscreen>
<item>Continue on with the OS/2 installation process.
<item>Reboot and select partition 2 (Windows 95) from the Boot Manager.
<item>When the missing operating system error pops up,
boot your MSDOS installation disk.
We selected this partition in order to ``hide'' the MSDOS partition.
OS/2's Boot Manager is a bit strange. For every bootable partition
you have (in our case, MSDOS and OS/2), you can have only one of
them visible at a time. What this means is that if you boot into
one partition, MSDOS for example, the other partition (Win95) is
invisible. The MSDOS partition and Win95 essentially SHARE a drive
letter. That's why under ``Access'' above, MSDOS has drive letter C
and Win95 has no drive letter. Under the current circumstances,
MSDOS is visible with drive letter C and Win95 is invisible with
no drive letter. If we were to boot Win95, the opposite would be true:
MSDOS would be invisible with no drive letter and Win95
would be visible with drive letter C.
<bf>An invisible drive cannot be accessed AT ALL.</bf>
If you wish to copy files between two drives
in which only one can be visible at one time, you must use a common
(non-bootable) drive to swap files.
In our case, the DOS/Win95 Data drive (drive D 511MB above)
will serve as this common drive. You might be asking
``Won't we eventually be booting Linux also?''.
The answer is yes, we will. But let's not get into that just yet.
<item>Install MSDOS to Partition 2
(we'll need this in order to install Windows 95).
<item>Boot Partition 2.
<item>Install Windows 95 to this partition (if you are running the upgrade
version of Win95, you may need to have your Win3.1 installation disk 1
ready to insert).
<item>Boot Partition 1.
<item>Format Partition 4.
<item>Restore DOS data from tape (if any) to partitions 1 and 4.
<item>Boot the Linux Boot Floppy.
<item>Follow up with the Linux Ramdisk (Root) floppy.
<item>When you log in as root and get to the <tt>&num;</tt> prompt,
type ``<tt>fdisk</tt>'' and press enter.
<item>Delete the last partition (the one we created in step 18).
<item>Add 1 16MB partition and tag it as filesystem type Linux Swap. (17MB)
<item>Add 1 last partition with the remaining cylinders on the disk and tag
this as filesystem type Linux native. (198MB)
<item>Write the changes to the boot sector and reboot.
<item>When you get to the <tt>&num;</tt> prompt again, run <tt>setup</tt>.
<item>Install Linux to the last partition.
<item>When you install LILO, be sure to install it to the root of the last
partition (NOT to the MBR, as you will destroy all of your previous
work in this HOWTO if you do so). Add only the last partition to
LILO and set the timer to zero. By doing this, when you select Linux
from the OS/2 Boot Manager, LILO will activate
and will then boot Linux from the logical drive on the extended
partition. Since Linux is the only partition
that we wish to activate from LILO, we don't need a timer on it
(unless you have more than one Kernel that you wish to load.
In this case, you may want to set the timer to something more
than 0 seconds).
<item>Activate the Linux swap partition
(refer to the Linux Installation and Getting Started Manual
by Matt Welsh for this).
<item>Boot OS/2.
<item>Run FDISK.
<item>Add Linux to the Boot Manager using the Linux NATIVE partition
(type <tt>83</tt> <bf>not</bf> <tt>82</tt>!).
</enum>
Your <tt>FDISK</tt> screen should now look like this (or something like this):
<tscreen>
<code>
FDISK
Disk 1
___________________________________________________________________________
Partition Information
Name Status Access FS Type MBytes
___________________________________________________________________________
MSDOS Bootable C: Primary FAT 11
WIN 95 Bootable : Primary FAT 350
Startable : Primary BOOT MANAGER 2
None D: Logical FAT 511
OS/2 Bootable E: Logical HPFS 127
None : Logical Type 82 17
Linux Bootable : Logical Type 83 198
</code>
</tscreen>
...And you're done!
</p>
<p>
Send any comments/suggestions/problems (as a last resort, please!)
to me at
<htmlurl url="mailto:r3mdh@raex.com" name="r3mdh@raex.com">.
</p>
<p>
Mike Harlan,
11 NOV 1997
</p>
</article>