can PPC do HD instead of HD image?

[ARCHIVED] About PearPC, a mostly obsolete PPC Mac emulator for Windows and Linux to run MacOS X 10.1 up to 10.4. Using QEMU is now recommended.

Moderators: Cat_7, Ronald P. Regensburg

Locked
ptesone
Space Cadet
Posts: 4
Joined: Fri May 27, 2005 8:50 pm
Contact:

can PPC do HD instead of HD image?

Post by ptesone »

I was wondering if PearPC could use a full blank hardrive instead of using a 3/6 gig image file (like vmware does)?
User avatar
PPC_Digger
Forum All-Star
Posts: 1050
Joined: Thu Jul 22, 2004 9:02 am
Location: Israel

Post by PPC_Digger »

I guess it is possible on linux, with the "Arbitary HD image file size" patch, with something like "/dev/hdb" in the config file.
Havin_it
Mac Mechanic
Posts: 159
Joined: Wed Jul 21, 2004 3:06 pm

Post by Havin_it »

But if the drive is formatted as HFS or HFS+, can a *nix host even mount it? I never heard of such support for this filesystem...

Also the patch you linked says nothing about supporting a *real* filesystem, as opposed to an .img - it's a very different thing.
User avatar
PPC_Digger
Forum All-Star
Posts: 1050
Joined: Thu Jul 22, 2004 9:02 am
Location: Israel

Post by PPC_Digger »

Havin_it wrote:But if the drive is formatted as HFS or HFS+, can a *nix host even mount it? I never heard of such support for this filesystem...

Also the patch you linked says nothing about supporting a *real* filesystem, as opposed to an .img - it's a very different thing.
1) Linux has full support for HFS/HFS+ in the kernel (it's just that most distros don't ship it by default), so mounting won't be a problem.
2) You don't need to mount an image/drive to use it on PearPC. On the contrary: If you do mount an image while using it in PearPC, it would probably cause data corruption (unless you mount it read-only). To use a real drive in PearPC, you simply write something like "/dev/hdd" in the config file (that's exactly why PearPC always had native cdrom access on linux, because devices on *nix are treated as nothing more than special files).
Havin_it
Mac Mechanic
Posts: 159
Joined: Wed Jul 21, 2004 3:06 pm

Post by Havin_it »

Sorry, I see what you mean now - wasn't thinking of the nature of device files.

When you put it like that, it sounds quite plausible. Why on earth did nobody try this yet?
User avatar
PPC_Digger
Forum All-Star
Posts: 1050
Joined: Thu Jul 22, 2004 9:02 am
Location: Israel

Post by PPC_Digger »

Havin_it wrote:Sorry, I see what you mean now - wasn't thinking of the nature of device files.

When you put it like that, it sounds quite plausible. Why on earth did nobody try this yet?
Why would people repartition their hard drives when they can simply create a disk image? If someone really wants me to try it, I can erase my swap partition for a few hours.

P.S: Another drawback is that if one would use PearPC with a partition, it will be somewhat difficult to use it on Windows or transfer it to another computer.
Havin_it
Mac Mechanic
Posts: 159
Joined: Wed Jul 21, 2004 3:06 pm

Post by Havin_it »

Yeah, tryittryitTRYIT!!!

j/k, I know it's a lotta work to setup. Hell, my IMG wouldn't fit into swap anyways, I'd have to use the FAT32 partition that holds it currently. And I'd be more than a little scared of reformatting it and risking Windows throwing a wobbly (as it often does when partitioning's done from another OS).

I'd like to hear about it if anybody does try, though, just to see what speed-gain (if any) could be achieved.

R/W on a single big file, versus a device file controlling a filesystem? Mmmm, any predictions?
User avatar
PPC_Digger
Forum All-Star
Posts: 1050
Joined: Thu Jul 22, 2004 9:02 am
Location: Israel

Post by PPC_Digger »

Havin_it wrote:R/W on a single big file, versus a device file controlling a filesystem? Mmmm, any predictions?
It should be faster, because most FAT32 drives get fragmented very quickly. However, in my case, it would not be significant, since I use EXT2 to host the PearPC image (and believe it or not, I can read it in Windows) and it barely gets fragmented. But I'll try it. Besides, nobody talked about installing OSX in the swap partition, but simply creating an HFS partition inside it and accessing it from PearPC.
ptesone
Space Cadet
Posts: 4
Joined: Fri May 27, 2005 8:50 pm
Contact:

Post by ptesone »

I did try it on my Fujitsu 8 gig on /dev/hde thinking it would speed things up, but it doesn't seem to run any faster :(

I'm thinking it's because the way pear pc was written and how it deals with data- doesn't matter if it's img or straight to the drive- it still accesses the same way on both. . .But it was it was defenatley worth a try! ( that's why I keep my little 8 gig around, for experiments such as these )...

Since I'm running Ubuntu Linux (debian based) I installed the HFS packages and actually formatted the partition as root like:
HFS> format /dev/hde

and it created the hfs+ filesystem so when I ran the Max Os X Disk Utility, it created /dev/hde1 (swap) and /dev/hde3 (root) partitions for it's filesystem. . .But I had to change my primary disk to /dev/hde first of course. . .
User avatar
PPC_Digger
Forum All-Star
Posts: 1050
Joined: Thu Jul 22, 2004 9:02 am
Location: Israel

Post by PPC_Digger »

ptesone wrote:HFS> format /dev/hde
What? What is this command? Shouldn't formatting be something like

Code: Select all

mkfs.hfsplus /dev/hde
Is it different on Ubuntu? Because I have Fedora.
ptesone
Space Cadet
Posts: 4
Joined: Fri May 27, 2005 8:50 pm
Contact:

Post by ptesone »

I guess you can do it that way, but here's what I did in more detail:

I did a search in synaptics for hfs and got a few programs that allow you to access MAC or HFS drives usable with command lines in linux, I could even put my MAC OS X cd in my cdrom and access it at the HFS command prompt. . .

so after installing them I simply did hfs in a terminal
which gave me an HFS> prompt

so I did:
HFS> help
and I got a big list of commands, one of which was format
(there was other ones too, like mkdir and others)...
and if I remember right I just did format /dev/hde at the HFS prompt and it just created it. . .

with fedora, just do a package search for HFS and I'm sure you will get the same things or equivalent that I did. . .

anyway, I hope that answers your question
ptesone
Space Cadet
Posts: 4
Joined: Fri May 27, 2005 8:50 pm
Contact:

Post by ptesone »

User avatar
PPC_Digger
Forum All-Star
Posts: 1050
Joined: Thu Jul 22, 2004 9:02 am
Location: Israel

Post by PPC_Digger »

ptesone wrote:so after installing them I simply did hfs in a terminal
which gave me an HFS> prompt
Oh, I thought you used the standard mkfs command for hfs. My mistake. It's just that I'm more comfortable using the standard UNIX tools, and for some reason I thought everyone are. Sorry.
Locked