Dual boot Vista, Windows 98 using Grub and Knoppix

April 7, 2008 at 8:52 pm (computers) (, , , , )

I’m in the process of setting up a new PC that has Windows Vista on it. I’ll put Linux on it at some point, but for now, I wish to dual boot it with Windows 98 (don’t worry, it won’t be connected to the Internet) so that we can play some old games.

Well, this is the sort of thing that is possible with the GRUB boot-loader – even if I don’t actually have Linux installed yet.

Setup – I have 2 hard disks as follows:

  • Disk 1 – NTFS partition with main Vista install
  • Disk 2 – NTFS partition with data on it

Procedure (warning, this worked for me, but requires an understanding of disks and operating systems. Proceed at your own risk – this could trash everything on your PC if it doesn’t apply directly to your setup!):

  1. Use the Vista management console disk management snap-in to resize the NTFS partitions to give me some space. I created 160 Mb on disk 1 and 40 Gb on disk 2 (I had more space on disk 2 for the W98 installation).
  2. Boot into Knoppix (I used an old Knoppix 3.7 CD) and get up a root console
  3. Create a Windows FAT partition in the spare space on disk 2

    # fdisk /dev/hdb
    -> n (new partition – used default sizes)
    -> t (set type – used c – Win FAT (lba))
    -> w (write parition table)

  4. Create a Linux partition in the spare space on disk 1

    # fdisk /dev/hda
    -> n (new partition – used default sizes)
    -> t (set type – used 83 – Linux)
    -> w (write partition table)

  5. Format the Linux partition (# mkfs /dev/hda2)
  6. Mount the Linux partition so that Knoppix can read/write to it (# mount /mnt/hda2)
  7. Run grub-install to install grub into the mounted Linux partition and in the MBR of the main disk

    # grub-install –root-directory=/mnt/hda2 /dev/hda

  8. Create a grub menu for the two entries now (for me, this was in /mnt/hda2/boot/grub/menu.lst). I used the following:

    default 0
    timeout 30

    title Windows Vista
    root (hd0,0)
    makeactive
    chainloader +1

    title Windows 98
    map (hd0) (hd1)
    map (hd1) (hd0)
    root (hd1,1)
    makeactive
    chainloader +1

  9. I needed the two map entries above as I was installed W98 on a second disk, and needed to tell GRUB to swap them over (as you can’t boot W98 off a second disk apparently). Recall, Vista is on disk 1 partition 1 (hd0,0), W98 on disk 2, partition 2 (hd1,1).
  10. Then I booted from a Windows 98 startup disk, used FDISK to verify that my C: drive was the unallocated 40 Gb on the second disk (and not any of my other partitions) and formatted C: as a system disk – (format /s c:)
  11. There was a problem though – on rebooting, I got a “GRUB error 17” indicating that it couldn’t mount the linux partition. On rebooting into Knoppix, I re-ran grub-install but then got a “stage1 not read correctly” error. On examining the partitions in fdisk, it appeared that the Linux partition had been changed to type 93 – Ameoba! No idea why. Changing the type back to Linux (83) solved the problem.
  12. The system now boots either into Windows Vista or Windows 98 (well, DOS – I now need to install Windows 98 – but I’ll actually be copying stuff off an old PC to do that).

Remember – mucking about with Linux boot disks, partitions and formatting is highly likely to screw up your PC. I’ve only put this here as I couldn’t find any mention of how to do this sort of thing on the Internet and it may be useful to someone attempting something similar. This is not a recipe, its just what worked for me. I can’t help you if you try anything here and it breaks something. Sorry.

Kevin.

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: