[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Windows multiboot (aaargh!)



On Wed, Sep 10, 2003 at 07:27:23AM -0500, Kent West wrote:
> cr wrote:
> >This may seem an odd place to ask this, but I'll bet some of the folks on 
> >this list know more about the technicalities of booting Windoze than 
> >Windoze users do   ;)
> >
> >I'd like to add a multi-boot DOS + Win95/98 hard drive to my Linuxbox.  
> >
> >I currently have Deb 3.0 installed on /dev/hda, booting with GRUB,  and I 
> >have a 500MB DOS partition on /dev/hdc1 and /dev/hdd1   (with ext2 Linux 
> >partitions on the rest of hdc and hdd).   If I want to boot DOS  I just 
> >use a boot floppy.
> >
> >I have a spare 3GB hard drive I'm thinking of installing on hdc, and I'd 
> >like to do something like this:
> >
> >500MB  DOS   FAT16
> >500MB  DOS   FAT16  (optional)
> >600MB Win95  modified FAT16?
> >600MB Win98  FAT32?
> >800MB Linux   ext2
> >
> >I'd like to be able to boot into DOS, Win95 and Win98.
> >
> >I'm just wondering how practical that is.    Can W95 and W98 coexist on 
> >the same disk in diferent partitions and still both be bootable?    If 
> >not, any suggestion on which is the better one to install?    And, would I 
> >need to lose one of the DOS partitions so as not to exceed the allowable 
> >number?
> >
> >There are plenty of multiboot HOWTOs, but they all seem to be WinNT + 
> >something.    I can't find a W95 + W98.    Before I start trying to figure 
> >out the details, I'd just like to know if I'm chasing an impossibility.    
> >Incidentally, I'd probably sit the disk in my old 75MHz 'spare' computer 
> >to do the installs so I don't risk  munging my Debian system.    When it's 
> >all set up, I'll pop it into my No 1 Linuxbox and set about tuning GRUB.   
> >
> >And, no, I'm not going to let those Windoze partitions anywhere near the 
> >modem.  ;)    No email, no browser.   Any internet stuff goes through 
> >Debian. 
> >cr
> 
> IIRC, DOS, Win95, and maybe Win98 insist on being on the first partition 
> on the "C:" drive. 

They don't insist on being the first partition. Nor is it true that
you can only have one primary DOS partition: it's just that DOS FDISK
won't let you create more than one.

> If you BIOS can trick these OSes into believing 
> /dev/hdcx is "C:", you're a bit closer. I don't want to say you're 
> "chasing an impossibility", but I think you'll have to come up with 
> several kludges to make it work.

This is true.

The selection between "boot Debian" and "boot Microsoft" is easy. Use
your BIOS Setup to tell the BIOS that /dev/hda doesn't exist. Assuming
that /dev/hdb doesn't exist / is a CD-ROM / doesn't have an MBR, the
BIOS will then try and boot from /dev/hdc. (Well, they do when I've
tried it.)

The selection between which Microsoft OS you want to boot involves a
bit of kludgery to set up and a bit of kludgery to use. This is what
I'd do:

To set up:

- Make a DOS boot floppy with FDISK and FORMAT on, and a Linux boot
  floppy with cfdisk on.
- Boot DOS, and partition /dev/hdc with one 500MB primary DOS
  partition (for your DOS boot partition), no other partitions.
- Boot Linux, and use cfdisk to change the partition type of that 
  partition to something DOS doesn't recognise.
- Boot DOS, and add a 600MB primary DOS partition for your Win95 boot
  partition.
- Boot Linux, and use cfdisk to change the partition type of the new
  partition to something DOS doesn't recognise.
- Boot DOS, and add a 600MB primary DOS partition for your Win98 boot
  drive. (You can convert it to FAT32 later from within Win98.) Then
  add an extended partition and create your "optional" 500MB DOS
  partition inside it.
- Boot Linux, and add your 800MB ext2 partition in the extended
  partition. Then change the partition types of the first two
  partitions back to primary DOS. Set the "bootable" flag on one of
  them.
- Boot DOS, and FORMAT /U /S all the DOS partitions. Then on those
  that are to be for 95 or 98, install MSCDEX.EXE and the CD-ROM
  driver .SYS so you can boot them and read the installation CD
  (ie. copy the files on and write one-liner CONFIG.SYS and
  AUTOEXEC.BAT.)
  
so you end up with

1  Pri DOS    500MB  Bootable    ; for DOS
2  Pri DOS    600MB              ; for W95
3  Pri DOS    600MB              ; for W98
4  Extended --> 5  DOS   500MB   ; DOS "optional"
            \-> 6  ext2  800MB   ; Linux

The reason for doing it this way is to reconcile the following:
- a Linux partition should be created with a Linux fdisk, and a
  DOS/Windoze partition with a DOS FDISK (Windoze FDISK can be flaky)
- DOS FDISK won't let you create more than one primary DOS partition
- Each MS OS needs to be in a primary partition for the DOS/Windoze
  bootloader to work.

To switch between booting different OSes, two methods are possible:

- (Easy, but unsmooth) Use Norton Utilities (for DOS) to edit the
  partition table and set the "bootable" flag on the partition for the
  OS you want to boot. From within Win95/98, set the shortcut to
  Norton to "run in MS-DOS mode".
- (Not so easy, but smoother) write a program to set the appropriate
  "bootable" flag as you instruct and then reboot. For example, you
  could have it accept as a command-line parameter the OS you want to
  switch to, and then "reboot 95" or "reboot 98" from within DOS, or
  in 95/98 set a couple of shortcuts with the appropriate command-line
  parameter and "run in MS-DOS mode".
  
For the simpler case with only two potentially-bootable partitions, I
have written a correspondingly simpler program which simply swaps the
"bootable" flag between the first two partitions. You're welcome to
the source code if you want it.

You need to get this set up before installing the OSes. Then, for DOS,
simply set the DOS partition bootable and boot off the DOS
installation floppy as usual. For 95 and 98, set the appropriate
partition bootable, boot it, stick the installation CD in and run
SETUP.EXE. Make sure you tell it to install on the C: drive, because
if the Windoze installer finds a \WINDOWS directory already existing
on one of the other drives it defaults to installing into that.

You will end up finding that whichever partition you boot into comes
up as C:, the other two primary partitions will be D: and E:, and the
extended partition will be F:. (I think.)

It may be the case that GRUB will allow you to switch between boots
more neatly than this, but I think you still have to resort to this
sort of kludgery to get the OSes installed.

Once you've got 98 installed use "FAT32 Converter" or whatever it's
called to change that partition to FAT32.

It is also possible to boot Linux from within DOS/Windoze using
LOADLIN.EXE (again "run in MS-DOS mode") without actually rebooting.

-- 
Pigeon

Be kind to pigeons
Get my GPG key here: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x21C61F7F

Attachment: pgprggJMov52C.pgp
Description: PGP signature


Reply to: