-   Linux - Software (
-   -   Win95 install under qemu (

dgermann 12-27-2005 08:44 PM

Win95 install under qemu

Hope someone can help me with this. I have tried to install Win95 under qemu and can get only so far.

The key, it seems to me, is that Win95 needs both a CD and a floppy to install.

I have done apt-get install qemu, created the virtual disk, etc.

I got a boot disk image from and created a boot disk. Then I did this:

# qemu -boot a -fda /dev/fd0 -hda /home/doug/qemu/hd.img
It got as far as to create an R:\ mapping, but it then when I try to switch to drive R:\ says "Not ready reading drive R:." Drives C: and D: are invalid drive specs. Yes, the Win95 CD is in the drive.

I tried to pkunzip the image file, got winb95b.IMA which I renamed to winb95b.img, and then used this code on it--it gets to "booting from floppy" and then hangs:

$ qemu -boot a -fda /path/to/my/bootdisk.img - hda /home/doug/qemu/hd.img
What I am missing it seems to me is a way to tell it to look to the bootdisk for the boot sequence, and then the CD for what to install. But I have not found an answer to this in any g4l searches.

Is this peculiar just to Win95?

And the big question: How can I get this to install?

Thanks for your help. I rely on you guys a lot. Maybe some day I can give advice to new(er) people, just like you folks! ;)

AdaHacker 12-29-2005 05:49 PM


Originally Posted by dgermann
Drives C: and D: are invalid drive specs. Yes, the Win95 CD is in the drive.

Two things. First, I don't see on the command line where you specified the CD drive. If you don't tell QEMU what file to use for the CD drive, I don't think it will use one at all. Second, did you partition and format the C: drive before trying to access it? If not, that would explain why it isn't a valid drive.

dgermann 12-29-2005 09:15 PM


Thanks, you are giving me hope!

So after a few false starts from the hint to specify the cd drive, I did this:

qemu -boot a -fda /dev/fd0 -cdrom /dev/hda -hda /home/doug/qemu/hd.img
Then when it came to the A:> prompt I typed fdisk, chose large disk support, and let the defaults go for the rest of it. That completed, I typed format C: /s and got a drive formatted.

But I cannot seem to get any further--Can't actually get Win95 to install.

Restarting the original linux command just gives me an a:/ prompt and I can switch to a c: prompt. Perhaps I need to have some sort of cdrom support.

So what's next?

Thanks! I can almost taste getting this thing installed!

AdaHacker 12-30-2005 06:01 PM


Restarting the original linux command just gives me an a:/ prompt and I can switch to a c: prompt. Perhaps I need to have some sort of cdrom support.
Well, now that you've copied the system files to the formatted drive, it's no longer to use A: as the boot drive, so you can change that option to '-boot c'.

I don't know exactly what boot disk you're using, but there's a chance that you'll need to install some generic ATAPI CD-ROM drivers before DOS will be able to see the CD drive. I know I've had to do that in the past.

dgermann 12-31-2005 06:20 PM


OK, I changed the command line to:

# qemu -boot c -cdrom /dev/hda -hda /home/doug/qemu/hd.img
And got the same thing--except it flashed the Win95 splash screen for a split second. But it does not show any other drives, and indeed the A: drive is not a valid filespec either. I tried all drives from d: through z: one at a time.

So the question of the hour seems to be, where do I find the CD driver, and then how do I get it to where the virtual machine can see it? Copy it to the floppy and boot one more time from the floppy?

Close, so close....

Thanks, AdaHacker! And a Happy new year!

AdaHacker 01-01-2006 09:02 AM

OK, I just noticed this - you're giving the wrong device for the CD drive. Your CD drive is almost certainly not /dev/hda, unless you have a really bizarre hardware setup. More likely it's /dev/hdc or /dev/hdd.

As for the A: drive no longer being valid, that's because you didn't specify it on the command line this time. Try something like this:

# qemu -boot c -fda /dev/fd0 -cdrom /dev/hda -hda /home/doug/qemu/hd.img
At this point, you should at least be able to boot from the C: drive. I suggest you copy all the files from your boot disk over to C: and set yourself up a bare-bones DOS environment, just to make things a little easier.

Concerning CD-ROM drivers, Google is your friend. A quick search for "DOS generic ATAPI CD-ROM drivers" turned up this file, which may meet your needs. Note that I haven't tried this, so I can't vouche for its quality. The page I found that on also has lots of other drivers and information.

dgermann 01-02-2006 09:31 PM


OK, I used the code you provided, booted up both floppy and the new C:\ drive, and copied the floppy contents over to the c:\ drive.

On the floppy I had:

root@doug2:/home/doug/qemu # ls  /media/floppy0
attrib.exe    chkdsk.exe    io.sys      regedit.exe  xcopy.exe
autoexec.bat  extract.exe  label.exe  scandisk.exe
cd1.sys      config.sys    fdisk.exe    mem.exe    scandisk.ini
cd2.sys      debug.exe    find.exe    move.exe
cd3.sys      deltree.exe  mscdex.exe  uninstal.exe
cd4.sys      drvspace.bin  himem.sys    msdos.sys  xcopy32.exe

As to the cd drive, when under gnome I go to system|administration|disks, this is what it tells me it is, unusual as it seems. I have tried running the qemu command with both the /dev/hda and /media/cdrom0 locations, both with the same (non)results.

Is there a command line way to find out where the cdrom actually is? I want to believe you are right, because it seems reasonable.

Is it possible that cdsys stuff is the cd drivers I need? What do I do with them.

Thanks AdaHacker for sticking with me on this. We are making progress!

Thanks to you, that is....

dgermann 01-02-2006 09:36 PM

OK, found a sloppy way to do what I asked: I put a cd in the cdrom drive and typed mount. What I got was:


/dev/hda on /media/cdrom0 type iso9660 (ro,noexec,nosuid,nodev,user=doug)
So it seems that /dev/hda is right, as is /media/cdrom0.

So it tells us, it seems to me, that we have to look elsewhere other than the possibility of the cdrom not being specified correctly. Do you see it the same way?


AdaHacker 01-02-2006 10:27 PM


Originally Posted by dgermann
So it seems that /dev/hda is right, as is /media/cdrom0.

Well that's wierd. Not that it makes any difference what the device is as long as you know it's the right one. As for the mount point, qemu doesn't care about that. If all else fails, you could always rip an image of the CD and use that.

From the listing you posted, it looks like you probably already have CD drivers on your boot disk. Check your config.sys and autoexec.bat to see if they're being loaded. If you're booting from the C: drive, make sure you've copied both those files into C:\, otherwise the drivers won't be loaded on boot.

dgermann 01-03-2006 10:18 PM


Somehow you got me installed! I "din't change nuthin'!" I restarted qemu using


# qemu -boot c -fda /dev/fd0 -cdrom /dev/hda -hda /home/doug/qemu/hd.img
and this time the Win95 splash screen stayed on longer, then it reported there was an r:\ drive, and I could read the CDrom. I rechecked, and the config.sys already had the stuff in it as you suggested--must have somehow been added on this boot, although the file still had a 1999 date on it!

So is that the same code I will use to start up qemu from now on? Or should I switch it?

I have a bunch of new questions about what to do with it now that I have it installed, so I will start some new threads with those questions, since they are off topic for this thread.

Thanks AdaHacker for sticking with me and for all your help--you are a life saver! :D :D

AdaHacker 01-04-2006 07:10 AM

I'm glad you were able to get it working.


Originally Posted by dgermann
So is that the same code I will use to start up qemu from now on? Or should I switch it?

If it works, stick with it. Strictly speaking, you only need to use the same image file, but if you leave out the fda or cdrom options, you won't have access to that hardware.

All times are GMT -5. The time now is 10:37 AM.