Category Archives: debian

Debian “jessie” on Intel “Skylake”

Except for work computers with GNU/linux, the last of which was retired in 2008, my GNU/linux computers have been outdated hand-me-downs. And when the P4 I got back in 2010 went belly up, I figured it was time for trying a modern machine.

Note: I wasn’t going for a top-of-the-line gaming computer with high performance everything. Just a modern state of the art computer.

I wasn’t satisfied with the combination of price and specs on the desktop computers sold by the consumer electronic retailers, so I asked an old colleague who likes building his own computers (thanks Alexey!) to help me come up with an order for components that would work when I put it together. This is what I ordered:

  • Main board: ASUS H170M-PLUS, Socket-1151
  • CPU: Intel Core i5-6600 Skylake
  • Memory: Corsair Vengeance LPX DDR4 2133MHz 16GB
  • SSD: Kingston SSDNow V300 120GB 2.5″ OEM
  • Hard disk: Seagate Barracuda® 1TB
  • Cabinet: Fractal Design Define S Black
  • Power supply: Corsair CX500, 500W PSU

I won’t spend much time on the task of putting the parts together to make a working computer, suffice to say that with re-watching this video, frequent phone calls to Alexey, compared with close reading of the documentation (Alexey told me to do that), I got it working and was greeted by the fancy screen that has taken the place of the BIOS.

UEFI Boot screen

I tried, and gave up on making PXE boot work for the debian install on the UEFI BIOS, and put the debian-8.3.0-amd64-netinst.iso image on an USB flash drive. I then inserted the USB flash drive in one of the USB3 connectors on the front of the cabinet, pressed F10 in the UEFI BIOS, and then kept F8 pressed F8 until I got to the boot menu.

In the boot menu, I selected

UEFI: Generic Flash Disk 8.07, Partition 1 (7640MB)

and then pressed ENTER.

In the debian installer:

  1. Selected the “Graphical installer”
  2. Selected “English” as the installer language
  3. Selected “Norway” as the time zone
  4. Selected “en_US.UTF-8” as the locale
  5. Selected “Norwegian” as the keyboard layout
  6. Gave “lorenzo” as the computer name
  7. Gave “hjemme.lan” as the domain name
  8. Set the root password
  9. I created a user for myself, and set the password
  10. Partitioned the disks manually:
    1. Partitioned the 120GB SSD. I put the root partition on the SSD to get a quick startup of the system, and to get fast startup of applications. I also had to put an EFI partition here. Without an EFI partition, the base-installer failed with a “No space left on device” error message:
      Number Size File system Name Flags
      #1 1GB fat32 efi boot,esp
      #2 119GB ext4 root
    2. Partitioned the 1TB HDD:
      1. I put the swap, sized to twice the physical memory, (something I’ve been doing since I installed my first GNU/linux box back in the 90-ies)
      2. To avoid SSD wear from frequent writing, I put the /var partition (where /var/log resides) on the spinning disk
      3. Finally, I made the rest of the disk the /home directory
      Number Size File system Name Flags
      #1 32GB linux-swap(v1) swap
      #2 100GB ext4 var
      #3 868GB ext4
  11. In the installer, I selected a package mirror from Norway (it doesn’t really matter which one, because of the NIX), selected “No proxy”, and continued
  12. I let the installer install GRUB on the hard disk
  13. During the installation of the system, the installer stopped with the following error message:
    Unable to install busybox
    An error was returned while trying to instal lthe busybox package
    onto the target system.
    
    Check /var/log/syslog or see virtual console 4 for details
  14. I googled for the error message, found this ubuntu bug report, and tried the following workaround from a comment on the bug, and the installer continued past the problem spot.The workaround/hack, was to boot the installer, press Ctrl-Alt-F2 to get a virtual console, and at the prompt in that console, type:
    # while true; do rm /var/run/chroot-setup.lock; sleep 1; done

    and then switch back to the installer in Ctrl-Alt-F1 and continue with the installation

  15. I let the installer run until completion, and pulled the USB flash drive from the USB3 connection (probably not necessary, since pressing F8 was necessary to get to the boot menu in the first place), and let the computer reboot
  16. The computer booted with the familiar debian gdm login screen, and a disappointing 1024×768 screen resolution
  17. I logged in to see what the display settings of the desktop had to say, but the display setting had 1024×768 as the only choice
  18. I let apt-get update the distribution
    apt-get update
    apt-get dist-upgrade
  19. I rebooted again after the update had completed, but the update wasn’t enough to fix the screen resolution, the display still had 1024×768 as the only available resolution
  20. This was my first test of Gnome 3 (when “gnome” in debian changed its meaning from the quite usable “Gnome 2” to “Gnome 3”, the old hardware on my previous debian computer wasn’t able to display anything at all), and I found it ugly and incomprehensible
  21. So I installed MATE
    apt-get install mate-desktop-environment

    and rebooted and logged in again

  22. This time, after logging in, I met something that looked very much like the old and familiar “Gnome 2” desktop, but still with 1024×768 as the only available display resolution
  23. I edited /etc/apt/sources.list and added apt lines for jessie-backports
    # jessie backports (4.3 kernel)
    deb http://http.debian.net/debian jessie-backports main contrib non-free
    
  24. I installed the kernel, firmware and xserver-xorg-video-intel
    apt-get -t jessie-backports install linux-image-amd64 firmware-linux
    apt-get -t jessie-backports xserver-xorg-video-intel
  25. After a new reboot I was up and running, and this time with 1600×1200 resolution on the display, which is the maximum the old display I was using would support
  26. Since I got a working system by using packages from backports, I didn’t make the jump to debian testing immediately, but I figured I might as well get as new packages as possible from jessie-backports, so I created an /etc/apt/preferences file with the following contents:
    Package: *
    Pin: release a=jessie
    Pin-priority: 700
    
    Package: *
    Pin: release a=jessie-updates
    Pin-priority: 710
    
    Package: *
    Pin: release a=jessie-backports
    Pin-priority: 720
    
  27. Then I did apt-get update followed by dist-upgrade and pulled in new versions of many packages
    apt-get update
    apt-get dist-upgrade
  28. I used apt-get to install many familiar packages from my old system
    apt-get install xscavenger
    apt-get install default-jdk
    apt-get install chromium
    apt-get install flightgear
    apt-get install oolite
  29. Like I always do on debian systems, I pulled in “real” firefox from Mint debian edition:
    1. I edited /etc/apt/sources.list file and added the apt lines for Mint debian edition
      # Linux Mint Debian Edition (has firefox)
      deb http://packages.linuxmint.com debian import
    2. I installed the key for Mint debian edition
      apt-get update
      apt-get install linuxmint-keyring
      apt-get update
    3. I used apt to install firefox
      apt-get install firefox
  30. I installed apticron that will check for updates daily and notify me about updates
    apt-get install apticron
  31. Then I rebooted into the system I’m currently running

That’s it basically. Things seems to work out of the box, sound, video etc. (youtube doesn’t play in chromium, but it does play in firefox).

Installing debian “squeeze” with PXE boot on a Samsung N145 Plus netbook

Introduction

This article describes the steps necessary to install debian 6 “squeeze” on a Samsung N145 Plus netbook, with the following specification:

  • Intel Atom processor
  • 10.1″ display
  • 1GB RAM
  • 340GB HDD
  • Windows 7 preinstalled

Setting up netboot of the debian installer

DHCP requests in my home LAN network is provided by dnsmasq on a desktop PC running GNU/linux debian stable (which at the time of writing, was Debian 6 squeeze). One nice feature of dnsmasq is that it can provide PXE network boot.

So what I did was to download the i386 network boot image and put the contents in the /var/tftpd/debian-installer/i386 directory of the computer running dnsmasq, and then edit the /etc/dnsmasq.conf file in the following way:

  1. Remove the comment in front of the dhcp-boot config line:
    dhcp-boot=pxelinux.0
  2. Set the tftp-root pointing to the directory containing the pxelinux.0 file:
    tftp-root=/var/tftpd/debian-installer/i386

Installing debian

Booting from the network

I connected the netbook with to the switch in my home LAN an RJ45  twisted pair cable, and powered on the netbook, and kept the F12 button pressed during boot, and ended up in the debian text based installer.

I set the time zone and location of the install (Oslo, Norway), created an initial user and set the root password.

Partitioning

The netbook came with a 340GB and Windows 7 preinstalled.  The hard disk was partitioned so that the Win7 system had both a C: and a D: drive, with the operating system installed on the C: drive.

The plan was to keep the Windows 7 installation, sans its D: drive and install debian in the part of the hard disk occupied by the D: drive.

The initial partitioning table looked like this:

#1 primary 104.9 MB B ntfs
#2 primary 93.4 GB ntfs
#5 logical 138.3 GB ntfs
#4 primary 28.2 GB ntfs

I guessed that partititon #1 was the boot partition, and that partition #2 was the C: drive containing the Windows 7 installation, and that #4 was either some kind of Samsung software (diagnostics possibly) or something belonging to the Windows 7 installation.

I left partition #1, #2 and #4 alone, and deleted the partition containing the D: drive (partition #5), and turned that into free space:

#1 primær 104.9 MB B ntfs
#2 primær 93.4 GB ntfs
pri/log 138.3 GB FREE SPACE
#4 primær 18.2 GB ntfs

I added a swap partition twice the size of the physical memory i.e. 2GB, and added an ext3 partition using the rest of the free space, and ended up with a partitioning table looking like this:

#1 primary 104.9 MB B ntfs
#2 primary 93.4 GB ntfs
#5 logical 136.3 GB B f ext3 /
#6 logical 2.0 GB f swap swap
#4 primary 18.2 GB ntfs

I saved the partitioning table and continued.

Installing the system

After completing the partitioning, I selected the following items to install:

  • SSH server
  • Laptop
  • Base tools

I let the installer run, using defaults for all questions. I answered YES to the question of whether GRUB should be installed on MBR. The installer found the Windows 7 installation and added it to the GRUB boot menu.  When the time came to reboot, I let the installer reboot.

After the reboot I logged in as root and installed the “KDE Plasma netbook” package:

apt-get install plasma-netbook kde-l10n-nb

I opened the /etc/apt/sources.list in a text editor, and modified it:

I then updated the APT database with the new sources and added all updates to the already installed software:

apt-get update
apt-get install linuxmint-keyring
apt-get update
apt-get dist-upgrade

I then installed all software I assumed was necessary:

apt-get install ttf-mscorefonts-installer
apt-get install openoffice.org openoffice.org-l10n-nb
apt-get install firefox firefox-l10n-nb

I rebooted the laptop and then logged into the plasma desktop using the user created at the start of the installation process. The desktop was missing network support and other useful software.

I logged in as root using the “failsafe” alternative, and installed missing software in the terminal window:

apt-get install network-manager-kde update-notifier-kde
apt-get install synaptic software-center gdebi

I rebooted and logged into plasma again. I tried to plug in an USB flash memory, and discovered that the desktop had no file manager, konqueror was missing. I installed konqueror (and discovered I should have picked the package “kde-plasma-netbook”, rather than just “plasma-netbook”):

apt-get install konqueror

The plasma desktop looked great, but was way to slow on an atom processor without much in the way of graphical hardware acceleration.

So I decided to try gnome and installed gnome with the command:

apt-get install gnome

I let apt set gdm3 as the default login instead of kdm.

I rebooted and logged into the gnome desktop, and it performed a lot better than the plasma desktop.

I rebooted again chose Windows 7 from the grub menu, and Windows 7 booted and logging into the desktop worked.

Making the Fn keys adjust the display brightness

The Fn keys for the adjusting the brightness didn’t work. I googled, and found two promising web pages:

  1. Fixing brightnes control, etc. on a Samsung R510 with Debian Squeeze
  2. InstallingDebianOn Samsung Samsung N150

I decided to try the first approach, and downloaded the packages created for Ubuntu Natty from https://launchpad.net/~voria/+archive/ppa

I then installed the downloaded .deb packages in the following way:

  1. Installed the easy-slow-manager:
    1. I let gdebi pull in all depdendencies (gcc, the linux-headers, make, etc)
  2. Installed samsung-backlight:
    1. Edited /etc/default/grub changing the line GRUB_CMDLINE_LINUX_DEFAULT
      GRUB_CMDLINE_LINUX_DEFAULT="quiet"
      to
      GRUB_CMDLINE_LINUX_DEFAULT="quiet acpi_backlight=vendor"
    2. Ran the command
      update-grub
  3. Installed samsung-tools:
      1. Installed the devscripts
        apt-get install devscripts
      2. Unpacked the samsung-tools tarball
        cd /tmp
        tar zxvf samsung-tools_1.4~ppa3~loms~natty.tar.gz
        cd /tmp/samsung-tools_1.4~ppa3~loms~natty
        dch -l sb
        1. Added “Compiled for debian squeeze” as the final comment

     

     

  4. Built the deb package
    cd /tmp/samsung-tools-1.4~ppa3~loms~nattysb1
    dpkg-buildpackage -rfakeroot -us -uc
  5. Installed the deb package
    gdebi /tmp/samsung-tools_1.4~ppa3~loms~nattysb1_all.deb
    1. I let gdebi install all of the required dependencies
  6. Rebooted

After the reboot I tried the Fn+Up and Fn+Down keys to adjust the display brightness and the keys worked fine.