home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 February / CHIP_2_98.iso / doc / HOWTO / mini / Linux+DOS+Win95+OS2 < prev    next >
Text File  |  1997-07-31  |  15KB  |  324 lines

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