Installing testing on a laptop

An example installation of Debian testing on a laptop

Author: Francesco Poli
Contact: invernomuto@paranoici.org
Version: 0.14
Copyright: Expat license
Notice:

Copyright (c) 2007-2023 Francesco Poli

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About this document
Web form HyperText Markup Language
Source form reStructuredText
Web stylesheet Cascading StyleSheets
Build directives Makefile

Contents

Testing on a laptop step by step

The purpose of this document is showing an example installation of Debian testing on a laptop.

Please note that this is just a step by step description of the installation process for a particular case. It is not meant to replace or substitute the official Debian installation guide: you can find the Debian stable installation guide and the Debian testing installation guide online.

Hardware

For the record, the machine under consideration is an Acer TravelMate P253-E-B9602G32Mnks (NX.V7XET.004), which ships with Linpus Linux pre-installed, and a Logitech M115 optical wheel USB mouse.

The numeric output of lspci on this box is:

$ lspci -n
00:00.0 0600: 8086:0104 (rev 09)
00:02.0 0300: 8086:0106 (rev 09)
00:16.0 0780: 8086:1e3a (rev 04)
00:1a.0 0c03: 8086:1e2d (rev 04)
00:1b.0 0403: 8086:1e20 (rev 04)
00:1c.0 0604: 8086:1e10 (rev c4)
00:1c.1 0604: 8086:1e12 (rev c4)
00:1d.0 0c03: 8086:1e26 (rev 04)
00:1f.0 0601: 8086:1e5e (rev 04)
00:1f.2 0106: 8086:1e03 (rev 04)
00:1f.3 0c05: 8086:1e22 (rev 04)
02:00.0 0200: 14e4:16b5 (rev 10)
02:00.1 0805: 14e4:16bc (rev 10)
02:00.2 0880: 14e4:16be (rev 10)
02:00.3 0880: 14e4:16bf (rev 10)
03:00.0 0280: 168c:0032 (rev 01)

Preparation

The hardware architecture of the box is AMD64 (EM64T). Since the goal is installing a 64 bit system, an amd64 installation medium is needed. The following testing netinst installation ISO hybrid image (with debian-installer based on the latest unstable port for the amd64 architecture) is chosen:

$ wget \
http://cdimage.debian.org/cdimage/daily-builds/sid_d-i/current/amd64/iso-cd/debian-testing-amd64-netinst.iso

Insert a USB flash memory stick into a USB port and check which device name it was assigned (by looking at recently created /dev/sd* files or by reading log messages with dmesg). You can now write the image to the USB stick:

$ dd if=debian-testing-amd64-netinst.iso of=/dev/sdb ; sync

Other available images are linked from the Debian Installer page.

Installation

After configuring the BIOS so that the laptop can boot from USB HDD or USB CDROM, insert the USB stick into a USB port of the laptop and boot from USB. Press [Enter] at the boot prompt in order to start the installation process.

First questions

The very first thing you are asked to select is the language you want to use for the installation process (which will subsequently be set as default language for the installed system): choose English, if you share my preferences. After that, you have to choose your country, so that the correct timezone will be set: select other, then Europe, and Italy (or otherwise, if you live elsewhere...). On next screen, choose the locale: select "en_US.UTF-8". Then choose the keymap to use: select "Italian", if you have an Italian keyboard.

At that point the installer warns that multiple network interfaces were found in the system and asks the user to choose the primary interface. One is the Broadcom Corporation NetLink BCM57785 Gigabit Ethernet PCIe, the other one is the Atheros Communications Inc. AR9485 Wireless Network Adapter: choose the Ethernet one as primary interface. The installer then proceeds to configure the network through DHCP. If you have a DHCP server on your LAN (as in my case), it succeeds and no further configuration is needed.

Now, use your creativity and choose a hostname for your box! You have to enter one in the next screen. Hereinafter, I'll refer to the chosen hostname as $HOSTNAME. Then, you have to enter the domain name: leave the field blank, if you have no established domain name for your LAN.

Time to set the root password: try and think a good one! You can create a regular user as well: enter your full name, a username, and a password.

Partitioning the disk

The goal is setting up a (hopefully) good partitioning layout for a laptop usage, with LVM for flexibility reasons. When asked, choose the manual partitioning method. Next screen displays the current disk partition table:

SCSI1 (0,0,0) (sda) - 320.1 GB ATA WDC WD3200BPVT-2
     #1  primary  160.0 GB  B    ext2
     #2  primary  160.0 GB       fat32

The screen also displays the partition table for the USB stick, but we are not going to touch that, so let's ignore it. Select each of the two primary partitions and choose "Delete the partition" from the dialog screen. Now the screen displays the following updated status:

SCSI1 (0,0,0) (sda) - 320.1 GB ATA WDC WD3200BPVT-2
       pri/log  320.1 GB      FREE SPACE

Select the free space line and choose "Create a new partition" from the dialog screen. Enter "250 MB" as partition size and choose "Primary" as partition type. Create the partition at the beginning of the available space, change the mount point to /boot and set the bootable flag to "on". After choosing "Done setting up the partition", you get back to the partition table screen, with the following updated status:

SCSI1 (0,0,0) (sda) - 320.1 GB ATA WDC WD3200BPVT-2
     #1  primary  248.5 MB  B  f  ext4          /boot
         pri/log  319.8 GB        FREE SPACE

Again select the free space line and choose "Create a new partition". Enter "max" as partition size and choose "Logical" as partition type. Change the "Use as" entry to "physical volume for LVM". After choosing "Done setting up the partition", you get back to the partition table screen, with the following updated status:

SCSI1 (0,0,0) (sda) - 320.1 GB ATA WDC WD3200BPVT-2
     #1  primary  248.5 MB  B  f  ext4    /boot
     #5  logical  319.8 GB     K  lvm

Choose "Configure the Logical Volume Manager"; you'll be asked to confirm the creation of partition #1 before you can proceed to the configuration of LVM: answer "Yes". Partition #1 is created with an ext4 filesystem in it.

The next screen allows you to configure the LVM: choose "Create volume group" and enter a suitable two- or three-letter abbreviation of $HOSTNAME (let's call it $HOSTABBR) as volume group name. Select /dev/sda5 for the new volume group. Back to the LVM configuration menu: choose "Create logical volume" and select the only possible volume group. Enter "root" as logical volume name. Now you're asked to enter the logical volume size: enter "1.0 GB". After that, you're back to the LVM configuration menu. If you want to check whether everything went fine, choose "Display configuration details"; you should get something like:

Unallocated physical volumes:
  * none

Volume groups:
  * $HOSTABBR                                           (319819MB)
    - Uses physical volume:        /dev/sda5            (319819MB)
    - Provides logical volume:     root                 (998MB)

Back in the LVM configuration menu, go on setting up logical volumes according to the following table:

LV name entered size
swap "2.2 GB"
usr "15.0 GB"
var "10.0 GB"
tmp "0.6 GB"
home accept proposed size (about "291 GB")

Choose "Finish" from the LVM configuration menu. You get back to the partition table screen, where the situation should look like:

LVM VG $HOSTABBR, LV home - 291.0 GB Linux device-mapper (linear)
     #1                 291.0 GB
LVM VG $HOSTABBR, LV root - 998.2 MB Linux device-mapper (linear)
     #1                 998.2 MB
LVM VG $HOSTABBR, LV swap - 2.2 GB Linux device-mapper (linear)
     #1                   2.2 GB
LVM VG $HOSTABBR, LV tmp - 599.8 MB Linux device-mapper (linear)
     #1                 599.8 MB
LVM VG $HOSTABBR, LV usr - 15.0 GB Linux device-mapper (linear)
     #1                  15.0 GB
LVM VG $HOSTABBR, LV var - 10.0 GB Linux device-mapper (linear)
     #1                  10.0 GB
SCSI1 (0,0,0) (sda) - 320.1 GB ATA WDC WD3200BPVT-2
     #1  primary  248.5 MB  B  f  ext4    /boot
     #5  logical  319.8 GB     K  lvm

Select the "#1 291.0 GB" line: change the "Use as" entry to "Ext4 journaling file system", and the mount point to /home. After choosing "Done setting up the partition", select the "#1 998.2 MB" line: change the "Use as" entry to "Ext4 journaling file system", and the mount point to /. After choosing "Done setting up the partition", select the "#1 2.2 GB" line: change the "Use as" entry to "swap area". After choosing "Done setting up the partition", repeat the process for the other logical volumes, until the result is as follows:

LVM VG $HOSTABBR, LV home - 291.0 GB Linux device-mapper (linear)
     #1                 291.0 GB     f  ext4    /home
LVM VG $HOSTABBR, LV root - 998.2 MB Linux device-mapper (linear)
     #1                 998.2 MB     f  ext4    /
LVM VG $HOSTABBR, LV swap - 2.2 GB Linux device-mapper (linear)
     #1                   2.2 GB     f  swap    swap
LVM VG $HOSTABBR, LV tmp - 599.8 MB Linux device-mapper (linear)
     #1                 599.8 MB     f  ext4    /tmp
LVM VG $HOSTABBR, LV usr - 15.0 GB Linux device-mapper (linear)
     #1                  15.0 GB     f  ext4    /usr
LVM VG $HOSTABBR, LV var - 10.0 GB Linux device-mapper (linear)
     #1                  10.0 GB     f  ext4    /var
SCSI1 (0,0,0) (sda) - 320.1 GB ATA WDC WD3200BPVT-2
     #1  primary  248.5 MB  B  f  ext4    /boot
     #5  logical  319.8 GB     K  lvm

Choose "Finish partitioning and write changes to disk"; you'll be asked to confirm the creation of the partitions: answer "Yes". The desired filesystems are created and the swap area is prepared.

Finishing the installation

At this point, you just have to wait for the base system to be installed.

Afterwards, you'll be asked to choose a Debian network mirror: select a mirror near you (for instance, choose Italy, deb.debian.org). You also have to specify an HTTP proxy, if you use one; if instead you do not use any HTTP proxy on your LAN (as in my case), then leave the proxy field blank.

Then you'll be asked whether you want to contribute to popcon: answer "Yes", if you care about Debian. The next screen allows you to select groups of packages: since the goal here is installing the base system only, deselect everything and choose "Continue". When asked to confirm that GRUB should be installed to the MBR, answer "No", in order to work around a bug in the current debian-installer; then enter "/dev/sda" as device for boot loader installation.

The installation is complete: remove the USB stick and choose "Continue" to reboot the system!

Conclusions

Now the system is installed and ready to run: you can boot it and log in as root or as the previously created regular user. But very little can be done with the base system only: next step is tuning the system configuration and begin adding software packages according to your needs. You may do that (and more) in a way similar to the workstation/desktop setup: follow the steps documented in

  • Initial configuration (HTML, reST), but only enable smartd monitoring for /dev/sda (see hard disk health section)
  • Console configuration (HTML, reST), but do not load the unneeded nct6775 kernel module (see utilities section) and choose "Acer Laptop" as keyboard model and "Italian" as keyboard layout (in the console fonts section)
  • Desktop environment configuration (HTML, reST), remembering that the screen resolution for our laptop should be 1366x768 with a 24 bit color depth, that the keyboard layout is Italian (hence it,ru,gr should be used instead of us,ru,gr in ~/.xsession), that conky configuration should be adapted to a laptop (see below for a reference to a document where laptop-specific tweaks are described), and that the subsection on software RAID monitoring should be skipped
  • Network tools configuration (HTML, reST)
  • E-mail configuration (HTML, reST)
  • Web browsers configuration (HTML, reST)
  • Backup configuration (HTML, reST)
  • Audio software configuration (HTML, reST), but skip the configuration for the external USB sound card (which will not be kept permanently connected)
  • Image and video software configuration (HTML, reST)
  • Document system configuration (HTML, reST)
  • Scientific applications configuration (HTML, reST)
  • Programming environment configuration (HTML, reST)
  • Games configuration (HTML, reST), remembering that the screen resolution for our laptop should be 1366x768

After that, you can tweak some laptop-specific things. More details in a separate document (HTML, reST).