Wednesday, October 01, 2008

Minimal Debian Etch install with X on VirtualBox host

This to document minimal installation of Debian 4.0 (Etch) on VirtualBox host.

Download latest Debian Etch, I am using debian-40r3-i386-netinst.iso. During the package installation, deselect all. This should give you a minimal Debian installation. During installation, you say "No" during selecting the mirror. We will update /etc/app/sources.list after the installation anyway. Reboot virtual machine after installation.

Add the following lines to your /etc/apt/sources.list, I am using nano to edit sources.list file. Since I am near Hongkong, I selected the mirror sites as shown below, change this as you see fit:
hostname:/# nano -w /etc/apt/sources.list

Additional entries into /etc/apt/sources.list
#more entries from here of course from /etc/apt/sources.list
deb etch main contrib non-free
deb-src etch main contrib non-free

Then do:
hostname:/# aptitude update hostname:/# aptitude upgrade

The above command should bring your fresh installation of Debian up to date with security patches and upgrade whatever is currently installed in your system. More likely than not, it will install new linux image so you need to reboot after the upgrade.
Now let us install xorg, base gnome and gdm:
hostname:/# aptitude install xorg gnome-core gdm gdm-themes

Reboot machine after the above command, we should now have a graphical login using GDM.
Now let us install some utility commands, less:
hostname:/# aptitude install less

Now install guest additions, in VirtualBox host do Devices | Install Guest Additions..... Then in Debian, do
# mount cdrom # cd /cdrom # sh
The guest machine should now feel much faster. One thing you will notice is that GNome is only using a portion of your total screen real state. A quick search in Google points to the fact that the X server used in Debian 4.0 is a bit dated and it does not work with auto-resize. So what we will do next is to adjust xorg.conf to force X to use a much larger workspace. Since X configuration is a book in itself I will just post my configuration here, see below:
# /etc/X11/xorg.conf (xorg X Window System server configuration file) # # This file was generated by dexconf, the Debian X Configuration tool, using # values from the debconf database. # # Edit this file with caution, and see the /etc/X11/xorg.conf manual page. # (Type "man /etc/X11/xorg.conf" at the shell prompt.) # # This file is automatically updated on xserver-xorg package upgrades *only* # if it has not been modified since the last upgrade of the xserver-xorg # package. # # If you have edited this file but would like it to be automatically updated # again, run the following command: # sudo dpkg-reconfigure -phigh xserver-xorg Section "Files" FontPath "/usr/share/fonts/X11/misc" FontPath "/usr/X11R6/lib/X11/fonts/misc" FontPath "/usr/share/fonts/X11/cyrillic" FontPath "/usr/X11R6/lib/X11/fonts/cyrillic" FontPath "/usr/share/fonts/X11/100dpi/:unscaled" FontPath "/usr/X11R6/lib/X11/fonts/100dpi/:unscaled" FontPath "/usr/share/fonts/X11/75dpi/:unscaled" FontPath "/usr/X11R6/lib/X11/fonts/75dpi/:unscaled" FontPath "/usr/share/fonts/X11/Type1" FontPath "/usr/X11R6/lib/X11/fonts/Type1" FontPath "/usr/share/fonts/X11/100dpi" FontPath "/usr/X11R6/lib/X11/fonts/100dpi" FontPath "/usr/share/fonts/X11/75dpi" FontPath "/usr/X11R6/lib/X11/fonts/75dpi" # path to defoma fonts FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType" EndSection Section "Module" Load "i2c" Load "bitmap" Load "ddc" Load "dri" Load "extmod" Load "freetype" Load "glx" Load "int10" Load "vbe" EndSection Section "InputDevice" Identifier "Generic Keyboard" Driver "kbd" Option "CoreKeyboard" Option "XkbRules" "xorg" Option "XkbModel" "pc104" Option "XkbLayout" "us" EndSection Section "InputDevice" Identifier "Configured Mouse" Driver "vboxmouse" Option "CorePointer" Option "Device" "/dev/input/mice" Option "Protocol" "ImPS/2" Option "Emulate3Buttons" "true" EndSection Section "InputDevice" Identifier "Synaptics Touchpad" Driver "synaptics" Option "Device" "/dev/psaux" Option "Protocol" "auto-dev" Option "HorizScrollDelta" "0" EndSection Section "Device" Identifier "Generic Video Card" Driver "vboxvideo" EndSection Section "Monitor" Identifier "Generic Monitor" Option "DPMS" EndSection Section "Screen" Identifier "Default Screen" Device "Generic Video Card" Monitor "Generic Monitor" SubSection "Display" Modes "1024x680" "800x600" EndSubSection EndSection Section "ServerLayout" Identifier "Default Layout" Screen "Default Screen" InputDevice "Generic Keyboard" InputDevice "Configured Mouse" InputDevice "Synaptics Touchpad" EndSection Section "DRI" Mode 0666 EndSection



No comments: