GENTOO-linux on a DELL Latitude E4300


Table of Contents

Introduction
Disclaimer
Motherboard problems
Preparation
Hardware Summary
Hard-Drive Parameters
Configuration
Partitioning with LVM
Chrooting to Gentoo
Recompiling the system
Build the Kernel
Final system configurations
Wireless
Fstab
Grub
After reboot into the Gentoo system
Dell BIOS upgrades (Instructions from gentoo wiki)
Summary of patching instructions
Other Tweakings
Bluetooth configuration
Xrandr tweaks
La files updating
Input devices and USB modules

Disclaimer

This web-page merely documents what I did to install Gentoo-linux in my Latitude E4300 using the gentoo powered rescue cd by www.sysresccd.org .

It is absolutely not meant to be an installation guide. Anyone deciding to take benefit of informations provided in this page be aware that this choice will be at her/his own risk.
Useful installation guides can be found at

Motherboard problems

During and after the installation I observed systematic locking up of the machine whenever I was using the C-compiler or other cpu-power demanding applications. I contacted assistance and after several unsuccessful intervenctions between December 2008 and January 2009 I received the following statement from Dell commercial:

Issue:
Regular reviews of Latitude E4300 field performance data as well as a small number of customer escalations have revealed a potential for system hangs in some Latitude E4300 systems. E4300 systems that have this issue will periodically hang and need to be rebooted. This issue can occur when running any OS and on systems using either the SP9300 or SP9400 CPU.

Root Cause:
The root cause is the power level available from the motherboard to the SP9400 and SP9300 CPUs under high stress conditions.

Solution:
Dell recommends that the users who have experienced this issue disable Multi-core on the affected systems until service supply of motherboards is available in mid- February. Dell will work with customers to replace motherboards on these systems as stock becomes available.
After replacing the motherboard with a newer model at the end of February 2009, the locking-up phenomena disappeared. It took however a lot of time...

Preparation

[Back to Introduction]

Hardware Summary

The table below summarises the hardware detected on the laptop.
Component Brand Model Info (drivers, etc.)
Motherboard MiniPCI
CPU Intel Core 2 CPU P9400 @ 2.40 GHz stepping 06
PCI Intel 82801I (ICH9 family) USB UHCI Controller Intel (TM) specs
RAM DDR3 Dual Channel 1067 MHz 4096MB (2x2048MB)
Hard Disk Dell 160GB Free Fall Sensor Serial ATA Disk (7200RPM)
Display Intel Corporation Device 2a42 Controller 13.3''(WXGA (1200X800) no WWAN)
Graphics-Controller Intel Mobile 4 Series Chipset Integrated Graphics Controller i915, vesafb.0/graphics/fb0
PCI Intel Device 10f5
Ethernet Intel(R) PRO/1000 PCI-Express Gigabit Ethernet driver=e1000e
Bluetooth Dell 365 Generic Bluetooth USB driver v 0.3
Wireless LAN Intel WiFi Link 5300 (802.11 a/b/g/n 3x3) with centrino label Intel(R) Wireless Link AGN driver for Linux (driver=iwlagn)
PCI bridge Intel Corporation PCI Express Port 1 Port 2 Port 4 rev 03
PCI bridge Intel Corporation 82801 Mobile PCI Bridge rev 93
Isa Bridge Intel Corporation Device 2917
IEEE 1394 Ricoh Co Ltd R5C822 IEEE 1394 Controller
RAID bus controller Intel Corporation SATA RAID Controller
USB Intel 82801I (ICH9 family) USB UHCI Controller 2 ports driver=uhci_hcd
USB Intel 82801I (ICH9 family) USB2 EHCI Controller 1 ports driver=ehci_hcd
Audio Intel 82801I (ICH9 family) HD Audio Controller

Result of 'lspci -n' taken from GNU/Linux OS analysed by the Debian GNU/Linux device driver check page

Debian GNU/Linux device driver check Output

PCI IDWorks?VendorDeviceDriverComment
80862a40YesIntel CorporationMobile 4 Series Chipset Memory Controller Hubintel-agpv2.6.25
80862a42-Intel CorporationMobile 4 Series Chipset Integrated Graphics Controller  
80862a43-Intel CorporationMobile 4 Series Chipset Integrated Graphics Controller  
80862a44-Intel CorporationMobile 4 Series Chipset MEI Controller  
80862a46-Intel CorporationMobile 4 Series Chipset PT IDER Controller  
80862a47-Intel CorporationMobile 4 Series Chipset AMT SOL Redirection  
808610f5YesIntel Corporation82567LM Gigabit Network Connectione1000ev2.6.26
80862937-Intel Corporation82801I (ICH9 Family) USB UHCI Controller #4  
80862938-Intel Corporation82801I (ICH9 Family) USB UHCI Controller #5  
80862939-Intel Corporation82801I (ICH9 Family) USB UHCI Controller #6  
8086293c-Intel Corporation82801I (ICH9 Family) USB2 EHCI Controller #2  
8086293eYesIntel Corporation82801I (ICH9 Family) HD Audio Controllersnd-hda-intelv2.6.25
80862940-Intel Corporation82801I (ICH9 Family) PCI Express Port 1  
80862942-Intel Corporation82801I (ICH9 Family) PCI Express Port 2  
80862946-Intel Corporation82801I (ICH9 Family) PCI Express Port 4  
80862934-Intel Corporation82801I (ICH9 Family) USB UHCI Controller #1  
80862935-Intel Corporation82801I (ICH9 Family) USB UHCI Controller #2  
80862936-Intel Corporation82801I (ICH9 Family) USB UHCI Controller #3  
8086293a-Intel Corporation82801I (ICH9 Family) USB2 EHCI Controller #1  
80862448YesIntel Corporation82801 Mobile PCI Bridgei810_rng,hw_random 
80862917YesIntel CorporationICH9M-E LPC Interface ControlleriTCO_wdtv2.6.28
8086282aYesIntel CorporationMobile 82801 SATA RAID Controllerahciv2.6.25
80862930YesIntel Corporation82801I (ICH9 Family) SMBus Controlleri2c-i801v2.6.25
11800832-Ricoh Co LtdR5C832 IEEE 1394 Controller  
11800822YesRicoh Co LtdR5C822 SD/SDIO/MMC/MS/MSPro Host Adaptersdhci-pciv2.6.25
11800843YesRicoh Co LtdR5C843 MMC Host Controllerricoh_mmcv2.6.25
80864235YesIntel CorporationPRO/Wireless 5300 AGN [Shiloh] Network Connectioniwlagnv2.6.27


Hard-Drive Parameters

Hard drive operational parameters

# sudo hdparm /dev/sda 
		

     /dev/sda:
      multcount    = 16 (on)
      IO_support   =  0 (default 16-bit)
      unmaskirq    =  0 (off)
      using_dma    =  1 (on)
      keepsettings =  0 (off)
      readonly     =  0 (off)
      readahead    = 256 (on)
      geometry     = 16383/255/63, sectors = 58605120, start = 0




# sudo hdparm -i /dev/sda
		
/dev/sda:

 Model=ST9160411ASG, FwRev=DE14    , SerialNo=            5TG0AYJX
 Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs RotSpdTol>.5% }
 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=4
 BuffType=unknown, BuffSize=16384kB, MaxMultSect=16, MultSect=?16?
 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=312581808
 IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes:  pio0 pio1 pio2 pio3 pio4 
 DMA modes:  mdma0 mdma1 mdma2 
 UDMA modes: udma0 udma1 udma2 udma3 udma4 udma5 *udma6 
 AdvancedPM=yes: unknown setting WriteCache=enabled
 Drive conforms to: unknown:  ATA/ATAPI-4,5,6,7

 * signifies the current active mode




Configuration

[Back to Introduction]

Partitioning with LVM

The reference for this section is the official Gentoo LVM2 guide

Partitioning with cfdisk: the hard disk unit is /dev/sda

 To edit the partition table
       $ cfdisk /dev/sda 


My partition

# sudo /sbin/fdisk -l -u /dev/sda 
		
Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000080

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          24      192748+  83  Linux
/dev/sda2              25         148      996030   83  Linux
/dev/sda3             149       13095   103996777+   5  Extended
/dev/sda5             149       13095   103996746   8e  Linux LVM


An alternative way to list the partition table

# sudo /sbin/cfdisk -Ps /dev/sda; sleep 10
		
Partition Table for /dev/sda

               First       Last
 # Type       Sector      Sector   Offset    Length   Filesystem Type (ID) Flag
-- ------- ----------- ----------- ------ ----------- -------------------- ----
 1 Primary           0      385559     63      385560 Linux (83)           Boot
 2 Primary      385560     2377619      0     1992060 Linux (83)           None
 3 Primary     2377620   210371174      0   207993555 Extended (05)        None
 5 Logical     2377620   210371174     63   207993555 Linux LVM (8E)       None
   Pri/Log   210371175   312576704      0   102205530 Free Space           None


Installation of LVM2 on the volume group in /dev/sda5

     $ modprobe dm-mod
 In order to avoid scanning the cdrom: 
     $ mkdir -p /etc/lvm 
     $ nano -w /etc/lvm/lvm.conf
      (set filter to scan /dev/sda and reject anything else)
      filter = [ "a|/dev/sda|", "r/.*/" ]
 To change pre-existing volume group      
     $ vgchange -a y 
 I named "vg00" the volume group on "/dev/sda5" 
     $ pvcreate /dev/sda5 
     $ vgcreate vg00 /dev/sda5
 Had I wanted to include more partitions in the volume group 
     $ vgextend vg00 /dev/${DISK}7 /dev/${DISK}8 /dev/${DISK}9 
 Creation of logical volumes in "vg00" 
     $ lvcreate -L1G     -ntmp  vg00
     $ lvcreate -L10G    -nvar  vg00
     $ lvcreate -L12G    -nusr  vg00
     $ lvcreate -L4G     -nusrlocal  vg00
     $ lvcreate -L3G     -nopt  vg00
 Use vgdisplay to check the remaining space
     $ vgdisplay 
     $ lvcreate -L63.13G -nhome vg00
 To list the properties of the logical volume "home" 
     $ lvdisplay /dev/vg00/home


Volume groups, logical volumes can be resized

Resizing with LVM

     $ vgreduce vg00 /dev/sda5
 echo "..." give verbose output 
     $ lvcreate -L800M -nvar  vg00        creating var as 800MB
 IMPORTANT: 

 before resizing a logical volume it is necessary to 
1) UMOUNT the volume, if mounted. 
2) resize the FILESYSTEM if already installed e.g. for home on ext3:
     $ umount /dev/vg00/home
     $ fsck -n /dev/vg00/home                  check only that the filesystem is clean
     $ tune2fs -O ^has_journal /dev/vg00/home  disable journalling 
     $ e2fsck -f /dev/vg00/home                repair 
     $ resize2fs /dev/vg00/home 64.18G         reduce the fs to the desired size  
     $ lvreduce -L-2G /dev/vg00/home           reduce the logical volume by 2G  
     $ tune2fs -j /dev/vg00/home               restore journalling 
 Detailed instructuctions available from the LVM-HOWTO     
and from    howtoforge.com - resizing ext3 prtitions.

 For EXTENDING a logical volume WITH FILESYSTEM it is necessary to 
    $ umount /dev/vg00/home
    $ tune2fs -O ^has_journal /dev/vg00/home   disable journalling 
    $ e2fsck -f /dev/vg00/home                 repair 
    $ lvextend -L+2G /dev/vg00/home            enlarge LV 
    $ resize2fs /dev/vg00/home                 adapt fs to new size 
    $ tune2fs -j /dev/vg00/home                restore journalling 

If the fs is not mounted:

     $ lvresize -L400M /dev/vg00/var       now 400MB
For enlarging 
     $ lvextend -L+1G /dev/vg00/var  
 In order to add 22 more logical extents (4MB each default) 1.4GB+88MB
     $ lvresize -l+22 /dev/vg00/var
     $ lvresize -L3G /dev/vg00/var
 Detailed instructuctions again from the LVM-HOWTO 



Resizing without unmounting or rebooting:

    $ mount -o remount,ro /boot
 after installation is complete to protect that critical data 
    $ mount -o remount,ro /boot


Recovering LVM after emergency reboot (using a rescue cd simplifies (http://www.sysresccd.org/Main_Page ))

 if at boot vg00 is detected 
    $ /sbin/vgmknodes /dev/vg00
    $ vgscan --mknodes   (to restart an interrupted Gentoo installation)


Applying the filesystems

     $ mke2fs -j /dev/sda1
     $ mke2fs -j /dev/sda3
     $ mkswap /dev/sda2
     $ swapon /dev/sda2
     $ for i in /dev/vg00/* ; do mke2fs -j $i ; done


Mounting

     $ mkdir /mnt/gentoo  
     $ mount /dev/sda3  /mnt/gentoo/
     $for i in boot usr tmp var home opt proc; do mkdir /mnt/gentoo/${i} ; done
     $ mkdir /mnt/gentoo/usr/local
     $ mount /dev/sda1  /mnt/gentoo/boot
     $ for i in usr tmp var home ; do mount /dev/vg00/${i} /mnt/gentoo/${i}; done
     $ mount /dev/vg00/usrlocal /mnt/gentoo/usr/local
     $ chmod 1777 /mnt/gentoo/tmp


Chrooting to Gentoo

Gentoo handbook well documented operations
  • Use links
  • Download stage-3 tarball for AMD64 and EM64T CPU: Core 2 Duo & Quad processors are EM64T)
  • Download portage tarball
  • Set time and date


Untarring installation packages

      $ tar xvjpf stage3-*.tar.bz2
      $ tar xvjf portage-latest.tar.bz2 -C /mnt/gentoo/usr


Gentoo Stage 3 download

      $ cp -L /etc/resolv.conf etc/resolv.conf
      $ mount -t proc none /mnt/gentoo/proc
      $ mount -o bind /dev /mnt/gentoo/dev
To check that everything is mounted 
      $ mount
      $ cp  /proc/mounts /mnt/gentoo/etc/mtab
The alternative to the instruction below is to copy in make.conf
the mirror address selected with " links" 
      $ mirrorselect -a -s4 -o | grep 'GENTOO_MIRRORS=' >>/mnt/gentoo/etc/make.conf


Chrooting to the new environment

      $ chroot /mnt/gentoo/ /bin/bash
      $ env-update
      $ source /etc/profile


Recompiling the system

--> Check the default "USE" flags

       $ emerge --info


  • make.conf
  • package.keywords
  • package.use


Log & Overlay directories

      $ mkdir /var/log/portage
      $ mkdir /usr/local/portage
      $ mkdir /usr/local/sci

--> make.conf for system installation

      $ nano -w /etc/make.conf

		
CHOST="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe"
CXXFLAGS="${CFLAGS}"
ACCEPT_KEYWORDS="amd64"  # amd64 is required by x86_64-pc-linux-gnu
PORTAGE_TMPDIR=/var/tmp
PORTDIR=/usr/portage
DISTDIR=${PORTDIR}/distfiles
PKGDIR=${PORTDIR}/packages
PORT_LOGDIR=/var/log/portage
GENTOO_MIRRORS="ftp://trumpetti.atm.tut.fi/gentoo/
 http://trumpetti.atm.tut.fi/gentoo/
 ftp://ftp.linux.ee/pub/gentoo/
 ftp://ftp.ing.umu.se/linux/gentoo/
 http://ftp.ing.umu.se/linux/gentoo/
 ftp://ftp.ds.karen.hj.se/gentoo/
 http://ftp.ds.karen.hj.se/gentoo/
 ftp://mirror.mdfnet.se/gentoo/
 http://mirror.mdfnet.se/mirror/gentoo/
 ftp://de-mirror.org/distro/gentoo/
 http://de-mirror.org/distro/gentoo/
 ftp://ftp.unina.it/pub/linux/distributions/gentoo/"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
PORTAGE_RSYNC_RETRIES="3"
MAKEOPTS="-j3"                 # For Core 2 Duo should be number of cpu (= 2) + 1
PORTAGE_NICENESS=3
AUTOCLEAN="yes"
FEATURES="candy ccache distlocks sandbox userpriv usersandbox"
CCACHE_SIZE="2G"
#PORTAGE_RSYNC_EXTRA_OPTS=""
#########
## USE ##
#########
USE="alsa avahi cdr cups gnome gtk hal ldap -arts -kde -qt3 -qt4"
ALSA_CARDS="hda-intel usb-audio"
INPUT_DEVICES="keyboard mouse evdev synaptic wacom"
VIDEO_CARDS="intel"


 Updating 
    $ emerge --sync
    $ emerge portage
    $ emerge -av binutils gcc-config gcc glibc
 only binutils not up to date 
    $ emerge binutils
 and recompiling (after removing eventual blocks) 
    $ USE="multilib" emerge -epv system
    $ emerge binutils gcc-config gcc glibc gcc
 and recompiling (after removing eventual blocks) 
    $ USE="multilib" emerge -Du world
    $ USE="multilib" emerge sys-libs/libstdc++-v3


How to resume "emerge"

Read the process number 
      $ emerge --resume
Temporary stop by pressing <ctrl>+z 
      $`USE="-*" emerge ${DEPENDENCY} && fg %1` 
replace after "fg" the right process number


Build the Kernel

--> Preparing the kernel

    $ emerge -av sys-fs/lvm2
    $ emerge -av pciutils
    $ lspci -v                  hardware inquiry         
    $ emerge gentoo-sources-2.6.xx-gentoo-rx
    $ cd /mnt/gentoo/usr/src/linux
    $ make menuconfig


Use genkernel to generate a kernel

    $ emerge -av genkernel eselect
    $ eselect kernel list            list the installed kernels
    $ eselect kernel set x           points simlink at kernel number x
    $ genkernel --menuconfig --lvm  --makeopts=-j3 --save-config --no-install kernel 
--makeopts specifies number of processor (n+1) 
--save-config saves .config in /etc/kernels 
kernel builds kernel and modules


--> Manual Kernel compilation

    $ make && make modules_install
    $ cp arch/x86_64/boot/bzImage /boot/kernel-2.6.xx-gentoo-rx
    $ cp System.map  /boot/System.map-2.6.xx-gentoo-rx
    $ cp .config /boot/config-2.6.xx-gentoo-rx
      To compare with older Kernel config
    $ emerge -Dua sys-kernel/kccmp 
    $ kccmp kernel-2.6.xx-gentoo-rx /path_2_old_config/config_file 
     to upgrade 
    $ cd /usr/src/linux-xxxxx  new source 
    $ cp ../linux-yyyy/.config .    copy old config 
    $ make menuconfig  check settings 
    $ ...
     to upgrade kernel modules that are not included in the kernel source 
    $ emerge sys-kernel/module-rebuild
    $ module-rebuild populate
    $ module-rebuild rebuild


--> Manual Tweakings

 Processor type and features  --->
       [*] Symmetric multi-processing support 
       [ ] Support for extended (non-PC) x86 platforms                                              
       Processor family (Core 2/newer Xeon)  --->   
             (X) Core 2/newer Xeon                              
       [*] Intel MCE features                                                         

 Power management and ACPI options  --->  
          [*] Power Management support                                     
          [*] Suspend to RAM and standby                                     
          [*] Hibernation (aka 'suspend to disk')                            
          [*] Run-time PM core functionality
          [*] ACPI (Advanced Configuration and Power Interface) Support  --->
                  < M >   AC Adapter                                                   
                  < M >   Battery                                                      
                  < * >   Button                                                       
                  < * >   Video                                                        
                  < M >   Fan                                                          
                   [*]    Dock                                                         
                  < M >   Processor                                                   
                  < M >   Processor Aggregator                                      
                  < M >   Thermal Zone        


 Executable file formats / Emulations  --->                                  
       [*] IA32 Emulation                                                              



 Networking Support --->
       Networking options --->            Wired network
             <*> PF_KEY sockets                                               
             [*] TCP/IP networking    
             [ ] IP: multicasting                                   
             [ ] IP: advanced router                                        
             [*] IP: kernel level autoconfiguration
             [*] IP: DHCP support
       <*>   Bluetooth subsystem support  --->   Gentoo bluetooth guide
                   Bluetooth device drivers  --->
                      < M > HCI USB driver 
       [*]   Wireless  --->              if compiled as module 
             <*>   Generic IEEE 802.11 Networking Stack (mac80211)    mac80211 should go to modules.autolaoad. 
       < M >   WiMAX Wireless Broadband support  --->                       
        <*>   RF switch subsystem support  --->      from 2.6.32


Device Drivers  --->                                            
       Generic Driver Options  --->                                 
            [*] Maintain a devtmpfs filesystem to mount at /dev              
            [*] Automount devtmpfs at /dev, after the kernel mounted the ro
            [*] Select only drivers that don't need compile-time external firmware 
            [*] Prevent firmware from being built              [Go to rc.conf configuration]

   
 Device Drivers  --->  From Gentoo forums:  SOLVED: Intel ICH9 SATA controller/kernel question
        < > ATA/ATAPI/MFM/RLL support              Turn off the ATA/ATAPI/MFM/RLL drivers completely: 
                                                  having these latter drivers enabled  
        < >  Intel PIIXn chipsets support   would turn /dev/sd(x) into /dev/hd(x). 
             SCSI device support  --->        SATA disks are SCSI:  enable the SATA driver with    
                 <*> SCSI device support
                 <*> SCSI disk support
                 <*> SCSI CDROM support
                 [*] SCSI low-level drivers  --->

            <*> Serial ATA (SATA) support

        <*> Serial ATA (prod) and Parallel ATA (experimental) drivers --->
             [*]   ATA ACPI Support                                             
             [ ]   SATA Port Multiplier support                               
             <*>   AHCI SATA support                                           
             < >   Silicon Image 3124/3132 SATA support                         
             [*]   ATA SFF support                                            
             <*> Intel ESB, ICH, PIIX3, PIIX4 PATA/SATA support




 Device Drivers  --->
       [*] Network device support  --->
             [*] Ethernet (1000 Mbit)  --->         Wired network:
                  <*>  Intel(R) PRO/1000 PCI-Express Gigabit Ethernet support
 

 Device Drivers --->
      [*] Network device support --->              
             Wireless LAN --->                     Wireless
                  [*] Wireless LAN (IEEE 802.11)
                  {M} Intel Wireless Wifi Core                                         
                  [ ] Iwlwifi RF kill support                                               
                  [ ] Enable full debugging output in iwlagn driver             
                  <*> Intel Wireless WiFi Next Gen AGN                         
                  [*]   Enable Spectrum Measurement in iwlagn driver     
                  [*]   Enable LEDS features in iwlagn driver                   
                  [ ]   Intel Wireless WiFi 4965AGN
                  [*]   Intel Wireless WiFi 5000AGN    [Go to emerge iwl5000-ucode]

  Obsolete from 2.6.32   RF kill must be disabled  see also the Gentoo forum  Intel Wireless WiFi 5000AGN on x86_64

 Wacom Tablet Support      
 For wacom tablet see  the Wiki guide
 Device Drivers  --->               
  Input device support  --->        
       [*]   Tablets  ---> 
          <  >   Wacom Intuos/Graphire tablet support (USB)  [Go to emerge kernel module] 
          < M >   Wacom Intuos/Graphire tablet support (USB)   from 2.6.39-r3 


 Graphics Support
 Device Drivers  --->
       Graphics support  --->
         -*- /dev/agpgart (AGP Support)  --->
                  <*>  Intel 440LX/BX/GX i8xx and E7x05 chipset support
         <*> Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)
                     < M > Intel I810            (driver: DRM_I810) 
                      <*> Intel I830M, 845G, 852GM, 855GM, 865G 
                      < >  i830 driver      (driver: DRM_i830) 
                      <*>  i915 driver      (driver: DRM_i915) 
                      [*]  Enable modesetting on intel by default    enable Kernel Mode Setting (KMS)
                < M > Lowlevel video output switch controls
             < > Support for frame buffer devices --->  Bug 288346 
                  [ ] VESA VGA graphics support        framebuffer drivers  (vesafb,
uvesafb, intelfb, etc) drivers are in direct conflict with the Intel DRM driver (i915) 
             Console display driver support  --->
                      <*> Framebuffer Console support
                      [*]   Framebuffer Console Rotation        Kernel 2.6.33 on: recommended for KMS
     RF kill must be disabled  see also the Gentoo forum  Intel Wireless WiFi 5000AGN on x86_64



 Device Drivers  --->
       Multimedia devices ---> 
          < M >   Video For Linux                                              
           [ ]     Enable Video For Linux API 1 (DEPRECATED)                  
           [*]     Enable Video For Linux API 1 compatible Layer (NEW)   
	   [*]   Load and attach frontend and tuner driver modules as needed    kernel 2.6.39
             Video capture adapters ---> 
                  [*]   Autoselect pertinent encoders/decoders and other helper chips
                  [*]   V4L USB devices  --->   
                 < M >   USB Video Class (UVC)        Webcam module


 Device Drivers --->
       <*>  Sound card support  --->  
                 < M >   Advanced Linux Sound Architecture  --->
                         [*]   USB sound devices  --->
                               < M >   Edirol UA-101/UA-1000 driver   2.6.36: generates snd-usb-lib 
 Device Drivers --->
       [*] USB support  --->                                     
                  [*]     USB runtime power management (autosuspend) and wakeup 
                 < M >   USB Printer support  
                 < M >   USB Mass Storage support

 Device Drivers --->
           Real Time Clock --->             UTC clock  
                  <*> PC_style 'CMOS'

 Firmware Drivers  --->      Dell Bios  
    < M > BIOS update support for DELL systems via sysfs
    < M > Dell Systems Management Base Driver
     [*] Export DMI identification via sysfs to userspace


 File systems  --->             Check that ext4 is active
       <*> Second extended fs support                                    
                  [ ]   Ext2 extended attributes                                   
                  [ ]   Ext2 POSIX Access Control Lists                            
       <*> Ext3 journalling file system support                           
                  [ ]   Default to 'data=ordered' in ext3                            
                  [ ]   Ext3 extended attributes                                     
       <*> The Extended 4 (ext4) filesystem
                  [ ]   Ext4 extended attributes (NEW)                               
                  [ ]     Ext4 POSIX Access Control Lists (NEW)                     

 Kernel Hacking  --->           Kernel size
       [ ] Magic SysRq key                                              
       [ ] Kernel debugging      Check whether genkernel activates kernel debugging 
       [ ] Compile the kernel with frame pointers                       



Final system configuration

[Back to Introduction]



    $ emerge syslog-ng xinetd fcron sysfsutils openssh dhcpcd gentoolkit slocate acpid ccache
    $ fcrontab -u systab /etc/crontab
    $ rc-update add syslog-ng default 
    $ rc-update add xinetd default
    $ rc-update add sshd default 
    $ rc-update add acpid default
    $ rc-update add fcron default


Wireless

--> Configuring the wireless interface

    $ ln -s /etc/ini.d/net.lo /etc/init.d/eth.wlan0
    $ emerge wpa_supplicant wireless-tools (in case the first does not detect the driver)
    $ nano -w /etc/init.d/net
    $ rc-update add net.lo networkmanager     (if networkmanager is the name of the default profile)       


Editing the net init file

#  modinfo iwlagn  module info 
#  nano -w /etc/conf.d/net
##
# wired
##
modules=("ifconfig")
config_eth0=("dhcp")
dhcpcd_eth0="-t 30"
dhcp_eth0="nodns nonis"
## 
# wireless
##
# the following lines tell to prefer wpa_supplicant on wireless-tools
#
modules=( "wpa_supplicant" )
wpa_supplicant_wlan0="-Dwext"      load the driver 
wpa_timeout_wlan0=60
#
# old for wireless-tools
#
#modules=( "iwconfig" )
#
config_wlan0=( "dhcp" )
dhcpcd_wlan0="-t 30"
dhcp_wlan0="nodns nontp nonis"


Editing the rc file

#  nano -w /etc/rc.conf
rc_logger="YES"
rc_hotplug="!net.*"         required NetworkManager  
rc_sys=""

[Back to kernel configuration]



Manual association of the WiFi driver

      $  nano -w /etc/modules.d/iwlagn
  alias    wlan0    iwlagn
#  options  iwlagn  disable_hw_scan=1
      $  update-modules
      $  less /etc/modprobe.conf |grep iwlagn
      $  emerge Du iwl5000-ucode   Needed to avoid the SIOCSIFFLAGS problem  

[Back to kernel WiFi settings]



Fstab


Write fstab file

  #  nano -w /etc/fstab
		
# <fs>     <mountpoints>   <type>    <opts>   <dump/pass>
# SYSTEM
/dev/sda1               /boot        ext2         ro,noatime   1 1      no journalling recommended on small partitions 
/dev/sda2               /            ext3         noatime      0 1
/dev/vg00/swap          none         swap         sw           0 0 
/dev/vg00/tmp           /tmp         ext3         noatime      0 2
/dev/vg00/var           /var         ext3         noatime      0 2
/dev/vg00/tmp           /tmp         ext3         noatime      0 2
/dev/vg00/usr           /usr         ext3         noatime      0 2
/dev/vg00/opt           /opt         ext3         noatime      0 2
/dev/vg00/home          /home        ext3         noatime      0 2

# VIRTUAL
none            /proc              proc         defaults            0 0
shm             /dev/shm           tmpfs        nodev,nosuid        0 0

# MEDIA 
/dev/cdrom      /media/cdrecorder  auto         user,exec,noauto,managed 0 0
/dev/sda1       /media/porsche     auto         user,exec,noauto,shortname=mixed
/dev/sdb1       /media/flash       auto         user,exec,noauto,shortname=mixed


Grub

Grub installation

#  emerge grub
default 0
timeout 30
splashimage=(hd0,0)/boot/grub/splash.xpm.gz

title=Gentoo Linux (3.0.6-gentoo)
root (hd0,0)
kernel /boot/kernel-x86_64-3.0.6-gentoo root=/dev/sda2 dolvm CONSOLE=/dev/tty1 softlevel=networkmanager i915.modeset=1   Bug 288346 
enable_mtrr_cleanup mtrr_chunk_size=256M mtrr_gran_size=256M
# Obs:vga=0x317 splash=verbose (needed for framebuffer)
		



Installing grub

  # grep -v rootfs /proc/mounts > /etc/mtab
  # grub-install --no-floppy /dev/sda


--> Shutting down LVM2

 Updating 
    $ vgchange -a n




After reboot into the Gentoo system

[Back to Introduction]



--> Modificaltion make.conf for X and Gnome installation

      $ nano -w /etc/make.conf  
		

USE="aac aalib acpi alsa avahi bash-completion cdparanoia cdr cups
     bzip2 dell dts encode emacs exif ffmpeg flac gnome gtk gcj hal java
     jpeg jpeg2k laptop ldap lm_sensors mad mjpeg mmap mp3 mmx pmu png
     quicktime spell svg svga tetex tcl tk tiff truetype win32codecs wmf
     X xine xinerama xinetd xprint xvmc sse sse2 -arts -kde -qt3 -qt4 "





--> The Xorg installation is documented by the Gentoo xorg-server installation guide

      $ USE=-fam emerge --oneshot dev-libs/glib  resolution of circular
      $ emerge --oneshot dev-libs/glib           dependencies
      $ emerge -av xorg-server
      $ emerge xorg-x11
      $ env-update
      $ source /etc/profile 
      $ Xorg -configure     automatic configuration 
      $ X -config /root/xorg.conf.new testing 
      $ cp /root/xorg.conf.new /etc/X11/xorg.conf
      $ startx


--> xorg-server upgrades since 1.10: re-emerge input drivers after upgrade

      $ emerge x11-drivers/xf86-input-evdev
      $ emerge -uDN world
      $ emerge xorg-drivers
      $ qlist -I -C x11-drivers/  list of input drivers 
      $ emerge x11-drivers/xf86-input-evdev x11-drivers/xf86-input-keyboard x11-drivers/xf86-input-mouse x11-drivers/xf86-input-synaptics x11-drivers/xf86-input-wacom x11-drivers/xf86-video-intel
      $


--> Gnome and Gnome-light installation is documented by the Gentoo gnome installation guide

      $ echo "net-dns/avahi -gtk" >> /etc/portage/package.use  resolution of circular
      $ echo "net-print/cups -avahi" >> /etc/portage/package.use    dependencies
   avahi bug
      $ USE="threads" emerge dev-lang/python
      $ emerge -av pygobject pycairo pygtk dbus-python avahi
      $ emerge -av alacarte   to edit the main menu
      $ emerge -av app-admin/gnome-system-tools   to edit the main menu
      $ emerge -av x11-themes/gentoo-xcursors     nice mouse cursor theme, defaulted from 
                                                        Preferences->Appearance->Theme->Cutomize->Mouse


--> gcc-4.1.2 bug (revdep-rebuild)

      $ ln -s /usr/lib/gcc/i686-pc-linux-gnu/x.x.x/lib-gnu-java-awt-peer-gtk.la /usr/lib/lib-gnu-java-awt-peer-gtk.la
      $ ln -s /usr/lib/gcc/i686-pc-linux-gnu/x.x.x/libgcj.la /usr/lib/libgcj.la


--> Hybernation script

      $  rc-update add hibernate-cleanup boot


--> Default access of the nm-applet to keyring manager

      $ nano /etc/pam.d/gdm
                          add at the bottom of the file
auth    optional        pam_gnome_keyring.so
session optional        pam_gnome_keyring.so    auto_start 



Dell BIOS upgrade

[Back to Introduction]



--> Dell bios upgrade

  Smbios method
      $ emerge -Du libsmbios              for system detection
      $ smbios-sys-info
  • Read System ID: 0x0mmm
  • Go to Dell Repo
  • Find the entry that matches system_bios_ven_0x1028_dev_SYSTEM_ID_version_BIOS_VERSION
  • Download
$ modprobe dell_rbu $ dellBiosUpdate-compat -u -f path_to_dir/bios.dir $ reboot



Summary of patching instructions

[Back to Introduction]



--> Creating a patch

      $ emerge --fetchonly package
      $ cd /usr/portage/distfiles
      $ bunzip2 package_name_version.tar.bz2
      $ tar xvf package_name_version.tar
      $ cd  package_name
      suppose file_to_be_patched is in /usr/portage/distfiles/package_name_version/dir/subdir/ 
      $ cd /dir/subdir/
      $ cp file_to_be_patched file_to_be_patched.orig
               edit patches 
      $ nano file_to_be_patched  	      
      $ cd /usr/portage/distfiles/package_name_version/dir/
      $ diff -u subdir/file_to_be_patched.orig subdir/file_to_be_patched > file_to_be_patched.patch
      $ mv file_to_be_patched.patch /usr/local/portage/package_group/package_name/files
      $ cd /usr/local/portage/package_group/package_name/
      $ nano package_name_version.ebuild	      
               add the section 
src_unpack() {
    unpack ${A}
    cd "${S}"          cd to /usr/portage/distfiles/package_name_version/dir 
    epatch "${FILESDIR}/file_to_be_patched.patch"
}
      $ ebuild package_name_version.ebuild digest
      $ emerge -Dav package_name



Other tweakings

[Back to Introduction]



--> Redirecting a directory to avoid "No space left on device" messages

      $ mkdir /home/more_space
      $ mount -o bind  /var/tmp/portage /home/more_space
      $ do what needed
      $ umount /var/tmp/portage 


--> Procedure to mount ISO images under Linux

      $ su -    Provide an environment similar to what the user would expect had the user logged in directly 
      # mkdir -p /mnt/disk
      # mount -o loop disk1.iso /mnt/disk
      # cd /mnt/disk
      # ls -l


Bluetooth configuration

--> Bluez: HID2HCI_ENABLE has to be enabled.

 
      $ emerge -Da net-wireless/bluez 
      $ nano /etc/conf.d/bluetooth
# Bluetooth configuraton file

# Run hid2hci (allowed values are "true" and "false")
HID2HCI_ENABLE=true

# Bind rfcomm devices (allowed values are "true" and "false")
RFCOMM_ENABLE=true

# Config file for rfcomm
RFCOMM_CONFIG="/etc/bluetooth/rfcomm.conf"

--> Bluetooth management applications (current: 28.12.2009)

      $ emerge -Da net-wireless/gnome-bluetooth     (2.28.3 broken ?)
      $ emerge -Da net-wireless/obexfs app-mobilephone/obexftp
      $ hciconfig hci0 reset            reset device (e.g. after upgrade)
      $ hcitool dev                     command line: check device
      $ hcitool scan                    command line: scan for devices
      $ obexftp -l                      command line: ftp to device


Xrandr tweaks

--> Xrandr documentation

 Gentoo wiki 
http://wiki.debian.org/XStrikeForce/HowToRandR12 



La files updating

--> To fix/update .la files

      $ emerge -Da dev-util/lafilefixer
      $ lafilefixer --justfixit


--> Update sequence

      $ glsa-check -p affected         check of needed security updates 
      $ glsa-check -f affected         security updates 
      $ revdep-rebuild
      $ lafilefixer --justfixit
      $ emaint --ckeck all
      $ emaint -- fix all              Gentoo maintenance 
      $ eclean distfiles


Input devices and USB modules

--> Input devices

      $ cd /dev/input
      $ ls          show devices 
      $ cat mouse   e.g. to check device mouse 
      Moving the mouse with driver "mouse" generates a sequence of alpha-numeric symbols.


--> USB wireless Logitech mouse

      $ nano /etc/modprobe.d/blacklist.conf
# these drivers are very simple, the HID drivers are usually preferred
blacklist usbmouse
blacklist usbkbd


--> Bamboo wacom tablet (kernel 2.6.35-r5) Gentoo Wiki instructions

      $ emerge sys-kernel/linuxwacom-module
      $ mv /etc/hal/fdi/policy/10-linuxwacom.fdi /etc/hal/fdi/policy/10-linuxwacom.fdi.bak
      $ emerge -av1 x11-base/xorg-drivers
  from 3.6.39-r3 linuxwacom not needed 
INPUT_DEVICES="keyboard mouse evdev wacom"
    
      $ emerge -av1 x11-base/xorg-drivers  

[Back to kernel wacom]



[Back to Introduction]