Difference between revisions of "BIOS Upgrade"

From ThinkWiki
Jump to: navigation, search
(Does work:)
(Booting using GRUB)
 
(193 intermediate revisions by 73 users not shown)
Line 1: Line 1:
__TOC__
+
{| width="100%"
 +
|style="vertical-align:top;padding-right:20px;width:10px;white-space:nowrap;" | __TOC__
 +
|style="vertical-align:top" |
 +
This page is meant to describe ways to update the BIOS on a ThinkPad that only runs Linux for users that don't have ready access to Windows. If you have Windows on your ThinkPad you can just boot into it and follow instructions on the Lenovo website.
  
This page is meant to describe ways to update the BIOS on a ThinkPad that only runs Linux for users that don't have ready access to Windows. If you have Windows on your ThinkPad you can just boot into it and follow instructions on the IBM website.
+
Updating the BIOS in Linux (with few exceptions) '''is not officially supported''' by Lenovo. However there are work arounds.
  
{{NOTE| In one case ([[APM setup on a type 2379 ThinkPad T40]]) it was not possible to upgrade the BIOS from Windows XP; a downgrade to Windows 98 was required to successfully run the BIOS upgrade app. The symptoms in this case were that, once the files had been extracted to the hard disk, and the machine was to reboot into the upgrade app, it would beep and hang just before reboot, requiring a power cycle. Once the power was cycled, it would simply reboot back into XP without performing any BIOS upgrade actions. So even if you have Windows, you may still need to use the info on this page.}}
+
<BR>
 +
{{WARN|By following any of the instructions here you are accepting the '''very real risk''' of turning your ThinkPad into a big expensive paper weight, as a firmware update gone wrong can create unfix-able problems.
  
----
+
'''Proceed at your own risk!'''}}
==Before You Begin==
+
|}
Updating the BIOS in Linux (with few exceptions) '''is not officially supported''' by IBM/Lenovo.  However there are work arounds.
 
  
{{WARN|By following any of the instructions here you are accepting the '''very real risk''' of turning your thinkpad into a big expensive paper weight, as a firmware update gone wrong can create unfixable problems.
+
= [[Custom BIOS]] =
  
'''Proceed at your own risk!'''
+
Some ThinkPad fans have created Custom BIOSes to remove whitelists, disable annoying errors, do Fn-Ctrl keyswaps, and add more functionality. Check the [[Custom BIOS]] wikipage for more information.
  
It is also important to understand that Thinkpads from IBM have two separate firmwares: the BIOS, and the Embedded Controller program.  A given BIOS version will require a certain version of the Embedded Controller program.
+
* '''X200, X60, T60, Macbook 2,1''' - [http://libreboot.org Libreboot] - Based on Coreboot, this BIOS (approved by the FSF) removes all proprietary blobs to create Free Libre Open Source Laptops, where everything from the motherboard to the computer can use Open Source Software. Richard Stallman famously uses a Libreboot X60.
 +
* Sovem's Whitelist Removed BIOSes - A famous user from BIOS-mods.com, that removes mPCI whitelists from BIOSes upon request.
 +
* '''T61, R61, X61/X61s/X61T, X300''' - [[Middleton's BIOS]] - Enables SATAII, removes whitelist, thermal fixes, Fn-Ctrl swap.
 +
* '''T43/T43p, R52, X41/X41T''' - [[Problem with non-ThinkPad hard disks#Use unofficial modified BIOS|TTav134's BIOS]] - Removes Error 2010 for aftermarket hard drives, and the BIOS whitelist.
  
The IBM documentation is sometimes unclear about the order in which these two firmwares should be updated.  On most, but not all Thinkpads, '''the correct update order is Embedded Controller program first, and then the BIOS'''.  Make sure to do the two updates immediately one after the other.  Newer models from Lenovo update both the Embedded Controller program and the BIOS at the same time, so you don't have to worry about it.}}
+
== [[Middleton's BIOS]] ==
  
==BIOS Upgrade Paths==
+
A user on NotebookReview named 'Middleton' made these alternative BIOSes to enable SATA2 on certain Thinkpad models (X61/T61/R61/X300). These ThinkPads are limited to SATA1 in their BIOS even though the hardware is SATA2. This is a huge drawback for anyone wanting to use SSDs, because it is so much slower.
  
For every firmware (either BIOS or Embedded Controller program) update on the IBM web site there used to be two different firmware update programs provided. The Diskette Updater and the Non Diskette Updater. For newer Lenovo Models the Diskette Updater is replaced with a bootable CD-Image and the Non Diskette Updater is renamed BIOS Update Utility, both of which update the BIOS and the Embedded Controller program at the same time. A list of links to firmware downloads can be found at [[BIOS Upgrade Downloads]] for nearly all Thinkpad Models.
+
Also, it is not possible to install some wireless cards, because only certain models are whitelisted by IBM/Lenovo. [[Middleton's BIOS]] removes this limitation as well.
  
===The Diskette Updater===
+
'''See the wikipage [[Middleton's BIOS]] for installation instructions, downloads, and more description.'''
  
The Diskette updater appears to be a 16 bit DOS program which asks you to accept a license agreement.  It will run in Windows, DOS, OS/2, or [http://dosemu.sf.net Dosemu] perfectly, but requires a real floppy disk attached via a real floppy controller.  A USB Floppy Drive will not work.
+
Note: If your BIOS-Update tool says that no update is needed, then simply downgrade the Bios first: On Lenovo's drivers download page, the old Bios files are listed at the very bottom of the page.
  
===The Bootable CD Image===
+
= Downloading New Firmware =
 +
{{WARN|Flashing the wrong firmware for your hardware may cause permanent damage to your ThinkPad.  It is up to you to confirm that the firmware you are using is correct.}}
  
Newer models from Lenovo can be updated using the Bootable CD ImageThis should be the easiest way for non-Windows users and also maybe a more secure way for Windows users, as well. As the image is provided as a plain ISO-file without any Windows enclosure, you can simply burn it to a CD-R/RW with any modern operating system, as long as you have a CD/DVD-RW Drive and are then able to boot from it.
+
A list of links to firmware downloads can be found at [[BIOS Upgrade Downloads]] for most Thinkpad modelsYou can also check the Lenovo Support website's [http://support.lenovo.com/en_US/downloads/default.page?#|ThinkPad driver matrix].
  
===Extracting a Bootable CD-ROM Image from the Non Diskette Updater===
+
Lenovo/IBM provides firmware upgrades in a variety of packages:
{{WARN|Though this process was successfully tested on one version of .exe files found on IBMs website this doesn't mean it will work for all of them.  Proceed at your own risk.}}
+
* Diskette
 +
* Non-diskette
 +
* Linux diskette
 +
* BIOS Utility
 +
* Bootable CD
  
This installer appears to be a 32bit windows .exe which is designed for updating the BIOS directly from a running Windows OS.  It turns out that this .exe is really a wrapper license program around Windows .cab files (see [[How_to_change_the_BIOS_bootsplash_screen|BIOS-Bootsplash]]).  If you install the Linux program [http://freshmeat.net/projects/cabextract/ '''cabextract'''] you can expand these .cab files directly. Run the following:
+
Not every type of package is available for every model.
  
:{{cmduser|cabextract FILENAME.exe}}
+
The ''BIOS Utility'' and ''Bootable CD'' packages combine the BIOS and ECP firmwares.  For the other packages, there is one for each firmware.
 +
{| align="right" style="width:20em;"
 +
| {{HELP|Can an image be extracted from a "Linux diskette" .exe file?}}
 +
|}
  
This will extract 8 files in the current directoryOne of them will be FILENAME.imgIn this discussion, "FILENAME" represents the name of the Non Diskette file that you downloaded, such as "1NHJ04US".
+
The ''Linux diskette'' is just the ''Diskette'' package that runs on Linux instead of Windows/DOSIt's unknown if a boot image can be extracted from it.   
  
You can test that this is really a floppy image by running:
+
You may need to try different packages to find the one from which you can extract a boot image.
  
:{{cmdroot|mkdir mntfloppy}}
+
== Two Firmwares: BIOS and ECP ==
:{{cmdroot|mount -o loop FILENAME.img mntfloppy}}
+
{{WARN|Flashing incompatible firmwares, or flashing them in the wrong order, may cause permanent damage to your ThinkPad.}}
:{{cmdroot|ls -la mntfloppy}}
 
  
If the results of {{cmdroot|ls -la mntfloppy}} look like a dos floppy, and no read errors were displayed, you have a pretty good chance that the floppy image is usable.
+
It is important to understand that Thinkpads from IBM have two separate firmwares: the BIOS, and the Embedded Controller Program (ECP).
  
Unmount the image after you are done:
+
A given BIOS version will require a certain version of the ECP.  You must read the Lenovo website and/or .txt files to confirm which BIOS is compatible with which ECP, and '''the order in which to update them'''. 
  
:{{cmdroot|umount mntfloppy}}
+
=== Update Order ===
 +
The Lenovo/IBM documentation is sometimes unclear about the order in which these two firmwares should be updated.  When in doubt (i.e. IBM didn't provide specific instructions for your model or a particular firmware update), '''update the ECP first, and then the BIOS'''.  Also, make sure to do the two updates '''immediately one after the other'''.
  
Now, you can proceed to [[BIOS_Upgrade:Creating a Bootable CD from a Floppy Image]], below.
+
The EC firmware is usually much better at backwards compatibility than the BIOS.
  
== Updating Thinkpad X Series ==
+
{{NOTE|Updaters for newer models take care of both BIOS and EC, and use automatically whatever sequence is needed, so you don't have to worry about it.}}
  
X Series Thinkpads do not have an internal drive. If there is no Windows installed, the BIOS must be updated by booting from an USB drive or a drive that is integrated in the docking station. Since a while Lenovo provides BIOS updates in form of bootable CD images. Unfortunately, these images are intended to be used with the docking station's CD drive. If you do not own such a drive, things get complicated.
+
== Installed Firmware ==
 +
You can check the current BIOS and ECP versions on your ThinkPad as detailed here: [[BIOS Version]]
  
The problem is that current BIOS updates are quite large, about 3 MB in size. Booting from CDs typically works like booting from a 1.44 MB or 2.88 MB floppy disk. The floppy image is stored on the CD and is referenced in the CD's boot record. Because the BIOS update file are that large, they do not fit on such a floppy image. Thus, they must be stored on the CD outside the virtual floppy image. To access these files a driver for the CD drive has to be loaded. Since Lenovo's CD images are intended to be used with a docking station's CD drive, it is not possible to use them for BIOS updates by booting from an USB CD drive.
+
===DMI IDs===
 +
Please consider updating the [[List of DMI IDs]] before (and after) updating your BIOS.
  
But there is hope. The CD images provided by Lenovo can be modified such that they contain drivers for USB CD drives. I tested the following with a Thinkpad {{X60s}}.
+
= Updating Firmware =
 +
 +
Firmware flasher program can run on DOS (Lenovo PC DOS) or Windows but, unfortunately, not Linux. So ''in theory'' there are two basic steps to update the firmware (either the BIOS or the ECP) on a ThinkPad not running Windows:
 +
# Get or create a bootable image with supported OS
 +
# Boot that image and, if not started automatically, ran flasher program
  
The idea is to take Lenovo's ISO CD image and modify it such that a USB CD drive can be used instead the CD drive in the docking station. Unfortunately, simply replacing the drivers is not enough. While doing the BIOS update, the USB ports seem to get disabled or something. Therefore, before starting the update process the CD contents have to be copied to a RAM disk. I will describe the procedure step by step.
+
Recent Thinkpads have firmwares available as ''Bootable CD'' image, e.g., FILENAME.iso. If you have an optical drive there is no need to read this page any further: just download .iso image, burn it and boot to flash bios. If you are not that lucky, read on.
  
<ol>
+
First you need to realize that there are different ways to boot DOS on PC (theoretically it is possible to boot Windows to ran flasher, but why?...): from internal hard drive, CD drive, USB Flash drive or, as the last resort, floppy drive. Easiest way is from internal hard drive, but you'd better avoid touching it until you don't want to loose files there. [[Booting from a Floppy]] is not recommended, so there are two best options to boot: CD drive or USB Flash drive.
<li>
 
Download the ISO image style BIOS update from Lenovo's website. This file will be refered to as <tt>/tmp/bios-lenovo.iso</tt>.
 
</li>
 
  
<li>
+
Sparse instructions below provide you guidance how to do different parts of this pazzle but it's your duty to understand what to do and how to do that.
Extract the floppy image from this ISO image. You can use the following shell script for this task (or an alternative one from [http://userpages.uni-koblenz.de/~krienke/ftp/noarch/geteltorito/]). Simply save this code into the file <tt>/tmp/extractbootimage.sh</tt>, set the x-flag (<tt>chmod +x /tmp/extractbootimage.sh</tt>) and call it using the command <tt>/tmp/extractbootimage.sh /tmp/bios-lenovo.iso /tmp/bios-lenovo.img</tt>. The floppy image contained in the ISO image will then be saved to <tt>/tmp/bios-lenovo.img</tt>. Here is the code of the shell script:
 
<pre>
 
#!/bin/bash
 
  
# This script extracts the floopy boot image from bootable ISO images
+
== Using UEFI ==
#
 
# Written by Joachim Selke (mail@joachim-selke.de), 2007-04-07
 
  
ISOFILE=$1
+
Especially usable when CDROM is not available, tested on X140e, but should work in most recent firmwares as these supports UEFI, much simpler than older methods outlined in this and other pages.
IMAGEFILE=$2
 
  
if [ ! -r $ISOFILE ]; then
+
You should have a USB mass storage device you can erase.
        echo $ISOFILE: file does not exist or is not readable
 
        exit 1
 
fi
 
  
if [ -z $IMAGEFILE ]; then
+
{{WARN|this will erase the USB mass storage device content.}}
        echo Error: no image file specified
 
        exit 1
 
fi
 
  
ISOFILESIZE=`stat -c %s $ISOFILE`
+
1. Download BIOS update ISO image, we assume it is xxx.iso.
  
# collect El Torito data
+
2. Extract bootable image using [https://userpages.uni-koblenz.de/~krienke/ftp/noarch/geteltorito/ geteltorito] tool:
# see http://www.phoenix.com/NR/rdonlyres/98D3219C-9CC9-4DF5-B496-A286D893E36A/0/specscdrom.pdf for reference
 
  
BOOTCATALOGPOINTERBYTE=$((17 * 0x800 + 0x47))
+
{{cmduser|./geteltorito.pl -o xxx.img xxx.iso}}
  
if [ $ISOFILESIZE -lt $(($BOOTCATALOGPOINTERBYTE + 4)) ]; then
+
3. Insert USB device, checkout its device, we assume /dev/sdX.
        echo ISO file is too short, possibly damaged
 
        exit 1
 
fi
 
  
# absolute pointer to first sector of boot catalog:
+
4. Dump content of image to USB device.
BOOTCATALOG=`od -A n -t x4 -N 4 -j $BOOTCATALOGPOINTERBYTE $ISOFILE | tr -d [:blank:]`
 
  
BOOTCATALOGBYTE=$((0x$BOOTCATALOG * 0x800))
+
{{WARN|Double check the device name so you do not overwrite any other filesystem.}}
  
echo Boot catalog starts at byte $BOOTCATALOGBYTE
+
{{cmdroot|<nowiki>dd if=xxx.img of=/dev/sdX</nowiki>}}
  
if [ $ISOFILESIZE -lt $(($BOOTCATALOGBYTE + 32 + 2)) ]; then
+
5. Reboot, enter BIOS setup, enable UEFI only (or 1st priority) at startup options, save and reboot.
        echo ISO file is too short, possibly damaged
 
        exit 1
 
fi
 
  
# media type of boot image
+
6. Interrupt boot, press F12 and select USB mass storage device as boot source.
# only floppy disk images are supported by this script
 
BOOTMEDIATYPE=`od -A n -t x1 -N 1 -j $(($BOOTCATALOGBYTE + 32 + 1)) $ISOFILE | tr -d [:blank:]`
 
  
if [ $BOOTMEDIATYPE -eq 1 ]; then
+
7. The BIOS update utility should run and you should succeed in flashing BIOS.
        echo Boot media type is 1.2M floppy disk
 
        IMAGEBLOCKS=$((1200 / 2))
 
elif [ $BOOTMEDIATYPE -eq 2 ]; then
 
        echo Boot media type is 1.44M floppy disk
 
        IMAGEBLOCKS=$((1440 / 2))
 
elif [ $BOOTMEDIATYPE -eq 3 ]; then
 
        echo Boot media type is 2.88M floppy disk
 
        IMAGEBLOCKS=$((2880 / 2))
 
else
 
        echo Boot media type is $((0x$BOOTMEDIATYPE)). This type is not supported yet.
 
        exit 1
 
fi
 
  
# absolute pointer to start of boot image
+
== Create a bootable image ==
BOOTIMAGE=`od -A n -t x4 -N 4 -j $(($BOOTCATALOGBYTE + 32 + 8)) $ISOFILE | tr -d [:blank:]`
 
  
BOOTIMAGEBYTE=$((0x$BOOTIMAGE * 0x800))
+
In case Lenovo does not provide your laptop with ''Bootable CD'' it is possible to create one from *discket packages.
  
echo Boot image starts at byte $BOOTIMAGEBYTE
+
=== Extracting an update image ===
 +
{{WARN|Though this process has been successfully tested on many versions of .exe files found on IBMs website, that doesn't mean it will work for all of them.  '''Proceed at your own risk'''.  Consult the testing tables farther down of this page to see other users' experience with your model Thinkpad.}}
 +
{{NOTE|Lenovo has changed the packaging format. Old bios can be extracted with [http://freshmeat.net/projects/cabextract/ '''cabextract'''], new ones with [http://innoextract.constexpr.org/ '''innoextract'''].}}
 +
Older .exe installers from Lenovo mostly appear to be just a wrapper license program around Windows .cab files (see [[How_to_change_the_BIOS_bootsplash_screen|BIOS-Bootsplash]]). If you install the Linux program [http://freshmeat.net/projects/cabextract/ '''cabextract'''] you can expand these .cab files directly.  For example, if you downloaded {{path|1iuj13us.exe}} from Lenovo:
  
if [ $ISOFILESIZE -lt $((0x$BOOTIMAGE * 0x800 + $IMAGEBLOCKS * 0x800)) ]; then
+
:{{cmduser|cabextract 1iuj13us.exe}}
        echo ISO file is too short, possibly damaged
 
        exit 1
 
fi
 
  
echo Extracting boot image ...
+
Extracting cabinet: 1iuj13us.exe
 +
  extracting 1IUJ13US.IMG
 +
  extracting BIOSUPTP.EXE
 +
  extracting DOBOOT.EXE
 +
  extracting DOSBOOT.COM
 +
  extracting DOSBOOT.SYS
 +
  extracting DOSBOOT.VXD
 +
  extracting DOSBOOT2.COM
 +
  extracting ECTLUPTP.EXE
 +
  extracting EFLASHAS.SYS
 +
  extracting HDFWUPTP.EXE
 +
  extracting IBMTPI.XML
 +
All done, no errors.
  
dd if=$ISOFILE of=$IMAGEFILE bs=2K count=$IMAGEBLOCKS skip=$((0x$BOOTIMAGE))
+
The file we want is '''FILENAME.IMG''', with "FILENAME" being the .exe. you downloaded.  E.g., {{path|1IUJ13US.IMG}}.
  
echo Finished
+
If this does not work for the Non-diskette .exe, try it on the Diskette .exe.  It's reported, for example, that the Non-diskette .exe for BIOS version 3.23 for the T41p was not extractable, but the Diskette .exe worked perfectly, with {{cmduser|cabextract}} delivering a .IMG file.
</pre>
 
</li>
 
  
<li>
+
==== If cabeextract/innoextract fails ====
Mount the floppy image '''as root''' using the loop device:
 
:{{cmdroot|mkdir /tmp/bios-lenovo.img-mnt}}
 
:{{cmdroot|mount -o loop /tmp/bios-lenovo.img /tmp/bios-lenovo.img-mnt}}
 
The image is now mounted as <tt>/tmp/bios-lenovo.img-mnt</tt>.
 
</li>
 
  
<li>
+
Diskette .exe for some older models can't be extracted using cabextract. For example for the latest BIOS of 390E one gets
Download needed drivers. First download some [http://panasonic.co.jp/pcc/products/drive/other/driver/f2h_usb.exe USB drivers] from Panasonic Japan. Save the file to <tt>/tmp/f2h_usb.exe</tt> This file is a self-extracting EXE file, that can be executed under Linux using [http://www.winehq.com/ Wine]:
+
spsdilc9.exe: no valid cabinets found
:{{cmduser|wine /tmp/f2h_usb.exe}}
+
There is a simple way to solve this, by stripping the header off from the Non-diskette version. To do this, first you need to find the index for the first occurance of '''MSCF''' in the downloaded executable. This can be done with the following
You will be asked where to save the extracted files. Choose <tt>/tmp</tt>. A new directory <tt>/tmp/F2h</tt> containing the needed drivers will be created.
+
strings -a -t d NO-DISKETT.EXE | awk 'offset=index($2,"MSCF"), (offset != 0) {print $1+offset-1}' | head --lines 1
 +
4196
 +
The command adds the byte offset of the matching line plus the index for the start of the '''MSCF''' on that line, thus the byte offset of '''MSCF''', this number is usually '''4196''' Now we need to cut these header bytes off, this is done by a standard dd cut, the following cuts away the first 4196 bytes.
 +
dd if=NO-DISKETTE.EXE of=out.cab iflag=skip_bytes skip=4196
 +
The newly created '''out.cab''' should now work with '''cabextract'''
 +
cabextract out.cab
  
Additionally, you will need drivers for the RAM disk mentioned. Download them from the [http://sourceforge.net/projects/srdisk ReSizeable RAMDisk project]. Unzip them to <tt>/tmp/srdisk</tt>.
+
A second alternative is to use Windows XP (works in VirtualBox too) together with [http://sourceforge.net/projects/vfd/ Virtual Floppy Drive]. Rund vfdwin.exe, go to the Driver tab and hit Install and Start. Then go to the Drive0 tab, click on Change and select A:. Finally, click on Open/Create, and click Create. This should give you a virtual floppy drive the .exe file will extract files to.
</li>
 
  
<li>
+
A third solution is to use QEMU with a DOS diskette image to run the disk extractor.
Let's modify the floppy image:
 
:{{cmduser|cp /tmp/F2h/Usbaspi.sys /tmp/bios-lenovo.img-mnt/}}
 
:{{cmduser|cp /tmp/F2h/USBCD.SYS /tmp/bios-lenovo.img-mnt/}}
 
:{{cmduser|cp /tmp/F2h/RAMFD.SYS /tmp/bios-lenovo.img-mnt/}}
 
:{{cmduser|cp /tmp/srdisk/srdxms.sys /tmp/bios-lenovo.img-mnt/}}
 
:{{cmduser|cp /tmp/srdisk/srdisk.exe /tmp/bios-lenovo.img-mnt/}}
 
Now add the following lines to <tt>/tmp/bios-lenovo.img-mnt/config.sys</tt> replacing the line <tt>DEVICE = A:\IBMTPCD.SYS /R /C</tt>:
 
<pre>
 
DEVICE = A:\SRDXMS.SYS
 
DEVICE = A:\RAMFD.SYS
 
DEVICE = A:\USBASPI.SYS /V
 
DEVICE = A:\USBCD.SYS /D:TPCD001
 
</pre>
 
Finally, edit the file <tt>/tmp/bios-lenovo.img-mnt/autoexec.bat</tt> replacing the last line (saying <tt>COMMAND.COM</tt>) by the following:
 
<pre>
 
A:\SRDISK 10000
 
COPY *.* D:
 
D:
 
COMMAND.COM
 
</pre>
 
  
Maybe the RAM disk gets a drive letter different from D: on your system. In this case, you have to change the above lines accordingly.
+
==== Testing the Image ====
</li>
 
  
<li>
+
You can test that FILENAME.IMG is really a floppy image by running:
Unmount the floppy image (as root):
 
:{{cmdroot|umount /tmp/bios-lenovo.img-mnt}}
 
</li>
 
  
<li>
+
{{cmdroot|mkdir /tmp/mntfloppy}}
Copy the content of the original CD image to a new directory and create a new ISO file:
 
:{{cmdroot|mkdir /tmp/bios-lenovo.iso-mnt}}
 
:{{cmdroot|mount -o loop /tmp/bios-lenovo.iso /tmp/bios-lenovo.iso-mnt}}
 
:{{cmduser|mkdir /tmp/bios-new.iso-mnt}}
 
:{{cmduser|cp /tmp/bios-lenovo.iso-mnt/* /tmp/bios-new.iso-mnt}}
 
:{{cmduser|cp /tmp/bios-lenovo.img /tmp/bios-new.iso-mnt/boot.img}}
 
:{{cmdroot|umount /tmp/bios-lenovo.iso-mnt}}
 
:{{cmduser|mkisofs -relaxed-filenames -b boot.img -o /tmp/bios-new.iso /tmp/bios-new.iso-mnt/}}
 
</li>
 
  
<li>
+
{{cmdroot|mount -o loop FILENAME.IMG /tmp/mntfloppy}}
The file <tt>/tmp/bios-new.iso</tt> is the modified ISO file. Just burn it to CD and use this CD for updating your BIOS (boot from it using your USB drive). Please give some comments here if it worked for you.
 
</li>
 
  
</ol>
+
If a '''ls''' command on the image returns what looks like a DOS floppy, and no read errors were displayed, you have a pretty good chance that the image is usable.  For example:
  
===Alternative method using a USB stick===
+
{{cmdroot|ls /tmp/mntfloppy}}
 +
$0195000.FL1  069580.PAT  06d2.HSH    IBMDOS.COM    TPCHKS.EXE
 +
0691.HSH      06D0.PAT    06d6.HSH    LOGO.BAT      UPDTFLSH.EXE
 +
0691.PAT      06D1.PAT    06d8.HSH    LOGO.SCR      UPDTMN.EXE
 +
0694.HSH      06D2.PAT    CHKBMP.EXE  PHLASH16.EXE  USERINT.EXE
 +
0694.PAT      06D6.PAT    COMMAND.COM  PREPARE.EXE  UTILINFO.EXE
 +
0695.HSH      06D8.PAT    CONFIG.SYS  PROD.dat      lcreflsh.bat
 +
0695.PAT      06d0.HSH    FLASH2.EXE  QKFLASH.EXE
 +
069580.HSH    06d1.HSH    IBMBIO.COM  README.TXT
  
''Note: none of the above methods worked on my X60s.  This method worked for me, however.'' [[User:PhilipPaeps|PhilipPaeps]] 16:41, 24 August 2007 (UTC)
+
Unmount the image after you are done testing:
  
This method was surprisingly painless once I convinced my ThinkPad X60s to boot DOS from a USB stick.  I used VMWare and some mystical tool to get DOS on the stick.  If you can find another way to get a bootable DOS stick, please update this section!
+
{{cmdroot|umount /tmp/mntfloppy}}
  
* Tell VMWare to create a virtual floppy image for you and format it under Microsoft Windows and tell it to create a system disk.  You can do this by clicking into "My Computer", then right-clicking on the "Floppy" icon and selecting "Format".  In the box that pops up, you need to check the box that says "Create an MS-DOS startup disk" and then click "Start".
+
== Booting from update image ==
 +
Now that you have a bootable image for the correct update for you hardware, you need to do is boot from that image to install the update.
  
* When you've done that, get this tool: http://www.techpowerup.com/downloads/330/mirrors.php and install it.  The tool is apparantly something HP once wrote, but I have been unable to find a link to it anywhere on the HP website.
+
There are different ways to do that:
 +
* [[#Booting from a CD|Boot from a CD]]
 +
* [[#Booting_using_GRUB|Boot image using bootloader (e.g. GRUB)]]
 +
* [[#Booting_from_a_USB_Flash_drive|Boot from a USB Flash drive]]
 +
* [[#Booting_from_a_floppy|Boot from a floppy]]
  
* In a command prompt again: <code>C:\DriveKey\HPUSBF.EXE E: -Q -B:A:\</code>, replacing the <code>E:</code> with the "drive letter" associated with your USB stick (you can find this letter in "My Computer" under "Removable Storage").  '''WARNING:''' this wipes anything on the USB stick. You will end up with a USB stick which appears empty at this point, but there is DOS on it somewhere.
+
=== Booting from a CD ===
 +
{| align="right" style="width:40em;"
 +
|{{HINT|If there is a ''Bootable CD'' image available, e.g., FILENAME.iso, just download that, instead of mucking around with image files.}}
 +
|}
 +
If you are going to update the firmware by booting from a CD, you need to turn FILENAME.IMG that you extracted above into an .iso file.
  
* Now mount the BIOS update ISO image from Lenovo as a virtual CDROM using VMWare again and copy the files from it to the USB stick: <code>copy D:\*.* E:\</code>.
+
The [http://en.wikipedia.org/wiki/El_Torito_%28CD-ROM_standard%29 El Torito Bootable CD Specification] is a wonderful thing.  Thanks to it, a bootable CD can be made with a bootable floppy image in such as way that the CD believes that it is a 2.88 MB floppy drive.  This allows you to replace a boot floppy by a boot CD in nearly all situations.
  
At this point, you may want to fiddle with the splash image, as described elsewhere on ThinkWiki.
+
It is very easy to create such a bootable CD ISO image in Linux using the '''mkisofs''' tool{{footnote|1}}.  Run a command as follows:
  
* Reboot and press F12, tell the BIOS to boot from your USB stick.
+
{{cmdroot|genisoimage -b 1WUJ25US.IMG -c boot.catalog -o bootcd.iso 1WUJ25US.IMG}} #or older mkisofs
  
* <code>cd flash</code> ; <code>updtflsh.exe</code>
+
Where *.IMG is the name of the image file extracted above.  This creates a CD with one file on it and marks that file as the boot image.
  
Think happy thoughts. The ThinkPad will beep quite ominously (and loudly!) a couple of times.  Do not let this worry you too muchAfter about three minutes, the program will ask you to press enter to restart and hopefully all will be well.
+
You can now burn the {{path|bootcd.iso}} to a CD in your favorite CD-burning program.
 +
{{WARN|By following any of the instructions here you are accepting the '''very real risk''' of turning your ThinkPad into a big expensive paper weight, as a firmware update gone wrong can create unfix-able problems'''Proceed at your own risk!'''}}
  
===Comments===
+
Boot from the CD to update your firmware.  Remember to have [[BIOS_Upgrade#Two_Firmwares:_BIOS_and_ECP|both BIOS and ECP firmware boot-CDs]] ready, as needed, and use them in the [[BIOS_Upgrade#Update_Order|proper order]].
  
<ul>
+
{| align="center"
 +
| {{HELP|Please, report your success/failure with flashing BIOS from the manually cooked CD (from .IMG file) here: [[BIOS_Upgrade_success_failure#Booting_from_CD]]}}
 +
|}
  
<li>
+
=== Booting using GRUB (Traditional) ===
I have followed your excellent instructions. The CD booted, the update program ran but stopped working and responding while updating. Luckily the BIOS was not destroyed. Since destroying the BIOS is a very high risk, I am going to recover the original Windows on an old HD and will run the update exe update program from there.
+
{|
</li>
+
| style="width:75%" | {{WARN|Many have warned '''not''' to use the SYSLINUX image-loader '''memdisk''' to boot firmware update images.}}
 
+
| style="font-size:80%" | {{HELP|Who are these "many"?  Link to a discussion?}}
<li>
+
|}
I followed these clear instructions, and like the comment above I ended up with a CD that booted but the update program stopped working and responding.  An ALT-CTRL-DELETE rebooted my x60s, and it works so the BIOS must not have been damaged.  I was trying to upgrade from version 2.08 to 2.11, I wonder if these instructions are somehow particular to certain versions? 
+
Warning: These instructions are for 'Traditional' GRUB, not GRUB2. Traditional GRUB uses a configuration file at /boot/grub/menu.lstGRUB2 uses /boot/grub/grub.cfgSee the next section for the GRUB2 instructions.
[[User:Latch|Latch]] 01:22, 14 June 2007 (UTC)
 
</li>
 
 
 
<li>
 
After following the above instructions, the program also stopped working while updating the BIOS. But after changing the drive letter from D: to C: (see code below), it everything worked fine. However, I had some trouble figuring out, which letter to choose over D: at first, as the BIOS Upgrade program started right away.
 
 
 
<pre>
 
A:\SRDISK 10000
 
COPY *.* C:
 
C:
 
COMMAND.COM
 
</pre>
 
[[User:Mtx|Mtx]], 1 August 2007, Thinkpad X61s
 
</li>
 
 
 
<li>
 
Flashing the bios (2.12) works for me on a X60s (using drive c). Using the DVD-R on an USB-Hub did not work.<br> [[User:Ra|Ra]] 00:15, 21 August 2007 (UTC)
 
</li>
 
 
 
</ul>
 
 
 
==Updating via CD/DVD Drive==
 
 
 
The whole thing gets more complicated if you neither have Windows nor a floppy drive installed. This is what this page is intended to describe.
 
 
 
Another possibility which works even without a CD-drive or network is to boot the disk image via the grub initrd mechanism.
 
 
 
Be aware that IBM officially does '''not''' support this! The official statement to my support request was:
 
 
 
<blockquote style="background: white; border: 1px solid black; padding: 1em;">
 
<pre><nowiki>
 
I'm afraid we only support the options listed on our web page and no you
 
can't burn a CD/DVD, however you can try to use an external USB FDD
 
(floppy) drive. The experts recommend a IBM USB FDD, however they have also
 
tested it with a Sony USB FDD drive.
 
 
 
In order to make sure the drive is recognised you can boot up the FDD with
 
a bootable dos diskette for w98
 
</nowiki></pre>
 
</blockquote>
 
 
 
But it seems to be possible as Mathias Dalheimer describes this [http://mailman.linux-thinkpad.org/pipermail/linux-thinkpad/1998-January/009743.html here].
 
 
 
Another indication that it should work is that IBM uses PHLASH16.EXE (at least on T4x/p systems) to flash the BIOS into the chip. The same tool is used by [http://www.samsungpc.com/gb/support/p35/bios/bios-instructions.html other vendors] to flash the BIOS from bootable CD-ROMs.
 
{{WARN|Do '''not''' use the [http://syslinux.zytor.com/ SYSLINUX] image-loader [http://syslinux.zytor.com/memdisk.php MEMDISK] to boot the images! Some flash tools crash in that situation!}}
 
 
 
Some interesting but very technical information about the used flash tool can be found [http://www.paul.sladen.org/thinkpad-r31/wifi-card-pci-ids.html here].
 
 
 
===Creating a Floppy Image===
 
If you have created a boot floppy on another machine, you need to create an image file of that floppy. This can be easily done in linux by running a command line:
 
 
 
:{{cmdroot|1=dd bs=2x80x18b if=/dev/fd0 of=/tmp/floppy.img}}
 
 
 
You can also create a floppy image by using Ken Kato's [http://chitchat.at.infoseek.co.jp/vmware/vfd.html VMware's back]. It is a free Windoze tool that creates a virtual floppy drive and allows you to produce an image file ready to be ISO'ed. Note: you might have to 'manually' (through application's interface) assign the virtual drive a volume letter in order to be seen by IBM's application (as, by default, it seems not to do it).
 
 
 
You should verify this {{path|floppy.img}} as explained above.
 
 
 
===Creating a Bootable CD from a Floppy Image===
 
Once you have your floppy image, either from imaging a real floppy, or from extracting them via the cabextract method above, you need to make a boot CD out of it.
 
 
 
The eltorito bootable CD standard is a wonderful thingWhat this means is that a bootable CD can be made with a bootable floppy in such as way that the CD believes that it is a 2.88 MB floppy driveThis allows you to replace a boot floppy by a boot CD in nearly all situations.
 
  
It is very easy to create such a bootable CD ISO image in Linux using the mkisofs tool. To do this run a command as follows:
+
Once the bootable image, FILENAME.IMG, is extracted from the .exe, it can be booted directly through GRUB without the need of burning a CD, using the [http://syslinux.zytor.com/ SYSLINUX] image-loader '''[http://syslinux.zytor.com/memdisk.php memdisk]'''.
  
:{{cmdroot|mkisofs -b bootfloppy.img -o bootcd.iso bootfloppy.img}}
+
Locate the '''memdisk''' file from the syslinux package. You can search for it with '''find''':  
  
where bootfloppy.img is the name of the .img floppy image file, for example 1NUJ10US.IMG.
+
{{cmdroot|find /usr -name memdisk}} #or just use "dlocate memdisk" or "locate memdisk" if these programs are installed
  
Note: This creates a CD with one file on it and marks that file as the boot image.  For more info on this read {{cmduser|man mkisofs}}.
+
If {{path|/usr/.../memdisk}} is not present, syslinux is not installed.  You will need to install it to boot a .IMG from GRUB.
  
You can now burn the {{path|bootcd.iso}} in your favorite CD burning program.
+
Copy both the '''FILENAME.IMG''' and '''memdisk''' files into {{path|/boot}} directory. For example:
  
To get an overview which models have been tested with this version, here is a list:
+
{{cmdroot|cp ./FILENAME.IMG /usr/share/syslinux/memdisk /boot/}}
  
===Does work:===
+
Open {{path|/boot/grub/menu.lst}} in your favourite editor.  '''Copy''' the active section into a '''new section''', and edit the new section:
 
{| border="1" cellspacing="0" cellpadding="2"
 
{| border="1" cellspacing="0" cellpadding="2"
| '''Model''' || '''Tested by'''
+
! Parameter
|-
+
! Instructions
| style="vertical-align:top;" |  {{600E}} (2645-4AU) ||
+
! Example
*George Tellalov <gtellalov_dontspamme@bigfoot.com>. BIOS 1.16 from spsdin36.exe worked perfectly with the method bootable cd from floppy image. I highly recommend this upgrade because it made my ibm-acpi module load (it wouldn't load before) and fixed some suspend to ram problems. Here's the [http://george.tellalov.info/bios_upgrade_600e_spsdin36.iso cd image] I used. Use at your own risk. You can send me a chocolate if it works for you ;)
 
 
|-
 
|-
| style="vertical-align:top;" | {{600E}} (2645-5bU) ||
+
| ''title'' || Pick a name for the new section. This will show up in the GRUB boot menu. || <tt>title IBM ECP Update</tt>
*Mike Vincent<matchstc-putobvioushere.com>. Bios 1.16 from spsdin36.exe and then to the boot cd worked great for me. Thought I had bricked it three separate times using a "real" floppy! Each from different diskettes .The updater would start, give me the "going to take30 seconds" speech...and then access the HD for 10 minutes. Each time it would reboot fine. Did the cd as described above...worked great first time. Perhaps 10 year old seldom used floppy disc drives have some challenges?
 
 
|-
 
|-
| style="vertical-align:top;" |  {{600X}} (2645) ||
+
| ''root''  || Do not change. This is the partition containing the {{path|/boot}} directory      || <tt>root (hd0,0)</tt>
*Jonathan Byrne <jonathan@RemoveThisToMailMe.yamame.org>. BIOS 1.11 from spsuit55.exe worked perfectly using cabextract/CD method.
 
 
|-
 
|-
| style="vertical-align:top;" | {{600X}} (2645) ||
+
| ''kernel'' || '''/boot/memdisk''' will allow you to boot an image file.                  || <tt>kernel /boot/memdisk</tt>
*Andy Barnes <andy@RemoveThisToMailMe.itchypaws.co.uk>. As per Jonathan above, extracted BIOS 1.11 from spsuit55.exe using cabextract, created a CD boot image and burnt to CD.  Worked flawlessly - thanks to everyone who contributed to this article!
 
 
|-
 
|-
| style="vertical-align:top;" |  {{A20p}} (2629-6VU) ||
+
| ''initrd'' || This is the name of the firmware-updater image file, e.g., 1IUJ13US.IMG    || <tt>initrd /boot/1IUJ13US.IMG</tt>
*Chris Pickett http://www.sable.mcgill.ca/~cpicke/. BIOS 1.11 flashed fine with cabextract/CD method.
 
|-
 
| style="vertical-align:top;" |  {{A21e}} (2628-JXU) ||
 
*Amit Gurdasani <gurdasani at yahoo dot com>. BIOS 1.13 flashed fine with cabextract/CD method. Alarmingly, after the BIOS update, the laptop beeped but did not shut down as was indicated onscreen -- that was frozen on the "do not shut down the laptop" screen. On power down and up again, the BIOS setup showed the newer BIOS image running, and Linux booted up fine. Linux ACPI didn't complain about the BIOS being too old either.
 
|-
 
| style="vertical-align:top;" |  {{A31p}} (2653) ||
 
*Matthias Meinke largeeddy@gmx.at, BIOS 1.09 1NET15WW flashed fine with cabextract/CD method.
 
|-
 
| style="vertical-align:top;" |  {{A31}} (2652) ||
 
*[[User:Wnoise|Aaron Denney]], BIOS 1.13 flashed fine with cabextract/CD method.  The cabextract/CD method also worked for BIOS 1.10.
 
|-
 
| style="vertical-align:top;" |  {{R30}}  ||
 
*Jarrod, 30 August 2007, Thinkpad R30 Type 2656-E0M. BIOS updated to 1.40 (1CETF0WW) using floppy disk/mkisofs/cdrecord. Worked fine, no problems.
 
|-
 
| style="vertical-align:top;" |  {{R31}} ||
 
*[http://mailman.linux-thinkpad.org/pipermail/linux-thinkpad/1998-January/009743.html Mathias Dalheimer]
 
*Sebastian Sauer (with cabextract/CD method)
 
|-
 
| style="vertical-align:top;" | {{R40}} ||
 
*Matthew Lambie, http://lambie.org
 
|-
 
| style="vertical-align:top;" | {{R50}} (1836-3SU) ||
 
*jlbartos <jlbartos at hotmail dot com>
 
|-
 
| style="vertical-align:top;" | {{R50e}} (1834-PTG) ||
 
*item <item at freemail dot hu> : successfully finished with cabextract/CD method for "1wuj25us.exe" (BIOS version 1WET90WW (2.10), Release Date: 2006/12/22)
 
|-
 
| style="vertical-align:top;" | {{R51}} (1829) ||
 
*Robert Uhl <rob dot uhl at gmx dot de>, Jellby <jellby at yahoo dot com>
 
|-
 
| style="vertical-align:top;" | {{R51}} (1830-RM7) ||
 
*Will Parker <stardotstar at sourcepoint dot com dot au> successfully flashed 3.20 using existing 3.04 ECP and retained custom boot splash.
 
|-
 
| style="vertical-align:top;" | {{R51}} (2887) ||
 
*Ingo van Lil <inguin at gmx dot de>
 
|-
 
| style="vertical-align:top;" | {{R52}} (1858) ||
 
*Stuart McCord <stuart dot mccord at gmail dot com>  flashed both BIOS and ECP using cabextract, BIOS flashed first as on IBM website
 
|-
 
| style="vertical-align:top;" |  {{T20}} ||
 
*Franz Hassels <fhassel at suse dot com>
 
|-
 
| style="vertical-align:top;" |  {{T22}} ||
 
*Daniel Maier <nusse teamidiot de>
 
*Mathias Behrle (with cabextract/CD method, Version 1.07 => 1.12) --[[User:Mathiasb|Mathiasb]] 11:58, 14 December 2006 (CET)
 
*Bob Skaroff (cabextract/CD), 1.06 => 1.12
 
*Leo Butler (cabextract/CD), 1.11 => 1.12
 
|-
 
| style="vertical-align:top;" |  {{T23}} ||
 
*Bart Snapp <snapp at uiuc dot edu> Note: I followed IBM's instructions to flash the BIOS *first* and the Embedded Controller *second*.
 
*Moy Easwaran: BIOS 1.18 / EC 1.06a via cabextract and CD-boot.  The BIOS-update exe generated errors in Windows 2000.
 
*Joe Renes: BIOS 1.18 / EC 1.06a on 2006-03-20 via cabextract and CD-boot. Piece of cake.
 
*Raphael Errani: BIOS 1.20 / EC 1.06a on 2006-11-06 via cabextract and CD-boot (using mkisofs). Worked without errors. 1st Bios, 2nd EC
 
|-
 
| style="vertical-align:top;" |  {{T30}} ||
 
*Martin Gühring <guehring at gmail.com> BIOS 2.10 via cabextract the Non-Diskette BIOS -> mkisofs '''in the directory the exe was extracted''' to generate the iso -> burn the iso -> boot the CD
 
|-
 
| style="vertical-align:top;" | {{T40}} ||
 
*Sean Dague, http://dague.net
 
*Justin Mason, http://jmason.org
 
*Ivanhoe (Bios 3.19)
 
*Alessandro Raulino (roger_2) EC 3.04 & BIOS 3.23 flashed with cabextract/CD method
 
*Nick Jenkins, using BIOS 3.23 with the [[#The_Non_Diskette_Updater|Non-diskette updater + cabextract method]], then [[#Creating_a_Bootable_CD_from_a_Floppy_Image|created a bootable CD from the cabextracted .IMG file]], then boot that ISO, and it worked great!
 
|-
 
| style="vertical-align:top;" |  {{T40p}} ||
 
*Lukas Krähenbühl, ismo at pop dot agri dot ch
 
*Thomas Achtemichuk, tom at tomchuk dot com. BIOS 3.15 flashed fine with cabextract/CD method
 
|-
 
| style="vertical-align:top;" | {{T41}} ||
 
*Lev Givon (Bios 3.15 / EC 3.04) <lev at columbia dot edu>
 
*Ernesto Hernández-Novich (Bios 3.19 / CP 3.04) < emhn at usb dot ve >
 
*[http://maebmij.org James Ballantine] (Bios 3.21 / CP 3.04) using nondisk/cabextract/CDRW
 
|-
 
| style="vertical-align:top;" |  {{T41p}} ||
 
*Nils Newman, work great. (Version: Bios 3.14 / Embedded Controller 3.04)
 
|-
 
| style="vertical-align:top;" |  {{T42}} ||
 
*Dan (BIOS 3.20 / EC 3.04, cabextract/CD method) <tronic171 at evilphb.org>
 
|-
 
| style="vertical-align:top;" |  {{T42p}} ||
 
*Robert Schiele <rschiele@uni-mannheim.de>, Joern Heissler <joern@heissler.de>
 
|-
 
| style="vertical-align:top;" |  {{T43}}  ||
 
*Conrad Rentsch <Conrad dot Rentsch at t-online dot de> (Version: Bios 1.29 / Embedded Controller 1.06)
 
*Tom Heady <tom-thinkwiki.org@punch.net>
 
*Florian Boucault <florian at boucault dot ath dot cx> (Model : 1871-W34 & Version: Bios 1.23 / Embedded Controller 1.03)
 
*Till Heikamp <t dot heikamp at geniusbytes dot com> (Model 2886, Bios 1.22 to 1.29, Embedded Controller 1.03 to 1.06)
 
|-
 
| style="vertical-align:top;" |  {{T60}}  ||
 
*Roman Komkov <roman  at komkov dot org dot ru> (Model 1951, Bios 1.07 to 2.13) Successfully upgraded from CD Image
 
|-
 
| style="vertical-align:top;" |  {{X20}}  ||
 
*Neil Caunt <retardis at gmail dot com>
 
|-
 
| style="vertical-align:top;" |  {{X21}}  ||
 
*Patrick Leickner <ranma at web dot de>, (BIOS 2.21->2.25 / EC 1.31->1.36) via non-disk/cabextract/mkisofs/cdrecord
 
|-
 
| style="vertical-align:top;" |  {{X22}}  ||
 
*David Emery <dave at skiddlydee dot com>,  (EC 1.30, BIOS 1.32 using non-disk/cabextract/CD method)
 
|-
 
| style="vertical-align:top;" |  {{X23}}  ||
 
*Nils Faerber <nils dot faerber at kernelconcepts dot de> (Embedded Controller 1.30, BIOS 1.32 with cabextract/CD method)
 
|-
 
| style="vertical-align:top;" |  {{X30}}  ||
 
*Hella Breitkopf, [http://www.unixwitch.de/ www]  (Embedded Controller 1.04, BIOS 1.07 with cabextract/CD method)
 
|-
 
| style="vertical-align:top;" |  {{X31}}  ||
 
*Grzegorz KuÅ›nierz <koniu at sheket dot org>  (Embedded Controller 1.08, BIOS 3.01 with cabextract/CD method)
 
|-
 
| style="vertical-align:top;" |  {{X40}}  ||
 
*Robbie Stone <robbie@serendipity.cx>
 
|-
 
| style="vertical-align:top;" |  {{Z60m}}  ||
 
*[[User:Morle|Morle]] 13:09, 20 May 2006 (CEST),  (Embedded Controller 1.14 with cabextract/CD method)
 
 
|}
 
|}
  
===Does not work:===
+
Do '''not''' modify the original section in {{path|/boot/grub/menu.lst}}, or you might not be able to boot back to the operating system.
{|
 
| '''Model''' || '''Tested by'''
 
|}
 
  
Please note that testing this is '''at your own risk'''!!!
+
If you have [[#Two_Firmwares:_BIOS_and_ECP|two firmware updates to do]], you will need a section for each firmware's FILENAME.IMG in {{path|/boot/grub/menu.lst}}.
  
 +
{{NOTE|If both BIOS and ECP are to be updated, be sure to update them in the [[#Proper_Order|proper order]].}}
  
 +
{{WARN|By following any of the instructions here you are accepting the '''very real risk''' of turning your ThinkPad into a big expensive paper weight, as a firmware update gone wrong can create unfix-able problems.  '''Proceed at your own risk!'''}}
  
==Updating via Grub and a Floppy Image==
+
Reboot your computer, entering the GRUB menu and selecting ''IBM BIOS Update'', or whatever you named the new section in {{path|/boot/grub/menu.lst}}.
  
{{WARN|Many have warned '''not''' to use the [http://syslinux.zytor.com/ SYSLINUX] image-loader [http://syslinux.zytor.com/memdisk.php MEMDISK] to boot the images! Some flash tools may crash in that situation! Proceed at your own risk!}}
+
==== Booting image with GRUB2 ====
 +
===== GRUB2: booting floppy Image =====
 +
With grub2, one would ''append'' the following to ''/boot/grub/grub.cfg'' :
 +
menuentry "My BIOS Upgrade" {
 +
set root=(hd0,0) #should match the others in your grub.cfg
 +
linux16 /boot/memdisk
 +
initrd16 /boot/1WUJ25US.IMG #or whatever yours is
 +
  }
  
Floppy images may be booted from Grub via a utility called [http://syslinux.zytor.com/memdisk.php MEMDISK], which may be compiled from the [http://www.kernel.org/pub/linux/utils/boot/syslinux/ '''SYSLINUX source'''].  Copy the compiled memdisk image and the floppy image to your boot directory and configure grub as follows:
+
{| align="center"
 +
| {{HELP|Please, report your success/failure with flashing BIOS from the manually cooked CD (from .IMG file) here: [[BIOS_Upgrade_success_failure#GRUB2:_Booting_floppy_Image]]}}
 +
|}
  
<blockquote style="background: white; border: 1px solid black; padding: 1em;">
+
===== GRUB2: booting CD Image =====
<pre><nowiki>
+
You must first download the bootable iso file from the Lenovo Website.
title    Bios Flash
 
kernel    /boot/memdisk
 
initrd    /boot/FILENAME.img
 
</nowiki></pre></blockquote>
 
  
Again, proceed at your own risk.  This was tested on an R51 type 2888.
+
===== On Debian and Ubuntu =====
 +
Then, on Debian and Ubuntu, you can install the grub-imageboot package, then you just have to copy the iso file in /boot/images and run update-grub:
 +
<pre>
 +
sudo apt-get install grub-imageboot
 +
sudo mkdir -p /boot/images
 +
sudo cp /home/youruser/Downloads/6uuj12uc.iso /boot/images
 +
sudo update-grub
 +
</pre>
  
This also worked for me on a T41p type 2373. -- [[User:MrStaticVoid|James Lee]] 20:55, 8 May 2006 (CEST)
+
===== Manual method =====
 +
Otherwise, copy the file 'memdisk' from the syslinux package to /boot. Also create a symlink, so you do not have to change the grub configuration for each bios upgrade:
 +
<pre>
 +
sudo su -
 +
cd /boot
 +
cp /home/youruser/Downloads/6uuj12uc.iso .
 +
cp /usr/share/syslinux/memdisk .
 +
ln -s 6uuj12uc.iso biosupgrade.iso
 +
</pre>
 +
Now create the boot entry:
 +
<pre>
 +
cat >> /etc/grub.d/40_custom <<EOF
 +
menuentry "Lenovo BIOS Upgrade" {
 +
    set root=(hd0,1)  # <-- check for correct numbering
 +
    linux16 /boot/memdisk iso
 +
    initrd16 /boot/biosupgrade.iso
 +
}
 +
EOF
 +
update-grub
 +
</pre>
 +
Reboot an Select "Lenovo BIOS Upgrade".
 +
 
 +
For the next Bios Upgrade you'll just need to copy the new iso file to /boot and adjust the symlink.
 +
 
 +
{| align="center"
 +
| {{HELP|Please, report your success/failure with flashing BIOS from the manually cooked CD (from .IMG file) here: [[BIOS_Upgrade_success_failure#GRUB2:_Booting_CD_Image]]}}
 +
|}
 +
 
 +
=== Booting from a USB Flash drive ===
  
And it worked for me on a X31 type 2673-CBU. -- [[User:JanTopinski|Jan Topinski]], 18 September 2006
+
==== Updating the BIOS in MS-DOS mode ====
 +
(This process works for most Thinkpad models that has Windows XP, Windows Vista or Windows 7 OS)
  
And it worked for me too on a X31 type 2672-CXU, very useful. -- [[User:TheAnarcat|TheAnarcat]] 16:21, 7 March 2007 (CET)
+
1. Using HP USB Boot Utility, [http://blogs.oreilly.com/digitalmedia/2004/10/utility-to-make-usb-flash-driv.html create a bootable USB flash drive [http://www.bay-wolf.com/utility/usbkey/win98boot.zip DOS using Windows 98 Boot Disk Floppy Image].
  
Same here (worked) on a X31 type 2673-58G --[[User:FaUl|FaUl]] 15:53, 20 June 2007 (UTC)FaUl
+
2. Extract the (*.ima) from the ISO BIOS image (e.g. [http://www.rarsoft.com WinRAR] will do this).
  
Works well on a X31 type 2672-PG9, but with a big moment between starting update and the updating window -- [[User:Starox|Starox]] 22 Jul 2007
+
3. Using a tool that can open .IMA files (such as [http://www.winimage.com/ WinImage]), extract all files to a temporary folder.
  
And it worked for me on two X40 type 2371 -- [[User:Antialize|Jakob Truelsen]], 19 Jan 2007 -- BIOS: 2.07 1uuj21us.exe -- ECP: 1.62 1uhj10us.exe
+
4. Run the HP tool, select the USB device, I used FAT32, create a DOS bootable disk and point at the win98boot folder - then "Start". Warning: this '''formats''' the USB flash drive and all data will be erased!
  
Not working for me on T43 type 2668-F7G -- [[User:Maus3273|Maus3273]] 20:48, 30 January 2007 (CET) -- BIOS: 1.29 1YUJ18US.IMG -- I got into the bios program, but the machine never restarts after initiating the upgrade.
+
5. Once complete (you could test if it boots at this point), copy the extracted BIOS files from the temporary folder you created to the USB flash drive.
  
X41 type 2525-F8G -- [[User:ladoga|Lauri Koponen]], 11:08 16 Apr 2007<br>
+
6. Boot from USB flash drive by pressing F11 within the BIOS boot logo. At the DOS command prompt, type "updflsh" and then follow the prompts by pressing "Y" or Enter. Make sure that you have a fully charged battery pack and the AC Adapter is firmly plugged before proceeding with the BIOS update.
BIOS: 2.09 (74UJ15US.IMG), is no go. (hangs while initialising the actual flashing process) I tried with 2.07 (74UJ13US.IMG) and 2.06 (74UJ12US.IMG) aswell and they all failed in the very same fashion.<br>
+
'''DO NOT Power off the laptop or unplug the USB flash drive while the update is in progress or else update will fail and your computer will be unable to boot and system board may need to be serviced.'''
ECP: 1.02 74HJ03US.IMG, works.
 
  
It works fine on R30 type 2656-64g, BIOS v.1.40 -- [[User:english.voodoo|Yuri Spirin]], 10 May 2007.
+
This process takes around 1-2 minutes. A long beep followed by a short beep will notify you that the update is complete and the system will automatically power off.
  
==Updating with Network Boot Image==
+
7. Power on the laptop then enter the BIOS setup by pressing F1 and Load BIOS defaults.
  
BIOS, Embedded Controller (EC), CD/DVD and Harddisk firmware disks can be booted
+
==== Using grub4dos (also for Linux) ====
over the network with [http://syslinux.zytor.com/pxe.php PXELINUX] as part of the [http://syslinux.zytor.com/ SYSLINUX] package.
 
  
This requires that you have a DHCP and tftp server configured and setup properly on
+
[http://grub4dos.sourceforge.net/wiki/ grub4dos] is a GNU GRUB fork with interesting features. One of them is the ability to boot ISO images directly off USB flash drives. Contrary to the name, GRUB for DOS works fine on Linux. Follow these steps:
your network, and is probably not for the faint of heart.
+
* Download the latest grub4dos package at http://download.gna.org/grub4dos/ (I needed 0.4.4 for my USB2 drive - 0.4.3 did not work.)
 +
* Unpack
 +
* Insert your FAT-32 formatted pendrive
 +
* Run <code>sudo ./bootlace.com /dev/sdX</code>, where /dev/sdX is the device name assigned to your pendrive (use <code>sudo fdisk -l</code> to figure this out). Be very careful to get the device correct or else you could overwrite your hard drive! This creates grub4dos boot sector in MBR of the flash drive.
 +
* Copy the files <code>grldr</code> and <code>menu.lst</code> to the root directory of your pendrive.
 +
* Convert the ThinkPad .IMG file to a .ISO file using <code>genisoimage -b 1yuj18us.img -c boot.catalog -o 1yuj18us.iso 1yuj18us.img</code>
 +
* Copy the ISO image to the root directory of your pendrive (e.g. <code>1yuj18us.iso</code>).
 +
* Edit <code>menu.lst</code> on the pendrive and include the following section (of course putting the appropriate ISO image name):
 +
<pre>
 +
title thinkpad-bios
 +
map (hd0,0)/1yuj18us.iso (hd32)
 +
map --hook
 +
chainloader (hd32)
 +
boot
 +
</pre>
 +
* Reboot and press F12 to select booting from USB.
 +
* If all went well, you should be able to boot the Thinkpad's ISO image and flash the BIOS. I tested it successfully on T400.
  
Make sure the firmware bootdisk is in linux 'dd' format, as the self-extracting .exe disks
+
==== Manually creating a USB Flash drive in Linux ====
from the IBM website cannot be booted directly as such.
 
  
This worked on the {{R31}}, {{X22}}, {{T21}}, {{T30}} and {{T41p}} with various firmware updates.
+
Use "geteltorito" to extract the update image from ISO image, downloaded from Lenovo's drivers page. Write the extracted image to a USB Flash drive using dd. "geteltorito" is available in Ubuntu (at least in Trusty, 14.04) from package "genisoimage".
 +
* Install the genisoimage package: <code>sudo apt-get install genisoimage</code>
 +
* Extract the boot image from the ISO: <code>geteltorito g6uj14us.iso > biosupdate.img</code>
 +
* Install the boot image to USB Flash drive, make sure to install to the correct device! (device for me was /dev/sdb): <code>sudo dd if=biosupdate.img of=/dev/<yourusbflashdevice> bs=512K</code>
 +
* Reboot and press F12 to select booting from USB.
 +
* If all went well, you should be able to boot the Thinkpad's ISO image and flash the BIOS. Tested successfully on: X1 Carbon, X230.
  
 +
=== Booting from a Floppy ===
 +
{{WARN|Using a floppy disk '''is NOT recommended'''.}}
  
On {{X22}}, works with EC 1.30 but NOT with BIOS 1.32
+
This is how IBM/Lenovo intended it.  Use their .exe files to create a bootable floppy with the flash update on it. Boot from the floppy and there you go.
  
==Updating via "IBM Predesktop area", suitable for model X (not have CDROM and floppy)==
+
So, why is it not recommended?
It's so difficult to update BIOS and ECP without cdrom, floppy disk.
+
# If something goes wrong, your ThinkPad may be permanently damaged
Don't know the reason why I couldn't update BIOS and ECP(1QHJ08US and 1QUJ19US) for my IBM Thinkpad X31.Hmm, may be cause of the dividing partition on my hard disk, that is:
+
# Floppy disk drives are not reliable
<blockquote style="background: white; border: 1px solid black; padding: 1em;">
+
# Floppy disks are not reliable
<pre><nowiki>
+
# It only works with /dev/fd0, meaning it won't work with a USB floppy
Primary: ext3, ext3, ntfs
 
Extended: Ntsf, fat32
 
Bootloader: GRUB
 
</nowiki></pre></blockquote>
 
  
No problem, you can use this way to do it:
+
So, even though Lenovo is now offering "Linux diskette" updaters, that will create a bootable floppy under Linux, using a floppy is still not recommended.  Besides, many people don't even ''have'' a floppy drive on their ThinkPad.
* First, config in BIOS
 
In Security part:
 
# Remove all password of Subpervisor and Power on password
 
# Set Access IBM Predesktop Area to Normal
 
# Choose Enable "Flash BIOS updating by End User" in BIOS update Option.
 
  
In Config part:
+
If you really want to do it with a floppy, some tips:
# Choose Enable for Network flash over Lan
+
* Use a clean (in the physical sense) floppy drive
 +
* Use new floppies
 +
* Test floppies for errors before starting update process
 +
* Have multiple copies of the update disks ready--if one should fail, replace it with a copy
 +
* Should DOS complain of a read error, '''only''' respond wth "Retry"
  
* Second, download the newest version of BIOS update and ECP update
+
{{NOTE|Should the system encounter a disk read error during the flash process, and you select "Abort", your system could be permanently damaged.}}
Running: The program extract all files to the folder. There is a .img file (1QUJ19US.IMG, 1QUJ08US.IMG) in each folder.
 
Copy the imformation content in that img file and paste it to one FAT partition(using winimage or TotalCmd to extract)
 
  
 +
==== Using UNetbootin ====
  
as seen All files in 1QUJ19US.IMG is extracted to D:\BIOS
+
Unetbootin 422 worked with the image files unpacked with cabextract on my x31.
<blockquote style="background: white; border: 1px solid black; padding: 1em;">
 
<pre><nowiki>
 
695,764  $018E000.FL1
 
163      0691.HSH
 
2,049    0691.PAT
 
163      0694.HSH
 
2,049    0694.PAT
 
163      0695.HSH
 
2,049    0695.PAT
 
2,049    06D0.PAT
 
163      06D1.HSH
 
2,049    06D1.PAT
 
163      06D2.HSH
 
2,049    06D2.PAT
 
163      06D6.HSH
 
2,049    06D6.PAT
 
2,049    06D8.PAT
 
697      CHKBMP.EXE
 
8,128    COMMAND.COM
 
26      CONFIG.SYS
 
24,860  FLASH2.EXE
 
26      LCREFLSH.BAT
 
170      LOGO.BAT
 
330      LOGO.SCR
 
111,925  PHLASH16.EXE
 
91,648  PREPARE.EXE
 
45      PROD.DAT
 
22,252  QKFLASH.EXE
 
9,923    README.TXT
 
4,260    TPCHKS.EXE
 
39,666  UPDTFLSH.EXE
 
6,958    UPDTMN.EXE
 
12,501  USERINT.EXE
 
15,254  UTILINFO.EXE
 
</nowiki></pre></blockquote>
 
  
And all files in 1QUJ08US.IMG are: D:\ECP
+
{{HELP|How exactly did you do this? It failed for me. Does it work only with .IMG files that are converted to .ISO files, or can .ISO files provided by Lenovo also work (how?)}}
<blockquote style="background: white; border: 1px solid black; padding: 1em;">
 
<pre><nowiki>
 
315,404 $018E000.FL2
 
8,000  COMMAND.COM
 
36      CONFIG.SYS
 
16,910  ECFLASH2.EXE
 
45      PROD.DAT
 
17,812  QKFLASH.EXE
 
990    README.TXT
 
4,260  TPCHKS.EXE
 
89,738  UPDTEC.EXE
 
31,134  UPDTFLSH.EXE
 
12,501  USERINT.EXE
 
15,226  UTILINFO.EXE
 
</nowiki></pre></blockquote>
 
  
* Okie, now plug AC Adapter, charge full battery to your laptop and continue third step:
+
=== Booting from a Network Boot Image ===
 +
BIOS, ECP, CD/DVD and Harddisk firmware disks can be booted over the network with [http://syslinux.zytor.com/pxe.php PXELINX] as part of the [http://syslinux.zytor.com/ SYSLINUX] package.  This requires that you have a DHCP and tftp server configured and setup properly on your network, and is probably not for the faint of heart.
  
** '''Flash BIOS first,'''
+
Make sure the firmware bootdisk is in linux 'dd' format, as the self-extracting .exe disks from the IBM website cannot be booted directly as such.
1. Power On, press blue button on keyboard: '''Access IBM'''
 
  
2. On "Utilities", double click " Diagnostic disk"
+
This worked on the {{R31}}, {{X22}}, {{T21}}, {{T30}} and {{T41p}} with various firmware updates. On the {{X22}}, it worked with ECP 1.30 but '''not''' with BIOS 1.32
  
3. Your laptop will start PC-DOS, wait when this message appear:
+
=After updating=
<blockquote style="background: white; border: 1px solid black; padding: 1em;">
+
Lenovo recommends reseting your BIOS settings to their factory defaults after a firmware update.
<pre><nowiki>
 
Please insert the first floppy diskette and
 
Press any key to continue
 
</nowiki></pre></blockquote>
 
  
4. Press Ctrl + Break, you will see :
+
Also, please consider updating the [[List of DMI IDs]] after updating your BIOS.
<blockquote style="background: white; border: 1px solid black; padding: 1em;"><pre><nowiki>Terminate batch job (Y/N) ?</nowiki></pre></blockquote>
 
  
5. Okie, press Y, you will get DOS prompt like D:\
+
= Special Cases =
{{NOTE|D:\ is my RAMDISK, C:\ is my disk format as FAT.!}}
+
* In one case, see ([[APM setup on a type 2379 ThinkPad T40]]), it was not possible to upgrade the BIOS from Windows XP; a downgrade to Windows 98 was required to successfully run the BIOS upgrade app. The symptoms in this case were that, once the files had been extracted to the hard disk, and the machine was to reboot into the upgrade app, it would beep and hang just before reboot, requiring a power cycle. Once the power was cycled, it would simply reboot back into XP without performing any BIOS upgrade actions. So even if you have Windows, you may still need to use the info on this page.
  
6. Enter to c:\BIOS
+
== Updating Thinkpad X Series ==
<blockquote style="background: white; border: 1px solid black; padding: 1em;">
+
The special update instructions for {{X_Series}} Thinkpads are quite long. You can find them at the page [[BIOS_Upgrade/X_Series]].
<pre><nowiki>
 
c:
 
cd c:\BIOS
 
</nowiki></pre></blockquote>
 
  
7. Run FLASH2.EXE /u $018E000.FL1
+
== Updating without battery or with dead battery ==
  
8. Wait flash progress compelete and reboot.
+
This is a last-resort approach. Use this only if everything else fails.
** '''Flash ECP'''
 
Follow above instruction from step 1 to 5
 
  
6. Enter to c:\ECP
+
The BIOS updater may refuse to update a BIOS without a battery, or if the battery charge is too low. In that case, extract the disk image with cabextract as per instructions above and dd it to an usb stick. (This will destroy the data on it, of course.) Acquire a pure DOS boot cd such as Windows 98 recovery CD and boot that.
<blockquote style="background: white; border: 1px solid black; padding: 1em;">
 
<pre><nowiki>
 
c:
 
cd c:\ECP
 
</nowiki></pre></blockquote>
 
  
7. run UPDTFLSH.EXE $018E000.FL2
+
Use F8 to abort the boot sequence of a windows 98 boot CD. If you need CD-ROM support, load CD-related things but say no to everything else. In particular, avoid loading himem.sys and doskey, as the presence of either program causes Phoenix bios flash tool phlash16.exe to abort.
  
8. Follow UPDTFLSH's instructions
+
Change to the volume where flash2.exe and other tools are installed, and execute "flash2.exe /u". This should bypass the battery check and perform the flashing. If that doesn't work, check if the update disk contains a tool called "phlash16.exe". This can be used directly to flash the image, and the invocation is typically "phlash16 /exit $01c80000.fl1".
  
9. Wait flash complete and auto turn off computer.
+
Updating the ECP with a dead battery or no battery presents a similar problem. For example, on the IBM ThinkPad X31, the normal command-line command to update the ECP would be UPDTFLSH ("UPDTFLSH $018E000.FL2").  But this utility checks for an installed and charged battery and will not let you update the ECP firmware if the battery is missing or not charged.  Instead, issue "QKFLASH $018E000.FL2".  This will bypass the test for the battery and allow the ECP firmware to be updated.  The same disclaimer applies here as for the BIOS: do this only as a last resort.  If there is a power failure during the update, you will likely brick your laptop.
  
I done it on my IBM Thinkpad X31.
+
This method won't work for the Thinkpad {{560X}} (and likely other older models). Since the 560X is a bit older, it won't be a big surprise if the battery is as dead as a dodo. Here's how to update the bios in this case: download the spsdi833 bios update and create the update floppy. If you have trouble creating this disk, [http://www.mediafire.com/?36o5a8buvbjx07o download an archive with the files] and put them on a floppy. Don't worry about making it bootable. Also, you will need a DOS bootdisk. A Windows 98 bootdisk will be fine. Boot the system with the W98 bootdisk, do not load CD-rom support. Remove the W98 bootdisk and put the disk with the BIOS update in the drive. If you would now run UPDTFLSH you would get the battery message, so don't do that. If you open UPDTFLSH.exe with a text editor, you would find some lines about UPDTROM. UPDTROM is the actual flash tool, but you can't simply run it just like that. Run the following:
  
Enjoy,
+
*updtrom /np /prep1
 +
*updtrom /np /prep2
 +
*updtrom /np /prep3
 +
*updtrom /np /romcmp /romflsh /prep4
 +
*updtrom /np /h8flsh /h8img /model
  
Tested by nm.
+
Yes, you need to run updtrom five times. Hold your breath and reboot the machine. It's done.
  
==Check List==
+
Perhaps not all these lines are necessary, but to be sure I ran them all, and this worked for me. So I suggest you do the same. This could probably be done from the harddisk as well, but I did not test that.
  
The following is important to remember:
+
For the {{i1400}} follow instructions on [http://www.motherboardpoint.com/flash-ibm-thinkpad-bios-w-o-battery-t143180.html this] website. It works not only for 2611 but for 2621 types too.
# You must update '''both''' the Control Program and the BIOS at the same time if your current Control Program is not compatible with the new BIOS (see below)
+
 
# You must find versions of the Control Program and BIOS that are compatible.  Not all of them are, so follow the readmes on the IBM website carefully to determine which are.
+
----
# You must update the Control Program '''before''' you update the BIOS
 
  
When the Control Program '''and''' the BIOS need updating, have both update disks or CDs ready. Update the Control Program first and the system should switch itself off when finished. Insert the BIOS update disk and proceed to update the BIOS. When it's all finished, enter setup, reset the settings to their defaults and reboot. Enter setup again and tweak the settings as necessary.
+
{{footnotes|
 +
# For lots of detail on making and burning .iso files, see The Linux Documentation Project (tldp.org): [http://tldp.org/HOWTO/CD-Writing-HOWTO-3.html#ss3.1 3.1 Writing CD-ROMs (pure data)].
 +
}}

Latest revision as of 23:12, 26 February 2022

This page is meant to describe ways to update the BIOS on a ThinkPad that only runs Linux for users that don't have ready access to Windows. If you have Windows on your ThinkPad you can just boot into it and follow instructions on the Lenovo website.

Updating the BIOS in Linux (with few exceptions) is not officially supported by Lenovo. However there are work arounds.


ATTENTION!
By following any of the instructions here you are accepting the very real risk of turning your ThinkPad into a big expensive paper weight, as a firmware update gone wrong can create unfix-able problems. Proceed at your own risk!

Custom BIOS

Some ThinkPad fans have created Custom BIOSes to remove whitelists, disable annoying errors, do Fn-Ctrl keyswaps, and add more functionality. Check the Custom BIOS wikipage for more information.

  • X200, X60, T60, Macbook 2,1 - Libreboot - Based on Coreboot, this BIOS (approved by the FSF) removes all proprietary blobs to create Free Libre Open Source Laptops, where everything from the motherboard to the computer can use Open Source Software. Richard Stallman famously uses a Libreboot X60.
  • Sovem's Whitelist Removed BIOSes - A famous user from BIOS-mods.com, that removes mPCI whitelists from BIOSes upon request.
  • T61, R61, X61/X61s/X61T, X300 - Middleton's BIOS - Enables SATAII, removes whitelist, thermal fixes, Fn-Ctrl swap.
  • T43/T43p, R52, X41/X41T - TTav134's BIOS - Removes Error 2010 for aftermarket hard drives, and the BIOS whitelist.

Middleton's BIOS

A user on NotebookReview named 'Middleton' made these alternative BIOSes to enable SATA2 on certain Thinkpad models (X61/T61/R61/X300). These ThinkPads are limited to SATA1 in their BIOS even though the hardware is SATA2. This is a huge drawback for anyone wanting to use SSDs, because it is so much slower.

Also, it is not possible to install some wireless cards, because only certain models are whitelisted by IBM/Lenovo. Middleton's BIOS removes this limitation as well.

See the wikipage Middleton's BIOS for installation instructions, downloads, and more description.

Note: If your BIOS-Update tool says that no update is needed, then simply downgrade the Bios first: On Lenovo's drivers download page, the old Bios files are listed at the very bottom of the page.

Downloading New Firmware

ATTENTION!
Flashing the wrong firmware for your hardware may cause permanent damage to your ThinkPad. It is up to you to confirm that the firmware you are using is correct.

A list of links to firmware downloads can be found at BIOS Upgrade Downloads for most Thinkpad models. You can also check the Lenovo Support website's driver matrix.

Lenovo/IBM provides firmware upgrades in a variety of packages:

  • Diskette
  • Non-diskette
  • Linux diskette
  • BIOS Utility
  • Bootable CD

Not every type of package is available for every model.

The BIOS Utility and Bootable CD packages combine the BIOS and ECP firmwares. For the other packages, there is one for each firmware.

Help needed
Can an image be extracted from a "Linux diskette" .exe file?

The Linux diskette is just the Diskette package that runs on Linux instead of Windows/DOS. It's unknown if a boot image can be extracted from it.

You may need to try different packages to find the one from which you can extract a boot image.

Two Firmwares: BIOS and ECP

ATTENTION!
Flashing incompatible firmwares, or flashing them in the wrong order, may cause permanent damage to your ThinkPad.

It is important to understand that Thinkpads from IBM have two separate firmwares: the BIOS, and the Embedded Controller Program (ECP).

A given BIOS version will require a certain version of the ECP. You must read the Lenovo website and/or .txt files to confirm which BIOS is compatible with which ECP, and the order in which to update them.

Update Order

The Lenovo/IBM documentation is sometimes unclear about the order in which these two firmwares should be updated. When in doubt (i.e. IBM didn't provide specific instructions for your model or a particular firmware update), update the ECP first, and then the BIOS. Also, make sure to do the two updates immediately one after the other.

The EC firmware is usually much better at backwards compatibility than the BIOS.

NOTE!
Updaters for newer models take care of both BIOS and EC, and use automatically whatever sequence is needed, so you don't have to worry about it.

Installed Firmware

You can check the current BIOS and ECP versions on your ThinkPad as detailed here: BIOS Version

DMI IDs

Please consider updating the List of DMI IDs before (and after) updating your BIOS.

Updating Firmware

Firmware flasher program can run on DOS (Lenovo PC DOS) or Windows but, unfortunately, not Linux. So in theory there are two basic steps to update the firmware (either the BIOS or the ECP) on a ThinkPad not running Windows:

  1. Get or create a bootable image with supported OS
  2. Boot that image and, if not started automatically, ran flasher program

Recent Thinkpads have firmwares available as Bootable CD image, e.g., FILENAME.iso. If you have an optical drive there is no need to read this page any further: just download .iso image, burn it and boot to flash bios. If you are not that lucky, read on.

First you need to realize that there are different ways to boot DOS on PC (theoretically it is possible to boot Windows to ran flasher, but why?...): from internal hard drive, CD drive, USB Flash drive or, as the last resort, floppy drive. Easiest way is from internal hard drive, but you'd better avoid touching it until you don't want to loose files there. Booting from a Floppy is not recommended, so there are two best options to boot: CD drive or USB Flash drive.

Sparse instructions below provide you guidance how to do different parts of this pazzle but it's your duty to understand what to do and how to do that.

Using UEFI

Especially usable when CDROM is not available, tested on X140e, but should work in most recent firmwares as these supports UEFI, much simpler than older methods outlined in this and other pages.

You should have a USB mass storage device you can erase.

ATTENTION!
this will erase the USB mass storage device content.

1. Download BIOS update ISO image, we assume it is xxx.iso.

2. Extract bootable image using geteltorito tool:

$ ./geteltorito.pl -o xxx.img xxx.iso

3. Insert USB device, checkout its device, we assume /dev/sdX.

4. Dump content of image to USB device.

ATTENTION!
Double check the device name so you do not overwrite any other filesystem.

# dd if=xxx.img of=/dev/sdX

5. Reboot, enter BIOS setup, enable UEFI only (or 1st priority) at startup options, save and reboot.

6. Interrupt boot, press F12 and select USB mass storage device as boot source.

7. The BIOS update utility should run and you should succeed in flashing BIOS.

Create a bootable image

In case Lenovo does not provide your laptop with Bootable CD it is possible to create one from *discket packages.

Extracting an update image

ATTENTION!
Though this process has been successfully tested on many versions of .exe files found on IBMs website, that doesn't mean it will work for all of them. Proceed at your own risk. Consult the testing tables farther down of this page to see other users' experience with your model Thinkpad.
NOTE!
Lenovo has changed the packaging format. Old bios can be extracted with cabextract, new ones with innoextract.

Older .exe installers from Lenovo mostly appear to be just a wrapper license program around Windows .cab files (see BIOS-Bootsplash). If you install the Linux program cabextract you can expand these .cab files directly. For example, if you downloaded 1iuj13us.exe from Lenovo:

$ cabextract 1iuj13us.exe
Extracting cabinet: 1iuj13us.exe
 extracting 1IUJ13US.IMG
 extracting BIOSUPTP.EXE
 extracting DOBOOT.EXE
 extracting DOSBOOT.COM
 extracting DOSBOOT.SYS
 extracting DOSBOOT.VXD
 extracting DOSBOOT2.COM
 extracting ECTLUPTP.EXE
 extracting EFLASHAS.SYS
 extracting HDFWUPTP.EXE
 extracting IBMTPI.XML
All done, no errors.

The file we want is FILENAME.IMG, with "FILENAME" being the .exe. you downloaded. E.g., 1IUJ13US.IMG.

If this does not work for the Non-diskette .exe, try it on the Diskette .exe. It's reported, for example, that the Non-diskette .exe for BIOS version 3.23 for the T41p was not extractable, but the Diskette .exe worked perfectly, with $ cabextract delivering a .IMG file.

If cabeextract/innoextract fails

Diskette .exe for some older models can't be extracted using cabextract. For example for the latest BIOS of 390E one gets

spsdilc9.exe: no valid cabinets found

There is a simple way to solve this, by stripping the header off from the Non-diskette version. To do this, first you need to find the index for the first occurance of MSCF in the downloaded executable. This can be done with the following

strings -a -t d NO-DISKETT.EXE | awk 'offset=index($2,"MSCF"), (offset != 0) {print $1+offset-1}' | head --lines 1
4196

The command adds the byte offset of the matching line plus the index for the start of the MSCF on that line, thus the byte offset of MSCF, this number is usually 4196 Now we need to cut these header bytes off, this is done by a standard dd cut, the following cuts away the first 4196 bytes.

dd if=NO-DISKETTE.EXE of=out.cab iflag=skip_bytes skip=4196

The newly created out.cab should now work with cabextract

cabextract out.cab

A second alternative is to use Windows XP (works in VirtualBox too) together with Virtual Floppy Drive. Rund vfdwin.exe, go to the Driver tab and hit Install and Start. Then go to the Drive0 tab, click on Change and select A:. Finally, click on Open/Create, and click Create. This should give you a virtual floppy drive the .exe file will extract files to.

A third solution is to use QEMU with a DOS diskette image to run the disk extractor.

Testing the Image

You can test that FILENAME.IMG is really a floppy image by running:

# mkdir /tmp/mntfloppy

# mount -o loop FILENAME.IMG /tmp/mntfloppy

If a ls command on the image returns what looks like a DOS floppy, and no read errors were displayed, you have a pretty good chance that the image is usable. For example:

# ls /tmp/mntfloppy

$0195000.FL1  069580.PAT  06d2.HSH     IBMDOS.COM    TPCHKS.EXE
0691.HSH      06D0.PAT    06d6.HSH     LOGO.BAT      UPDTFLSH.EXE
0691.PAT      06D1.PAT    06d8.HSH     LOGO.SCR      UPDTMN.EXE
0694.HSH      06D2.PAT    CHKBMP.EXE   PHLASH16.EXE  USERINT.EXE
0694.PAT      06D6.PAT    COMMAND.COM  PREPARE.EXE   UTILINFO.EXE
0695.HSH      06D8.PAT    CONFIG.SYS   PROD.dat      lcreflsh.bat
0695.PAT      06d0.HSH    FLASH2.EXE   QKFLASH.EXE
069580.HSH    06d1.HSH    IBMBIO.COM   README.TXT

Unmount the image after you are done testing:

# umount /tmp/mntfloppy

Booting from update image

Now that you have a bootable image for the correct update for you hardware, you need to do is boot from that image to install the update.

There are different ways to do that:

Booting from a CD

Hint:
If there is a Bootable CD image available, e.g., FILENAME.iso, just download that, instead of mucking around with image files.

If you are going to update the firmware by booting from a CD, you need to turn FILENAME.IMG that you extracted above into an .iso file.

The El Torito Bootable CD Specification is a wonderful thing. Thanks to it, a bootable CD can be made with a bootable floppy image in such as way that the CD believes that it is a 2.88 MB floppy drive. This allows you to replace a boot floppy by a boot CD in nearly all situations.

It is very easy to create such a bootable CD ISO image in Linux using the mkisofs tool1. Run a command as follows:

# genisoimage -b 1WUJ25US.IMG -c boot.catalog -o bootcd.iso 1WUJ25US.IMG #or older mkisofs

Where *.IMG is the name of the image file extracted above. This creates a CD with one file on it and marks that file as the boot image.

You can now burn the bootcd.iso to a CD in your favorite CD-burning program.

ATTENTION!
By following any of the instructions here you are accepting the very real risk of turning your ThinkPad into a big expensive paper weight, as a firmware update gone wrong can create unfix-able problems. Proceed at your own risk!

Boot from the CD to update your firmware. Remember to have both BIOS and ECP firmware boot-CDs ready, as needed, and use them in the proper order.

Help needed
Please, report your success/failure with flashing BIOS from the manually cooked CD (from .IMG file) here: BIOS_Upgrade_success_failure#Booting_from_CD

Booting using GRUB (Traditional)

ATTENTION!
Many have warned not to use the SYSLINUX image-loader memdisk to boot firmware update images.
Help needed
Who are these "many"? Link to a discussion?

Warning: These instructions are for 'Traditional' GRUB, not GRUB2. Traditional GRUB uses a configuration file at /boot/grub/menu.lst. GRUB2 uses /boot/grub/grub.cfg. See the next section for the GRUB2 instructions.

Once the bootable image, FILENAME.IMG, is extracted from the .exe, it can be booted directly through GRUB without the need of burning a CD, using the SYSLINUX image-loader memdisk.

Locate the memdisk file from the syslinux package. You can search for it with find:

# find /usr -name memdisk #or just use "dlocate memdisk" or "locate memdisk" if these programs are installed

If /usr/.../memdisk is not present, syslinux is not installed. You will need to install it to boot a .IMG from GRUB.

Copy both the FILENAME.IMG and memdisk files into /boot directory. For example:

# cp ./FILENAME.IMG /usr/share/syslinux/memdisk /boot/

Open /boot/grub/menu.lst in your favourite editor. Copy the active section into a new section, and edit the new section:

Parameter Instructions Example
title Pick a name for the new section. This will show up in the GRUB boot menu. title IBM ECP Update
root Do not change. This is the partition containing the /boot directory root (hd0,0)
kernel /boot/memdisk will allow you to boot an image file. kernel /boot/memdisk
initrd This is the name of the firmware-updater image file, e.g., 1IUJ13US.IMG initrd /boot/1IUJ13US.IMG

Do not modify the original section in /boot/grub/menu.lst, or you might not be able to boot back to the operating system.

If you have two firmware updates to do, you will need a section for each firmware's FILENAME.IMG in /boot/grub/menu.lst.

NOTE!
If both BIOS and ECP are to be updated, be sure to update them in the proper order.
ATTENTION!
By following any of the instructions here you are accepting the very real risk of turning your ThinkPad into a big expensive paper weight, as a firmware update gone wrong can create unfix-able problems. Proceed at your own risk!

Reboot your computer, entering the GRUB menu and selecting IBM BIOS Update, or whatever you named the new section in /boot/grub/menu.lst.

Booting image with GRUB2

GRUB2: booting floppy Image

With grub2, one would append the following to /boot/grub/grub.cfg :

menuentry "My BIOS Upgrade" {
set root=(hd0,0) #should match the others in your grub.cfg
linux16 /boot/memdisk
initrd16 /boot/1WUJ25US.IMG #or whatever yours is
}
Help needed
Please, report your success/failure with flashing BIOS from the manually cooked CD (from .IMG file) here: BIOS_Upgrade_success_failure#GRUB2:_Booting_floppy_Image
GRUB2: booting CD Image

You must first download the bootable iso file from the Lenovo Website.

On Debian and Ubuntu

Then, on Debian and Ubuntu, you can install the grub-imageboot package, then you just have to copy the iso file in /boot/images and run update-grub:

sudo apt-get install grub-imageboot
sudo mkdir -p /boot/images
sudo cp /home/youruser/Downloads/6uuj12uc.iso /boot/images
sudo update-grub
Manual method

Otherwise, copy the file 'memdisk' from the syslinux package to /boot. Also create a symlink, so you do not have to change the grub configuration for each bios upgrade:

sudo su -
cd /boot
cp /home/youruser/Downloads/6uuj12uc.iso .
cp /usr/share/syslinux/memdisk .
ln -s 6uuj12uc.iso biosupgrade.iso

Now create the boot entry:

cat >> /etc/grub.d/40_custom <<EOF
menuentry "Lenovo BIOS Upgrade" {
    set root=(hd0,1)  # <-- check for correct numbering
    linux16 /boot/memdisk iso
    initrd16 /boot/biosupgrade.iso
}
EOF
update-grub

Reboot an Select "Lenovo BIOS Upgrade".

For the next Bios Upgrade you'll just need to copy the new iso file to /boot and adjust the symlink.

Help needed
Please, report your success/failure with flashing BIOS from the manually cooked CD (from .IMG file) here: BIOS_Upgrade_success_failure#GRUB2:_Booting_CD_Image

Booting from a USB Flash drive

Updating the BIOS in MS-DOS mode

(This process works for most Thinkpad models that has Windows XP, Windows Vista or Windows 7 OS)

1. Using HP USB Boot Utility, create a bootable USB flash drive [http://www.bay-wolf.com/utility/usbkey/win98boot.zip DOS using Windows 98 Boot Disk Floppy Image.

2. Extract the (*.ima) from the ISO BIOS image (e.g. WinRAR will do this).

3. Using a tool that can open .IMA files (such as WinImage), extract all files to a temporary folder.

4. Run the HP tool, select the USB device, I used FAT32, create a DOS bootable disk and point at the win98boot folder - then "Start". Warning: this formats the USB flash drive and all data will be erased!

5. Once complete (you could test if it boots at this point), copy the extracted BIOS files from the temporary folder you created to the USB flash drive.

6. Boot from USB flash drive by pressing F11 within the BIOS boot logo. At the DOS command prompt, type "updflsh" and then follow the prompts by pressing "Y" or Enter. Make sure that you have a fully charged battery pack and the AC Adapter is firmly plugged before proceeding with the BIOS update. DO NOT Power off the laptop or unplug the USB flash drive while the update is in progress or else update will fail and your computer will be unable to boot and system board may need to be serviced.

This process takes around 1-2 minutes. A long beep followed by a short beep will notify you that the update is complete and the system will automatically power off.

7. Power on the laptop then enter the BIOS setup by pressing F1 and Load BIOS defaults.

Using grub4dos (also for Linux)

grub4dos is a GNU GRUB fork with interesting features. One of them is the ability to boot ISO images directly off USB flash drives. Contrary to the name, GRUB for DOS works fine on Linux. Follow these steps:

  • Download the latest grub4dos package at http://download.gna.org/grub4dos/ (I needed 0.4.4 for my USB2 drive - 0.4.3 did not work.)
  • Unpack
  • Insert your FAT-32 formatted pendrive
  • Run sudo ./bootlace.com /dev/sdX, where /dev/sdX is the device name assigned to your pendrive (use sudo fdisk -l to figure this out). Be very careful to get the device correct or else you could overwrite your hard drive! This creates grub4dos boot sector in MBR of the flash drive.
  • Copy the files grldr and menu.lst to the root directory of your pendrive.
  • Convert the ThinkPad .IMG file to a .ISO file using genisoimage -b 1yuj18us.img -c boot.catalog -o 1yuj18us.iso 1yuj18us.img
  • Copy the ISO image to the root directory of your pendrive (e.g. 1yuj18us.iso).
  • Edit menu.lst on the pendrive and include the following section (of course putting the appropriate ISO image name):
title thinkpad-bios
map (hd0,0)/1yuj18us.iso (hd32)
map --hook
chainloader (hd32)
boot
  • Reboot and press F12 to select booting from USB.
  • If all went well, you should be able to boot the Thinkpad's ISO image and flash the BIOS. I tested it successfully on T400.

Manually creating a USB Flash drive in Linux

Use "geteltorito" to extract the update image from ISO image, downloaded from Lenovo's drivers page. Write the extracted image to a USB Flash drive using dd. "geteltorito" is available in Ubuntu (at least in Trusty, 14.04) from package "genisoimage".

  • Install the genisoimage package: sudo apt-get install genisoimage
  • Extract the boot image from the ISO: geteltorito g6uj14us.iso > biosupdate.img
  • Install the boot image to USB Flash drive, make sure to install to the correct device! (device for me was /dev/sdb): sudo dd if=biosupdate.img of=/dev/<yourusbflashdevice> bs=512K
  • Reboot and press F12 to select booting from USB.
  • If all went well, you should be able to boot the Thinkpad's ISO image and flash the BIOS. Tested successfully on: X1 Carbon, X230.

Booting from a Floppy

ATTENTION!
Using a floppy disk is NOT recommended.

This is how IBM/Lenovo intended it. Use their .exe files to create a bootable floppy with the flash update on it. Boot from the floppy and there you go.

So, why is it not recommended?

  1. If something goes wrong, your ThinkPad may be permanently damaged
  2. Floppy disk drives are not reliable
  3. Floppy disks are not reliable
  4. It only works with /dev/fd0, meaning it won't work with a USB floppy

So, even though Lenovo is now offering "Linux diskette" updaters, that will create a bootable floppy under Linux, using a floppy is still not recommended. Besides, many people don't even have a floppy drive on their ThinkPad.

If you really want to do it with a floppy, some tips:

  • Use a clean (in the physical sense) floppy drive
  • Use new floppies
  • Test floppies for errors before starting update process
  • Have multiple copies of the update disks ready--if one should fail, replace it with a copy
  • Should DOS complain of a read error, only respond wth "Retry"
NOTE!
Should the system encounter a disk read error during the flash process, and you select "Abort", your system could be permanently damaged.

Using UNetbootin

Unetbootin 422 worked with the image files unpacked with cabextract on my x31.

Help needed
How exactly did you do this? It failed for me. Does it work only with .IMG files that are converted to .ISO files, or can .ISO files provided by Lenovo also work (how?)

Booting from a Network Boot Image

BIOS, ECP, CD/DVD and Harddisk firmware disks can be booted over the network with PXELINX as part of the SYSLINUX package. This requires that you have a DHCP and tftp server configured and setup properly on your network, and is probably not for the faint of heart.

Make sure the firmware bootdisk is in linux 'dd' format, as the self-extracting .exe disks from the IBM website cannot be booted directly as such.

This worked on the R31, X22, T21, T30 and T41p with various firmware updates. On the X22, it worked with ECP 1.30 but not with BIOS 1.32

After updating

Lenovo recommends reseting your BIOS settings to their factory defaults after a firmware update.

Also, please consider updating the List of DMI IDs after updating your BIOS.

Special Cases

  • In one case, see (APM setup on a type 2379 ThinkPad T40), it was not possible to upgrade the BIOS from Windows XP; a downgrade to Windows 98 was required to successfully run the BIOS upgrade app. The symptoms in this case were that, once the files had been extracted to the hard disk, and the machine was to reboot into the upgrade app, it would beep and hang just before reboot, requiring a power cycle. Once the power was cycled, it would simply reboot back into XP without performing any BIOS upgrade actions. So even if you have Windows, you may still need to use the info on this page.

Updating Thinkpad X Series

The special update instructions for X1, X1 Carbon, X1 Carbon G2, X1 Carbon G3, X1 Carbon G4, X1 Carbon G5, X1 Carbon G6, X1 Carbon G7, X1 Carbon G8, X1 Extreme, X1 Extreme G2, X1 Hybrid, X13, X20, X21, X22, X23, X24, X30, X31, X32, X40, X41, X41 Tablet, X60, X60s, X60 Tablet, X61, X61s, X61Ls, X61 Tablet, X100e, X120e, X121e, X130e, X131e, X140e, X200, X200s, X200 Tablet, X201, X201i, X201s, X201si, X201 Tablet, X201i Tablet, X220, X220i, X220 Tablet, X220i Tablet, X230, X230i, X230s, X230 Tablet, X230i Tablet, X240, X240s, X250, X260, X270, X280, X300, X301, X390, X395 Thinkpads are quite long. You can find them at the page BIOS_Upgrade/X_Series.

Updating without battery or with dead battery

This is a last-resort approach. Use this only if everything else fails.

The BIOS updater may refuse to update a BIOS without a battery, or if the battery charge is too low. In that case, extract the disk image with cabextract as per instructions above and dd it to an usb stick. (This will destroy the data on it, of course.) Acquire a pure DOS boot cd such as Windows 98 recovery CD and boot that.

Use F8 to abort the boot sequence of a windows 98 boot CD. If you need CD-ROM support, load CD-related things but say no to everything else. In particular, avoid loading himem.sys and doskey, as the presence of either program causes Phoenix bios flash tool phlash16.exe to abort.

Change to the volume where flash2.exe and other tools are installed, and execute "flash2.exe /u". This should bypass the battery check and perform the flashing. If that doesn't work, check if the update disk contains a tool called "phlash16.exe". This can be used directly to flash the image, and the invocation is typically "phlash16 /exit $01c80000.fl1".

Updating the ECP with a dead battery or no battery presents a similar problem. For example, on the IBM ThinkPad X31, the normal command-line command to update the ECP would be UPDTFLSH ("UPDTFLSH $018E000.FL2"). But this utility checks for an installed and charged battery and will not let you update the ECP firmware if the battery is missing or not charged. Instead, issue "QKFLASH $018E000.FL2". This will bypass the test for the battery and allow the ECP firmware to be updated. The same disclaimer applies here as for the BIOS: do this only as a last resort. If there is a power failure during the update, you will likely brick your laptop.

This method won't work for the Thinkpad 560X (and likely other older models). Since the 560X is a bit older, it won't be a big surprise if the battery is as dead as a dodo. Here's how to update the bios in this case: download the spsdi833 bios update and create the update floppy. If you have trouble creating this disk, download an archive with the files and put them on a floppy. Don't worry about making it bootable. Also, you will need a DOS bootdisk. A Windows 98 bootdisk will be fine. Boot the system with the W98 bootdisk, do not load CD-rom support. Remove the W98 bootdisk and put the disk with the BIOS update in the drive. If you would now run UPDTFLSH you would get the battery message, so don't do that. If you open UPDTFLSH.exe with a text editor, you would find some lines about UPDTROM. UPDTROM is the actual flash tool, but you can't simply run it just like that. Run the following:

  • updtrom /np /prep1
  • updtrom /np /prep2
  • updtrom /np /prep3
  • updtrom /np /romcmp /romflsh /prep4
  • updtrom /np /h8flsh /h8img /model

Yes, you need to run updtrom five times. Hold your breath and reboot the machine. It's done.

Perhaps not all these lines are necessary, but to be sure I ran them all, and this worked for me. So I suggest you do the same. This could probably be done from the harddisk as well, but I did not test that.

For the i Series 1400 follow instructions on this website. It works not only for 2611 but for 2621 types too.



FOOTNOTES [Δ]
  1. For lots of detail on making and burning .iso files, see The Linux Documentation Project (tldp.org): 3.1 Writing CD-ROMs (pure data).