Installing NetBSD 6.1.5 Sparc64 on Qemu

From Computer History Wiki
Revision as of 05:13, 15 January 2015 by Neozeed (talk | contribs) (remove duplicate boots)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
File:NetBSDSPARC64 6.1.5 on Qemu 2.2.0.png
NetBSD 6.1.5 Sparc64 on Qemu

As of Qemu 2.2.0 you can actually install NetBSD onto the emulated Sparc64, using the bundled OpenBIOS. Installation is pretty straight forward with only a few caveats.

First I found that using a VMDK or QCOW2 was incredibly slow. So I HIGHLY recommend using a raw disk image.

qemu-img.exe create -f raw netbsd-615-sparc64.raw 2G

With the disk image in hand, the next issue is that the keyboard doesn't seem to work from the graphical console on install. Switching to the serial console by disabling the graphics adapter, and setting up the serial port so you can telnet into it with a proper terminal emulator (putty) seemed to be the best solution for me. I launch Qemu like this:

qemu-system-sparc64.exe -cdrom NetBSD-6.1.5-sparc64.iso -net nic,model=ne2k_pci -net user -hda netbsd-615-sparc64.raw -nographic -serial mon:telnet:127.0.0.1:23,server,wait -m 2048 -boot d

NetBSD doesn't read the boot parameters from OpenBIOS's stack so you have to tell it the root disk, in this case to install it is cd0c. From there installation proceeded pretty straight forward. Likewise, once installation is complete, you can now use the '-boot c' flag, and you'll have to tell the kernel that the root device is now wd0a.

I've had issues with the harddisk under heavy load where it'll lose disk interrupts, and the VM will hang. Be patient it will recover. Upon installation the process makemandb will be building a manpage database, and this is incredibly disk intensive. It's best to wait for it to complete, then try to use the system. Lost interrupts appear as: "cmdide0:0:0: lost interrupt".