Ubuntu 7.04 "Feisty Fawn" on a MacBook (check here for other installations)
Changelog (you can always find an up-to-date version here)
* August 2, 2007
- First official release of this document
Usage
I use this notebook for work (system/network administration and web/database development) and for fun (music, movies and sometimes games).
Partitions
After shrinking the partition holding the preinstalled Mac OS X to 30 GB, I installed Linux using only / and /home partitions.
Many howtos assert that, while using rEFIt, one can't use more than four partitions: this isn't totally true, although fdisk ignores the logical partition(s), and cfdisk marks that space as unusable.
The partition table is set as follows:
$ sudo fdisk -l /dev/sda
Disk /dev/sda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System Size Mount point
/dev/sda1 1 26 204819+ ee EFI GPT 200MB
/dev/sda2 * 26 3942 31457280 af Unknown 30GB
/dev/sda3 3942 4707 6144531+ 83 Linux 6GB /
/dev/sda4 4707 4962 2047852 82 Linux swap / Solaris 2GB swap
(/dev/sda5 78GB /home)
Installation
The installation is very straightforward: it's as simple as booting from the "desktop" CD (I only pressed F3 before booting to select the Italian keyboard) and double-clicking on the "Install" icon on the desktop.
After answering a few questions, the live system gets copied to the hard disk, some unneeded packages are uninstalled and you are told to reboot.
I use netenv (more on this later) to manage different network profiles: since it has some issues with the new NetworkManager application, I disable the former before rebooting, using the following commands from a terminal.
$ echo exit |sudo tee /target/etc/default/NetworkManager
$ echo exit |sudo tee /target/etc/default/NetworkManagerDispatcher
First boot
After booting from hard disk, take a look at the output of dmesg: everything should be fine.
Ubuntu 7.04 symlinks /bin/sh to /bin/dash (instead of /bin/bash, as usual up to 6.06).
This leads to errors in scripts provided by "universe" or "multiverse" packages: to get rid of these errors, simply restore the "default" shell with
$ cd /bin/
$ sudo ln -nsf bash sh
Then, clean the apt cache and upgrade the system to the current available versions of the installed programs:
$ sudo aptitude clean
$ sudo aptitude update
$ sudo aptitude dist-upgrade
In case the kernel or some modules get updated/upgraded, rebooting the machine is a Good Thing (TM).
Once the new kernel is working OK (see dmesg), you can uninstall the previous one:
$ sudo aptitude remove --purge linux-image-2.6.20-15-generic linux-restricted-modules-2.6.20-15-generic
Correct display resolution, xorg.conf tweaks, desktop effects
The default Ubuntu installation sets the display resolution to a not-so-nice 1024x768: getting the native 1280x800 resolution is simply a matter of
$ sudo aptitude install 915resolution
Turning the right Apple button into Alt Gr key is as simple as
$ sudo sed -i~ '/xkb_symbols "ralt_switch" {/a\ include "level3(rwin_switch)"' /etc/X11/xkb/symbols/level3
To get the most out of the trackpad, use this InputDevice section in /etc/X11/xorg.conf:
Section "InputDevice"
Identifier "Fully Functional Synaptics Touchpad"
Driver "synaptics"
Option "SendCoreEvents" "true"
Option "Device" "/dev/psaux"
Option "Protocol" "auto-dev"
Option "LeftEdge" "150"
Option "RightEdge" "1070"
Option "TopEdge" "100"
Option "BottomEdge" "310"
Option "FingerLow" "25"
Option "FingerHigh" "30"
Option "MaxTapTime" "180"
Option "MaxTapMove" "220"
Option "MaxDoubleTapTime" "180"
Option "HorizEdgeScroll" "0"
Option "VertEdgeScroll" "0"
Option "TapButton1" "0"
Option "TapButton2" "0"
Option "TapButton3" "0"
Option "LockedDrags" "off"
Option "VertScrollDelta" "20"
Option "HorizScrollDelta" "50"
Option "VertTwoFingerScroll" "1"
Option "HorizTwoFingerScroll" "1"
Option "MinSpeed" "1.10"
Option "MaxSpeed" "1.30"
Option "AccelFactor" "0.08"
Option "Emulate3Buttons" "true"
Option "SHMConfig" "on"
# corner buttons
Option "RTCornerButton" "0"
Option "RBCornerButton" "2"
Option "LTCornerButton" "0"
Option "LBCornerButton" "3"
EndSection
Be sure to add a ServerLayout section using
InputDevice "Fully Functional Synaptics Touchpad"
After restarting the X server (with CTRL+ALT+CANC), Desktop effects (compiz) can be enabled from System -> Preferences -> Desktop Effects.
Extra applications
After enabling "All available applications" from Applications -> Add/Remove... menu it's possible to install some extra applications:
Accessories
7zip (p7zip-full)
ACE (unace)
Qemu Launcher (qemu-launcher)
RAR (rar)
Search (beagle)
Games
Frozen-Bubble (frozen-bubble)
Gweled (gweled)
Planet Penguin Racer (planetpenguin-racer)
Internet
aMule (amule)
DNS Query Tool (gresolver)
Epiphany web Browser (epiphany-browser)
gFTP (gftp)
GMail Notify (gmail-notify)
Liferea Feed Reader (liferea)
Psi (psi)
Thunderbird Mail (mozilla-thunderbird)
Wengophone (wengophone)
Wireshark (wireshark)
XChat IRC Client (xchat)
Other
Ubuntu Restricted Extras (ubuntu-restricted-extras)
Programming
Bluefish Editor (bluefish)
Eclipse (eclipse)
Sound & Video
Banshee Music Player (banshee)
Grip (grip)
GStreamer extra plugins (gstreamer0.10-plugins-ugly)
GStreamer ffmpeg video plugin (gstreamer0.10-ffmpeg)
GStreamer plugins for aac, xvid, mpeg2, faad (gstreamer0.10-plugins-bad-multiverse)
GStreamer plugins for mms, wavpack, quicktime, musepack (gstreamer0.10-plugins-bad)
K3b (k3b)
k9copy (k9copy)
Mplayer Movie Player (mplayer)
Mplayer Plugin for Mozilla (mozilla-mplayer)
VLC media Player (vlc)
Xine extra plugins (libxine-extracodecs)
All
Art Manager (gnome-art)
GpsDrive (gpsdrive)
last.fm Player (lastfm)
Streamtuner (streamtuner)
Sun Java 6 Console (sun-java6-jdk)
Setting Java preferences
I want Java-related commands (java, javac and so on) to default to the Sun Java 6 JDK:
$ sudo update-java-alternatives -s java-6-sun
I also installed the Java JDK documentation, downloading jdk-6-doc.zip to /tmp (chowning it to root.root) and installing it with:
$ sudo aptitude install sun-java6-doc
$ sudo rm /tmp/jdk-6-doc.zip
Additional packages
If you plan to install NetBeans, you will have to download the netbeans-5.5.tar.gz package from here and move it to /tmp before installing the netbeans5.5 package.
I use to install the following additional packages:
#0# # sudo aptitude install \
#0# Email # fetchmail mailx mutt postfix \
#0# Email (universe) # dovecot-imapd freepops spamassassin spamc \
#0# Libraries # libfltk1.1 \
#0# Utilities (universe) # arj clamav clamav-daemon unzoo
#1# # sudo aptitude install \
#1# Cross Platform # smbfs \
#1# Development # build-essential cvs \
#1# Documentation # apache2-doc apt-doc bash-doc bind9-doc debconf-doc doc-linux-html doc-linux-text \
#1# # gnupg-doc grub-doc installation-guide-i386 perl-doc postfix-doc samba-doc \
#1# Editors # openoffice.org-style-tango vim \
#1# Games And Amusement # knetwalk \
#1# GNOME Desktop Environment # epiphany-extensions \
#1# Internationalization And Localization # language-pack-it language-support-it \
#1# Libraries # qca-tls \
#1# Libraries - Development # libncurses5-dev \
#1# Miscellaneous - Text based # chkrootkit kernel-package mysql-server ndiswrapper-common \
#1# Multimedia # vorbis-tools \
#1# Networking # nfs-common nmap ntp openssh-server samba traceroute \
#1# System Administration # alien john subversion-tools \
#1# Utilities # fakeroot \
#1# World Wide Web # firefox-themes-ubuntu libapache2-mod-php5 php5-mysql
#2# # sudo aptitude install \
#2# Base System (universe) # apt-file \
#2# Communication (universe) # tor \
#2# Documentation (universe) # apt-dpkg-ref apt-howto-en asr-manpages debian-history debian-policy \
#2# # festival-doc funny-manpages jargon-text maint-guide quick-reference-en sysadmin-guide \
#2# Games And Amusement (universe) # bomberclone bsdgames cappuccino fortunes-bofh-excuses planetpenguin-racer-extras supertux typespeed \
#2# GNOME Desktop Environment (universe) # beagle-backend-evolution gdesklets gdm-themes ontv \
#2# Graphics (universe) # cups-pdf cupsys-driver-gimpprint vlc-plugin-esd \
#2# Interpreted Computer Languages (universe) # expectk xmltv \
#2# Libraries (universe) # gstreamer0.10-fluendo-mp3 \
#2# Miscellaneous - Graphical (universe) # industrialtango-theme tango-icon-theme-extras \
#2# Miscellaneous - Text Based (universe) # module-assistant \
#2# Multimedia (universe) # audacity festvox-italp16k festvox-itapc16k id3tool mpg321 soundconverter sox \
#2# Networking (universe) # aircrack-ng airsnort bitchx-ssl debmirror kismet madwifi-tools netdiscover p0f tshark \
#2# System Administration (universe) # apt-show-versions rkhunter \
#2# Utilities (universe) # gphoto2 gpsdrive hddtemp mc sshfs vlock \
#2# Word Processing (universe) # foomatic-db-gimp-print xmlstarlet \
#2# World Wide Web (universe) # mozilla-helix-player privoxy smarty smarty-gettext
#3# # sudo aptitude install \
#3# Development (multiverse) # netbeans5.5 netbeans5.5-doc \
#3# Documentation (multiverse) # doc-linux-nonfree-html doc-linux-nonfree-text php-doc rutebook \
#3# Multimedia (multiverse) # lame
#4# # sudo aptitude install \
#4# Medibuntu (free) # libdvdcss2 libk3b2-mp3 \
#4# Medibuntu (non-free) # googleearth skype w32codecs
FreePOPs
The FreePOPs project recently released freepops-updater-fltk, a graphical updater for freepops.
Until the new package makes its way through the official repositories, you can download it (and a newer version of freepops itself) from here.
$ sudo dpkg -i freepops_0.2.5-1-bkm_i386.deb freepops-updater-fltk_0.2.5-1-bkm_i386.deb
Then, run Applications -> Internet -> FreePOPs Updater to get the latest plugins.
Skype
Since August 1, 2007 there's a more recent "Beta" version of Skype available here: download it and
$ sudo dpkg -i skype-debian_1.4.0.94-1_i386.deb
Multiple networking environments
I use my laptop in several places (home, customers' offices, friends' homes), and I manage these network environments easily with netenv.
Install it and use the script provided as a Debian example (or this one, which requires gawk and manages multiple network interfaces, wireless settings and hosts in a friendly manner).
I expect to build a Debian/Ubuntu package also with the tweaks I made to /sbin/netenv to make netenv run properly on Ubuntu.
$ sudo aptitude install gawk netenv
$ sudo install -m 755 ~bibe/public_html/feisty/netenv_setup /etc/netenv/
$ sudo install -m 755 ~bibe/public_html/feisty/sbin_netenv /sbin/netenv
$ echo NETENV_SCRIPT=/etc/netenv/netenv_setup |sudo tee -a /etc/netenv/netenv.conf
Be sure that netenv starts during boot:
$ sudo update-rc.d netenv start 40 S .
I also add some altoptions directives in /boot/grub/menu.lst (leave these lines "commented", or you will lose them when updating grub) for commonly used network environments, say:
$ grep altoption /boot/grub/menu.lst
## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
## altoptions=(single-user mode) single
# altoptions=(wired) NETENV=wired
# altoptions=(wireless) NETENV=wireless
# altoptions=(recovery mode) single
Grub configuration gets updated automatically at every linux-image installation: to do it manually, simply run
$ sudo update-grub
Alternatives
Debian's way to manage multiple programs for the same task (i.e., editors) is the use of alternatives, which are symlinks provided in /etc/alternatives/.
For instance, I set vim (instead of nano) as the system's default editor:
$ sudo update-alternatives --config editor [ select /usr/bin/vim.basic ]
Kismet Log Viewer
An interesting utility for viewing Kismet output as HTML pages is Kismet Log Viewer, available here.
To install it, download the latest binary (version 0.9.7) and
$ cd /usr/src
$ tar zxf /path/to/kismet-log-viewer-0.9.7.tar.gz
$ cd kismet-log-viewer-0.9.7
$ install -o <kismet_suid_user> -m 700 *.pl <kismet_logs_path>
$ install -o <kismet_suid_user> -m 644 logo.png <kismet_logs_path>
Reboot
Now the system is fully configured: reboot and issue a
$ dmesg |less
to verify that there are no errors and/or problems during the boot process.
TODO list
I still have to test modem, IrDA, firewire, bluetooth, the integrated webcam and the card reader.
I hope you will find some of these information useful, and if you have any suggestion for helping me to get everything to work, please email me at
bibe AT atworkonline DOT it