The Linux DOS-Win95-OS2-Linux HOWTO Mike Harlan, r3mdh@dax.cc.uakron.edu v1.0, 06 MAR 1996 _____________________________________________________________________________ Disclaimer: 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. ============================================================================= Stuff to make the lawyers happy: 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; 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; 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 Greg Hankins, the Linux HOWTO coordinator, at gregh@sunsite.unc.edu via email, or at +1 404 853 9989. _____________________________________________________________________________ Now................. on with the show! 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: NOTE: Numbers in parentheses were the number of megabytes that I used on my 1.2GB harddrive. 1. Run view.exe 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. 2. Backup any information that you wish to keep to tape (or whatever media you have available to you). 3. Boot your original MSDOS installation floppy, disk 1. 4. When "Starting MSDOS" appears, press F5 to bypass config.sys and autoexec.bat. 5. Run a:\fdisk.exe. 6. Delete all partitions (you have been warned: DELETING / MODIFYING OF ANY PARTITION WILL RESULT IN THE LOSS OF ALL DATA ON THE DISK!). 7. Add an MSDOS primary partition. (11MB) 8. Format this partition. 9. Run a:\setup.exe to install MSDOS on this partition. 10. Boot OS/2. 11. Select Advanced installation. 12. Run FDISK (this will eventually popup for you if you run through the OS/2 installation. 13. Add 1 primary partition after the MSDOS one. This will become our Windows 95 partition. (349MB) 14. Add the Boot Manager to the next primary partition. (2MB) 15. Add a logical drive in the extended partition. This will become the data portion of our MSDOS system. (511MB) 16. Add another logical drive to the extended partition. This will become our OS/2 HPFS (High Performance File System) partition. (127MB) 17. Add 1 partition with the remaining space on the drive. This will later become 2 partitions under Linux -- 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 extended or 4 primary), we have to create only one. 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 cannot 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. 18. Add partitions 1, 2, and 5 to the Boot Manager. 19. Make partition 5 installable. Your FDISK screen should now look like this (or something like this): 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 20. Continue on with the OS/2 installation process. 21. Reboot and select partition 2 (Windows 95) from the Boot Manager. 22. When the missing operating system error pops up, boot your MSDOS installation disk. We selected this partition in order to "hide" the MSDOS partition. The OS/2 Boot Manager allows us to hide 1 or more primary partitions by selecting the one that we want visible. You can only have 1 primary partition ACTIVE at a time with IBM's FDISK (and MSDOS follows this rule also), so when DOS is hidden, OS/2 is drive C and DOS has no drive letter and when OS/2 is hidden the opposite is true. Our DOS Data partition will be drive D for both of these partitions. Since IFS's (Installable File Systems -- e.g., OS/2, Linux) can't be seen from MSDOS, we will only have drives C and D from DOS and Windows 95. OS/2 can see our DOS Data partition, so we could use that to dump OS/2 files there also and the same goes for Linux (we'll have to mount this DOS Data drive first, though). 23. Install MSDOS to Partition 2. 24. Boot Partition 2. 25. Install Windows v3.1 to this partition. 26. Install Windows 95 to this partition. 27. Boot Partition 1. 28. Format Partition 4. 29. Restore DOS data from tape to partitions 1 and 4. 30. Boot the Linux Boot Floppy. 31. Follow up with the Linux Ramdisk (Root) floppy. 32. When you log in as root and get to the # prompt, type "fdisk" and press enter. 33. Delete the last partition (the one we created in step 17). 34. Add 1 16MB partition and tag it as filesystem type Linux Swap. (17MB) 35. Add 1 last partition with the remaining cylinders on the disk and tag this as filesystem type Linux native. (198MB) 36. Write the changes to the boot sector and reboot. 37. When you get to the # prompt again, run setup. 38. Install Linux to the last partition. 39. 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 work 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). 40. Activate the Linux swap partition (refer to the Linux Installation and Getting Started Manual by Matt Welsh for this). 41. Boot OS/2. 42. Run FDISK. 43. Add Linux to the Boot Manager (it's the partition of type 83). Your FDISK screen should now look like this (or something like this): 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 ...And you're done! Send any comments/suggestions/problems (as a last resort, please!) to me at r3mdh@dax.cc.uakron.edu. Mike Harlan 06 MAR 1996