Running Dano in Qemu

As most here most likely are already aware, I am a fan of the Haiku OS, classic Apple, Gnu/Linux, and of course… the late, great BeOS. Like many here, I have 4.5 and R5 Pro discs, but my all-time Be love is a leaked copy of Dano I’ve kept going on an old PIII Hewlett-Packard notebook.

There’s been guides for VMware, etc. but what about running Dano using qemu on modern hardware? Doing so is surprisingly simple, given 15 minutes - 2 hours of time, depending on your hardware. I personally recommend using a direct disk image for this, rather than trying to install Dano from a CD image – as it is much simpler to virtualize the system this way. However, if you do choose to use the CD in the VM, then make sure you burn it as a multi-session disc to avoid common boot errors, and expect to wait a long time if you make it to the Installer.

If you’re sticking to the CD (image), skip this section. If not, please read on…

Pre-install methods:

A) Part I: Install Dano on a real Pentium machine with a USB port. From there, boot from a Live CD, (such as Slax v6, as it has legacy i386 support, should you need it). Most systems after the Pentium Pro/P6 (late 95) should be i686. Connect a USB drive and identify disks using fdisk. Unmount, then do a dd copy from the HDD to the flash drive (i.e. dd if=/dev/hda of=/dev/sda on Slax 6). Note that on USB 1.0, such as my box has, this will take a while.

Part II: Now, you’ll need to use a *nix-like system to turn this into a usable raw image, unless you want to run directly from USB. As an example (adapt this to your system to avoid data loss, etc.!), I’d first run DriveSetup, diskutil, parted -sl, or whatever applied to my system, then do: dd if=/dev/disk2 of=dano.image or something like dd if=/dev/disk/usb/0/0/raw of=dano.image on Haiku.

B) Install VMware Fusion 5 on Lion or Snow Leopard (10.6.8 required) and create a VM with “Other” specified. Create the VMDK as a solid image, not separate. Install Dano normally. (If you’re on Windows, there’s VMware guides available others have written that I won’t cover here; VMware Player 6 appears to work out-of-box on C2D systems I’ve used.)

Starting (and managing) Dano:

Once you have pre-installed Dano using Method A or B, (or stubbornly managed to get past the errors and install from the CD), go ahead and copy the folder from VMware (or copy the raw disk image into a folder called ‘dano’). The hard part is now over, as you can now just do something similar to: qemu-system-i386 -m 256M -cpu pentium3 -hda Dano.img from your Dano folder.

Now, you’ll most likely be greeted with a monochrome (B&W) BeOS, unless you have a special driver you used for the last step. To fix it, we’ll just open Terminal and type 3 commands (for the unfamiliar, Terminal is in Be menu -> Applications). Once open, do: cd /boot/home/config/settings/kernel/drivers then echo “mode 800 600 16” > vesa and shutdown -r which will restart the system and hopefully greet you with high color without needing to go into Safe Mode. While you can go with another mode, I’d recommend starting out with this one or 1024x768 first before venturing to higher modes.

If cursor motion is erratic, try adding -usbdevice tablet to qemu, or if you have a notebook equipped with one, use the trackpoint over a standard touchpad, as it handles smoothly. As for allocating memory to it, limit it to under 1 GB to prevent issues; 768 MB is the max I’ve decided to leave my VM operating with… as you can see below:

And I surprisingly haven’t heard other guides mention it, but like any filesystem, it would be a good idea to check the FS integrity. I’d definitely recommend cloning the disk, adding both -hda and -hdb to the machine to connect both disks, startup from one, and run chkbfs from Terminal. Or you could, of course, try to run from the active startup disk by doing chkbfs /boot which will scan it read-only, but will still correct block allocation mismatches that it finds. As an extra precaution, you could also do MD5 sums on the image itself, or otherwise have your client check the virtual disk for errors as well to ensure the physical image works well.

Closing thoughts…

As one last note, while R5 can run inside VMs as well, I prefer Dano as it has worked better for me in my experience on Qemu (and since it is my favorite version, I’m biased). :wink: Use whatever version works best for you.

As discussed in another thread, I’ve contemplated leaving a direct link for others to download my VM image of BeOS, but I’m still not sure if Haiku would get in trouble or not from it. That said, if you were hoping for this, the best I could say is to find and subscribe to the ‘upload BeOS’ thread, as I might leave a link to my page instead there sometime.

Thanks for reading; hopefully this guide will be helpful to whoever finds it.

Edits and additions

The first version of this guide mentioned I couldn’t run BeOS in VirtualBox; this was due to leaving acceleration enabled on my system. If you decide to run BeOS in VirtualBox, ensure VT-x/AMD-V is disabled before you try to start the VM; otherwise, it most likely won’t start or run correctly.

Also, you can get fully-working audio in Qemu (tested on a 2.5 GHz machine with Void rolling) if you decide to add -soundhw all to qemu (which ensures all available sound cards are added to the system; one should be selected and active in Media preferences/media_server when you start BeOS up). If you want a specific card, you can name it, such as sb16, although this didn’t work on my system. And obviously, if no audio card at all is specified, this will most likely happen when you try to play a sound:

As for playback, I tested BeStartup.wav (copied here for convenience; its default home is in /boot/beos/etc/sounds) with MediaPlayer, and it played perfectly for me. Results may vary depending on the power and configuration of your computer.

Again, I hope this guide will prove to be helpful. Good luck! :slight_smile:

2 Likes

How’s the sound quality? VirtualBox with BeOS R5 has choppy sound due to bugs in their SoundBlaster emulation.

I’ve got BeOS R5 working in VirtualBox 5.0 (5.1 has Linux integration problems, locking up X Windows), instructions at Installing BeOS R5 in VirtualBox

1 Like

Good for the most part on my 2.5 GHz box when I tested MediaPlayer with the startup sound. I’ll add details for sound to the guide above.

I read through the guide and realized where I had went wrong – I kept trying to run the system stubbornly with hardware acceleration (VT-x) enabled! I’ll add these changes to my guide; thanks. Also, just to verify the window server bug, I made sure my settings were correct this time, and ran Dano on VB 5.1.6 on Void. X.org and VB kept running smoothly with no issues… so I’m not sure if this is specific to a Linux kernel build, Xorg revision, or distribution. Unforunately, unlike in qemu, I get no sound with the SoundBlaster16 or ICH controllers in VB 5.1.6, so I can’t confirm any audio choppiness.