Using QEMU to prepare hard drive for Lombard PB G3?

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
User avatar
that-ben
Granny Smith
Posts: 141
Joined: Tue Nov 10, 2015 7:50 pm

Using QEMU to prepare hard drive for Lombard PB G3?

Post by that-ben »

Hi, I'm wondering if it would be doable to use QEMU to prepare a 6GB disk image split in 2 partitions that will contain Mac OS 9.2.2 and Mac OS X 10.2 for a PowerBook G3 Lombard? I could dd the disk image onto the real IDE HDD after Mac OS X is installed. You may be wondering why I'm not using the DVD drive to boot Mac OS X 10.2 and install it from there? It's because that Lombard does not have its DVD drive anymore and Lombards cannot boot from USB either due to an incomplete Open Firmware implementation :(
User avatar
Cat_7
Expert User
Posts: 6172
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Using QEMU to prepare hard drive for Lombard PB G3?

Post by Cat_7 »

Hi,

Some years ago I imaged a hard disk from a G3 running 9.1 and 10.3 on two partitions which can be booted with Qemu, so the other way around might also work.

Best,
Cat_7
User avatar
that-ben
Granny Smith
Posts: 141
Joined: Tue Nov 10, 2015 7:50 pm

Re: Using QEMU to prepare hard drive for Lombard PB G3?

Post by that-ben »

Thanks for replying.

Do you know if the QCOW or whatever format that QEMU is using as a disk image needs to be converted somehow before being dd'ed onto an actual IDE HDD?
User avatar
adespoton
Forum All-Star
Posts: 4277
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Using QEMU to prepare hard drive for Lombard PB G3?

Post by adespoton »

that-ben wrote: Mon Jul 31, 2023 8:20 pm Thanks for replying.

Do you know if the QCOW or whatever format that QEMU is using as a disk image needs to be converted somehow before being dd'ed onto an actual IDE HDD?
Yes, you'd need to convert it to a raw image using qemu-img, if you're using the QCOW2 format for QEMU.

QEMU will also run a raw image just fine, but you lose all the snapshot and differencing features on the emulator as well as compression (data and slack space) on the disk image.
User avatar
that-ben
Granny Smith
Posts: 141
Joined: Tue Nov 10, 2015 7:50 pm

Re: Using QEMU to prepare hard drive for Lombard PB G3?

Post by that-ben »

I think I should start over by taking the IDE HDD image and feeding it to QEMU, attaching Jaguar CD1 and installing on there. This way when the install is done, I can just flash the disk image back to the IDE HDD.
Last edited by that-ben on Mon Jul 31, 2023 9:38 pm, edited 2 times in total.
User avatar
adespoton
Forum All-Star
Posts: 4277
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Using QEMU to prepare hard drive for Lombard PB G3?

Post by adespoton »

that-ben wrote: Mon Jul 31, 2023 8:50 pm I think I should start over by taking the IDE HDD image and feeding to QEMU, attaching Jaguar CD1 and installing on there. This way when the install is done, I can just flash the disk image onto the IDE HDD.
You may still run into problems, unless your PB G3 happens to have the exact same hardware profile as QEMU (which it doesn't). You'd probably do better to restore the Jaguar CD images to partitions on the IDE HDD itself and boot from those on the Lombard.
User avatar
that-ben
Granny Smith
Posts: 141
Joined: Tue Nov 10, 2015 7:50 pm

Re: Using QEMU to prepare hard drive for Lombard PB G3?

Post by that-ben »

Oh I see what you mean, but how will I be able to "eject and then insert CD 2" ?
User avatar
adespoton
Forum All-Star
Posts: 4277
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Using QEMU to prepare hard drive for Lombard PB G3?

Post by adespoton »

that-ben wrote: Mon Jul 31, 2023 9:37 pm Oh I see what you mean, but how will I be able to "eject and then insert CD 2" ?
Just create a second partition with CD 2. Alternatively, use a DVD instead of two+ CDs.
User avatar
that-ben
Granny Smith
Posts: 141
Joined: Tue Nov 10, 2015 7:50 pm

Re: Using QEMU to prepare hard drive for Lombard PB G3?

Post by that-ben »

Against all odds, and before you replied, I had nothing to lose except waste 15 minutes and I went ahead and simply installed OSX 10.2 on an empty disk image using QEMU and then I flashed it back to the HDD and again, against all odds, the Lombard just booted into it and it works... In hindsight, this is pretty crazy.
User avatar
adespoton
Forum All-Star
Posts: 4277
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Using QEMU to prepare hard drive for Lombard PB G3?

Post by adespoton »

that-ben wrote: Mon Jul 31, 2023 10:33 pm Against all odds, and before you replied, I had nothing to lose except waste 15 minutes and I went ahead and simply installed OSX 10.2 on an empty disk image using QEMU and then I flashed it back to the HDD and again, against all odds, the Lombard just booted into it and it works... In hindsight, this is pretty crazy.
Wow... impressive! Well done!
User avatar
that-ben
Granny Smith
Posts: 141
Joined: Tue Nov 10, 2015 7:50 pm

Re: Using QEMU to prepare hard drive for Lombard PB G3?

Post by that-ben »

I also just dragged all the folders from the Mac OS 9.2.2 install to the second partition, flashed it back to the IDE HDD and I now have a fully working dual partition, dual boot Mac OS 9.2.2 + OSX 10.2.8 environment in the internal PB G3 Lombard IDE HDD, all thanks to QEMU, otherwise I feel like it would have been pretty much impossible to do. I even tried with my RaSCSI Reloaded and OSX would not (fully) boot from it no matter what, so thanks QEMU!

I'm waiting for a 64GB IDE to mSATA drive which will replace the stock, 24 years old 6GB IDE HDD and will reduce noise, heat and prevent HDD head crashes in that Lombard. This brings me to a last question! Is there a way to safely "grow" from a 6GB, 2 partitions HDD to a 64GB, 2 partitions mSATA drive without corrupting the 2 Mac OS installations or would I have to start over from scratch, partitioning a blank 64GB disk image, installing OSX on the first half and then Mac OS 9.2.2 on the second half? (I know that the Lombard *requires* OSX to be on the first partition and no more than 8GB in size)

Unrelated: I was about to order 2x256MB DIMM for that Lombard to try and do the unsupported 512MB kind of deal, but this is by far the most frustrating Mac to work on and I feel like I'll just leave it as is. Makes me wonder why I had to go for the Lombard instead of the Pismo haha but at least it works in the end, but yeah, pretty frustrating Mac to work on.
User avatar
adespoton
Forum All-Star
Posts: 4277
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Using QEMU to prepare hard drive for Lombard PB G3?

Post by adespoton »

that-ben wrote: Tue Aug 01, 2023 4:23 pm Is there a way to safely "grow" from a 6GB, 2 partitions HDD to a 64GB, 2 partitions mSATA drive without corrupting the 2 Mac OS installations or would I have to start over from scratch, partitioning a blank 64GB disk image, installing OSX on the first half and then Mac OS 9.2.2 on the second half? (I know that the Lombard *requires* OSX to be on the first partition and no more than 8GB in size)
I believe this functionality (safely) was added with Panther, with some caveats. I'd recommend reading https://apple.stackexchange.com/questio ... sk-utility first, and then see if you can make that work with 10.2.
User avatar
that-ben
Granny Smith
Posts: 141
Joined: Tue Nov 10, 2015 7:50 pm

Re: Using QEMU to prepare hard drive for Lombard PB G3?

Post by that-ben »

I wonder if i could do that under OSX 10.4.11 meaning I could first create a 64GB blank disk image outside of QEMU, boot QEMU to OSX 10.4.11 Tiger with all these 3 disk images attached and perform Disk Utility restore to partition like in the aforementioned SE solution:
- Mac OS X 10.4.11 (boot, Disk Utility)
- 6GB IDE HDD disk image (source partitions)
- Blank 64GB disk image (use DU to split this in two, then they become the destination partitions)
User avatar
adespoton
Forum All-Star
Posts: 4277
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Using QEMU to prepare hard drive for Lombard PB G3?

Post by adespoton »

that-ben wrote: Sat Aug 05, 2023 11:50 am I wonder if i could do that under OSX 10.4.11 meaning I could first create a 64GB blank disk image outside of QEMU, boot QEMU to OSX 10.4.11 Tiger with all these 3 disk images attached and perform Disk Utility restore to partition like in the aforementioned SE solution:
- Mac OS X 10.4.11 (boot, Disk Utility)
- 6GB IDE HDD disk image (source partitions)
- Blank 64GB disk image (use DU to split this in two, then they become the destination partitions)
Worth a try... let us know how it turns out!
User avatar
that-ben
Granny Smith
Posts: 141
Joined: Tue Nov 10, 2015 7:50 pm

Re: Using QEMU to prepare hard drive for Lombard PB G3?

Post by that-ben »

Allllllright, so after a quick vacation trip, I'm back at this task. It's been sitting on partitioning the 64GB disk image for more than 15 minutes using OSX 10.2 install CD... not sure why it's taking so long...

Image

Anyway, I just abruptly closed QEMU and launched it again and the partitioning seems to have been done correctly... not sure what it was doing, but there was no disk activity and the mouse was not frozen either, weird. OK, then I realized there was no disk restore option in OSX 10.2 so I booted 10.4 and began the disk restore operation!

Image

...after almost 2 hours for the OSX drive and approximately 20 minutes for the OS9 drive, it's done! The partitions are intrinsically "grown" to their full size :)

Image

Half an hour later, I had dd'ed the 64GB disk image back to the mSATA to IDE drive and had replaced the original 6GB IDE HDD in the PB G3 with it. When I powered it on, it initially didn't find any of the two Mac OS'es. I had to go to the multi-boot (equivalent of holding down the option key on newer Macs) to manually select one to boot. After a Disk First Aid repair pass (which found absolutely nothing wrong with any of the two partitions from the Mac OS 9.2.2's point of view, but had to fix a couple permissions from the OSX 10.2's DFA) and a desktop rebuild pass (which fixed many of the app's icons which were missing for some reason) everything now runs flawlessly! So thanks QEMU! Fun fact: I'm also astonished to report that this PB G3 Lombard's OEM battery still holds at least half an hour charge, which absolutely blows my mind.
Post Reply