Lab Install of Fedora 9

May 22, 2008

Fedora 9 was released last week. Our lab’s servers and workstations all run varying versions of Fedora or CentOS, the RHEL-clone server distribution. In preparation for the release of F9, we had decided to replace some aging 32-bit workstations. The new workstations all have Intel Q9300 CPUs, four gigs of RAM, NVidia 9600GT video cards, and a pair of 250GB SATA drives. The 250GB drives are kind of overkill — we do most of the heavy work on our servers and clusters these days — but hard drives are cheap.

When configuring new computers, we usually keep a log in a notebook. This time, I decided to add the log here. Hopefully others performing a clean installation of F9 in a science/programming environment may find it useful.

Clean Install Procedure

The install procedure, guided by Fedora’s Anaconda, is as trouble-free as it was in recent Fedoras. On one older machine, we had trouble booting from the Fedora DVD (in particular, a crc error when loading the kernel and initrd). This was remedied by using another DVD burn of the install disc, but burned at a slower speed. The first burn just wasn’t entirely reliable.

Our dual SATA drivers were partitioned using a custom layout. In our case, we created identical software RAID partitions on each disc: 4 gig for swap, 1 gig for /boot, with / getting the remainder. /boot needs to be partitioned as RAID-1, but swap and / were partitioned as RAID-0 for maximum speed. If a disk fails, it’s not a big deal for us: all of our important data and home directories are on a RAID-5 fileserver. After the RAID, the only time consuming thing in the initial setup is specifying the network info, which includes our static IP addresses.

Our packages to install are in the default “Office and Productivity” section and the “Software Development” section. The most important part of this log is the following list of packages added for our customized install, the first batch of which are on the DVD:

  • emacs – it’s surprising that vi is installed by default, but emacs is not
  • openbabel – a chemistry utility in the science and engineering subsection
  • all optional packages in the graphics subsection – imagemagick is particularly important
  • k3b – the best CD/DVD burner to be found for linux
  • lynx – the classic text-only web browser
  • the fedora packager subsection
  • gnuchess – how can other games be installed, but not chess?!
  • memtest86+ – useful for hardware troubleshooting
  • the system tools subsection
  • the legacy software compatibility subsection
  • tcsh – most of our lab uses this shell! this should be installed by default
  • gnome-netstatus – a useful widget
  • thunderbird – a couple members of our lab use this for reading mail
  • the authoring and publishing subsection – mostly for the TexLive packages

Things to do at Firstboot

After the 1300+ packages finish installing, a couple things (such as NIS logins) are configured on firstboot. Logging in as root, we need to configure two additional repositories: livna and adobe-linux. Then, we install additional packages from the Fedora repository via yum:

  • xpdf – lightweight, fast, and useful pdf viewer
  • xdvik – amazingly, xdvi is not distributed with F9’s TexLive packages
  • autofs – this is needed to mount our /home directories, and is surprisngly omitted from the F9 DVD
  • openmpi and openmpi-devel – parallel (MPI) compilers
  • scipy – a suite of modules for doing science with Python
  • PyX – a nifty module for drawing graphics with Python and LaTeX
  • grace – the best 2D graphing program for GNU/linux
  • readahead – a small package which helps cache files to speed the boot process

Lastly, the media packages, (mostly) from livna and adobe-linux:

  • nspluginwrapper.i386 and alsa-lib.i386 – needed for getting i386 (32-bit) Flash to work with x86_64 (64-bit) Firefox. alsa-lib is needed for sound.
  • flash-plugin – flash itself, via the adobe-linux repository
  • mplayer – for playing movies and mp3s, via livna
  • lame – a mp3 encoder/decoder
  • libdvdcss – a DVD decoder
  • amarok-extras-nonfree – more plugins for Amarok, an alternative to mplayer (will install h.264 support as a dependency)

While using yum to install all these packages, many dependencies will also be installed. This is normal.

Services

Now that autofs and other packages have been installed, the default services need to be configured at System>Administration>Services.
The following are switched to disabled:

NetworkManager – a new service being pushed by Fedora, but it overrode our static IPs with DHCP IPs
bluetooth – not needed on workstations
ip6tables – we don’t use IPv6
isdn – we don’t use ISDN

The following are switched to enabled (all these are needed for our lab’s local network):

autofs – automounting remote nfs shares
netfs – needed for autofs and other remote mounting
network – replaces NetworkManager
ypbind – NIS client

Additionally, smartd and lm_sensors may be enabled if you plan on carefully monitoring your hardware.

NVidia 3D Drivers and Fedora 9’s X.org

One thing I haven’t mentioned yet is the NVidia 3D video driver. Fedora 9 includes a pre-release version of X.org, and NVidia’s proprietary, closed-source drivers have not yet been updated to support it. Even the supposed -ignoreABI and Disable “glx” workarounds completely fail. The solution is to downgrade some key X.org packages to the Fedora 8 versions. A minimal downgrade can be successful by only changing five packages. However, depending on your own particular hardware and software configuration, more packages may have to be downgraded. Here’s the procedure:

  1. Get the following files:

    xorg-x11-drv-keyboard-1.2.2-2.fc8.x86_64.rpm
    xorg-x11-drv-mouse-1.2.3-1.fc8.x86_64.rpm
    xorg-x11-drv-nv-2.1.6-1.fc8.x86_64.rpm
    xorg-x11-server-utils-7.3-2.fc8.x86_64.rpm
    xorg-x11-server-Xorg-1.3.0.0-44.fc8.x86_64.rpm

    http://wuarchive.wustl.edu/pub/fedora8.64/Packages/
    http://wuarchive.wustl.edu/pub/linux/distributions/fedora/updates/8/x86_64/

    Other packages some people may need include xorg-x11-drv-void, xorg-x11-drv-vesa, xorg-x11-drv-evdev, xorg-x11-drv-fbdev, xorg-x11-drv-vmmouse, and xorg-x11-xkb-utils.

  2. Install, with
    rpm -Uvh --oldpackage --replacefiles --replacepkgs --nodeps xorg*
    
  3. Get the nvidia driver from Livna:
    yum install xorg-x11-drv-nvidia-173.08-1.lvn9.x86_64
    

    NOTE: that exact version is important. The 173.08-2-lv9.x86_64 package (note the -2 instead of the -1) was found to fail on our workstations. If you do not see the -1 version as an option and do not want to download and install it by hand, try installing the “yum-allowdowngrade” package and then seeing if the older version shows up.
    xorg-x11-drv-nvidia will also want to install the following, as dependencies:

    kmod-nvidia, xorg-x11-drv-nvidia-libs, akmod-nvidia, livna-config-display, kmodtool, kernel-devel, akmods

    Make sure the kmod-nvidia, xorg-x11-drv-nvidia-libs, and akmod-nvidia versions match the xorg-x11-drv-nvidia version (-1 instead of -2). The kernel-devel rpm that is installed will typically be the newest one, which will not match a non-updated Fedora 9 kernel. Now would be a good time to do a

    yum update kernel*

    as well.

  4. Finally, add the line:
    exclude=xorg-x11*
    

    to the end of /etc/yum.conf so that the next time you upgrade anything it doesn’t replace all the F8 files with F9 ones.

  5. Reboot; the nvidia driver should get built during the boot sequence. Might require two reboots for this, or manually restarting
    service nvidia restart
    

emacs and Firefox 3 tweaks

There are a few other tweaks a fresh install of F9 needs. In particular, emacs defaults to courer 12, which is a bit larger than needed. To have it default to courier 10, add the following to your .emacs file:

(custom-set-faces
  ;; custom-set-faces was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
 '(default ((t (:stipple nil :background "#ffffff" :foreground "#000000" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 122 :width normal :family "adobe-courier")))))

Also, the Firefox 3 beta 5 address bar may be particularly ugly to people accusomted to the cleaner Firefox 2 interface. Much of the previous style can be restored by modifying some settings in “about:config”:

  1. In the address bar, type “about:config” and hit enter.
  2. Accept the “void your warranty” warning
  3. Filter for “urlbar”
  4. Double click on browser.urlbar.autoFill
  5. Double click on browser.urlbar.matchOnlyTyped
  6. Double click on browser.urlbar.maxRichResults and changed the number from 12 to something more tolerable, like 2 or 3.

Now the address bar should behave a little more like Firefox 2.

Advertisements

Personal Installation of OS X 10.5.2

February 27, 2008

Adventures with OS X. I decided to keep a detailed record of my fresh, custom install of OS X 10.5 (Leopard), after being an Apple “switcher” and Tiger user for about six months.  I’m also a computational chemist, and my install will feature many scientific or programming related applications.  My Mac is a Santa Rosa MacBook Pro (65nm Merom, 2.4 GHz, 2007), and it’s great.

Backup

  • Before performing the erase and install, I backed up everything to my Seagate Freeagent Desktop 500GB external USB drive. It was partitioned into three sections: one for a Disk Utility backup, one for a SuperDuper 2.5 backup, and one for a Winclone 1.6.6 archive of the Boot Camp partition.

Special Items

The Fresh Install Procedure

  • After backing everything up, I performed an “erase and install”.  I like my OS nice and clean, with no settings or software left from a previous version.  I customized the install to exclude foreign languages and most printer drivers.  I retained X11.  There are a lot of lists on the web touting themselves as “50 essential Mac apps” are other nonsense. My list of installed apps really are essential for my day-to-day workflow and entertainment.  I strive to keep my system as minimalist as possible.  The following items were installed in order.
  • 10.5.2 combo update downloaded from Apple’s website.  Note, my Freeagent was not detected from inside 10.5.0, and I did not want to use software update for this step.  Reboot.
  • Xcode 3.0, Dashcode, and the ADC Reference Library. Xcode and Dashcode were optional installs from the Leopard DVD, and the ADC Library was copied to /Developer from the March ADC Monthly mailing disk image, which I had stored on my Freeagent.  The ADC Library contains over five gigabytes of documentation which is not installed by default with Xcode.
  • Xquartz 2.1.4, a significant upgrade over Leopard’s X11.  This will be needed later by Macports applications which use X11.  Jeremy Huddleston and Ben Byer maintain this package, and both work for Apple.
  • iLife ’08 and iWork ’08.  They’re nice collections of apps.  I find Keynote, iPhoto and iMovie to be of particular value.
  • After all the Apple software was installed, I performed the online Software Update.  14 updates were found.  By design, none of the applications had been opened yet.  After a reboot, I completed the keyboard firmware update and ran Software Update again.  Two updates were found; I did not keep track if they were part of the original batch of 14.  The last updates installed smoothly.
  • Now was a good time to open an iWork application and complete the mandatory registration, and enter in my Quicktime Pro upgrade code.
  • Flip4Mac 2.2.0.49 and Perian 1.1 began the parade of third-party applications.  These are nice codec collections for Quicktime, although I think VLC is pretty good too.
  • Caffeine 1.01 and iStat Nano 2.2 are two widget applications.  Caffeine loads in the menu bar, and is a simple way to toggle power-saving features of laptops.  I prefer the minimalist approach of iStat Nano over the more popular iStat Pro.
  • Skype 2.7.0.257, their first official Leopard release.  Not everyone can be reached via iChat.
  • VMD 1.8.6, a wonderful visualization tool for chemists and biologists.
  • Aquamacs 1.3a, a port of the popular *nix editor, emacs, to an OS X native Aqua interface.  Awesome.  I want to use the Xcode IDE environment more, but Aquamacs has better syntax highlighting for Fortran, and I use emacs on Linux systems.
  • I also installed a fortran plugin for Xcode 3.0.  I learned about this at the nifty site macresearch.org.  The only drawback to using Xcode is that its syntax highlighting for fortran isn’t quite as good as aquamacs / emacs. Anyway, don’t forget to defaults write com.apple.Xcode DBGFortranBasePath /opt/local/bin/gfortran-mp-4.2
  • Macports 1.6.0 base installer.

Macports Configuration and Package Installations

  • There is a bug in the Macports 1.6.0 base installer which doesn’t set a couple paths (and perhaps other things) on Leopard. So, I ran the Macports svn repository postflight script.
  • Next, I edited a setting in sources.conf to install my macports local portfile: py25-pyx, and copied the Portfile to the appropriate local directory.
  • As I have two cores for compiling, I set the macports.conf buildmakejobs to 2.
  • Now it’s time to “port install” the packages I need.  Macports will automatically install the ports for any dependencies.  I started with gcc42 (4.2.3).  Leopard/Xcode 3.0 comes with gcc 4.0.1 and does not provide gfortran.
  • Next, the parallel compiler package, openmpi +fortran (1.2.5).  Again needed to handle the 4.2.x compilers and parallel fortran.
  • grace (5.1.21), a wonderful 2D plotting program which is also popular on Linux systems.  Grace uses X11, and one of its major dependencies is openmotif (more on that later).
  • PyX, a Python package for creating 2D/3D graphics with a TeX interface.  In Macports, this is py25-pyx (0.10).  I need PyX for some 2D vector graphics creation from simulation output.  A notable dependency of py25-pyx in my Portfile is TeX Live 2007 (by default it depends on teTeX).  Several users have had problems installing texlive on Leopard, possibly due to missing openmotif or a strange X11R6 path problem.  There is a syntax bug in a TeX Live fonts map file which PyX warns about, but it is easily corrected.  Finally, py25-zlib (a dependency for py25-pyx) failed to build, but I came up with a workaround.
  • ImageMagick (6.3.8).  This suite of command-line graphics tools is great to have on any *nix system.  It’s useful in scripting when dealing with large numbers of graphics files.
  • I recently installed Tkinter and the Python Imaging Library.  py25-tkinter needed the same workaround as py25-zlib, but py25-pil installed easily.  At least one person has found my note about the zlib and tkinter workaround to be useful.

Leopard System Preferences

  • The first thing to go was the desktop background, which was changed to the Black & White “Sea Mist” provided by OS X.
  • I set all four hot corners, to Screen Saver, Expose, Dashboard and Spaces.
  • Next were two of my favorite settings which I probably should have changed earlier, Trackpad clicking and two finger secondary click.
  • To Dashboard!  I added iTunes (I like that little control) and Stickies, while deleting that ridiculous calculator.
  • On to more serious work.  Gmail IMAP setup isn’t that bad (see the gmail link in my Special Items section), but the best options aren’t documented on gmail.com.  Do not store drafts or notes on server, do store junk on server.  I use “plain text composing” because many good people still use Pine.   I deleted the Apple Hot News RSS feed.  Set the IMAP Path Prefix to [Gmail].  Now the initial IMAP mail import can be done.  When that’s finished, right-click on the Gmail folders to use the Gmail ones for Sent, Trash, and Junk.  Note, the IMAP sync to Gmail’s “All Mail” folder was rather slow, as has been noticed elsewhere. Also, my Spam folder is filtered on the Gmail side so that items in it do not appear as unread.
  • Security settings! Amazingly, even after installing 10.5.2, the Leopard firewall was still disabled by default. So, after allowing ssh remote access in “Sharing”, I enabled the firewall (allowing ssh) and enabled the screen saver + login password prompts.
  • Speaking of ssh, next I copied the names and addresses of the machines in our lab’s local network from our main fileserver’s /etc/hosts file, and added them to my Mac’s /etc/hosts file.
  • Open PDF files in Preview instead of Safari, by default.
  • Lastly, banish the 3D dock.  How I hate it so.  This not only makes things look better, it visibly increases performance of minimizing/maximizing windows, dock scrolling and dashboard.  I had already applied the Leopard Graphics Update 1.0, and this performance difference is still present.  Hopefully it’s fixed in a future OS X update, but I do like the 2D look better anyway.
  • One thing which did not have to be changed was disabling Bluetooth wake from sleep, which Leopard does by default (Tiger did not).

Put the External Drive Back to Work

  • It was about time to restore my personal data.  My movies, music, pictures, data and anything else that was backed up but not yet reinstalled.  This was the easy part; I just had to be sure to restore the iTunes database by copying over all its folders.
  • I configured Time Machine to use one of the three 160 GB partitions on my Freeagent.  This allows me to keep a complete backup of my old, bootable Tiger and Windows partitions for the time being. Unfortunately, the first attempt at using Time Machine failed!   I had erased the partition and set it up to do the initial TM backup, then I went to sleep.  Although it was running on external power, my MBP apparently went to sleep as well, after about 10GB of the backup.  TM did not recover gracefully, and I had to cancel it, and reboot in order to successfully reformat the Freeagent partition.  I tried Time Machine again the next day, this time using the Caffeine applet to disable system sleep.  It worked.

Wishlist

  • Acquire/install Adobe Web Premium CS3.