Saturday, January 10, 2009

Minimal Debian Lenny install on VirtualBox

- internet connection
- Virtual Box installed on host machine. This exercise will be using Vista as host.

As of this writing, Debian Lenny is still at testing stage. For this exercise we will use RC1, visit for the netinstall iso. Once download is done, create a new virtual machine using Virtual Box, use the following configuration: 512 MB Memory, 120 GB HD, use Intel PRO/1000T server for the network card. For the VirtualBox networking I am using host network configuration. Once VirtualBox guest configuration is set, start the guest machine and then mount the CD-ROM image. In installer boot menu, select Graphical Install. For "Chose the Language" screen, select English or your language of choice. For the country, select whichever you are currently in. In my case, I will be using Philippines. In "Keymap to use" select "American English" or whichever is much appropriate for your system. After this screen, the system should now start detecting your hardware and configures the system for installation. Few seconds later, it should present you with "Configure your network" screen, in my case I am gonna be using "deb5." Since I am using Vista and Internet Connection Sharing, I have as the default domain. Accept this default. This should not matter that much if you are using your system inside a guest machine. In "Partition disks", use Guided - use entire disk. You may use other option if you are confident with playing around with disk partitioning in Linux. Select first HD in your Virtual Box, then select "All files in one partition (recommended for new users)." Then accept the changes to write the partition layout to your HD. Wait while the installation sequence is partitioning your hard drive and installs the base system. In Philippines, one of the nearest mirror sites is Hongkong. We have two mirrors from Hongkong and I will be using In the Http proxy window, you can leave this blank if you are not using HTTP proxy to access outside world. Thus say, if you are using DSL, Cable, WIFI or Wireless connection like HSDPA or the like, leave it blank. After this, the system will pull up installation software from our mirror site. This may take a while depending on the connection speed. Since this is only the few cases where I can help the Debian community, I opted to join the "package survey." I too encourage everyone to participate this survey. Since we want this to be a minimal system, deselect all packaged options. This leaves us with the bare minimum to run our Debian Lenny Linux system. Since this is running of VirtualBox guest, we are sure enough that it is safe to put GRUB boot loader in master boot record. So go ahead, and say Yes. In few moments, installation should complete. Congratulations, you have just installed a minimal Debian Lenny Linux in VirtualBox!!!

Let us now install a minimal GNOME in top of our minimal system. Before we do the installation of desktop environment, it is a good practice to do the ff:
hostname:/# aptitude update hostname:/# aptitude safe-upgrade
But since we have just used netinstall installation, our system should be up to date. Now, let us get our system configured with X, do:
hostname:/# aptitude install less hostname:/# aptitude install xorg gnome-core gdm gdm-themes
The above command install xorg, GNOME and gdm (GNOME Display Manager) and associated gdm themes. Wait and relax as this may pull archives of around 250 MB. After the installation, do a reboot to login to GNOME Display Manager. You will notice here that your graphical login screen maybe bigger than your monitor. This can be fixed by installing virtual additions but we can also work around this one by modifying /etc/X11/xorg.conf as root, like so:
Section "Screen" Identifier "Default Screen" Monitor "Configured Monitor" SubSection "Display" Modes "1024x680" "800x600" EndSubSection EndSection
Let us now install VirtualBox guest additions:
hostname:/# su hostname:/# aptitude install build-essential hostname:/# aptitude install linux-headers-`uname -r` hostname:/# mount /media/cdrom hostname:/# sh
After reboot, you should now have a nicely integrated Debian Lenny with VirtualBox. Now, to make guest machine auto-adjust with the size of main VirtualBox window, update /etc/X11/xorg.conf with:
Section "Device" Identifier "Configured Video Device" Driver "vboxvideo" EndSection


1 comment:

Anonymous said...

Thanks, this just saved me a headache. :)