Debian Installation
From A110 Wiki
This HOWTO describes how you can install a recent Debian GNU/Linux distribution on the internal 2 GB Solid-State-Disk.
There is now a HOWTO for Debian Sid with a recent 2.6.27 kernel, XFCE desktop and most features enabled. Read it here
Contents |
Goals
- Installation from USB thumb drive (>= 512 MB) onto the SSD.
- Encrypted hard drive (dm-crypt), LVM on top of that, ext3 on top of that.
Preparations
First, backup your USB thumb drive (you'll overwrite all contents) and the laptop's internal SSD (see Backups).
Then, download the latest boot.img.gz (for USB thumb drive installs) and the latest netinst ISO:
$ wget http://people.debian.org/~joeyh/d-i/images/daily/hd-media/boot.img.gz $ wget http://cdimage.debian.org/cdimage/daily-builds/daily/arch-latest/i386/iso-cd/debian-testing-i386-netinst.iso
Unpack boot.img.gz and dd it onto the thumb drive's first partition (/dev/sdb1 in my case):
$ gunzip boot.img.gz $ dd if=boot.img of=/dev/sdb1
Be very careful and make sure /dev/sdb1 is really your thumb drive! Also, the first partition on the USB thumb drive must already exist (use e.g. cfdisk if it doesn't).
Now mount the new /dev/sdb1 and copy the netinst ISO onto it:
$ mount -t vfat /dev/sdb1 /mnt $ cp debian-testing-i386-netinst.iso /mnt $ umount /mnt
That's it, you can now attach the thumb drive to the A110 and boot it. Select USB HDD as first item in the Boot priority order in the BIOS, though.
Base Installation
- Before the installation actually starts, select Advanced Options, then Expert install.
- Partitioning: Select Guided - use entire disk and set up encrypted LVM.
- Select IDE2 master (hdc) to install on the SSD.
- On the LVM config screen, select the "/" partition (ext3) and change Reserved blocks from 5% to 1% to save some space.
- During Software selection do not select Standard system in order to get the smallest possible installation. We'll install more software later.
- Install GRUB Legacy, not the new (and possibly unstable) GRUB 2. GRUB 2 may be worth trying, but I haven't yet tested it on the A110.
- Install GRUB in the master boot record (of the SSD).
After the Installation
At this point we still have 1.2 GB of space left on the root filesystem (it's actually an LVM volume) of the SSD. The /boot partition is ca. 256 MB, the swap LVM volume is ca. 140 MB big.
Firewall and config files
Optionally, you can now put some firewall scripts and config files onto a thumb drive and transfer them to the laptop. This is what Uwe Hermann usually uses: fw_laptop (iptables firewall script), bashrc, bash_logout, inputrc, vimrc, muttrc.
Now attach the thumb drive with those files to the A110 and transfer them into place:
$ mount -t vfat /dev/sda1 /mnt $ cd /root $ cp /mnt/bashrc .bashrc $ cp /mnt/bash_logout .bash_logout $ cp /mnt/inputrc .inputrc $ cp /mnt/vimrc .vimrc $ cp /mnt/muttrc .muttrc $ chmod 600 .bashrc .bash_logout .inputrc .vimrc .muttrc
Read the .bashrc file so it takes effect:
$ . .bashrc
Note: Of course you can use the same files for your normal (non-root) user, too.
Now install and start the firewall:
$ mkdir /etc/rc.boot $ cp /mnt/fw_laptop /etc/rc.boot $ chmod 700 /etc/rc.boot/fw_laptop $ /etc/rc.boot/fw_laptop
Edit /etc/rc.boot/fw_laptop to fit your needs, of course.
We can now unmount the USB thumb drive:
$ umount /mnt
Network
Edit /etc/network/interfaces and add:
auto eth0 iface eth0 inet dhcp pre-up /etc/rc.boot/fw_laptop
The pre-up line is optional, it'll start the firewall everytime the eth0 device comes up. Now attach an Ethernet cable and start the network:
$ /etc/init.d/networking restart
Dist-upgrade to latest Debian unstable
Edit /etc/apt/sources.list, delete all lines and add the following ones for Debian unstable:
deb http://ftp.de.debian.org/debian unstable main contrib non-free deb-src http://ftp.de.debian.org/debian unstable main contrib non-free
Then dist-upgrade to the latest Debian unstable:
$ apt-get update $ apt-get dist-upgrade
This will get you all the latest versions of packages you have installed, and (more importantly), the latest 2.6.25 kernel.
Let's install some more useful packages, then reboot into the new 2.6.25 kernel:
$ apt-get install less vim gpm pciutils bzip2 deborphan alsa-utils vlock mutt postfix yacpi logcheck ntpdate lynx mplayer vorbis-tools $ reboot
Optimize for space
In order to free up some more space on the SSD:
$ apt-get install localepurge $ localepurge $ dpkg --purge linux-image-2.6.24-1-486 $ apt-get clean $ apt-get autoremove $ dpkg --purge `deborphan`
Time/Date
The time and/or date on your A110 may not be correct yet, set it up like this:
$ ntpdate pool.ntp.org $ hwclock --systohc
X11
Let's install the X.org server and a small window manager (e.g. icewm):
$ apt-get install xorg xterm icewm iceweasel gimp
As a non-root user you can now start X11:
$ startx
This will start the X server with a default resolution of 640x480 (TODO: find out how to enable higher resolutions).
Audio
Getting the audio to work is quite easy. If you haven't done it before you shall install the utilities:
# apt-get install alsa-utils
Then you have to raise the controller manually:
# alsamixer
