home *** CD-ROM | disk | FTP | other *** search
/ Freelog Special Edition 1: Linux / CD1.iso / doc / HOWTO / mini / Linux+DOS+Win95+OS2 < prev    next >
Text File  |  1998-10-14  |  16KB  |  463 lines

  1.   The Linux ``Linux-DOS-Win95-OS2'' mini-HOWTO
  2.   Mike Harlan, r3mdh@raex.com
  3.   v1.3.1, 11 November 1997
  4.  
  5.   This document presents a procedure to make 4 operating systems co-
  6.   exist on a single hard disk.
  7.   ______________________________________________________________________
  8.  
  9.   Table of Contents
  10.  
  11.  
  12.   1. Introduction
  13.  
  14.   2. The Procedure
  15.  
  16.  
  17.  
  18.   ______________________________________________________________________
  19.  
  20.  
  21.      Disclaimer:
  22.         Any damages inflicted on any machine by you as a result of your
  23.         reading of this HOWTO is still YOUR FAULT. When you read about
  24.         deleting partitions and formatting disks, be smart.  Realize
  25.         that doing any of the above will result in loss of data.  So,
  26.         BACKUP SOON, BACKUP OFTEN.  This is your second-to-the-last
  27.         warning.
  28.  
  29.  
  30.      Stuff to make the lawyers happy:
  31.         Unless otherwise stated, Linux HOWTO documents are copyrighted
  32.         by their respective authors. Linux HOWTO documents may be
  33.         reproduced and distributed in whole or in part, in any medium
  34.         physical or electronic, as long as this copyright notice is
  35.         retained on all copies.  Commercial redistribution is allowed
  36.         and encouraged; however, the author would like to be notified of
  37.         any such distributions.
  38.  
  39.         All translations, derivative works, or aggregate works
  40.         incorporating Linux HOWTO documents must be covered under this
  41.         copyright notice.  That is, you may not produce a derivative
  42.         work from a HOWTO and impose additional restrictions on its
  43.         distribution.  Exceptions to these rules may be granted under
  44.         certain conditions; please contact the Linux HOWTO coordinator
  45.         at the address given below.
  46.  
  47.         In short, we wish to promote dissemination of this information
  48.         through as many channels as possible. However, we do wish to
  49.         retain copyright on the HOWTO documents, and would like to be
  50.         notified of any plans to redistribute the HOWTOs.
  51.  
  52.         If you have any questions, please contact Tim Bynum, the Linux
  53.         HOWTO coordinator, at linux-howto@sunsite.unc.edu via email.
  54.  
  55.  
  56.      Updates from v1.3:
  57.  
  58.      o  Updated my e-mail address.  My address has changed from
  59.         r3mdh@imperium.net to r3mdh@raex.com.
  60.  
  61.      Updates from v1.0:
  62.  
  63.      o  Updated my e-mail address.  My address has changed from
  64.         r3mdh@dax.cc.uakron.edu to r3mdh@imperium.net.
  65.  
  66.  
  67.   Now...........on with the show!
  68.  
  69.   1.  Introduction
  70.  
  71.   After many days of struggle and frustration, I finally figured out how
  72.   to accomplish what I wanted.  I have a 1.2GB HD and 16MB RAM PC.  I
  73.   wanted to have 4 operating systems on my system:  MSDOS v6.22, Windows
  74.   95, OS/2, and Linux.  Until now, I have found no Linux HOWTO to
  75.   perform the task of getting each and every one of these operating
  76.   systems on one machine and still have the ability to boot each (it is
  77.   possible to write the OSs to different partitions, but getting them to
  78.   boot and not hang at the ``Starting MSDOS'' message, for example, is
  79.   something that I had to figure out.  Well, after much trial and error,
  80.   I have come up with the following recipe to perform this feat:
  81.  
  82.   Before I begin going through the procedure step-by-step, let me first
  83.   clue you in on what I eventually wish to accomplish:
  84.  
  85.  
  86.        <NAME>                      <SIZE>   <LABEL>  <PARTITION NUMBER>
  87.        ---------------------------------------------------------------------
  88.        MSDOS v6.22                   11MB   P1       Primary Partition 1
  89.        ---------------------------------------------------------------------
  90.        Windows '95                  350MB   P2       Primary Partition 2
  91.        ---------------------------------------------------------------------
  92.        OS/2 Boot Manager              2MB   P3       Primary Partition 3
  93.        ---------------------------------------------------------------------
  94.        DOS/Win Data                 511MB   E1       Primary Partition 4
  95.        OS/2 Warp 3.0                127MB   E2       Extended into 4 logical
  96.        Linux Slakware 3.2 Swap        XMB   E3       drives (sub-partitions)
  97.        Linux Slakware 3.2 Native  219-XMB   E4       labeled E1-E4
  98.        ---------------------------------------------------------------------
  99.  
  100.  
  101.  
  102.  
  103.   What does all of this mean? Well, let me talk you through it.  First,
  104.   we need to use up all 4 partitions on our 1 harddrive.  Partitions 1
  105.   through 3 are PRIMARY partitions.  We will store MSDOS, Win95 and the
  106.   OS/2 Boot Manager (which inefficiently requires its OWN partition) on
  107.   these partitions, respectively. We then have 1 partition left.  But,
  108.   we want to have a drive just for DOS/Win95 data (this gives us a large
  109.   place to dump all of those ZIP files we so often download from the
  110.   Internet as well as a place to store Win95 programs and data that we
  111.   don't have enough room for on the Win95 partition), OS/2, and Linux
  112.   (both a Linux native as well as Linux swap partition).
  113.  
  114.   Now, I've been getting a lot of grief through e-mail lately about why
  115.   I have a separate partition for Win95 and one for DOS and one for
  116.   Win95/DOS data.  Here's my answer: having separate Win95 and DOS
  117.   partitions isn't for everyone.  Perhaps you don't even use DOS
  118.   anymore.  Perhaps Windows '95 is your answer for any software written
  119.   for a Microsoft platform. Well, there are some people out there who
  120.   still use DOS and can't live without it. Whether it's because DOS can
  121.   run 16-bit applications faster and more efficient, or because the
  122.   certain DOS program that you may use won't run under a Windows
  123.   environment (the Gravis Ultrasound soundcard setup program comes to
  124.   mind), you simply MUST be able to boot into DOS from time to time.
  125.   This HOWTO was written with those people in mind.  If you still have
  126.   difficulty swallowing the fact that the word ``MSDOS'' is included in
  127.   this HOWTO, then feel free to sit down and write a Linux-
  128.   Win95-OS/2-only HOWTO.  :)
  129.  
  130.   Now, back to the diagram above.  Like I said, we have 1 partition to
  131.   cram 4 things onto: DOS/Win data, OS/2, and Linux native & swap.  This
  132.   can be done by creating what are called logical drives (or logical
  133.   partitions, depending on which book you read) within the 1 primary
  134.   partition.  When we create these logical drives within a primary
  135.   partition, we refer to this primary partition as an EXTENDED PARTITION
  136.   (because it is extended beyond the scope of a single, primary
  137.   partition and instead contains up to 3 subpartitions (logical
  138.   drives)). Confused?  If so, you might want to read the OS/2 manual
  139.   about this topic. It will explain it better than I have here.
  140.  
  141.   Now, you might be scratching your head saying ``he wants to cram 4
  142.   things onto that extended partition, but he just got done saying we
  143.   can only have 3 subpartitions to put them on!''  This is true, at
  144.   least in MS-DOS's and OS/2's reasoning.  But, here one of the many
  145.   powerful advantages to Linux comes to save the day.  Linux can create
  146.   more than 3 subpartitions on an extended drive.  Just how many, I
  147.   don't know.  But, I know it can create at LEAST 4 (what we need).  So,
  148.   when we go through the steps of the installation procedure below, keep
  149.   in mind that when we create partitions using an MSDOS or OS/2 program,
  150.   we will only create 3 logical drives.  Then, when we go to Linux, we
  151.   will split one of them into two.  Essentially, you can think of it as
  152.   ``tricking'' MSDOS and OS/2 into seeing only 3 logical drives, but in
  153.   reality (and to Linux), there will be 4.
  154.  
  155.   2.  The Procedure
  156.  
  157.  
  158.      NOTE:
  159.         Numbers in parentheses were the number of megabytes that I used
  160.         on my 1.2GB harddrive.
  161.  
  162.   Now, let's move on to the step-by-step procedure:
  163.  
  164.   1. Run view.exe on the Linux Slakware CD and create the Linux Boot and
  165.      Linux Root floppies.  For some reason, the Linux bootstrap program
  166.      calls the Root disk the Ramdisk floppy. I'll refer to this disk
  167.      from now on as the Ramdisk (Root) floppy.
  168.  
  169.   2. Backup any information that you wish to keep to tape (or whatever
  170.      media you have available to you).
  171.  
  172.   3. Boot your original MSDOS installation floppy, disk 1.
  173.  
  174.   4. When ``Starting MSDOS'' appears, press F5 to bypass config.sys and
  175.      autoexec.bat.
  176.  
  177.   5. Run a:\fdisk.exe.
  178.  
  179.   6. Delete all partitions (you have been warned: DELETING / MODIFYING
  180.      OF ANY PARTITION WILL RESULT IN THE LOSS OF ALL DATA ON THE DISK!).
  181.  
  182.   7. Add an MSDOS primary partition. (11MB)
  183.  
  184.   8. Format this partition.
  185.  
  186.   9. Run a:\setup.exe to install MSDOS on this partition.
  187.  
  188.   10.
  189.      Boot OS/2.
  190.  
  191.   11.
  192.      Select Advanced installation.
  193.  
  194.   12.
  195.      Run FDISK.  (this will eventually popup for you if you run through
  196.      the OS/2 installation)
  197.  
  198.  
  199.   13.
  200.      Add 1 primary partition after the MSDOS one.  This will become our
  201.      Windows 95 partition. (349MB)
  202.  
  203.   14.
  204.      Add the Boot Manager to the next primary partition. (2MB)
  205.  
  206.   15.
  207.      Add an extended partition.
  208.  
  209.   16.
  210.      Add a logical drive to the extended partition.  This will become
  211.      the data portion of our MSDOS system. (511MB)
  212.  
  213.   17.
  214.      Add another logical drive to the extended partition.  This will
  215.      become our OS/2 HPFS (``High Performance File System'') partition.
  216.      (127MB)
  217.  
  218.   18.
  219.      Add 1 last logical drive to the extended partition using the
  220.      remaining space on the drive.  This will later become 2 partitions
  221.      under Linux -- our swap partition and our native Linux partition.
  222.      But, since OS/2 (and DOS as well) can only write up to 6 partitions
  223.      per drive (3 primary and 3 logical drives housed within 1 extended
  224.      partition), we have to create only one at this time. And we DO have
  225.      to create this partition.  Don't leave this as free space and
  226.      expect Linux to be able to create the two partitions. Due to the
  227.      way that OS/2's FDISK works, where you add your last logical drive
  228.      to the extended partition marks the END of the extended partition.
  229.      You cannot add partitions beyond this point.  So, in other words,
  230.      creating this one last logical drive serves as a space-filler for
  231.      Linux. Later we will delete this partition and add 2 new ones in
  232.      the space that it once took up.
  233.  
  234.   19.
  235.      Add partitions 1, 2, and 5 to the Boot Manager.
  236.  
  237.   20.
  238.      Make partition 5 installable.
  239.  
  240.      Your FDISK screen should now look like this (or something like
  241.      this):
  242.  
  243.  
  244.        ______________________________________________________________________
  245.  
  246.                                       FDISK
  247.  
  248.        Disk 1
  249.        ___________________________________________________________________________
  250.  
  251.        Partition Information
  252.        Name            Status          Access          FS Type         MBytes
  253.        ___________________________________________________________________________
  254.  
  255.        MSDOS           Bootable        C: Primary      FAT              11
  256.        WIN 95          Bootable         : Primary      FAT             350
  257.                        Startable        : Primary      BOOT MANAGER      2
  258.                        None            D: Logical      Unformatted     511
  259.        OS/2            Installable     E: Logical      FAT             127
  260.                        None            F: Logical      Unformatted     219
  261.  
  262.        ______________________________________________________________________
  263.  
  264.  
  265.   21.
  266.      Continue on with the OS/2 installation process.
  267.  
  268.   22.
  269.      Reboot and select partition 2 (Windows 95) from the Boot Manager.
  270.  
  271.   23.
  272.      When the missing operating system error pops up, boot your MSDOS
  273.      installation disk.  We selected this partition in order to ``hide''
  274.      the MSDOS partition.  OS/2's Boot Manager is a bit strange. For
  275.      every bootable partition you have (in our case, MSDOS and OS/2),
  276.      you can have only one of them visible at a time. What this means is
  277.      that if you boot into one partition, MSDOS for example, the other
  278.      partition (Win95) is invisible. The MSDOS partition and Win95
  279.      essentially SHARE a drive letter. That's why under ``Access''
  280.      above, MSDOS has drive letter C and Win95 has no drive letter.
  281.      Under the current circumstances, MSDOS is visible with drive letter
  282.      C and Win95 is invisible with no drive letter. If we were to boot
  283.      Win95, the opposite would be true: MSDOS would be invisible with no
  284.      drive letter and Win95 would be visible with drive letter C.  An
  285.      invisible drive cannot be accessed AT ALL.  If you wish to copy
  286.      files between two drives in which only one can be visible at one
  287.      time, you must use a common (non-bootable) drive to swap files.  In
  288.      our case, the DOS/Win95 Data drive (drive D 511MB above) will serve
  289.      as this common drive. You might be asking ``Won't we eventually be
  290.      booting Linux also?''.  The answer is yes, we will. But let's not
  291.      get into that just yet.
  292.  
  293.   24.
  294.      Install MSDOS to Partition 2 (we'll need this in order to install
  295.      Windows 95).
  296.  
  297.   25.
  298.      Boot Partition 2.
  299.  
  300.   26.
  301.      Install Windows 95 to this partition (if you are running the
  302.      upgrade version of Win95, you may need to have your Win3.1
  303.      installation disk 1 ready to insert).
  304.  
  305.   27.
  306.      Boot Partition 1.
  307.  
  308.   28.
  309.      Format Partition 4.
  310.  
  311.   29.
  312.      Restore DOS data from tape (if any) to partitions 1 and 4.
  313.  
  314.   30.
  315.      Boot the Linux Boot Floppy.
  316.  
  317.   31.
  318.      Follow up with the Linux Ramdisk (Root) floppy.
  319.  
  320.   32.
  321.      When you log in as root and get to the # prompt, type ``fdisk'' and
  322.      press enter.
  323.  
  324.   33.
  325.      Delete the last partition (the one we created in step 18).
  326.  
  327.   34.
  328.      Add 1 16MB partition and tag it as filesystem type Linux Swap.
  329.      (17MB)
  330.  
  331.   35.
  332.      Add 1 last partition with the remaining cylinders on the disk and
  333.      tag this as filesystem type Linux native. (198MB)
  334.  
  335.   36.
  336.      Write the changes to the boot sector and reboot.
  337.  
  338.   37.
  339.      When you get to the # prompt again, run setup.
  340.  
  341.   38.
  342.      Install Linux to the last partition.
  343.  
  344.   39.
  345.      When you install LILO, be sure to install it to the root of the
  346.      last partition (NOT to the MBR, as you will destroy all of your
  347.      previous work in this HOWTO if you do so). Add only the last
  348.      partition to LILO and set the timer to zero. By doing this, when
  349.      you select Linux from the OS/2 Boot Manager, LILO will activate and
  350.      will then boot  Linux from the logical drive on the extended
  351.      partition. Since Linux is the only partition that we wish to
  352.      activate from LILO, we don't need a timer on it (unless you have
  353.      more than one Kernel that you wish to load.  In this case, you may
  354.      want to set the timer to something more than 0 seconds).
  355.  
  356.   40.
  357.      Activate the Linux swap partition (refer to the Linux Installation
  358.      and Getting Started Manual by Matt Welsh for this).
  359.  
  360.   41.
  361.      Boot OS/2.
  362.  
  363.   42.
  364.      Run FDISK.
  365.  
  366.   43.
  367.      Add Linux to the Boot Manager using the Linux NATIVE partition
  368.      (type 83 not 82!).
  369.  
  370.      Your FDISK screen should now look like this (or something like
  371.      this):
  372.  
  373.  
  374.        ______________________________________________________________________
  375.  
  376.                                       FDISK
  377.  
  378.        Disk 1
  379.        ___________________________________________________________________________
  380.  
  381.        Partition Information
  382.        Name            Status          Access          FS Type         MBytes
  383.        ___________________________________________________________________________
  384.  
  385.        MSDOS           Bootable        C: Primary      FAT              11
  386.        WIN 95          Bootable         : Primary      FAT             350
  387.                        Startable        : Primary      BOOT MANAGER      2
  388.                        None            D: Logical      FAT             511
  389.        OS/2            Bootable        E: Logical      HPFS            127
  390.                        None             : Logical      Type 82          17
  391.        Linux           Bootable         : Logical      Type 83         198
  392.        ______________________________________________________________________
  393.  
  394.  
  395.  
  396.  
  397.   ...And you're done!
  398.  
  399.   Send any comments/suggestions/problems (as a last resort, please!)  to
  400.   me at r3mdh@raex.com.
  401.  
  402.   Mike Harlan, 11 NOV 1997
  403.  
  404.  
  405.  
  406.  
  407.  
  408.  
  409.  
  410.  
  411.  
  412.  
  413.  
  414.  
  415.  
  416.  
  417.  
  418.  
  419.  
  420.  
  421.  
  422.  
  423.  
  424.  
  425.  
  426.  
  427.  
  428.  
  429.  
  430.  
  431.  
  432.  
  433.  
  434.  
  435.  
  436.  
  437.  
  438.  
  439.  
  440.  
  441.  
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.