This is my first installation of Gentoo (for now running parallel to FC2 until I run out of hard disk space). I read the handbook [1] and decided to perform a stage 1 network installation. I burnt the 2005.0 CD image and booted from it. At the boot prompt I entered gentoo doscsi, otherwise the DVD-ROM wasn't detected. Also don't miss the point where you have only a few seconds to select your keymap. Following the installation process I created /boot (ext2), / and /home (both ext3) partitions on a free place of the hard disk and manually configured and compiled the gentoo-patched kernel 2.6.11-r11.
Meanwhile I upgraded to kernel 2.6.12-r4 (gentoo-sources), here is my config. I tried to include only the minimum required kernel features and modules. The older config for kernel 2.6.11-r11 is here.
In the kernel I enabled frame buffer support using the i810fb driver and created a bootsplash image as described in [2]. There is a warning not to use i810 frame buffer options in recent kernels, but I didn't exierence any problems. This is my default entry in /boot/grub/grub.conf, which provides a 1024x768 console with a nice background image:
title Gentoo Linux 2.6.12-r4 root(hd0,8) kernel (hd0,8)/kernel-2.6.12-gentoo-r4 root=/dev/hda10 video=i810fb:vram:4,xres:1024,yres:768,bpp:16,hsync1:30,hsync2:55,vsync1:50,vsync2:60,accel splash=verbose,theme:livecd-2005.0 initrd (hd0,8)/fbsplash-livecd-2005.0-1024x768
I emerged xorg as described in [3]. As I had no quick succes setting it up via xorgcfg etc. I simply re-used this /etc/X11/xorg.conf from my FC2 installation (only commented out some distro-specific font paths.) To enable 3D acceleration default color depth is set to 16. I also emerged my favourite desktop environment KDE.
See [4]. I use the kernel based ALSA driver (the module snd_intel8x0 is needed). Emerge alsa-utils, run alsaconf, add alsasound to the runlevel default and you're done.
Running kernel 2.6.11 the mouse pointer is extremely jumpy when moved slowly. It behaves much better when the module psmouse is loaded with the parameter proto=exps. So I added this to /etc/modules.autoload/kernel-2.6 together with the sonypi module
psmouse proto=exps sonypi
In kernel 2.6.12 psmouse works smoothly without the above parameter. The device node /dev/sonypi ist automatically created by udev. Like before I installed rsjog [5] to make use of the small 'back'-button, adjust brightness and volume and define my own Fn key bindings. Requires ruby-gtk, spicctrl and aumix.
There is a chapter about networking in the handbook [1]. The wired ethernet device is eth0, while eth1 and eth2 are used for WLAN (which is a PCMCIA device) and ethernet-over-firewire (via the module eth1394, which is loaded together with ohci1394) depending on which service is started first. To have a unique device name for WLAN instead I added this udev rule to /etc/udev/rules.d/10-local.rules:
KERNEL=="eth*", SYSFS{address}=="00:02:2d:6a:5d:63", NAME="wlan"
The MAC adress was identified by udevinfo -a -p /sys/class/net/eth2.
Here is my /etc/conf.d/net:
iface_eth0="dhcp" iface_wlan="dhcp" modules="iwconfig" #mode_wlan="ad-hoc" essid_wlan="MYESSID" key_ESSID="XXXX-XXXX-XX" adhoc_essid_wlan="MYESSID" channel_wlan="1" iwconfig_wlan="key XXXX-XXXX-XX"
This was the first configuration that worked. Though I use WLAN in ad-hoc mode I had to comment out the related entry. Both interfaces are set up via DHCP and started manually via the related init scripts. The WLAN interface is started when PCMCIA is started, so I simply use this to bring up WLAN:
/etc/init.d/pcmcia start
To be able to start/stop the devices as a normal user I configured sudo appropriately via visudo, e.g.
olaf pluto = NOPASSWD: /etc/init.d/pcmcia olaf pluto = NOPASSWD: /etc/init.d/net.eth0 ...
and created aliases in my .bashrc, e.g.
alias eu='sudo /etc/init.d/net.eth0 start'
So I can just type 'eu' to bring up ethernet, and so on.
Requires the module uhci_hcd, which I added to /etc/modules.autoload/kernel-2.6. usb_storage is loaded together with it. We also need sg for MemorySticks and sd_mod for USB-Sticks. By default udev creates the device nodes /dev/sda1 and /dev/sdb1, respectively.
However /dev/sdb1 is only created, when usb_storage is (re-)loaded after inserting a MemoryStick, which is quiet unhandy. I found a workaround by creating my own udev rules in /etc/udev/rules.d/10-local.rules
BUS=="scsi", SYSFS{model}=="MSC-U03", NAME{all_partitions}="memstick" BUS=="scsi", KERNEL=="sd*", SYSFS{model}=="MS-551X", NAME="usbstick"
The first line makes udev create several device nodes /dev/memstick* for the "USB (one-card-only) card reader". A MemoryStick, after inserted, will be accessible at /dev/memstick1. The second entry is for my USB-Stick and simpy overrides the default device node /dev/sda1 with /dev/usbstick. These are the related entries in /etc/fstab.
/dev/memstick1 /mst vfat noauto,user 0 0 /dev/usbstick /usb vfat noauto,user 0 0
Requires the modules sr_mod, sbp2 and ohci1394, which I added to /etc/modules.autoload/kernel-2.6. The default device node is /dev/sr0, but /dev/scd0 works as well. Like for USB I wrote my own udev rule in /etc/udev/rules.d/10-local.rules
BUS=="scsi", KERNEL=="sr*", SYSFS{model}=="DVD-ROM SDR-081", NAME="dvdrom"
Here's the /etc/fstab entry:
/dev/dvdrom /dvd auto noauto,user 0 0
Seems like it's not possible to attach/mount the DVD-drive with an inserted CD in a closed tray.
I use bluetooth to connect the laptop to my Sony Ericsson T610 mobile phone.
Bluetooth requires the modules uhci_hcd, hci_usb and sonypi (add to /etc/modules.autoload/kernel-2.6) and packages bluez-utils and spicctrl. Edit /etc/bluetooth/pin to specify your PIN. Gentoo has no default udev rules for bluetooth, so I put this into /etc/udev/rules.d/10-local.rules:
KERNEL=="rfcomm[0-9]*", NAME=="%k", GROUP="users", MODE="0660"
This will make udev create the bluetooth device node /dev/refcomm0, which is needed by some of the tools mentioned below. To switch bluetooth power on type:
spicctrl -l 1
I added this to the beginning of the start section in /etc/init.d/bluetooth (and spicctrl -l 0 at the end of the stop section). Now bluetooth can be started:
/etc/init.d/bluetooth start
I configured sudo to allow me this as a normal user (compare network section). You may prefer to have it autostarted:
rc-update add bluetooth default
When bluetooth is started you can get your mobile phone's hardware address using hcitool and either bind the device manually using rfcomm or automatically by editing /etc/bluetooth/rfcomm.conf (see the Fedora chapter for more details).
I use kmobiletools to control my mobile phone from the laptop and easyconnect [6] to access internet via GPRS. For the latter I also successfully tried wvdial using this /etc/wvdial.conf
Modem = /dev/rfcomm0 Phone = *99***1# Auto DNS = 1 Stupid Mode = 1 Init1 = AT+CGDCONT=1,"IP","internet","",0,0 Username = gprs Password = gprs
This works for O2 germany; to use another provider you will have to change at least the APN (here:'internet').
Last time I tried to dial in I had to load the module ppp_generic manually.
For file exchange between PC and mobile phone I emerged kdebluetooth (the marked testing version 0.99_beta1-r1, because the latest stable version failed to compile). You should exchange the pin_helper script in /etc/bluetooth/hcid.conf as indicated by emerge (and also the name of the device if you like), restart KDE, start bluetooth and kbluetoothd, open URL sdp:/ in konqueror, and your phone should be displayed; select and test the available services. With kbluetoothd running in the background a window will popup if someone wants to send you files via bluetooth.
Another useful program, that makes the T610 (and compatible Sony Ericsson phones) a remote control for your PC is bluemote [7].
Like on FC2 the laptop did not wake up from suspend-to-RAM (though the hard disk does actually spin up again), but suspend-to-disc works quite well. I made a few successfull attempts with swsusp, but since a few months I only use swsusp2 once in a while.
As described in [8] I installed suspend2-sources together with the hibernate-script, compiled kernel 2.6.12-suspend2-r3 and created a GRUB entry with kernel parameter resume=/dev/hda8 (to specify the swap partition where all data will be stored). 3D acceleration turned out to be a problem when suspending from runlevel 3, so I commented out loading of modules glx and dri in /etc/X11/xorg.conf.
At the moment my /etc/hibernate/hibernate.conf looks like this:
UseSuspend2 yes Reboot no EnableEscape yes DefaultConsoleLevel 1 Compressor lzf Encryptor none Verbosity 0 LogFile /var/log/hibernate.log LogVerbosity 1 SaveClock restore-only Unmount /dvd OnSuspend 01 cardctl eject OnSuspend 02 killall ruby OnResume 02 rmmod -f sonypi OnResume 01 modprobe sonypi UnloadModules uhci_hcd bluetooth psmouse ohci1394 UnloadModules orinoco_cs orinoco hermes pcmcia yenta_socket rsrc_nonstatic pcmcia_core LoadModules psmouse uhci_hcd bluetooth ohci1394 DownInterfaces eth0 wlan StopServices pcmcia bluetooth SwitchToTextMode yes XStatus kde
To get WLAN working after resuming PCMCIA is stopped and all modules involved removed, which also requires (virtually) ejecting the card. I restart WLAN by starting PCMCIA as mentioned above, the modules are then loaded again.
Reloading sonypi is necessary but doesn't work via UnloadModules, so I use OnResume and rmmod to force unloading. rsjog is stopped previously (via killall ruby) and restarted manually after resuming.
To be able to run hibernate as a normal user via the Fn-F12 key binding I configured sudo as follows (via visudo):
olaf pluto = NOPASSWD: /usr/sbin/hibernate
and added this to ~./rsjogrc:
bind FNKEY_F12 sudo /usr/sbin/hibernate
However, I didn't manage to get suspend-to-disc working after resuming - it fails when invoked a second time, so a normal shut down is required instead.
[1] http://www.gentoo.org/doc/en/handbook/handbook-x86.xml
[2] http://gentoo-wiki.com/HOWTO_fbsplash
[3] http://www.gentoo.org/doc/en/xorg-config.xml
[4] http://www.gentoo.org/doc/en/alsa-guide.xml
[5] http://linuxbrit.co.uk/rsjog/
[6] http://easyconnect.linuxuser.hu/modules/index/
[7] http://www.geocities.com/saravkrish/progs/bluemote/
[8] http://gentoo-wiki.com/HOWTO_Software_Suspend_v2