Dutch blog

My Dutch blog is at http://andre-nl.blogspot.com

03 March 2012

Installing ArchLinux on HP EliteBook 8530w

About this post: I have proceeded installing the laptop in two days, which quite some time between them. I have made notes of this, including some mistakes I've made. Therefore this is not directly an installation guide. I guess I should clean it up as an installation guide. However, it might give some solutions to problems encountered in the wild.




I am using a mlti architecture (x86/x86_64) boot cd. This CD fails to boot correctly on this laptop when the disc is inserted into the internal optical drive. Flashing caps lock and scroll lock leds, and after a while they stop blinking, the hard disk led flashing rapidlly.

To solve this problem I have installed Smart Boot Manager (http://www.sourceforge.net/projects/btmgr)
As this is an older program, not aware of AHCI, therefore I have set the SATA mode to IDE. However, the Smart Boot Manager still doesn't detect the optical drive.

Since it mentions on https://wiki.archlinux.org/index.php/USB_Installation_Media#Overwrite_the_USB_drive it is possible to write the content of the ISO file directly to a flash medium, and I do have my digital camera with me, I will attempt to write the content to an MMC card and boot from that. Perhaps the content of the CDROM is confusing the “BIOS” in the laptop. (It's not a real BIOS, but an UEFI in BIOS mode, but enabling UEFI tells me this is for development purposes only)

However booting from an MMC card doesn't seem to work. I suppose the “BIOS” only recognises SD cards. (SD is electronically compatible with MMC but uses a different protocol)

Anyhow, I have found a way to boot the CD. Press Escape, and then F9, during the POST to enter the Boot Device Menu, and inserting the disc when this menu is displayed (NOT any earlier), and then choose the “Notebook Upgrade Bay” option to boot from the CDROM. (Really....Upgrade Bay means Optical Drive???) Sigh Why is it so difficult to implement a BIOS that correctly boots from CDs. I thought we had these kind of problems behind us. Appearently, booting from CD problems are still an issue today.

Anyhow, now the boot process is completed, I am dropped in a root shell, with the message “To begin installation run /arch/setup”, so let's do that.

Selecting the sources. Since I am at Stack, meaning I got a high speed internet connection available, I choose remote sources in stead of the local source. Core-remote, extra-remote, community-remove and multilib-remote.

Next step, selecting the mirror. Since I am in the Netherlands, I choose the http://ftp.nluug.org mirror. Next is network setup. Just a few times hitting enter to set up a wired DHCP configured network, to be used during installation.

The next question is choosing an editor. The choise is between nano and vi. It has as comment nano (easy) and vi (advanced). However I have no expecience with nano, but I do have experience with vim, which means vi improved. Well... let's give nano a try.

Setting the clock and timezone, Europe/Amsterdam. The next question, the hardware clock, to set it to UTC or local time. Operating Systems like Microsoft Windows usually set the hardware clock to local time, while Linux/Unix operating systems usually set the hardware clock to UTC. As this system might Dual-boot with windows later, I will set it to localtime for now. In the next menu, I choose for syncing time with an ntp server, and continue.

Back in the main menu, the next step, preparing the hard disk. I keep the default value for the /boot partition, 100 MiB. For the swap partition, the default value is 256 MiB. How much swap space does a system require? I believe an advice many times mentioned is double the amount of RAM in the system. https://www.linux.com/news/software/applications/8208-all-about-linux-swap-space. I have entered a value of 8192 MiB.

The / file system: the default value is 7500 MiB. In my experience, this value is way too low, and I advice to set it to 30000 MiB. After setting this, the installer asks to use the rest for the /home partition.

However, I just realised I might need to install Windows on this laptop later. It would usually be recommended to install Windows first and then other operating systems. Due this fact, I will revert the partitioning and make the partitions manually.

So, I will have a 100 MB ext2 formatted primaty partition at the beginning of the disk, the /boot partition, and at the end of the disk, extended paritions, 30000 MB ext4 root, 80000 MB ext4 home, 8192 MB swap partition. Note the cfdisk tool used for manual partitioning uses MB in stead of MiB. Setting up the file systems and mount points is a separate menu option.

Installing packages, selecting grub as bootloader, keeping the default selection. We will install software later. Next option in the main menu is to configure the system. We should add another mirror to the mirror list, but we shouldn't do so at this moment, as, a new version of pacman has been released, and chaning the configuration file now will make it not auto upgrade the configuration file with options required for the new version to run. Let's edit the mirrorlist, and uncomment a Dutch mirror from the list. The rest we will configure later.

Then we continue installing the boot loader, and finish up this part of the installation. I am still not convinced this is the most ideal setup. I have been thining a lot about wether I would install a windows installation or not, and how this would impact my partitioning.

Booting, logging in with the root password set duing the installation.

Run
pacman -Syu
to install updates. The installation medium comes with pacman 3.5.4. Since pacman 4 is released, we will need to upgrade this first. After running the upgrade command, pacman will upgrade itself, and suggest to run
pacman-key –init
As it requires some random bytes, and the bare system not doing much other activities this might take a few minutes to complete. To speed up, possible run
dd if=/dev/urandom of=blaat count=100
while true; do cp blaat blaat2; done
in a second console.

When this is done, run
pacman -Syu
It may complain about conflicting files in the filesystem package, if so run
pacman -f -S filesystem
then run
pacman -Syu
again, and answer questions to replace module-init-tools with core/kmod with yes.


I continued installing on 03-03-2012. Since some time passed by since I ran previous steps, another pacman -Syu is required. It seems some more changed happened and the package util-linux required to be forced as well

pacman -Syu
pacman -S util-linux --force
pacman -Syu


If we wish to run a graphical enviorement we should install X, therefore we need the package group xorg

pacman -S xorg

Besides xorg, we need also a desktop environment and window manager. Nowadays, many of the options provide both functionality. Technically spoken they can still be run as separate entities. My choice goes to xfce4. The xfce4 group contains the xfce4 desktop environment and the xfwm4 window manager. In the xfce4-goodies package group are some utilities, like a screenshooter and task manager.

pacman -S xfce4 xfce4-goodies

During the resolving of dependencies a messaage appears “ kmod and module-init-tools conflict, remove module-init-tools?”. Answer yes here

There might be some more conflicts, --force them as above

Next, we need a display mananger. As I have always been a gnome user, until they released Gnome3, which made me make the switch to xfce4. I have always used the Gnome Display Manager (GDM)

Let's see what we have available. The default display manager is XDM. () This is a minimalistic display manager. A little too minimalistic perhaps. GDM has an option to choose the session type, which means, if you have multiple Window Environments installed, you can choose upon login which one you wish. This option appears to be missing in XDM. Most alternatives are developed by a Window Manager project, such as KDE, Gnome, LXDE, Window Maker, etc. However, xfce doesn't have it's own Display Manager. On their page they point to SLiM as an alternatives that doesn't have dependencies of KDE or Gnome. I will investigate this possibility

pacman -S slim archlinux-themes-slim

Now it is installed, let's try it

/etc/rc.d/slim start

Now, my screen goes black. Therefore I try to espace back to the console by pressting control+alt+f1, but I see nothing. I type reboot, and the system reboots. So the console is still running, but the graphics card is messed up. Xorg is messing something up. Let's have a look at this.

less /var/log/Xorg.0.log

The auto configure attempts the following drivers in this order:

  • nouveau (open source driver for nvidia cards)
  • nv (older Xorg driver)
  • nvidia (the binary blob from nvidia)
  • vesa (VESA interface)
  • fbdev (Framebuffer)

The xorg driver for nouveau is not installed. Appearently this is not part of the xorg-drivers package
The nv driver fails due a kernel driver claiming it. Appearently the kernel part of nouveau is installed.
The binary blob from nvidia isn't installed either.
The VESA driver appears to be used, and somehow messes up. Probably because the nouveau kernel module did some initialisation of the graphics card.

As it appears to be, after unloading the nouveau driver the console becomes unusable. ( http://askubuntu.com/questions/16998/switch-between-nvidia-current-and-nouveau-without-a-reboot)

Well... the question is, which driver to use? The binary blob from Nvidia or the open source nouveau. For the time being, I will use the nouveau driver, since it's already in the kernel, and so it required the least effort. Besides... a binary blob in a linux kernel, well... is it desirable? But that's a whole different debate.

So... let's just install some stuff

pacman -S nouveau-dri xf86-video-nouveau

now
/etc/rc.d/slim start

gives a graphical login screen. Press control+alt+f1 to return to the console. We cannot login yet since we have no users (expect root) yet.
At this point, we might change some config files

nano /etc/rc.conf
or if you prefer vim, install it first with

pacman -S vim

vim /etc/rc.conf

In the Hardware section we see

MODULES=()

If we see a () in this config file, it means an array. The values are space separated.
It might be usefull to add the module sg here. I had some weird problems in the past due the fact this module not being auto loaded anymore, as it used to be in the past. This module inplements an older interface to IDE/SCSI/SATA drivers, and is required to run certain cd burining software, such as Nero Burning Rom for Linux.

MODULES=(sg)

Next thing to do, under the Networking section, set the hostname. (default setting was myhost)

At the bottom, we can add slim to the end of the daemons list.

After these changes, we're going to add a user

useradd

and answer the questions, such as username and password. In the usual case the defaults for the other options are just fine.

After a reboot I am still having issues. I decided to switch to gdm instead, as I am familiar with this, and it basically configures itself.Although I wonder, why does a Display Manager depend on gcc

I made myself some trouble by forcing a complete upgrade and aborting the installation of a kernel with a control C.  I created myself a corrupted initramfs, causing my system not to book.

So, on a side track, if installing a kernel gives the error
Error hook 'udev' can not be found
you got to re-install udev (just enter pacman -S udev)

If the system is unbootable, boot from CD and change root as described on


Rven though I did a different approach: I booted from the CD, created a new initramfs using that CD, and copied kernel + modules over to my system, so it was bootable again.

So far this side track, installing GDM, and a dependency dbus, which it doesn't automatically install with gsm

pacman -S gdm dbus

A test run

/etc/rc.d/dbus start
/etc/rc.d/gdm start

now, we get the login screen, change the session type from gnome to xfcd4-session, enter username and password, xfce4 should start. For now, I accept the default panel settings.

With control+alt+f1 I return to my console

The next thing to do is adding the archlinux-fr repository, and installing yaourt. Yaourt is a front end for pacman. But it has more features, it can install from AUR. Archlinux User Repository.

As it says on their site http://archlinux.fr/yaourt-en
Simply add

[archlinuxfr]
Server = http://repo.archlinux.fr/$arch
to /etc/pacman.conf and run
pacman -Sy yaourt

If you wish to install some closed source software, such as skype or nerolinux, this can often be found in the AUR repository. Some someware in the AUR repository will be built from source by the yaourt. Anyways.... it enables you access to some more software. One of the packages from AUR we'll be using is a simple wireless script, which starts wpa_supplicant and after it connected acquire am IP address through DHCP.

yaourt -S wpa_auto

Answer edit PKGBUILD with no . And the following questions with yes

Then we'll have to edit the /etc/rc.conf file again
the daemons, add “wpa_auto dbus gdm” there.

Edit the /etc/wpa_supplicant.conf file,
remove everytthing, and just put
update_config=1
ctrl_interface=/run/wpa_supplicant
In the default installation there are no tools such as ifconfig and iwconfig.

pacman -S net-tools
pacman -S wireless_tools

Also usefull to install is wpa_supplicant_gui ,

pacman -S wpa_supplicant_gui

Now, return to the X world by pressing control+alt+f7
Open a terminal, and get root

su
wpa_gui

Now we can configure a wireless network. And we will notice, due the wpa_auto script, we will see an IP address appear automatically. Do not forget to save the configuration. (we did allow this in the two line wpa_supplicant.conf we made earlier)

Well... so far do good. Done configuring. Now it's time to just install some more software, such as firefox, thunderbird, libreoffice, vlc and so on. But that's just straight-forward pacman -S and doesn't require any other settings.


System maintenance. To install upgrades

pacman -Syu

That's it folks


One more thing. I am running an NFS server, and to configure that

pacman -S nfs-utils

and add to the daemons in /etc/rc.conf, “rpcbind nfs-common” after network.
I have also added an @ to the network, so the laptop will not wait for an IP address in case no ethernet cable is connected.

So, my daemons look like

DAEMONS=(hwclock syslog-ng @network rpcbind nfs-common netfs crond wpa_auto dbus gdm)