Gnuru.org
Productive Linux


Subscribe

 Subscribe via Feedburner in a reader

Enter your email address:

Delivered by FeedBurner


Login
Login:
Password:



Don't have an account?
Sign up to Gnuru.org
Forgot your password?

Updating BIOS Firmware on a Linux Only Thinkpad Laptop
18 June 2010 @ 16:25 BST
by Paul

Recently, I successfully replaced a hard drive in a Thinkpad X40, with a CompactFlash memory card.

The laptop now runs very well, but I was getting this warning:

thinkpad_acpi: ThinkPad ACPI Extras v0.23
[    6.610645] thinkpad_acpi: http://ibm-acpi.sf.net/
[    6.616012] thinkpad_acpi: ThinkPad BIOS 1UET74WW (1.22 ), EC 1UHT58WW-1.12
[    6.621317] thinkpad_acpi: IBM ThinkPad X40, model 23716JG
[    6.626593] thinkpad_acpi: WARNING: Outdated ThinkPad BIOS/EC firmware
[    6.631788] thinkpad_acpi: WARNING: This firmware may be missing critical bug fixes and/or important features

It was a fair warning. The BIOS probably did probably contain some bugs, which is why IBM/Lenovo issued new versions.

Almost all laptop manufacturers allow users to download BIOS updates as Windows executable 'exe' files. Lenovo is no exception.

The problem is that on this laptop, I had no Windows at all, no Windows boot disk and so no way to execute this 'exe' file. Thankfully, there is a way.

Get the firmware files

The first step to getting the firmware files. Thinkpads are unusual in that they require two different firmware updates; the BIOS and the Emedded Controller Program. This is an added complication becasue only some BIOSs and ECPs are compatible together and therefore one must be updated before the other. This is extremely important.

For the X40, the files can be downloaded here.

Extract the archives

The files might be Windows executables, but they are merely self-extracting 'cabinet' archives. On Linux these can be extracted using cabextract.

In each archive, there will be one file called '.IMG'. This is a disk image that can be mounted.

For the X40 these are 1UUJ22US.IMG and 1UHJ10US.IMG for the BIOS and ECP respectively. You can mount these with something like:

mount -o loop 1UUJ22US.IMG /mnt/

Once you've verified that these are disk images you need to find a way to boot to them.

How to boot the images

In theory there are many ways to boot a disk image. You can burn it to a CD or boot from a memory stick. The X40, however, doesn't have a CD drive to boot from. I tried to use unetbootin to install the disk images to a bootable pen drive. Although unetbootin reported success any attempted boot would hang.

The answer was to use grub to boot the disk images.

Amend /etc/grub.d/40_custom

To boot these disk images, copy the images to the /boot/ directory. Also, ensure that the syslinux package is installed and copy memdisk also to the /boot/ directory.

sudo cp /usr/lib/syslinux/memdisk /boot/

Now, you have to configure grub to boot the images. What files you edit will depend on the version of grub you have installed and your distribution. The instructions are slightly wrong. For grub2 on Debian, what worked for me was to add these lines to /etc/grub.d/40_custom:

menuentry "X40 ECP Upgrade" {
set root=(hd0,1)
linux16 /boot/memdisk
initrd16 /boot/1UHJ10US.IMG
}
menuentry "X40 BIOS Upgrade" {
set root=(hd0,1)
linux16 /boot/memdisk
initrd16 /boot/1UUJ22US.IMG
}

Then run update-grub.

Now reboot the computer.

Update the BIOS and ECP in the right order

For Thinkpads it is extremely important that the Embedded Controller System and the BIOS are updated in the right order. For the X40, which is not at all typical, the instructions on the IBM/Lenovo site are clear that the BIOS should be updated before the ECP.

Boot into the Disk Images

Now, we're ready to boot into the disk images. First I chose the grub entry 'X40 Bios Upgrade' and followed the instructions. Then it was time to choose the entry 'X40 ECP Upgrade' and follow the instructions.

BIOS update splash screen

This worked perfectly and I can claim to have upgraded the BIOS on a Linux-only laptop.

I hope users of other laptops can do the same. There are a few things. Laptop makers need to be transparent about thier BIOS's and how to upgrade them. For example, once you understand that the IBM/Lenovo files are cab archives and that the important file in the archives is a disk image, the way to proceed becomes a lot clearer.

Also, booting into that disk image wasn't straight forward, it would be helpful if laptop manufacturers could provide a standard way of booting from a pen drive to carry out these upgrades.

None the less, I am extremely happy that it is possible to upgrade firmware without the need to boot into Windows.




Comments disabled