valibuk.net

A place for opinions and notes of a valibuk.

Gentoo on Dell Latitude D820

Installation of Gentoo on Dell Latitude D820 notebook
(23 September 2006)

[Last update: 17 October 2006]

Larry the Cow

[26.10.2009] Well, this is slightly an older howto :) However I was actively using Gentoo on this notebook with approximately this configuration without any problems until December 2008.

Some newer info could be find on Guido’s site or try the Linux on Laptops site for Dell.

I installed Gentoo on the Dell Latitude D820 notebook. It was not so straightforward as I expected ;), so I decided to write a (short) howto.

1. Introduction

This howto extends the Gentoo Handbook. I used the Gentoo 2006.0 on a Dell Latitude D820 Notebook page, but some parts are outdated.

Features of this howto:

  • I decided to keep the original Windows XP installation that came with the notebook.
  • My notebook came with a Wester Digital SATA harddisk and an nVidia graphics card.
  • The suspend2 hibernation works.
  • I found how to remove the annoying clicking sound of the harddrive.

2. Shrinking of Windows Partition

The harddisk contains two partitions at the beginning:

  1. Device Boot      Start         End      Blocks   Id  System
  2. /dev/sda1               1          12       96358+  de  Dell Utility
  3. /dev/sda2              13         905     7173022+   7  HPFS/NTFS

Originally the 7173022+ number was higher — I wrote the howto after a successful installation. :)

I shrinked the Windows partition to 7GB (I do not need more, maybe Windows do, but who cares? ;).

3. Installation CD

I installed Gentoo with the Minimal Installation CD. To boot from a CD it is necessary to change the boot sequence in the setup of the notebook.
The installation CD booted without any problems and detected all necessary parts of the notebook (I have a wired Internet connection, no idea if it works with the wireless card).

4. Disk Partitions and File Systems

Here are my partitions:

  1. Device Boot      Start         End      Blocks   Id  System
  2. /dev/sda1               1          12       96358+  de  Dell Utility
  3. /dev/sda2              13         905     7173022+   7  HPFS/NTFS
  4. /dev/sda3   *         906         910       40162+  83  Linux
  5. /dev/sda4             911       14593   109908697+   5  Extended
  6. /dev/sda5             911        1160     2008093+  82  Linux swap / Solaris
  7. /dev/sda6            1161        3028    15004678+  83  Linux
  8. /dev/sda7            3029        8811    46451916   83  Linux
  9. /dev/sda8            8812       14593    46443883+  83  Linux
  • The first two sda1 and sda2 partitions are the Windows installation.
  • 40MB sda3 for /boot
  • sda4 is an extended parition for the next partitions
  • 2GB sda5 swap, so the swap partition can be used for hibernation
  • 15GB sda6 for the root /
  • 45GB sda7 for /home
  • 45GB sda8 as an encrypted partition (not installed yet)

For the sda3 partition I chosen the ext2 file system (hereafter fs), for sda5 the ext3 fs and for the sda6 the reiserfs.
Why reiserfs? I just wanted to try it, but, of course, you can choose ext3 or any other fs.

And a remark to the 2GB swap and the hibernation: firstly I thought I will use the old suspend (it worked on my previous Acer notebook) and there is no compression. Suspend2 has a compression, but anyway I would stay with a 2GB swap partition (I did not see any statistics about the compression algorithm used by default, maybe it compresses a full 2GB RAM of JPEG pictures to 1,67 GB and you would need a 2GB swap partition anyway.).

5. Configuring Kernel

Unfortunately I was not able to start the notebook with a manually configured kernel — the grub bootloader was not able find any partition on a SATA harddisk. A kernel produced by the genkernel application works fine without any problems. (Any idea why?)

Firstly I tried the gentoo-sources kernel, but there was no suspend support, so now I have the suspend2-sources kernel.

To remove unnecessary modules from the kernel or to add some necessary, call:

  1.  

The kernel is recompiled automatically.

I enabled the suspend2 in the kernel and here is the configuration for it:

  1. Power management options (ACPI, APM)  —>
  2. [*] Suspend2  —>
  3.  
  4. — Suspend2
  5.      —   Image Storage (you need at least one writer)
  6.      [ ]     File Writer
  7.      [*]     Swap Writer
  8.      —   General Options
  9.      ()      Default resume device name
  10.      [ ]     Allow Keep Image Mode

The suspend2 compression needs the LZF compression algorithm (the option with a default value Compressor lzf in the /etc/hibernate/hibernate.conf file) to be compiled into the kernel:

  1. Cryptographic options  —>
  2. <*>   LZF compression algorithm

6. Bootloader

I decided for grub. My /boot/grub/grub/conf file (do not forget to mount the /boot parition):

  1. default 0
  2. timeout 10
  3.  
  4. title=Gentoo
  5. root (hd0,2)
  6. kernel /boot/kernel-genkernel-x86-2.6.16-suspend2-r8 root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/sda6 udev vga=791 splash=silent resume2=swap:/dev/sda5
  7. initrd /boot/initramfs-genkernel-x86-2.6.16-suspend2-r8
  8.  
  9. title=Windows
  10. rootnoverify(hd0,1)
  11. makeactive
  12. chainloader +1

7. Xorg

For the newest NVidia driver call emerge nvidia-drivers.

I created two configuration files:

  • two monitors with Twinhead — this creates one huge monitor with shared DPI.
    In KDE you will see two displays, but you cannot change settings for them.
    An advantage of this way that you can move application windows between monitors.

    The xorg.twinview.conf file.

  • two monitors definitions — this created two separate monitors with individual settings such as DPI.
    You will be able to set individual resolutions or a rotation :).
    A disadvantage of this way is that there is no possibility to move a window between monitors. Basically there are two X displays: :0.0 and :0.1. To start an application on a specific monitor from the command line you can use the following way:

    1. DISPLAY=":0.0" kcalc #starts in the first monitor
    2. DISPLAY=":0.1" kcalc #starts in the second monitor

    The xorg.two_monitors.conf file.

8. Suspend2

To enable loading a suspended image you have to (if you used the genkernel to generate kernel, what we did) change the following lines in the /usr/share/genkernel/generic/linuxrc file:

  1. mount -t proc proc /proc >/dev/null 2>&1
  2. mount -o remount,rw / >/dev/null 2>&1

to the following lines:

  1.  

By default the blacklisted-modules file contains also the nvidia module, so if you have this graphics card, comment out the line with the nvdidia value.

A part of the /etc/hibernate/blacklisted-modules file:

  1. #nvidia

9. Harddrive Clicking Sound

The harddrive was making an annoying clicking sound. Every approx. 10 seconds. Even in the (BIOS) setup. It was quite frustrating :|

Fortunately there is a way how to disable this feature ;)

  1. hdparm -B 255 /dev/sda

You should see the following output:

  1. /dev/sda:
  2.  setting Advanced Power Management level to disabled

Last words

I hope I helped you, so let’s enjoy Gentoo on your Dell notebook — as I do. :)

For the comments see the post.

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • DZone
  • Digg
  • Reddit
  • Technorati
  • Furl
  • NewsVine
  • Slashdot
  • Ma.gnolia
  • StumbleUpon