The disk format that QEMU uses is called qcow2. We'll make a 9.1GB disk, that's plenty to hold Solaris and have a lot of room left over.

qemu-img create -f qcow2 sparc.qcow2 9663676416

Disks in Solaris need to be labelled before they can be used, so we can't install just yet. First we need to boot into Solaris to format and label the disk we just made.

qemu-system-sparc -M SS-5 -m 128 -drive file=sparc.qcow2,bus=0,unit=0,media=disk -drive file=solaris_2.6_598_sparc.iso,bus=0,unit=2,media=cdrom,readonly=on

Let's take a look at the options:

qemu-system-sparc - run the emulator for a 32-bit SPARC system

-M SS-5 - emulate a SPARCstation 5

-m 128 - 128 MB of RAM

-drive file=sparc.qcow2,bus=0,unit=0,media=disk - Use our disk image, put it on SCSI bus 0, unit 0

-drive file=solaris_2.6_598_sparc.iso,bus=0,unit=2,media=cdrom,readonly=on - Use the Solaris 2.6 ISO as a CD drive, SCSI bus 0, unit 2

Once you run that, the OpenBIOS ROM should start first and bring you to a prompt, type:

boot cdrom:d -vs

The system should boot into single user mode and bring you to a root prompt (#). First we run a few commands to prep the system, then we'll format the disk.

# drvconfig
# disks
# format

Solaris only knows about a few specific disk types, so we need to specify our own geometry.

Specify disk (enter its number): 0
Specify disk type (enter its number): 16
Enter number of data cylinders: 16381
...defaults are fine here...
Enter number of heads: 16
Enter number of data sectors/track: 63
Enter disk type name (remember quotes): Qemu9G

Now label the disk - it's really easy:

format> label
Ready to label disk, continue? y

All set. Now type q to quit the format utility and type reboot to restart the system. It's time to install!

This guide was first published on Apr 26, 2019. It was last updated on Apr 26, 2019.

This page (Create a disk image) was last updated on May 15, 2021.

Text editor powered by tinymce.