Thursday, January 25, 2007

Gentoo configuration issues (2)




Updating configuration files in gentoo
=======
* Regenerating GNU info directory index...
* Processed 160 info files.
* IMPORTANT: 34 config files in /etc need updating.
* Type emerge --help config to learn how to update config files.
=======
In this case run the command: #etc-update


To add a service to the start up runlevel (so it will start every time the machine is reinitiated)

Adding to the run level:
# rc-update add gpm default
# rc-update add sshd default

To find a string:
Goto the applications folder, then:
grep -inr searchterm *
Ex: grep -inr localhost.localdomain *
This should show you all the files that contain that string.


3) Gentoo Method

Gentoo also uses a script to enable or disable services during boot-up. The name of the script is rc-update . Gentoo has three default runlevels. Them being: boot, default and nonetwork. Suppose I want to add the apache webserver to start in the default runlevel, then I run the command:
# rc-update add apache2 default
... and to remove the webserver, it is as simple as :
# rc-update del apache2
To see all the running applications at your runlevel and their status, similar to what is achieved by chkconfig --list, you use the rc-status command.
# rc-status --all

Gentoo configuration issues










To update the entire system
#emerge --update --deep --newuse --ask world

To manage blocked packages
http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?full=1#blocked
To un emerge the blocked packages:
#emerge --unmerge pckgname

Upgrade guide
http://www.gentoo.org/doc/en/new-upgrade-to-gentoo-1.4.xml

1. Before you begin

Be prepared

As with any major upgrade to the core of your Gentoo system, there is always the possibility that unforeseen problems will ensue. It is always prudent to back up all important data before beginning this process. If possible, try to allocate a large block of time for this upgrade, so that you will not feel rushed. All the software on your machine will need to be recompiled.

Other options

This is not the only way to upgrade your system. You can install a new 1.4 system onto a separate partition and reuse some of your system configuration instead. This method also has the advantage that you can always go back to your old system in the meantime as a fallback. You may also decide to simply not upgrade your system. If you decide you want to upgrade in place, read on.

General notes

Whenever the code listings suggest running the emerge command, it is always a good idea to make a test run of the command using the -p or --pretend option to make sure that the command will do what you expect it to do.

2. Upgrading in place

Get Portage as current as possible

Some of the syntax of current ebuilds is unreadable by older versions of Portage. If you don't have at least Portage 2.0.44, try upgrading Portage.

Code Listing 2.1: Updating Portage

# emerge --sync
# emerge -u portage

Note: If your Portage version is very old, you may get an error message containing the phrase "unscriptable object". Read and follow the instructions in /usr/portage/sys-apps/portage/files/README.RESCUE. Your Portage install should then be current.

Preparing GCC for cohabitation

You will be installing a newer version of GCC during this upgrade. Versions of GCC older than 2.95.3-r8 are not designed to have multiple versions of GCC installed. You must therefore upgrade GCC to at least version 2.95.3-r8. This will also have the beneficial side-effect of installing the gcc-config package on your system, which can be used to switch back and forth between various installed versions of GCC.

Code Listing 2.2: Updating GCC

# emerge -u gcc 

You can now check to see if gcc-config is working properly:

Code Listing 2.3: Verifying GCC profile

# gcc-config --get-current-profile 

This should return i686-pc-linux-gnu-2.95.3 on most x86 systems. Older systems may return i586-pc-linux-gnu-2.95.3.

Installing GCC 3

Now you can install a newer version of GCC without damaging your current compiler. Look in /usr/portage/sys-devel/gcc for a version of the GCC ebuild that is at least 3.2.1-r6. Choose the highest version that is marked stable for your architecture. To see if an ebuild is considered stable for your architecture, look for the KEYWORDS line in the ebuild file. If it has your architecture listed without a ~ in front of it, it is considered stable. Assuming 3.2.2 is the most current stable version, we first need to remove the glibc dependency from gcc.

Edit /usr/portage/sys-devel/gcc/gcc-3.2.2.ebuild and search for the line containing DEPEND. Remove the glibc dependency and save the ebuild.

Code Listing 2.4: Editing gcc-3.2.2.ebuild

# vim /usr/portage/sys-devel/gcc/gcc-3.2.2.ebuild 

Now install the latest GCC version on your system:

Code Listing 2.5: Install the latest GCC

# USE="-java" emerge /usr/portage/sys-devel/gcc/gcc-3.2.2.ebuild 

Changing profiles

Now you need to change two sets of profiles: your gcc-config profile and your Portage profile.

Code Listing 2.6: Change the Portage profile

# cd /etc
# rm make.profile
(Replace "x86" with your architecture)
# ln -s ../usr/portage/profiles/default-x86-1.4 make.profile

Code Listing 2.7: Change the GCC profile

(Note the one for the version you just emerged, use it below)
# gcc-config --list-profiles
(Replace with the version you noted above)
# gcc-config i686-pc-linux-gnu-3.2.2

Recompile toolchain

Now you need to recompile your core toolchain with your new compiler. If you are continuing in the same shell, you need to run source /etc/profile as gcc-config instructed you to. Then emerge glibc and binutils using your new compiler:

Code Listing 2.8: Rebuilding the toolchain

# emerge glibc binutils 

Warning: It is quite likely that you will upgrade glibc from a 2.2 or older version to 2.3. Do not downgrade glibc afterwards. Any software you have compiled against glibc 2.3 will stop working, and this can make your system unusable.

Recompiling everything with your new compiler

Now you may recompile everything on your system with your new compiler:

Code Listing 2.9: Rebuilding the entire system

# emerge -e world 

Note: If this command fails at any point due to errors, you can use emerge --resume to continue the process where you left off. This requires Portage 2.0.47 or later.

Wednesday, January 24, 2007

IBM-Lenovo Thinkpad T60

Author
Bill Giannikos (bill2 at giannikos.com.au) (Link to webpage)

Discuss this laptop here.

Introduction
This is a guide to running Linux with the IBM-Lenovo Thinkpad T60 laptop, model 19514BM.

Editing this page
Feel free to edit this page if you have further information or corrections to add. You may also completely delete and re-create this page if you feel you can do a better job as long as you at least cover the details already here.

Specifications
ProcessorIntel Core Duo T2400 1.83GHZ
Screen14.1"
RAM512MB
HDD60GB
Optical DriveDVD-RW
GraphicsIntel Media Accelerator 950
NetworkGigabit Ethernet, 802.11g Wireless, Bluetooth
Other3 x USB2.0


Linux Compatibility
DeviceCompatibilityComments
ProcessorYes
ScreenYes
Optical DriveYes
GraphicsYesSee notes below
SoundYes
EthernetYes
WirelessYesUse ipw3945 driver
BluetoothNot tested
56K ModemNot tested
USBYes
PCMCIANot tested but should work


Notes
For best results you should use a Linux distribution with kernel 2.6.16 or greater, such as Fedora Core 5.

Some versions of the T60 use the Intel Media Accelerator 950 graphics chip. Use the i810 driver for these laptops.

Some versions of the T60 use the ATI Mobility Radeon x1300 and x1400 graphics chip. The open source radeon driver does not support this chip yet but you can get it working with the proprietary ati driver.

Summary
You should use a Linux distribution which includes kernel 2.6.16 or greater, such as Fedora Core 5. With an up to date distribution this notebook is easy to get going.

Debian GNU/Linux (sid) on the IBM/Lenovo ThinkPad T60

(Link to webpage)
Specification
IBM/Lenovo ThinkPad T60
  • Intel Core Duo processor T2500 (2.0 GHz)
  • Mobile Intel 945PM Express Chipset
  • 2 GB RAM (PC2-5300 667 MHz DDR2)
  • 100 GB SATA 5400 rpm hard disc (Fujitsu MHV2100BH)
  • ATI Mobility Radeon X1400 M54 128 MB
  • 14.1" SXGA+ (1400x1050) TFT color
  • DVD burner / Super Multi-Burner
  • PC Card Slot
  • Gigabit Ethernet (Intel 82573L)
  • 3 USB 2.0 ports
  • 56K V.90 (V.92 designed) modem
  • High Definition (HD) Audio AD1981HD
  • Infrared port
  • Bluetooth
  • Intel PRO/Wireless 3945ABG
  • Fingerprint reader

First Impressions

The build quality of the T60 is extraordinary. Compared to the HP Omnibook XT1000 which I own as well and which isn't bad quality at all, the ThinkPad T60 is even better. Everything feels rock solid, you cannot bend the notebook, it sits in front of you like a black beautiful monolith. Regarding the opinions on the net that the T60 doesn't look as good as its predecessors, I have to disagree. I think the T60 looks much more "finished" and business-like than even the T43.

Installation Preparation

The ThinkPad comes preinstalled with Windows XP Professional. There's an additional partition on the hard disc which contains "Rescue and Recovery" tools in case something goes wrong. This is a hidden partition, accessible via the "ThinkVantage" button during booting.
As I didn't want to lose either Windows XP itself nor the recovery partition, some investigations were necessary. The Master Boot Record (MBR) seems to be a special one that checks for the "ThinkVantage" button. So, installing GRUB in the MBR will render the button useless. Installing GRUB into the GNU/Linux root partition and making it bootable, is a nice idea but doesn't work with this MBR either.
The installation procedure I took is this:

  • First of all I created the recovery media set (one CD and one DVD) from within Windows. In case something goes wrong, you can always restore to the factory settings this way.
  • Then I shrank the Windows partition down to only 30 GB.
  • I installed Debian GNU/Linux with the latest Debian Installer Beta 2 for the forthcoming Etch release. Installation works like a charm. SATA and the Gigabit Ethernet are recognized without problems. No manual fiddling necessary here.
  • As mentioned above, I didn't install GRUB in the MBR of the hard disc, but in the GNU/Linux root partition.
  • In order to make Debian really bootable, I used the Windows XP boot loader. Therefore, the 512 bytes GRUB installed in the GNU/Linux root partition (/dev/sda4 in my case) have to be copied over to the Windows partition. The Debian installer offers you the option to open a shell where you can do:
    dd if=/dev/sda4 of=bootgrub.bin bs=512 count=1
    Now copy bootgrub.bin to some removable media or to some other computer via network for later on.
  • When the Debian installer prompted for a reboot, I booted into Windows XP, copied the bootgrub.bin file into C:\ and added the following line to C:\boot.ini:
    C:\bootgrub.bin="Debian GNU/Linux"
    I also made this the default and decreased the timeout to 5 seconds, but that's just personal taste.
  • When I rebooted into Debian, the first this was changing /etc/apt/sources.list from etch to unstable and doing an apt-get dist-upgrade.

Once you know how to do it, it's not very hard. ;-)

Framebuffer Booting

If you want to see your two Tuxes when booting, add the following option to your kernel options when booting:
vga=0x323

Kernel

I'm using Linux kernel 2.6.16 on the T60. The most important configuation option I had to change after the installation was multi-processing. If the machine has two processors, we would be stupid not to use both! Here's my config-2.6.16 in case you want to have a look at it.

X11

The ATI Mobility Radeon X1400 is relatively new and is not yet supported by the ati drivers included in XFree86 or Xorg. However, there is a binary only driver (called fglrx) by ATI themselves available. This driver is included in Debian and comes with source for a kernel module (for kernel 2.6.16 at present) which you should compile as well.
If you think the fonts are too small, have a look whether your X server is started with the -dpi 96 option. If so, remove it and enter the dimensions of your screen in the xorg.conf as DisplaySize in the Monitor section. Then X calculates the DPI setting and the fonts get larger. In order to make most of the touchpad, use the Synaptics driver which is supplied with Xorg. My xorg.conf is here as a reference.
Especially interesing is the Generic Mouse section as this enables middle mouse button scrolling of the UltraNav.

Sound

For sound, just compile ALSA into the kernel and especially the snd-hda-intel module (configuration option CONFIG_SND_HDA_INTEL). That was enough to make it work for me.

Network

The Gigabit Ethernet in the T60 is supported by the e1000 driver (configuration option CONFIG_E1000) and just works.

WLAN

At present you need to disable all WLAN and IEEE80211 stuff in the kernel. Then you have to build it from http://ieee80211.sf.net/ and install the driver for the WLAN card from http://ipw3945.sf.net/ which works quite well for me. But connecting to an access point can take very long at some times.

USB

Configure USB support in your kernel and install udev then hotplugging should just work as well.

Mouse

The internal touchpad and TrackPoint are on /dev/psaux. In order to make USB mice work, configure your kernel in a way that mice are enabled in the HID section of USB. In my xorg.conf I have defined the touchpad and the TrackPoint as CorePointer and have set up an additional input device that sends core events as soon as an USB mouse is plugged in.

Fingerprint reader

There's an excellent guide of how to enable the fingerprint scanner which I followed to the letter. Afterwards you can log into your account using the fingerprint scanner like you can on Windows. Cool!

Modem

I haven't spent any time in configuring it as I don't need it.

IrDA

I have not yet spent any time getting it to work.

Bluetooth

I have not yet spent any time configuring it.

ACPI

I have all ACPI modules enabled, especially ibm-acpi. If you compile that as a module and add the following line to /etc/modules, you have control over the fan via /proc/acpi/ibm/fan (although you can only enable or disable it):
ibm-acpi experimental=1

ThinkPad keys

Using either tpb or hotkey-setup makes the additional buttons emit key codes which you can map to actions.

Problems

The only thing that is worrying me a little is the fact that the fan is constantly spinning. I had hoped the T60 would be a machine near quiet. But due to the spinning fan this is not the case. That's the only disappointment for me.

Related pages

ThinkPad T60 - Installation Guide for Linux

Debian Linux on an IBM Thinkpad T43p

Click here to go back to the index page.

Linux on a Lenovo T60

(Link to webpage)

So, work is letting me use a Lenovo T60. I put Gentoo GNU/Linux (2006.0) on it and decided to create a small page detailing the results.

If you're planning on using Debian External Content on model 2007-63g, I highly recommend Marco Kraus' installation guide External Content .

Specifications
  • Make/Model: Lenovo T60 (Model 2008-CTO)
  • Processor: Intel Core Duo (Centrino Duo) T2400 @ 1.83GHz, 2048 KiB L2 Cache
  • Graphics: ATI X1400 w/64MiB DDR-1 Video RAM
  • Memory: 1024MB
  • Storage: Hitachi 60GB 5400RPM SATA Disk Drive
  • Optical Drive: CDRW/DVD Drive (HL-DT-STCD-RW/DVD DRI)
  • Audio: Intel HD Audio Chipset
  • Wireless Networking: Intel PRO/Wireless 3945ABG
  • Wired Networking: Intel 82573L Gigabit Ethernet
  • Peripheral Networking: Bluetooth

All the goodies (lspci, dmesg, etc.) can be found here.

Hardware Table

Here's a list of the hardware in the laptop:

Component Model Status/Support Notes
Processor(s) Intel Core Duo (Centrino Duo) T2400 @ 1.83GHz, 2048 KiB L2 Cache Excellent Add CONFIG_X86_SMP and CONFIG_MTRR to your kernel, and you should be fine.
Memory 1024MB DDR2 Excellent Add CONFIG_HIGHMEM to your kernel config, otherwise you'll be capped at 896MB.
Graphics ATI X1400, 64MiB DDR-1 RAM Fair Well, this works fine with the VESA driver. However, ATI has some binary drivers External Content that seem to do the trick, too. Xvideo only started working in the 8.26.18 release, though.
IDE Controller Intel 82801GBM/GHM SATA Controller Excellent Works fine. Add CONFIG_SCSI_SATA, CONFIG_SCSI_SATA_AHCI, and CONFIG_SCSI_ATA_PIIX to your kernel. Probably beats the heck out of the Silicon Image junk in my Athlon64 box ...
Hard Disk Hitachi 60GB 5400RPM SATA Disk Drive Excellent Just.. works, like it should.
Optical Drive H-L Data Storage (Hitachi-LG) CD-RW/DVD GCC-4246N Bad libata.atapi_enabled still seems to have problems with AHCI, so disable it in the BIOS if you want to use the drive. Anyway, I burned an ISO image of the T60 BIOS, and the drive does work fine.
Audio Intel HD Audio Chipset Good Works fine w/ALSA. Use CONFIG_SND_HDA_INTEL in the kernel, and remember to run alsaconf, otherwise you won't get any sound. Use the PCM and Front volume controls to tweak the sound. I don't know what the Headphone volume control does, because it certainly doesn't modify the headphone output.
Wireless Networking Intel PRO/Wireless 8945ABG (802.11a/b/g) Fair Well, it works (tried w/802.11a), but Intel External Content needs to be whipped for requiring a binary-only regulatory daemon in addition to the binary-only firmware. The Gentoo package is somewhat brain-dead, too, since it requires net-wireless/ieee80211, which doesn't work if CONFIG_IEEE80211 is enabled. If you end up going this route, you'll have to disable CONFIG_IPW2100, CONFIG_IPW2200, CONFIG_PRISM54, and CONFIG_HOSTAP, since they require CONFIG_IEEE80211. (I suggest unpacking this in your home directory, and then just run ./load and ./unload manually)
Wired Networking Intel 82573L Gigabit Ethernet Good Works fine, enable CONFIG_E1000. The firmware on this seems to be buggy or something, because if I do a warm boot without a link (eg, no cable plugged in), I get "e1000_probe: The EEPROM Checksum Is Not Valid" when the e1000 module is loaded. This works on a cold boot, and when a cable is plugged in during a warm boot. Huh?
Peripheral Networking Broadcom BCM2045B Bluetooth 2.0 Receiver Excellent Works well w/my Logitech MX900 mouse. I suggest modularizing most (or all) of the Bluetooth options in the kernel, and emerging bluez-utils. Then, configure hidd to run at startup in /etc/conf.d/bluetooth, and rc-update -a bluetooth default. Gentoo's net.ppp scripts make jumping on the Internet via Bluetooth DUN a walk in the park.
Log

[Update 20060729] Updated most of the old stuff on the page. The kernel timing issue is in fact fixed in the released 2.6.17 kernel, and in distribution specific kernels, like Ubuntu External Content 's 2.6.15-26 patch. You don't need to do any hacking for ATI's drivers anymore, they build fine against 2.6.17 kernels.

[Update 20060422] I just realized that the optical drive hasn't ever worked. Correction, it hasn't ever been able to read media. I burned an ISO just fine w/cdrecord, since it uses its own SCSI library. Apparently with AHCI enabled, libata.atapi_enabled=1 does nothing, and there is no way of accessing this drive via /dev. So, disable AHCI to use your optical drive =(

[Update 20060418] There's an official (erm, hard-masked) ebuild for the 8.24.8 drivers, now. You still need to hack your kernel and change that line in firegl_public.c, though :)

[Update 20060417] I got the ATI video drivers to work, today. First, I hacked my kernel via the following:

  • Adding intermodule.o to the obj-y list in kernel/Makefile
  • Adding CONFIG_OBSOLETE_INTERMODULE=y to the end of my .config

That adds (yes, you can guess it) obselete inter_module functions to the kernel, since ATI's drivers are brain-dead and use them. Now, get an unofficial Gentoo ebuild from from this post External Content . Grab ati-driver-installer-8.24.8-x86.run and ati-driver-installer-8.24.8-x86_64.run from ATI External Content , and place them in /usr/portage/distfiles. Place the ebuild in /usr/portage/x11-drivers/ati-drivers (YES, this is bad, I know I should use PORTAGE_OVERLAY, but hopefully we'll see an official driver, soon, and won't have to worry) and run "ebuild ati-drivers-8.24.8.ebuild digest" to generate a digest. Next, go ahead and compile it, but interrupt the build right after it starts building the DRM module, and edit /var/tmp/portage/ati-drivers-8.24.8/work/common/lib/modules/fglrx/build_mod/firegl_public.c. Change MODULE_PARAM(firegl, "s"); to module_param(firegl, charp, 0);, then continue the build. If it works, awesome, if not - please wait for an official ebuild. Grab my dual-head xorg.conf below, if you want an example.

[Update 20060415] The first big problem I hit was a timer/clock issue, starting with a 2.6.15-gentoo-r1 kernel. Networking was just dog slow, and the system was dropping packets to hosts on the local LAN, along with some really weird latency. According to the kernel printk timestamps, only 30 seconds had gone by, when the system had been up for over 4 minutes. Also, not a good sign when keyboard repeat rate slows down and speeds up when you're just holding down a key.

The initial fix for this was to disable ACPI. Unfortunately, doing so prevented the SATA contoller to be detected. Disabling AHCI in the BIOS fixed this. However, the Intel audio module wouldn't load, and the Intel NIC didn't feel like transmitting or receiving any frames.

So, I jumped on the bleeding edge and got 2.6.17-rc1, then patched to -git9. I also set the timer frequency to 1000Hz (shouldn't have to do this, since 250Hz works perfectly on my IBM T42). I also made sure to enable the following:

CONFIG_IRQBALANCE=y
CONFIG_REGPARM=y

Maybe it was a combination of a couple things, but stuff started working. Every once and awhile I notice a small jitter here and there, which I don't think is normal, but the system feels much better, and SSH sessions are usable. wmnd External Content doesn't seem too happy, but I don't care right now. Grab my kernel .config here.

Dual boot Linux-Windows (Leaving MBR untouched)

Disclaimer: This document is provided "as is" without warranty. Use at your own risk. In no event shall I be liable for any damage resulting from the use of this work.

This HOWTO applies if:

  • Your machine already has Windows installed, and you are installing Linux as a second operating system, and
  • You want to leave the Windows boot loader (NTLDR) on the MBR (Master Boot Record). This allows you to continue to boot Windows with no issues. I've heard that Windows 2000/Windows XP or anti-virus software may complain if the MBR does not contain the Windows boot loader

You can use either GRUB or LILO to dual-boot Windows 2000/Windows XP and Linux. Both functionally work fine, but from what I've read, GRUB requires less maintenance, as LILO requires you to reinstall the boot loader (by running /sbin/lilo) every time you rebuild the kernel or make changes to /etc/lilo.conf.

Requirements for /boot Partition

The location of the /boot partition on the hard drive is critical so that you don't get screwed by the infamous BIOS 1024 cylinder limit. The BIOS of older systems can't access data beyond cylinder 1024, which is ~8.5 GB. A simple way to avoid the BIOS 1024 limit is to create /boot within the first 1024 cylinders (~8.5 GB) of the hard drive. If you have multiple hard drives (disks), /boot must be on the same hard drive (probably the first hard drive) that has the Windows boot loader (NTLDR) on the MBR.

Here are some options for where to create /boot partition.

  1. (What I did) Shrink the Windows partition such that there is 50 MB of unused disk space at the beginning of the drive and lots of space after the Windows partition. You can install the /boot Linux partition in this first 50 MB and avoid any potential issues with the 1024-cylinder limit entirely.
  2. Shrink the Windows partition such that it does not cross the 1024 cylinder (~8.5 GB), and install the /boot partition right after the Windows partition.
  3. Use LBA (Logical Block Addressing). LBA allows you to boot beyond the 1024 cylinder. In order to use LBA, your BIOS must support it. In addition, for LILO, you must also add a flag to enable LBA support. GRUB supports LBA "out-of-the-box"

To non-destructively shrink the Windows partition, you can use the free software program fips (please note that fips does not currently support NTFS partitions). Another option is the excellent commercial product Partition Magic. It has an easy-to-use GUI. Unfortunately, the tool that comes with Red Hat 7.2, Disk Druid, does not have the ability to shrink existing partitions. Once you've shrunk the Windows partition, you can use Disk Druid during the Red Hat Installation to create all the partitions you need for Linux.

Dual-Boot Setup

Following are the steps to get dual-boot working with GRUB; I figured out how to do this by looking at a similar procedure for LILO. I've verified that this works for Windows 2000 and Windows XP, and this should work on Windows NT (all 3 OSs use the same booting architecture).

  1. Install GRUB on the first sector of the /boot partition. DO NOT INSTALL IT ON THE MBR!.
    If you are performing the Red Hat installation, for the "Boot Loader Installation" screen:
    • Select "Use GRUB as the boot loader"
    • Select Install Boot Loader record on "...First sector of boot partition".
    • After finishing the Red Hat installation, reboot into Linux. If you don't have a boot disk, try booting in linux rescue mode
    If you already have Linux installed:
    • Run the following command (e.g. assuming /boot is /dev/hda2): grub-install /dev/hda2.
      If you don't know which partition contains /boot, run the df command and check the output.
    • Edit /etc/grub.conf and make sure there is an entry for your version of Windows. For reference, here is a copy of my /etc/grub.conf file.
  2. Determine which partition contains the /boot partition by running the df command. You'll see output like this:
    Filesystem           1k-blocks      Used Available Use% Mounted on
    /dev/hda3 8665372 1639580 6585612 20% /
    /dev/hda2 46636 5959 38269 14% /boot
    /dev/hda6 513776 189504 324272 37% /osshare
    none 256624 0 256624 0% /dev/shm
    From this output, we see that /boot is on /dev/hda2.
  3. Make a copy of the Linux boot sector onto a floppy or onto a FAT32 partition. We'll name this copy linux.bin.
    To make a copy onto a floppy:
    • Mount the floppy drive if it's not mounted (assumes /mnt/floppy exists): mount -t msdos /dev/fd0 /mnt/floppy
    • Run the following command: dd if=/dev/hda2 of=/mnt/floppy/linux.bin bs=512 count=1
      Substitute the path for the if= parameter (the input file) with the appropriate partition from the previous step. E.g., set if= to /dev/hda2.
    To make a copy onto a FAT32 (vfat) partition:
    • Mount the FAT32 partition if it's not mounted yet. If it isn't listed in the df output, it hasn't been mounted yet. Check out steps 3a-3c for mounting a FAT32 partition on the "Share Partitions HOWTO".
    • Run the following command: dd if=/dev/hda2 of=/osshare/linux.bin bs=512 count=1
      Substitute the path for the if= parameter (the input file) with the appropriate partition from the previous step. E.g., set if= to /dev/hda2. Substitute the path for the of= parameter (the output file) with whatever is appropriate for your system. The example here (of=/osshare/linux.bin) is for copying onto a FAT32 partition called osshare.
  4. Reboot into Windows
  5. Copy the linux.bin file to C:\
  6. Run notepad and edit C:\boot.ini. Note that C:\boot.ini is a hidden system file, so it probably won't show up in Windows Explorer. To edit the file, try: Start->Run and enter: notepad C:\boot.ini. Add the following line at the end: c:\linux.bin="Linux"
    If your C: filesystem is NTFS (not FAT32), you must edit C:\boot.ini as a user with administrator-level privileges.
    To make C:\boot.ini writable, you can either :
    • Use Explorer:
      • Go to Tools->Folder Options->View and select Show hidden files and folders and deselect Hide protected operating system files (Recommended).
      • Right-click on the file, view the Properties and uncheck Read-only. You can now edit the file.
      • After editing the file, restore the settings to their original state.
    • Use the command-line:
      • Make the file writable: attrib -R -S -H C:\boot.ini.
      • After you've finished editing the file, put the settings back: attrib +R +S +H C:\boot.ini
    For reference, here is a copy of my boot.ini file.
  7. Reboot again. You should be able to pick either Windows or Linux. Selecting Linux will start GRUB

Troubleshooting

  • When I select Linux from the boot menu, I get a frozen "GRUB" (or an "L" in the case of LILO)
  • Make sure you created the linux.bin file correctly with the dd command. If you think you ran the command correctly, the problem may be that your /boot partition is beyond cylinder 1024 and your BIOS can't reach it. At system startup, the Windows boot loader lists the choices from boot.ini. When you select Linux, the boot loader then loads the 512-byte linux.bin file, and then BIOS tries to access the /boot partition to run GRUB. Some BIOS implementations can only address the first 1024 cylinders of a hard drive, which corresponds to ~8.5 GB. How do you fix this? Create your /boot partition before cylinder 1024; i.e. before ~8.5 GB.
  • If I select Linux from the boot menu, I get an error message that says "Windows XP could not load: The file hal.dll (windows/system32/) is missing or corrupt. Please reinstall.
  • This is usually caused by an error in the boot.ini file. If you are unable to find and fix the error, check out Kelly Theriot's page that provides various methods for addressing the problem.

Acknowledgments

  • Jimmy Andriambao: for recommending the link regarding hal.dll problems
  • Leif Roger Kolberg: for creating a Norwegian translation of this page
  • Dirk Goepfert: for creating a German translation of this page
  • Fred van Lieshout: for creating a Dutch translation of this page
  • Rostislav "Udo" Galicek: for creating a Czech translation of this page
  • Arun Swami: for validating the dual-boot setup with multiple hard drives. Thanks Arun!
  • Adrián I. Correa: for enthusiastically providing a Spanish translation of this page. Adrián said it best: "I love this wonder called The Internet!"
  • Devesh Mistry: for pointing out the use of chroot /mnt/sys/mnt/syimage when in linux rescue mode
  • Emmanuel Brun: for graciously providing a French translation of this page
  • Jason Noll: for reporting the hal.dll problem resulting from error(s) in boot.ini
  • Garth Patil: for helping to troubleshoot why GRUB was freezing and having a great sense of humor
  • Piete Brooks: for pointing out that editing C:\boot.ini requires administrator-level privileges and providing the content for making the file editable using Explorer
  • Paul Feehan: for providing the commands to make C:\boot.ini editable for Windows XP
  • Jan Holm Jensen: for reporting that C:\boot.ini is a hidden system file
  • Hampus Hedberg Hankell: for the following suggestion:
    I think you should add help for users in despair that already have installed grub on mbr ,thus loosing the their ability to boot into windows xp. Procedure for this is ,boot from a windows start disc and do a fdisk /mbr At least then they can reach their windows and this time doing it right
  • Mark Jordan: for verifying that this works on Windows XP and suggesting the content for copy to floppy
  • Darryl Eaton: for introducting me to Red Hat Linux

If you are interested in creating a translation of this page, please read the translation policy.

IBM (Lenovo Thinkpad)

http://www-306.ibm.com/pc/support/site.wss/MIGR-48NT8D.html

http://www.linux-tested.com/results/ibm_thinkpad_T60_1951-28u.html

http://www.linux-tested.com/results/ibm_thinkpad_T60_2623-d2u.html

Laptops:Lenovo Thinkpad T60

http://learn.clemsonlinux.org/wiki/Laptops:Lenovo_Thinkpad_T60

Running Linux on the Lenovo Thinkpad T60

(Link to webpage)
I've recently purchased a Lenovo Thinkpad T60 (reviews: here and here). The machine is powered by an Intel Core Duo processor, with two cores of each 1.83Ghz. More specs:
  • 1GB RAM
  • Intel IPW3945 ABG WiFi chip
  • 14" 1400x1050 TFT display
  • 60GB harddrive
  • CDRW / DVD combo drive
  • Intel Corporation 82573L Gigabit Ethernet Controller
  • ATi x1300 graphics

Kernel and drivers

Not all of the hardware in the T60 is supported out of the box. VGA and WLAN chips are pretty new, so I had to manually install drivers for those. With recent kernels (2.6.17 and higher) CPU hotplugging works - you can switch off one CPU while everything is running and switch it back on. It is even possible to set different cpufreq governors for each core and have the cores running at different speeds, those speeds are 1,0Ghz, 1,33Ghz and 1,83Ghz.

Intel IPW3845 WLAN

Intel has released a driver for the WLAN chip on http://ipw3945.sourceforge.net. In order to use the driver, you first need to compile and install the ieee80211 subsystem. Additionally, you need a binary microcode image for the WiFi chip, and a userspace daemon. The installation of the driver is a little complicated because you need 4 different components, but once done, the driver behaves stable and works very well with the exceptions that power management does not seem to be supported yet. (Note that I'm not refering to suspend and resume hooks in the driver, but to the wireless powermanagement you're setting with iwconfig [iface] power.) WPA supplicant works well with those drivers, using no encryption, WEP and WPA-PSK encryption. I did not yet test others.

I've created a patch containing the ieee80211 subsystem updates and the ipw driver, you can get it in the Files section. This patch can be applied to the kernel source directly, it saves you reinstalling the driver after a kernel rebuild.

ATi X1300 Graphics

Currently, there is no Open Source driver for the ATi x1300 chips other than VESA, which is quite slow.
ATi has recently released a binary driver that also works with the x1300 chips, albeit with minor problems: I'm getting minor corruption of the framebuffer consoles. (The problem is known to the ATi developers and should be fixed in one of the upcoming releases. Update: This problem is fixed in recent versions, the packages in the files section do not have this problem any more.)

I've generated suitable driver packages for Kubuntu Dapper Drake (6.06) and Edgy Eft (6.10). You can download the packages from the Files section.

Suspend2 (suspend-to-disk)

I've added Suspend2 to the kernel. This makes the suspend process quite a lot faster (I measured 40% compared with vanilla's swsusp) and adds possibilities for a nice progress bar, along with some other neat features. If you use the kernel image I've put in the files section, that would save you the hassle of patching and compiling it yourself. I've also put a hibernate.conf example in the Files section. In order to test, change the file so it says

ProcSetting userui_program /usr/local/sbin/suspend2ui_text
#ProcSetting userui_program /usr/local/sbin/suspend2ui_fbsplash
You can add a snazzy framebuffer splash later. How to do so is documented on suspend2.net.

Using ATi's binary driver, it took me some time to figure out that I need to setting

ProcSetting extra_pages_allowance 36000 
in /etc/hibernate/hibernate.conf, otherwise the machine would hang on suspend. With this setting, suspend2 is completely reliable for me.

(disk-backed) suspend-to-RAM

Suspend-to-RAM works reliably on this machine. I'm using a disk-backed implementation provided by suspend2 and the hibernate script (that's also used for suspend-to-disk in fact). The only change I made is setting
PowerdownMethod 3  
in hibernate.conf. 3 stands for S3 (suspend-to-RAM), 4 is S4 (suspend-to-disk). Setting it to 3 will make the notebook write a memory image to disk and then enter suspend-to-RAM. The notebook will actually need a little energy then, but you'll be able to resume much faster than with S4 (about 10 seconds with S3, around 30 seconds with S4, depending on imagesize and other variables). The memory image on disk adds the advantage that in case you run out of battery (or something else goes wrong with suspend-to-RAM), you're still able to resume from disk and continue working. Neat.

Minor suspend-related problems and workarounds

Note that in order to make suspend working with the fglrx binary ATi driver, the fglrx kernel module needs to be loaded. Having it not loaded, it's still possible to use X, albeit with slower rendering and no 3d, but suspend will crash reliably.
After a suspend/resume cycle the scrolling features of the touchpad is lost, switching to another VT and back to VT7 makes it work again. Compiling the evdev driver into the kernel image also solves this problem. (CONFIG_INPUT_EVDEV=y, this is done in the provided kernel image.)

Multimedia

Controlling the volume via the multimedia buttons on the notebook works fine out of the box using kmilo.

I'm using kmplayer to watch movies and xine to watch DVDs. For most DVDs to work, you need to install libdvdcss2. This library is due to it's questionable legal status in some countries (Hello USA!) not in the official Ubuntu archives. I've installed it from debian-multimedia.org, using the following line in my /etc/apt/sources.list:

deb http://www.debian-multimedia.org etch main
. If playing DVDs is terribly slow, check with hdparm if DMA is enables on the drive, and if not, read this.

In order to be able to use the sound device with more than one application at the same time, you can modify your /etc/asound.conf file as follows (or just create the file if it's not there):

pcm.card0 {
type hw
card 0
}

pcm.!default {
type plug
slave.pcm "dmixer"

}

pcm.dmixer {
type dmix
ipc_key 1025
slave {
pcm "hw:0,0"
period_time 0
period_size 2048 #1024
buffer_size 32768 #4096
#periods 128
rate 48000 #44100
}
bindings {
0 0
1 1
}
}
This enables ALSA's DMix plugin and unblocks the sounds device once an application is using it.

Various issues

DMA problems on DVD drive

DMA on the DVD-drive was switched off initially. The reason is that the IDE driver will claim the DVD drive first, it'll then appear as /dev/hdc. In this case, DMA cannot be switched on. Adding

hdc=noprobe libata.atapi_enabled=1
will solve that problem. Since the storage devices can be used with libata and thus do not need CONFIG_IDE, we can also switch it off in the kernel config and thus avoiding this problem. (I did this in my example .config.) I found this workaround on ThinkWiki.

Storage / SATA

At the moment of writing, the kernel's AHCI driver does not play nicely with suspend. In the BIOS, I switched from AHCI to "compatibility" mode, which works around that problem. I the meantime, the driver is being fixed, so I expect this to vanish with one of the next releases of the Linux kernel.

Various hacks

GRUB kernel options

In order to use swsusp, you need to add a kernel parameter, resume=/dev/sda1, where sda1 is your swap partition. (I have a swap partition of 1GB, which should be enough if I'm not "fully loaded".) Here's my grub entry:
title   Ubuntu, kernel 2.6.17.1
root (hd0,1)
kernel /boot/vmlinuz-2.6.17.1 root=/dev/sda2 ro vga=791 \
acpi_sleep=s3_bios,s3_mode quiet splash
savedefault
boot
(note that the kernel line has to be 1 line.)

Files

I've created a T60 kit for those that don't want to go through the hassle of collecting all the stuff in different places. This package should provide you with suitable drivers for the T60 hardware, it also has config files that you can use as a reference point.
The packages contain a kernel image which has ipw3945 support built-in (Note that you still need the microcode image and the ipw3945d daemon). There is also a couple of packages for the ATi driver, basically, you need to install all the packages here to get a kernel which has hardware accelerated graphics, support for the WLAN chip and swsusp support.

You can download the customized packages here.

Install them like this:
sudo dpkg -i xorg-driver-fglrx_8.25.18-1_i386.deb \
fglrx-control_8.25.18-1_i386.deb \
fglrx-sources_8.25.18-1_i386.deb \
xorg-driver-fglrx-dev_8.25.18-1_i386.deb \
kernel-image-2.6.17.1_10.00.Custom_i386.deb \
fglrx-kernel-2.6.17.1_8.25.18-1+10.00.Custom_i386.deb
If you prefer to patch and configure your kernel yourself, you can use the ipw3945 patch and the libata-acpi patch, along with my .config

Resources

17-10-2006, 22:03 h
© Sebastian Kügler

IBM/Lenovo ThinkPad T60 (Model 2007-63g)

(Link to this information)

Installation Guide for Debian GNU/Linux


(c) 2006 by Marco Kraus
http://www.kraus.tk


Comments, suggestions
and improvements very welcome.


If this website helped you, I'd also
love to hear from you.
Just drop me a note.


Mailt to: Marco eMail




Last updated: 06.06.2006
T60



General Data:
CPU: Intel Core Duo 2500 with 2GHz
Graphic Card: ATI X1400
RAM: 1024 MB
Screen: 14" with 1400x1050 (SXGA+)
2nd Level Cache: 2MB
Wireless LAN: Intel IPW3945
LAN: Intel e1000 Gigabit Ethernet
Audio: AC'97 with AD1981HD chipset

With Fingerprint Reader
With IBM Harddisk Protection System

Here is the complete LSHW output with ALL technical details.



What works and what doesn't:

Works with no or less tweaking:

- Multicore support
- Serial ATA
- DVD/Burner

- Fn Keys
- ThinkLight
- NavPad and Trackpoint
- Audio system
- Ethernet adapter
- Graphic Card (3D accelerated)


Works with a bit or more tweaking:

- OSD for Softkeys and volume control
- Wireless LAN


Doesn't Work:

- some IBM ACPI functions like fan control (in development)
- HDAPS chipset not supported (in development)


Not tested:

- Modem
- Fingerprint reader
- Bluetooth
- Suspend



Installation Details:

Kernelconfiguration

Get my kernel configuration here.

It is thought to be used with Kernel version 2.6.16 and the proprietary ATI binary drivers and external Intel IPW3945 drivers (so the kernel uses a normal Kernelstacksize without patches, has no IEEE subsystem and WLan drivers, and only VESA support for the graphiccard). See detailed description in belower sections.

CPU

Install a SMP (multiprocessor) kernel. If you compile your own kernel, add SMP support to it. It's advisable also to add RTC (device drivers->character support). The Yonah core (first generation Cure Duo) doen't have Hyperthreading, so disable SMT.

Harddisk

Switch the S-ATA Disk in your BIOS to "compatibility"-mode when the harddisk is not recognized (problems with the SATA driver in your Installation-Kernel, normally when using a kernel < style="font-style: italic;">Attention: Change devices in grub.conf/menu.lst (or lilo.conf) from /dev/hdaX to /dev/sdaX !

My TP came with no XP CD. There a so called "rescure-and-restore"-partition that includes a backup of WinXP. So if you would like to to a Dual-OS installation, you have to resize the partitions within your finished Windows-Installation. Do this with e.g. Partition Magic and keep the Restore-Partition (the 5 Gig FAT32 that's normally hidden under windows) at the end of your disk. Don't move that Restore-Partition.

ACPI / suspend and resume

Use Suspend2 and add the suspend to the kernel (under powermanagement->acpi). Add the following option to your kernel boot parameters (e.g grub.conf/menu.lst): resume=/dev/sdaX (your swap partition). The swap partition is the best solution. There's also a possibility to use files with a special filewriter. Read the suspend2 manual for more help. I do more tests about this in future.

Booting

You can add framebuffer support to your kernel, and add "vga=834" to the kernel boot options to enable sxga in your console. With the options above, my menu.lst looks like this. Attention: Doesn't seem to work always. Send me your VGA options.

Fan

One of the major problems of the T60 is a thermal issue. The procesor is quit cool (about 50 degree celsius) and also battery (about 50 degree C) and harddisk (about 40 degree C) are absolutely fine. BUT the powerful graphiccard is a problem. In idle-mode it gets quit hot, round about 75 degree C. Playing some minutes doom3 or UT2004 brings it up to 86-87 degree. Thats still no problem for that card, it get trouble when it get hotter than 110 degrees. BUT your fan of the T60 has to cool the card all the time. also in idle mode. So it's always running. It is not too loud, but good hearable. And always running parts of a computer are fragile....

I got some mails from users that with ibm-acpi you can control the fan. That is correct. And with a current version and forcing module-load with experimental=1 you can switch on/off the fan (no more detailed control is possible right now). BUT I do not recommend to switch the fan off, becaus your graphiccard simply needs it, ALL the time ! You risk your hardware when switching it of. Keep that in your mind.


Network

It's a intel e1000 network card. So the e1000 driver should work. It wasn't possible to use the e1000 driver with the normal sarge installation. So I copied a linux-2.6.16 kernel from my usb stick and compiled a new kernel manually. With the 2.6.16 the e1000 drivers work without a problem.

Wireless LAN

It is the new IPW3945 Card from Intel. It's no normal MiniPCI, it's MiniPCI express now,yeah ;-) There are two solutions to get this working right now:

1.) The drivers from Intel: http://ipw3945.sourceforge.net/. Because the drivers are not (and maybe will not, see discussions on the LKML) in the kernel, you need the drivers, the binary, and the ecxternal IEEE package. You get this all on the IPW website mentioned above. Read the INSTALL manual. At a short: copy firmware to the place of your firmwareloader, remove all IEEE stuff (network drivers,etc) and compile/install IEEE and IPWDrivers package. At the moment you can not install the ipw drivers, you have to manually load and unload them via the scripts. This will change when the driver is stable. This worked quite good for me with IPWDrivers version 0.0.74 and ieee80211-1.1.12 (or later).

If it doesn't work for you, you can also try the second solution, read on.

2.) Another solution is the usage of ndiswrapper. But this also need a bit more tweaking.
First of all, we need 16K Stacksize for the kernel, we grab the right kernelpatch for that from: http://www.linuxant.com/driverloader/wlan/downloads-patches.php and patch our kernel with: Thinky:/usr/src# patch -p0 <>
Then change the stacksize to (now available) 16K and recompile (add intermodule support again to you .cofig file if you did this before for your ATI drivers). Download, compile and install ndiswrapper. A more detailed installing instruction can be found in the ndiswrapper wiki at: http://ndiswrapper.sourceforge.net/mediawiki/index.php/Installation
Comment: Do a "make dep" instead of just a "make" do build clean debian packages, which you can install with dpkg after. Now get the windows drivers from Intels website (only available in a package with the other cards, so you have to get 80MB:
http://www.intel.com/support/wireless/wlan/sb/cs-010623.htm
Unzip and change to the "Drivers" directory, and run "ndiswrapper -i w39n51.inf" and modprobe ndiswrapper. After this, your device should be appear as wlan0 in your iwconfig list. Good luck. I still had some problems with this, so I used the native IPW drivers from solution 1).

Bluetooth

Fn+F5 switchs Bluetooth on. Install the bluez stack, and (if wanted) kbluetooth, add bluetooth in your kernel (under USB devices). Didn' try more with that, but seems fine. Will report if I find a bluetooth device to test ;-)

Trackpoint/Ultranav

Works as a PS/2 device. Should mostly work out of the box. When not, compile your kernel with ps2 input device support. Also install the synaptics touchpad drivers (should be available with every common distribution).

Sound

This is a Analog Devices AC'97 Audio controller with AD1981HD chipset. Build a kernel with AD HD support. This is NOT the usual AC97 intel chipset (snd-i80x), but the HD driver some lines above the kernel configuration. Run alsaconf and set the volume via your favourite mixer (aumix in console is fine). The Volume control works out of the box via Fn keys (inc. muting).
I recognized some cracking noises with applications using OSS (and so OSS emulation via alsa). I read about a workaround to put position_fix=2 to the module option. But that's not the perfect solution, but works okay...

Graphic Card

This is an ATI x1400 graphic card. ATI released on 12th April new drivers that supports the X1400. That half a year after the X1K was released (Version 8.24.8), but okay...no get them here: https://support.ati.com/ics/support/default.asp?deptID=894

Sadly there are still the Intermodule problems (ATI is using the intermodule API pre 2.6.15). So if you use a kernel > 2.6.15 then you should fix this with that litte workaround from the Rage3D Forum: http://rage3d.com/board/showthread.php?p=1334218607
(in short: add obsolete intermode to the kernel, enable agpart and disable drm)

[OLD: If you are using xorg v7 (X11R7) there is another problem: the ATI installer doesn't support xorg 7.0, only 6.9. But the codebase of yorg 6.9 and xorg 7 are the same, except the modular concept, so force the version to x690 and run the installer like this: X_VERSION=x690 ./ati-driver-installer--.run
Then copy the X11 modules from /usr/X11R6/lib to /usr/lib/xorg (the fglrx driver from drivers and linux subdirectory).]

Update: Driver version 8.25.18 and above support xorg7 correctly now !

Now change the driver in your xorg config to fglrx an restart X.
If you get a black screen, keep in mind that ATi doesn't support 16Bit, and change the default mode to (at least) 24 bit color depth.

That's it...here is my xorg.conf with the ATi driver.

When you don't want to use the proprietary driver, you have to use VESA because there are no free xorg drivers for this card. Use the VESA driver and set the resolution to 1400x1050 (SXGA+) and bet (or better write an email to ATI) that ATI will publish new drivers that also supports newer cards. Cruel Linux politics from ATI, so never buy that stuff when you have the choice. My xorg.conf for VESA is here

Thinklight

The TP keyboard light is controlled via BIOS only and Fn+PgUp works out of the Box on all maschines. No tweaking needed here. Yeah! Brightnesscontroll also works out of the box via Fn keys.

HDASP

Frank Mehnert wrote:

--- cut ---
HDAPS works well (at least hdaps-utils give
valid output) if you use the hdaps driver from the tp_smapi package

http://thinkwiki.org/wiki/tp_smapi

and load it using force=1 module parameters.
--- cut ---

Thanks for that hint.

Keycontrol and OSD

All Fn Keys and Volumecontrol work out of the box. But normally you also want to show the key values on your desktop. This can be done via tpb (edit /etc/tpbrc for your needs) or you use the kmilo plugin in KDE cntrollcenter. In both cases nvram support hast to be enabled in your kernel. If you use udev, etc /etc/udev/020_permissions and add a MODE="0666" to the NVRAM line to set global rights. Or add you to the nvram group. It won't work when you have no access to that virtual device.

KMilo is a tpb clone, but has less features. I found out that kmilo has problems on my T60 with the volume control. I controls the headphones instead of the PCM mixer. So I use tpb. There it's possible to use a mixerr callback function. I made a small workaround:

1) Using tpb for softkey control.
BTW: To start "tpb -d" on KDE startup with putting this in a small shellscript in .kde/env
2) Setting up /etc/tpbrc for your needs
3) Setting a callback in the tpbrc to /path/to/the/script and using amixer for volume control.
The callback script can be found here

Fingerprint reader

I didn't really try it out right now, but it seems to works with a bit of tweaking and some proprietary code. Read the great tutorial at ThinkWiki about that:
http://www.thinkwiki.org/wiki/How_to_enable_the_fingerprint_reader

A more complete and detailed installing instruction can be found at:
http://linux.spiney.org/debian_gnu_linux_on_an_ibm_thinkpad_t43p_fingerprint_reader



(c) 2006 by M.Kraus, http://www.kraus.tk

Tuesday, January 23, 2007

Solaris 10 - UNIX for the people?

Here is a good article about Solaris 10
http://www.osnews.com/story.php?news_id=10673

A better option I guess is OpenSolaris
http://www.opensolaris.org/os/

Also Gentoo have announced plans to add OpenSolaris support to portage which is a great combination.
http://www.gentoo.org/news/en/gwn/20050124-newsletter.xml

Portage tree has been ported to other OS like FreeBSD and others
http://en.wikipedia.org/wiki/Gentoo/Alt
http://www.gentoo.org/doc/en/gentoo-freebsd.xml
http://en.wikipedia.org/wiki/Gentoo/FreeBSD

GPT (GUID Partition Table)

Intel EFI/GPT parition tables
http://en.wikipedia.org/wiki/EFI_System_Partition
http://en.wikipedia.org/wiki/GUID_Partition_Table

GNU Parted is the solution
http://www.gnu.org/software/parted/features.shtml
The new version has support for Intel EFI/GPT partition tables.
http://www.gnu.org/software/parted/faq.html

GRML Live CD
http://www.grml.org/
http://grml.org/files/release-0.8/dpkg_list
It works with GNU Parted 1.7.1 which suports Intel EFI/GPT partition tables
http://www.gnu.org/software/parted/features.shtml

GParted Live CD
http://gparted.sourceforge.net