HoloVector: HoloVector: Thanks for the write up apgreimann.

Thanks I like working with Macs, so… as long as I have free time, I don’t mind having fun with them.

Now I’ll definitely say this is not the only method to get Haiku installed onto the Mac; other members of the community here (and other places on the Web) have differing methods they use that work nicely as well; the one I’ve posted (and am elaborating on) is just the one I personally (and somewhat stubbornly) like to use… but for everyone reading this, you definitely don’t have to install it this way. The reason I like this way is because using images allows keeping a nice backup of Mac OS just in case, where I can either start from it or restore it back later.

victordomingos: victordomingos: Can you describe the process in a more detailed way?

And so, @HoloVector, @victordomingos, and to the Haiku (on Mac) community, I feel that to really explain everything about this process well, I’ll go ahead and write a long post that helps explain various areas about how I did this, answer questions so far, etc…

HoloVector: HoloVector: I tried to use the restore tab in Disk Utility but it was asking for an img file but I don’t have one for Snow Leopard so then I tried something that I was pretty sure wasn’t going to work. I did a drag and drop copy the entire drive contents onto my blank spare external drive which of course Start Disk won’t recognize as a valid Boot drive.

Yeah… copying everything via drag-and-drop via the Finder (or another file manager) isn’t going to work. Files may be in use, have permissions that limit what can be copied, etc. and so more than likely the whole system won’t be copied properly or completely that way. If you’re looking to back up your system manually, the better route would be to start from a separate startup disk (like a FireWire drive or another Mac via TDM) so the volume is unmounted, and go the (U)nix way with the Terminal. However, since Mac OS has tools to back up the system, it makes life much easier.

HoloVector: HoloVector: Also do you know of any way to “bless” this backup so it is bootable and therefore recognizable by Startup Disk?

Onto the second topic of blessing disks, this of course started back in the Classic days, and was different on those. On Mac OS 10.0+, this can be done through the bless command (in /usr/sbin)… but since I’ve been using Intel-based Macs, I really haven’t had to use it much; most of the time this has been automatic on them (at least for me). And… tbh, unless you have a for-sure working copy of Mac OS on there, I doubt blessing CoreServices (inside /System/Library), such as with the --folder option would be successful. I saw as I was writing this that there was a ‘follow-up’ where this was tried; as I already suspected, it didn’t solve the issue. Also, to check the current “blessing” status on a Mac, you can use bless --info , by the way. On my MacBook (with Mac OS X here as an example), bless will print something like this:

And in addition, to check what’s in non-volatile RAM, we can also do nvram -p , but that’s not important right now… as I’ve still got a lot to write

HoloVector: HoloVector: So, could you please elaborate on the of the Mac OS X backup step?

Good question. While I touched up on it before, how would someone go about either restoring the Mac OS back to the disk or backing it up to a disk (before installing Haiku, for example)? Even though this is more of a Mac group question, since it’s relevant to the Haiku installation method I’m using, I’ll go ahead and cover it here (with the screenshots included for illustration/fair use).

So, let’s look at that. I’ll be showing how to restore or write the Mac OS back; for backing up the system, the source and destination volumes that I’ll be showing here will be reversed.

Restoring (or backing up) Mac OS

First, you’ll want to go to the Partition tab (in this version; this will be different on the latest Macs; eventually I’ll need to write something for those Macs as well). In the Format pop-up menu, definitely choose Mac OS Extended (Journaled) which is basically JHFS+. I personally like to have my disks be case-sensitive, and would suggest choosing it – but this is up to personal preference (and needs).

Also, under Options, we will need to go for the GUID Partition Table (i.e. GPT) here, since this is an Intel-based Mac.

Like most disk utilities out there (including DriveSetup) we’re asked to confirm writing the changes to the disk. And so, go ahead and click Partition to apply the changes.

In the end, you should see the two disks (and mounted volumes) in the sidebar, as shown here:

What we’ll want to click here to either to back up the Mac OS before writing Haiku (as outlined earlier) or in this case, to show how to restore the Mac OS back to the Mac is click the volume of the source disk, then the Restore tab. You should see the source volume as, well, the source. In this case, “Blackbook” is what I chose.

To choose the destination, drag it into the destination well or field as illustrated below (and again, depending on if we’re backing up or restoring, these drives will switch roles as source/destination, so choose the ones you need accordingly):

Now, I have “Erase Destination” checked, but if you’ve already formatted it earlier with a Mac OS Extended option, this doesn’t need to be checked (and it may override the earlier options). Once everything’s ready, click Restore.

You’ll be asked whether to continue with the erase or not; click Erase to start it (or of course, Cancel to stop it).

Finally, authenticate.

And be ready to wait… a long time, (varying of course, by the volume size, contents, the speed of the Mac and disks, and what direction data is being written). But anyway, that’s pretty much how the Restore process works, which works over Lightning/FireWire for TDM (target disk mode) or with external disks. Use Startup Disk (from Apple menu -> System Preferences) to (re)set the startup disk when done.

Of course, if you’re backing up Mac OS X (or for more recent versions now, macOS), you’ll want to do this process in reverse (restore the internal drive to an external source). And last (but not least), as a serious disclaimer to keep this guide legal: please only use restore for Macs and/or system software you have! As it says on the box, “don’t steal software”; having freely distributable and open software for everyone is the reason that Haiku, BSDs, GNU/Linux, etc. exist.

So hopefully, this illustrates this nicely.

Getting the installation image set up

You’ll first want to download a copy of Haiku that can be used as a CD (ISO/Anyboot), depending on what edition of Haiku you’re planning to image and install: the 32-bit or 64-bit edition. As a general guide for Macs, on the Intel side of things, if it’s a Core Duo, it’s a 32-bit. If it’s Core 2 Duo, that means it’s 64-bit (and on early x64 Macs, an 32-bit EFI that presents a challenge getting Haiku to start in EFI mode on these Macs (or anything beyond Mac OS 10.7.x “Lion” without a patch for that matter), but that’s another story). I personally get images from the Haiku Nightly branch at download.haiku-os.org (as Beta 1 was released a while ago, and Beta 2 isn’t out yet):

The other thing you’ll most likely need for this method that makes life a lot easier (although a spare disk on real hardware could be used as well) is a virtualization client.

If you have a spare Mac or PC with Gnu/Linux installed on it (and that has acceleration via VT-x/AMD-V and kvm support), you can use qemu (such as qemu-system-i386 or qemu-system-x86_64 ) with a raw disk image directly, which will save time (as it won’t need to be converted later).

Otherwise, I’d personally recommend VirtualBox, as it is free/open source and fairly straightforward to install. For people that are still using 10.6.x “Snow Leopard” (what most CD/early C2D Macs will most likely have on them still), you’ll more than likely need to use version 4.3.x. Here is a link to that. Also, (again, if you’re installing VBox 4.3 on SL), you probably will need to temporarily set the clock back using date in Terminal (or Date & Time in System Preferences) to sometime before when the certificate for the installation package expired to avoid install errors; after installation, the clock can be safely be set back to normal. (To check if the installer certificate is good, click the little certificate on the right of the titlebar of the installer). And… for all other users, VirtualBox should install fine per whatever steps are needed for that platform.

For now, I’m going to assume VirtualBox (on macOS) and show people how to set it up that way.

One thing I definitely do, however, is that if VirtualBox gives me an IDE controller for my Haiku VM, I usually delete it and change it out for a SATA controller (as that is closest to what the real Mac will be using). Add in the disk from earlier and the Haiku DVD.

Next, if you’ll be updating it, adding custom packages, etc. I definitely recommend changing out the network card for an Intel one, as shown below (as I’ve found it does better with Haiku in the past). You can refresh the MAC (media access control) address for the card as well.

In the end, you should have a shiny new virtual machine in the side list like so:

In any case, in whatever virtualization client that Haiku is installed in, what’s important is to have it properly partitioned, installed, and with the boot menu set up. To do this, as I’ve heard some users say before it’s not totally clear how:

When you start up, you’ll be greeted by the “first boot prompt” or Welcome box, where we’ll choose to ‘Run installer’ and Continue. From there, you should see the Installer, where we’ll want to “Set up partitions” (or open DriveSetup).

Once inside, select the virtual hard disk in the list of drives, then click “Intel Partition Map…” from Initialize in the Disk menu, as shown here:

A few confirmation dialogs will show up (so click Continue and Write Changes to do so). Then, select the empty area in the list, go to the Partition menu, and click Create.

There will be a box that comes up from there where we can set the partition size (since the disk image is so small, I’ll use all of it) and mark as active.

Once again, there will be a confirmation step (click Write Changes here too). Then, from Format in the Partition menu, click “Be File System…”

And for a third time, we’ll be asked to continue. Yes, we really want to, so click Continue. Then in the next box, enable query support (if not enabled already by default), and Format when ready. There’ll be another box after this asking to write changes; click Write Changes. And hopefully, after that, there’ll also be a notification the format went well.

From there, we’re done with this part, so close the DriveSetup window (like the classic Mac, the little square in the top left corner for those new to Haiku). Select our new destination disk in the “Onto” pop-up menu and click Begin in the Installer and wait for Haiku to write all the files to disk. A few minutes later, Haiku will be done installing. Now, as a “just in case” (though Haiku writes a boot sector automatically) I like to be extra careful and set up the boot menu from Tools (and so I’d suggest doing that). I also used to click “Write boot sector” for good measure as well, but as PulkoMandy nicely pointed out earlier in this thread, this isn’t needed.

From there, go ahead and restart Haiku in the virtual machine. It’s really up to you at this point how to customize it, what to put inside, packages to add from the Depot, preferences to adjust to your liking, etc. I’ll go ahead and show the ones I used for mine at the end.

Once everything is ready, we’ll need to have a raw image (for the best results when writing it with dd ). To convert the VDI on my Mac, as outlined in an earlier post, I’d open Terminal from /Applications/Utilities, then do: cd "$HOME/VirtualBox VMs/Leafbox" , then /Applications/VirtualBox.app/Contents/MacOS/VBoxManage clonehd Leafbox.vdi Leafbox.img --format RAW if my VM was Leafbox, for example. (But I might add that if you happen to have a Mac with macOS Catalina, you’ll more than likely need to grant Terminal permission to access files and folders in System Preferences (as it appears to “puppy guard” the shell for reasons I halfway understand) for things to work).

Writing the image to disk

So, from here, for the rest of the steps I’ll be mentioning, please be sure that you’re logged in as an Administrator (a quick, simple way to check your account type is in System Preferences -> Accounts, although using Directory Services or dscl will also work, as will looking at user IDs and groups on the system). For compatibility’s sake, let’s jump back in time to Snow Leopard again:

So, as you can see, this is what is currently showing on the Desktop: “Blackbook” on external storage and my “Leafdrive” raw disk image. (As outlined in my earlier post, this was converted from a VDI).

So before we continue on, this is one way to find the Disk Identifier (click the drive, then click the Info button in Disk Utility):

… or if the button isn’t in the toolbar, click File -> Get Info (as shown here in a newer version):

Now, as this Mac is 32-bit with 32-bit firmware, what the image I wrote (and will be writing again for this guide) has is the Master Boot Record, which as mentioned in the dialog, is commonly used by PCs for “DOS and Windows”. At this point, it doesn’t matter if I pick this option as the disk image will write over it, but I did want to illustrate this point.

Once the disk has been erased, it should now appear on the Desktop.

And since both disks are ready, I’ll go ahead and list them out. To do this, run diskutil list (or use Get Info in Disk Utility as shown earlier; whatever is easier).

Notice how I’ve highlighted /dev/disk0 here, and also rdisk0 (to do multi-line highlights, by the way, hold down Command). Because I have the image on the Desktop of the external disk I’m running Snow Leopard from, I’ll go ahead and write that out as the path, and to speed things up, I’ll use 4096 (4 MiB) as the block size.

“But wait!” a voice might exclaim. You can’t run that just yet! And they’d be right. First, we have to unmount the disk. (Of course, there is the old Trash can for putting away disks, but unless it’s the internal HD, I wouldn’t recommend ejecting it…)

Instead, the better option is to either re-open Disk Utility for a moment and click “Unmount”, or since we’re already in Terminal, we can just do diskutil unmount , in this case, for /dev/disk0s1. To illustrate what happens if we don’t unmount, the shell will return “Resource busy” for dd , which is a nice precaution.

So, in writing out the image to the disk for real, you should get the text at the bottom mentioning x bytes transferred in x.y seconds (x bytes/sec) (where x and y correspond to values). Notice here it finished in a sweet 318 seconds, rather than the long 2490 seconds from my earlier post in this thread, thanks to me using the block size this time (before I did a straight write):

Of course, because the Mac can’t read this disk, you’ll also get “The disk you inserted was not readable by this computer” that pops up right afterward.

But that’s okay. We can safely ignore this, exit our session, (and also do a quick press of Cmd+Q to quit the Terminal).

If the write was successful, you should see the drive is using the right partitioning table (in this case, MBR) in the disk info, and for the “unrecognized” volume beneath it, the Partition Type should be 0xEB, which means it’s a BeFS (or BFS) partition.

Starting Haiku on Mac!

Go ahead and shut down the Mac, remove any flash drives, external disks, etc. and then power on! There will be a moment of gray or one or two blinks of the ‘?’ folder (if it stays there, more than likely, something went wrong earlier). Afterward, you should be redirected into Haiku.

(I did find that on my Blackbook, the startup process (at the icons/blocks) can ‘stick’; pressing a key I’ve found will un-stick it). After everything loads, you should be presented with the Haiku desktop!

Customizations to my Haikutosh

And last but not least, you’ve probably noticed this isn’t the ‘out of the box’ Haiku look and feel. I’ve tweaked it somewhat to make it feel at home, and here’s the various things I both had fun with (and some I suggest, particularly for the keymap and shortcuts).

Appearance

It’s purely a cosmetic thing, but I usually like to have fun with the font and colors; sometimes I’ll chose thick ones, sometimes thin ones. In this case, I chose “Poppins” (in semi-bold), as it reminds me of “Gadget” in Mac OS 9 on my Clamshell.

Haiku has a retro ‘R5’ palette it goes for, but classy as it is, I usually like to play with the colors a bit. I usually thin out the yellow in the tabs as a little ode to Soliloquy.

And just in case anyone’s wondering where in the world I’m getting the lavender color from, it’s just a few notches off from the blue - purple color R5.1d0 “Dano” used:

Up until OS X “Lion” added iPad scrollbars to the Mac, BeOS 4 and later used to share a double scroll button feature with the “smart scrolling” Mac OS 8.5 - 10.6 had. For those that miss it, this is under “Look and feel”:

Deskbar tweaks

Next is “Deskbar preferences”. The Deskbar is really versatile, so making it however you like is up to whoever’s using it, but this is usually how I set mine up (in short: sort apps by name, Tracker first, expand app blocks, and resize the icons somewhere in the middle (with it docked to the left, which kind of reminds me of a NeXT/early Be sort of UI).

Some may also stick the Deskbar along the top sort of like the Menubar, but it does work kind of differently still…

Keymap

But, on to less cosmetic things, and on to serious adjustments. Under layout, definitely choose a Mac keyboard from the keymaps on the left, so your modifiers and keys properly map to an iMac or MacBook keyboard. By default, Haiku uses a generic PC keyboard (as that’s what the majority of users on it will be using). As illustrated below, the Mac layout I’m using shifts the modifiers in and puts the Command key (cmd) in the right spot.

And for reference, the keymap I have set is the “Apple Aluminum (US)” layout, as illustrated here:

Take screenshots and open apps, home, etc.

Next, you’re probably wondering how I’m taking screenshots, since Haiku maps the screenshot button to the PrtScr (print screen) button on a generic PC keyboard. But as every Mac aficiando knows, to take a screenshot on a Mac (or an iPad), you’d press Cmd+Shift+3 (and 4 for a cropped shot, and so on). So in Shortcuts preferences, I’ve mapped this to /boot/system/apps/Screenshot (and also mapped Cmd+Shift+A and Cmd+Shift+H keys to summon /boot/system/Tracker to open /boot/system/apps and /boot/home as well). These are similar to folder keys in the Finder, and help make things easier. (The preferences one (mapped to Cmd+Shift+P) I’ve mapped in as an extra, and I’ll explain why in a minute).

Enable type-ahead filtering

One thing that the Mac has had (since the switch to X) is a quick search feature inside Finder folders with a nested search bar, and Haiku can do something similar with a feature labelled “type-ahead filtering”. So, if you have Haiku on your Mac, this definitely might come in handy, and this is why I have Preferences mapped. With this on, I can open a folder with a shortcut and then start typing, then press return to open it. It may just be me, of course, but I personally think it makes things feel a lot easier.

What does/doesn’t work:

Network

I have got a network connection going through a shared AirPort connection over Ethernet from my MacBook Pro to here, and as long as the Mac I’m tethered to is awake, the connection is fast and stable. As for wireless, the ‘atheroswifi’ in here is spotty; I’ve got it to connect before, but I also get ‘no link’ as shown here… and overall, I’ve found the wireless varies depending on what Mac is being tested at the moment. So sharing (or plainly using) Ethernet seems to be the most stable option (at least on this Mac) for browsing, getting packages, updating the system, etc.

Media

As I’ve noticed upon testing Haiku before on a few Macs, the sound doesn’t always work with Haiku, and this Mac is no exception. Hopefully, most members with Macs here also have iPods until all the Haikutoshes get audio.

Screen

The good news, however, is that thanks to graphics and display improvements since the first beta, it is possible to change the display brightness with the new slider, and I have full resolution (1280x800 with 32 bits/pixel (what Mac OS would label “millions of colors” on this model).

Summary

Anyway, I truly hope this helps answer questions and makes Haikutoshing using this method easier (again, there are other ways that people in the Haiku community use). I like doing this (and again, hope it proves useful to everyone). And for anyone with other methods (like using the DVD, starting from USB, Boot Camp, dual boot setups, etc.), definitely free to post guides too