Slashdot Mirror


All of the Win32 Operating Systems on a Single Box?

Shadarr asks: " We would like to be able to have one machine and put each version of Windows (95, 98, and NT) on a separate partition on the hard drive, then use a boot loader to pick which one to start each time. This would probably not be that difficult to set up. My worry is that every time we reformat a partition and reinstall Windows, it will over-write the master boot record and we will have to re-install and configure the boot loader. Is there a way to protect the MBR, and if not what would be the easiest way to reinstall the boot loader? " Is NT's boot loader up to the task, or would something similar to System Commander be the answer? Even with NT?

1 of 23 comments (clear)

  1. I had similar requirements, different solution. by Falsch+Freiheit · · Score: 3
    At one job, not all that long ago, I had somewhat similar requirements. The main difference, however, was that I needed to have nearly virgin installs of Win 3.1, Win 95, Win 98 and Win NT (4.0 Workstation) that I could recreate quickly. (The reason being that I needed to test the installation of a certain package and uninstalling all of the installed components and then trying an install again generated different results and was therefore not a useful test. Or at least not a test on a "like virgin" system anymore.)

    Solution: two hard drives. Drive 0 (/dev/hda, C: in windows, whatever) was a 512MB drive (yes, nearly a throwaway, but all that was required for the OS and single piece of software) and Drive 1 (/dev/hdd, actually, IIRC -- slave on secondary with CD as master on secondary -- just to keep the two hard drives on separate IDE channels) was, I think, a 4 gig drive. You'll note that this is all very easy to scale up.

    Anyways. Then I installed Linux (RedHat 6.0, minimal install) on the entire second drive (I don't even recall if I gave Linux any swap or not...) and created a boot floppy at the appropriate point.

    Process:
    1. Zero out first drive, "dd if=/dev/zero of=/dev/hda"
    2. Create appropriate single FAT partition, format, etc.
    3. Install appropriate OS (Win 3.1 was most difficult -- you'd be surprised how hard it was to scare up good installation media for MS-DOS 6)
    4. Do anything with OS that would "render it typical" -- maybe play solitaire for five minutes, change colors around and reboot the OS a few times. (some of the OS's do something different on first boot or second boot from subsequent boots)
    5. Stick in Linux boot floppy and reboot machine.
    6. Copy entire first drive to a backup file: "dd if=/dev/hda of=win95-virgin-19980912.img" (or some filename appropriate like that for my purposes). Optionally gzip it (or gzip later). (which is why zero-ing it earlier can help.)
    7. Repeat from step one with different OS.

    Then, later, I would just "dd if=whatever.img of=/dev/hda", reboot and do whatever damage to that OS that I wanted, without having to worry about it. Then any states that I needed saved I could easily backup via Linux.

    If you just use a Linux rescue disk and a *really* small Linux partition you could back up just the MBRs. The magic dd command line for that is like this: "dd if=/dev/hda of=MBR.img bs=512 count=1". For whatever reason, the LILO documentation reccomends something like "dd if=MBR.img of=/dev/hda bs=446 count=1" when you actually want to write the saved MBR back onto a drive.

    More realistically, once you've installed each OS onto a separate partition and saved the MBR for it (do NT last), you can copy the MBR file onto the root of NT's boot drive (even if you have to do it via a floppy) and then:
    "attrib -s -r boot.ini"
    Edit boot.ini -- add a line like:
    C:\MBR95.IMG="Win95"
    Then be sure to "attrib +s +r boot.ini" afterwards. After that, NT should present you with the additional boot options when it starts up.

    Look in the LILO documentation and "Linux+NT-Loader" mini-HOWTO for more info on that kind of strange trickery.