Debian Etch on VirtualBox (Mac OS X)

Posted on September 11, 2008
Filed Under Operating Systems, Software |

vbox_logo Debian Etch on VirtualBox (Mac OS X)

For a change of pace, I’ll not be blabbing about random crap in a rabid manner today. Rather, I’m going to do a little HOWTO on installing Debian 4 “Etch” (for x86)  under the fantastic x86 virtualization package, VirtualBox on Mac OS X.

So, without any further introduction, I’ll just presume that you have some reason to need to do this, and that you’ve some familiarity with Linux, virtualization systems, and OS X.

Download and Install VirtualBox

Download VirtualBox 2.0 (yay, no Sun signup needed now!), and install it. As shown in the first screenshot below, it’s just a standard Macintosh installer package (mpkg) with some guide text, a user manual, and uninstall tool included in the disk image as well.

vbox_0 Debian Etch on VirtualBox (Mac OS X)

VirtualBox is a simple mpkg install away...

Download Debian Etch Disk 1 ISO

I’ll be doing a bare minimum Debian install, with all additional items needed being fetched via the network, so I’m only grabbing an ISO of the first Debian installation disc. Using your preferred method from the Getting Debian page, grab ISO image(s) from the site.

Set up VirtualBox

After you’ve installed VirtualBox, you’ll want to start it from your applications folder, and create a virtual machine for installing Debian Etch. Follow along with the steps below and consult the screenshots if you’re unsure of something.

vbox_1 Debian Etch on VirtualBox (Mac OS X)

Initial VirtualBox screen - let's make a VM!

The opening screen can be seen above, with Butterflies and Penguins cavorting in harmony- sure, we’re looking to install the Penguin type guy, so go ahead and click that big shiny New button in the upper left.

Clicking New will start a wizardly process whereby you’ll configure the guts of your virtual machine. If you’ve used other virtualization systems, this process should seem familiar to you.

You’ll want to click Next at the wizard intro, leaving you with your first real task in the process:

vbox_3 Debian Etch on VirtualBox (Mac OS X)

VirtualBox supports Debian OS types out of the box

Set a name for your VM, and specify the operating system type. VirtualBox supports a wide assortment of operating systems by name, and Debian is one of them (for users of oddball Linux distros, there are also the convenient generic “Linux 2.4″ and “Linux 2.6″ labels for the respective kernel which said oddball distro runs).

Next, it’s time to specify some memory and storage details.

vbox_4 Debian Etch on VirtualBox (Mac OS X)

Allocating memory for the virtual machine

My goal with configuring this VM (besides helping to step you through the process as well) is to emulate a very slightly configured virtual private server (VPS), that I use, so I’m specifying a paltry 256MB for my VM’s base memory. You can of course, allocate much more to your own VM, depending on how much physical memory your machine is equipped with.

Once you’re happy with your base memory setting, click Next to begin configuring storage.

vbox_5 Debian Etch on VirtualBox (Mac OS X)

Choosing (or beginning to create) a VM hard disk image

Go ahead and click New to begin defining the virtual disk image that will be used by your VM. A smaller series of wizard windows will appear- click Next on the first of these to get down to the details. At this point, and as shown below, you can elect to use a fixed-size or dynamically expanding virtual disk image.  The name of each type should be self-explanatory, so I’ll skip over what they mean, and say only that I chose a dynamically expanding image (just in case).

vbox_7 Debian Etch on VirtualBox (Mac OS X)

Creating a hard disk image for the VM

Next you’ll be specifying a name and initial size for the virtual disk image.

vbox_8 Debian Etch on VirtualBox (Mac OS X)

Specifying VM hard disk details

In the Virtual Disk Location and Size window, give your virtual disk a name, and optionally select where on your host computer’s filesystem you wish the disk image to reside. Specify the size in Megabytes or Gigabytes using the slider or direct entry of a value into the text field, and click Next. Again, since I’m striving to emulate my itty bitty VPS, I’m sticking with only 4GB of disk space initially.

When you reach the summary screen shown below, and are satisfied that you’ve created the virtual disk that’s really right for you, your host computer, and your intended application, click Finish to make it so…

vbox_9 Debian Etch on VirtualBox (Mac OS X)

VM hard disk creation summary

Having created your VM’s virtual disk, you can now complete the new virtual machine setup, and begin either exploring the avilable settings in detail, or proceeding to identify a boot image  for installing Debian.

From the initial VirtualBox screen, make sure your newly created VM is highlighted, and click Settings.

You’ll notice many options as shown in the next screenshot:

vbox_10 Debian Etch on VirtualBox (Mac OS X)

Selecting a CD/DVD device (ISO image) for boot

Click on Storage and then CD/DVD-ROM to begin configuring your VM to boot from the Debian ISO image. Click the folder browse icon to open the Virtual Disk Manager.

Click Add and browse your host computer’s filesystem to the location where the Debian ISO image is located, and select it. Click Open to select the ISO, and then Select to to confirm your selection.

vbox_12 Debian Etch on VirtualBox (Mac OS X)

CD/DVD device selection screen

After configuring the ISO image for booting, it’s now time for some brief setup of the network interface:

vbox_11 Debian Etch on VirtualBox (Mac OS X)

VM network device details

For the most basic network setup where the Debian guest operating system will be accessing the internet via your computer’s network interface, enable the first network adapter, use NAT for the Attached To setting, and make sure that the correct host interface is selected under Host Interfaces.

An interesting point of note is that VirtualBox provides emulated Intel Pro 1000 (desktop and server) network interfaces beyond the standard PCnet emulated interfaces.

Confirm your network setup, by clicking OK.

Now let’s boot your VM! Make sure the VM is highlighted in the leftmost pane of the VirtualBox main window, and click the Start icon to boot!

vbox_13 Debian Etch on VirtualBox (Mac OS X)

The VirtualBox splash screen - Yay!

Install Debian

For a brief moment, you’ll see the VirtualBox boot splash screen, reminding you that this is an open source effort backed by Sun Microsystems. After the splash screen, you should see the Debian bootloader screen, as below:

vbox_14 Debian Etch on VirtualBox (Mac OS X)

The Debian boot splash - Time to install Debian GNU/Linux!

Woohoo! Now you can use the excellent installation documentation provided by the Debian GNU/Linux project to continue with installation of Debian on your Mac under what is without a doubt, the best virtualization system with an open source version under the Sun (hee hee), VirtualBox!

Stay tuned for the next installment, where I’ll be dropping some tips on host based networking whilst installing a development instance of the venerable reddit codebase onto my newly minted Debian virtual machine in preparation for an article which I hope to soon post to the reddit open source project’s wiki.

Comments

One Response to “Debian Etch on VirtualBox (Mac OS X)”

  1. Magnus on December 3rd, 2008 5:07 pm

    Thanks, worked like a charm :)
    Really neat guide.

Leave a Reply