issue mounting a IMG disk image in QEMU on Windows 10 host

About Qemu-system-ppc, a PPC Mac emulator for Windows, macOS and Linux that can run Mac OS 9.0 up to Mac OS X 10.5

Moderators: Cat_7, Ronald P. Regensburg

Post Reply
Con_79
Space Cadet
Posts: 6
Joined: Thu Feb 22, 2018 2:41 am

issue mounting a IMG disk image in QEMU on Windows 10 host

Post by Con_79 »

I'm having issue mounting a IMG disk image in QEMU virtualization on a Windows 10 host and an OS 9.2.1 guest machine.

The IMG disk image (has a HFS files system) was created using FTK Disk Imager and was extracted from a ZIP drive. The disk image was able to mount and show on the desktop of an OS 9.02 guest on a SheepShaver virtualization. However, some of the files on the IMG disk image need Microsoft 98 and a faster processor than can be provided on Sheepshaver, which is why I'm looking at using QEMU.

In QEMU I was able to install OS 9.2.1 and mount ISO disk images from Macintosh Garden without any problems. When I mount the HFS formatted disk image it doesn't mount or show up on the desktop but I can initialize it in the Drive Setup program (I don't want to loose the information on the image). I tried a OS 9 system installed on a Mac Extended and Mac Standard format but the result was the same.

Is there anyway to mount and access the files on the disk image in QEMU?

Thanks

Here is the script to start the OS 9 guest in QEMU:

Code: Select all

qemu-system-ppc.exe ^
-L pc-bios ^
-boot c ^
-m 512 ^
-M mac99,via=pmu ^
-prom-env "auto-boot?=true" -prom-env "boot-args=-v" -prom-env "vga-ndrv?=true" ^
-sdl -netdev user,id=network01 -device sungem,netdev=network01 ^
-device VGA,edid=on ^
-drive "file=Example_2_MacOS9.2.1.qcow2,format=qcow2,media=disk" ^
-drive "file=H:\qemu\Apple\Programs\TEST_programs.dsk,format=raw,media=disk" ^
-drive "file=H:\Emulation_Mac\Sheepshaver\SheepShaver\Disk Images\Collection_test\mss86091_179_105_img\data\mss86091_179_105_img.img,format=raw,media=disk"

pause
User avatar
Cat_7
Expert User
Posts: 6172
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: issue mounting a IMG disk image in QEMU on Windows 10 ho

Post by Cat_7 »

Hi,

So your issue was not resolved by my suggestion on the qemu mailing list ;-)

If you can read the image in SheepShaver, you might be able to put all files on a new iso created with e.g. Roxio Toast. You can use SheepShaver's shared folder option to export/save the iso on the host and read the image with Qemu.

Best,
Cat_7
rjolbrich
Student Driver
Posts: 19
Joined: Fri May 15, 2020 5:35 am

Re: issue mounting a IMG disk image in QEMU on Windows 10 ho

Post by rjolbrich »

Hello,
I've already started a topic on "other emulators", but this topic is exactly the same
as mine, so I'll do the unforgivable and cross post.
I've got an .img file that won't load in Qemu and Mac OS 9.2. I created the HFS image
in pce\macplus and added a single file. In pce\macplus the disk image shows as a SCSI disk.
When I try to start Mac OS 9.2 through Qemu the disk does not appear( if I use -drive
filename.img,format=raw,media=disk) As in the OP I can initialize it but I don't want to loose
the contents. Do I need to specify a SCSI interface for this image for QEMU? How?
User avatar
Cat_7
Expert User
Posts: 6172
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: issue mounting a IMG disk image in QEMU on Windows 10 ho

Post by Cat_7 »

Exactly how did you create that image in pce/macplus?

If I understand pce/macplus correctly, it uses some sparse format for disk images that might not be compatible with Qemu.
rjolbrich
Student Driver
Posts: 19
Joined: Fri May 15, 2020 5:35 am

Re: issue mounting a IMG disk image in QEMU on Windows 10 ho

Post by rjolbrich »

Create was the wrong word. I downloaded a blank HFS image file, placed it in the
pce\macplus folder, and started the emulator. I then initialized the drive and added
a file to the drive.
rjolbrich
Student Driver
Posts: 19
Joined: Fri May 15, 2020 5:35 am

Re: issue mounting a IMG disk image in QEMU on Windows 10 ho

Post by rjolbrich »

I just installed HFSExplorer and the image file was read successfully with the one file
listed properly.
I read early on that HFS+ is recommended for OS 9.2 but HFS should be OK also.
I'm not experienced enough to understand the "sparse" image. Could you explain?
User avatar
adespoton
Forum All-Star
Posts: 4276
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: issue mounting a IMG disk image in QEMU on Windows 10 ho

Post by adespoton »

Regarding sparse images... on a Mac, you can create a regular disk image, or you can create a "sparse" image where all the bits with no data just don't exist, and as new data gets written to disk, the data is appended to the file. They have a file extension of .sparseimage
rjolbrich
Student Driver
Posts: 19
Joined: Fri May 15, 2020 5:35 am

Re: issue mounting a IMG disk image in QEMU on Windows 10 ho

Post by rjolbrich »

My HFS image file is definitely a .img file, so it is not a "sparse" image.
I'm still waiting for advice regarding the SCSI drive image and QEMU.
User avatar
Cat_7
Expert User
Posts: 6172
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: issue mounting a IMG disk image in QEMU on Windows 10 ho

Post by Cat_7 »

The extension given to a file does not say much. I can name a disk image image.gif and it wouldn't change a thing to its content.

I don't think it would make any difference whether you attach a disk image through an IDE or SCSI hardware interface.
It is the formatting of the disk image that determines its readability.

EDIT: surprisingly I could read PCE and BasiliskII disk images after adding them as type cdrom to the Qemu command line:
-drive file=c:\PCE\fd4.img,format=raw,media=cdrom

Best,
Cat_7
rjolbrich
Student Driver
Posts: 19
Joined: Fri May 15, 2020 5:35 am

Re: issue mounting a IMG disk image in QEMU on Windows 10 ho

Post by rjolbrich »

On another topic,
As I said I'm new to OS 6 and 9.2. I spent some time with the current
version of Classilla and found it severely limited because of its outdated
encryption support - detailed by Google search and my limited experience.
It won't even load emaculation.com (no common encryption error).
Without a functional browser I don't know if I will have much continued
interest in both emulators. Updating Classilla doesn't seem to be much of
a priority.
User avatar
adespoton
Forum All-Star
Posts: 4276
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: issue mounting a IMG disk image in QEMU on Windows 10 ho

Post by adespoton »

Generally people don't run an emulator to run a modern browser inside. Classilla is mostly for people running old hardware, to give them a way of getting on the WWW.

However, most people have now switched to using a proxy instead, such as the one provided by MacIPGW. This way, you can run a VM on the host that manages all the networking, and the emulator guests proxy through it, getting old, insecure versions of the pages served up, while IPGW proxies the secure sites.

https://www.macip.net/ has everything you need to set that up, including a pre-built Linux VM and a pre-built Basilisk II boot image configured with NCSA Mosaic.

[edit] If you just want to be able to use web browsers, you can run https://github.com/tenox7/wrp on your host system and proxy through that. Of course, you may have issues with SLIrP granting you access to a port on the host system, but it should be possible....
rjolbrich
Student Driver
Posts: 19
Joined: Fri May 15, 2020 5:35 am

Re: issue mounting a IMG disk image in QEMU on Windows 10 ho

Post by rjolbrich »

Hmm, it does mount as a cdrom (media=cdrom)!? That's no help, though...
User avatar
adespoton
Forum All-Star
Posts: 4276
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: issue mounting a IMG disk image in QEMU on Windows 10 ho

Post by adespoton »

What mounts as a CD ROM?

The software I mentioned isn't run in BII, it's run on the host as a proxy system. You need VirtualBox installed to run the pre-built Virtual Machine.
rjolbrich
Student Driver
Posts: 19
Joined: Fri May 15, 2020 5:35 am

Re: issue mounting a IMG disk image in QEMU on Windows 10 ho

Post by rjolbrich »

The empty HFS disk image shows up in OS 9.2 as a cdrom with media=cdrom in QEMU.
User avatar
adespoton
Forum All-Star
Posts: 4276
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: issue mounting a IMG disk image in QEMU on Windows 10 ho

Post by adespoton »

Yes, this makes sense; if you tell QEMU an image is a CD-ROM, it will treat it as one. In this case, an empty one formatted HFS.

What does this have to do with running Classilla and accessing modern websites?
User avatar
Cat_7
Expert User
Posts: 6172
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: issue mounting a IMG disk image in QEMU on Windows 10 ho

Post by Cat_7 »

I've got an .img file that won't load in Qemu and Mac OS 9.2. I created the HFS image
in pce\macplus and added a single file. In pce\macplus the disk image shows as a SCSI disk.
When I try to start Mac OS 9.2 through Qemu the disk does not appear( if I use -drive
filename.img,format=raw,media=disk) As in the OP I can initialize it but I don't want to loose
the contents. Do I need to specify a SCSI interface for this image for QEMU? How?
rjolbrich was trying to get mac os 9.2 and pce\macplus to read the same image as hard disk.
However, a disk initialized in pce with a file copied to it was not readable in qemu with mac os 9.2
I found that adding that disk to qemu as cdrom (and not as hard disk) allowed reading the content ;-)

Best,
Cat_7
User avatar
adespoton
Forum All-Star
Posts: 4276
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: issue mounting a IMG disk image in QEMU on Windows 10 ho

Post by adespoton »

Ah; somehow I lost track of the fact that this was all the same thread! Thanks!
rjolbrich
Student Driver
Posts: 19
Joined: Fri May 15, 2020 5:35 am

Re: issue mounting a IMG disk image in QEMU on Windows 10 ho

Post by rjolbrich »

I installed Mini vMac and ImportFl. I guess I'll abandon pce\macplus as a destination for files
from OS 9 and QEMU. I'll just browse in Windows.
Post Reply