How to change the BIOS bootsplash screen

From ThinkWiki
Jump to: navigation, search

This page describes how to replace the standard IBM BIOS Bootsplash (The one with the ThinkPad- and Pentium M-Logo), without access to Microsoft Windows or a floppy drive.

Windows users who want to have a custom splash image when they start up should try this guide instead.

Getting the Files

You'll need the bios upgrade file from the IBM website.

Method 1: Using a Non-Diskette-File and cabextract

For ThinkPads R50, R50p, R51 (1829, 1830, 1831, 1836), R52, T40, T40p, T41, T41p, T42, T42p, T43, T43p this file is suitable:

There may be a more recent file on the IBM website.

For Thinkpads T61, R61 14.1 inch screen

or

For Thinkpad R60e the bios is available as an iso which can be edited before burning See the readme file in the ISO for details of how to change the bootsplash.

You need the cabextract tool to extract files from the exe:

# apt-get install cabextract

Do this to get the ibm file and extract the disk image from it:

# cd /tmp
# wget ftp://ftp.software.ibm.com/pc/pccbbs/mobiles/1ruj35us.exe
# cabextract -F "*.IMG" 1ruj35us.exe
# mv 1RUJ35US.IMG floppy.bin

Method 2: Using a Diskette-File and dosemu

Another option is to use the "Diskette BIOS file".
For ThinkPads R50, R50p, R51 (1829, 1830, 1831, 1836), R52, T40, T40p, T41, T41p, T42, T42p, T43, T43p this file is suitable:

For Thinkpads T61, R61 14.1 inch screens

The file is an OS/2 executables and don't run with wine, so you need to install dosemu to run it and create the image.

# apt-get install dosemu dosemu-freedos

(for non-debian-users: Get dosemu and freedos somewhere and make it work somehow).

With dosemu, you can run this executable, but this program unfortunately needs a floppy drive to write to. So use the loopback device, to create a virtual floppy.

# dd if=/dev/zero of=/tmp/floppy.bin bs=1024 count=1440
# losetup /dev/loop0 /tmp/floppy.bin

Put this block device (/dev/loop0) into the dosemu configuration as the floppy disk device. Now you can run the extractor executable, which makes /tmp/floppy.bin the desired floppy image .

# dosemu 1ruj27ud.exe
# losetup -d /dev/loop0

For 2.6.12+ if you have dosemu error:

# echo 0 > /proc/sys/kernel/randomize_va_space


Method 3: Using harddisk image from a boot iso

For ThinkPads x200 tablet

find the master boot record of the harddisk image

the master boot record is a 512 byte block ending on 55 aa.

# hexdump -v -C 7wuj32uc.iso | grep "55 aa" | more
0000a010  20 52 4f 4d 00 00 00 00  00 00 00 00 8a fc 55 aa  | ROM..........U.|
0000d9f0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 55 aa  |..............U.|
000119f0  4d 49 42 4d 44 4f 53 20  20 43 4f 4d 00 00 55 aa  |MIBMDOS  COM..U.|
0001ade0  00 cd 13 72 09 26 81 3e  fe 03 55 aa 74 01 f9 c3  |...r.&.>..U.t...|
...

now to find the start of the block you have to calculate the block address (get out a calculater that can do hex calculations)

0000a010 + 10 - 200 =  9e20
0000d9f0 + 10 - 200 =  d800
000119f0 + 10 - 200 = 11800
...

with hexdump analyse the block.
as you can see, the second one is a master boot record. ;-)
just look for someting like "Error loading operating system. Missing operationg system" or similar.

# hexdump -v -C 7wuj32uc.iso -s 0xd800 | more
0000d800  fa bc 00 7c 29 c0 8e d0  fb be 20 7c 50 1f bf 20  |...|)..... |P.. |
0000d810  06 50 07 b9 f0 00 fc f3  a5 ea 20 06 00 00 90 90  |.P........ .....|
0000d820  be be 07 80 3c 80 74 54  cd 18 be 40 06 ac 08 c0  |....<.tT...@....|
0000d830  75 02 eb fe 56 bb 07 00  b4 0e cd 10 5e eb ee 90  |u...V.......^...|
0000d840  45 72 72 6f 72 20 6c 6f  61 64 69 6e 67 20 6f 70  |Error loading op|
0000d850  65 72 61 74 69 6e 67 20  73 79 73 74 65 6d 00 4d  |erating system.M|
0000d860  69 73 73 69 6e 67 20 6f  70 65 72 61 74 69 6e 67  |issing operating|
0000d870  20 73 79 73 74 65 6d 00  90 90 90 90 ad 89 c2 ad  | system.........|
0000d880  89 c1 bd 06 00 55 b8 01  02 bb 00 7c cd 13 5d 73  |.....U.....|..]s|
0000d890  0f 29 c0 52 55 28 d2 cd  13 5d 5a 4d 75 e7 eb 8a  |.).RU(...]ZMu...|
0000d8a0  be 5f 06 81 3e fe 7d 55  aa 75 82 be e6 06 29 c0  |._..>.}U.u....).|
0000d8b0  29 ed b9 10 00 ad 01 c5  49 75 fa be 5f 06 81 fd  |).......Iu.._...|
0000d8c0  2b c0 75 e5 be e8 06 80  7c 1f aa 74 03 be 08 07  |+.u.....|..t....|
0000d8d0  ac 08 c0 74 0b 56 bb 07  00 b4 0e cd 10 5e eb f0  |...t.V.......^..|
0000d8e0  be be 07 ea 00 7c 00 00  4e 65 72 6f 20 42 6f 6f  |.....|..Nero Boo|
0000d8f0  74 2d 4c 6f 61 64 65 72  20 56 33 2e 30 0d 0a 0a  |t-Loader V3.0...|
0000d900  00 61 68 65 61 64 21 55  4c 65 6e 6f 76 6f 20 47  |.ahead!ULenovo G|
0000d910  72 6f 75 70 20 4c 69 6d  69 74 65 64 0d 0a 0a 00  |roup Limited....|
0000d920  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
0000d930  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
0000d940  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
0000d950  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
0000d960  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
0000d970  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
0000d980  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
0000d990  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
0000d9a0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
0000d9b0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 80 01  |................|
0000d9c0  01 00 01 3f 20 0e 20 00  00 00 e0 77 00 00 00 00  |...? . ....w....|
0000d9d0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
0000d9e0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
0000d9f0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 55 aa  |..............U.|


with dd we can extract the image. but first we need to know how many blocks to skip.

d800 / 200 = 6C --> 16 * 6 + 12 = 108

first see if we calculated correctly

# dd if=7wuj32uc.iso bs=512 skip=108 count=1 | hexdump -v -C

should show you the previously found boot sector.

extract the image.

# dd if=7wuj32uc.iso bs=512 skip=108 of=disk.img

see if we got a partition table.

# fdisk -l disk.img
You must set cylinders.
You can do this from the extra functions menu.

Disk disk.img: 0 MB, 0 bytes
64 heads, 32 sectors/track, 0 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Disk identifier: 0x00000000

               Device Boot      Start         End      Blocks   Id  System
disk.img1   *           1          15       15344    1  FAT12

if it does not show a partition table check your calculation. if the calculation is correct look for an other MBR.

Adding the custom image

Mount your floppy.bin as a loopback device.

# mkdir /tmp/mnt
# mount -o loop,umask=000 /tmp/floppy.bin /tmp/mnt

Create a 16 color 640x480 BMP (4 Bit/pixel VGA palette) (for example with Gimp) and save it to /tmp/mnt/logo.bmp.

When creating your image, keep in mind that on the T43p (and others??), regardless of your custom bootsplash screen there will be a superimposed black "Centrino" logo (~100x100 pixels) on the upper right of your display, so you might want to keep that area clear. You might also want to reserve the bottom 150 pixels for the "boot options" / "Entering BIOS setup" message(s) too, which will also be displayed.

The Thinkpad T61 (and likely others) superimposes several messages/logos, including the "Press the ThinkVantage Button" message in the lower-left corner, an "Intel" logo in the upper-right, and a "Lenovo" message on the right side.

Now prepare the image with prepare.exe using wine: (This does not work with dosemu!)

# wine prepare.exe logo.scr

The image must compress to <10k. If you receive an error, you can try reducing the number of colors in your image palette (step down to an 12 or 8 color palette for a very significant reduction in image size.) When successful, there should be a new logo.mod and your logo.bmp. If so, you are set, don't forget to unmount your loopback device:

# umount /tmp/mnt

Fake a floppy

Now you need to put the image on a floppy and boot from it. Since recent ThinkPads don't have a floppy drive, we can use a CD-R (or a CD-RW, actually, for the cheap ones, like me) and burn it with the following command:

# mkisofs -b floppy.bin floppy.bin | cdrecord dev=<device> -

(<device> being your cd writer device)

Add an image to an iso

At first download the BIOS ISO from the IBM support site. I used following one for my R60: 7cuj24uc.iso

Extract the ISO, rename your logo Bitmap to LOGO.BMP and copy it to the extracted folder.

Then run LOGO.BAT in a command shell ( windows-key+r -> cmd ).

Get some ISO editing tool (e. g. IsoMaster, free software and available for both Windows and Linux) and add following files to the downloaded image: LOGO.MOD, LOGO.SCR ( i've added also LOGO.BMP and LOGO.LOG but i don't think that they are needed ).

Save it, burn it, boot it and enjoy it.

Add an image to an harddisk image

two ways to proceed - (continuing from 1.3 Method 3: Using harddisk image from a boot iso)
1. calculate the offset for the first partition blocksize times sectors ( 512 * 32 see above fdisk -l )

# mount -t vfat -oloop,offset=16384 disk.img /tmp/mnt

2. just write it directly to an usb-stick and use that later to boot. (my favored one is this solution.)
unmount it before you write to the stick if it its mounted automatically.

# dd if=disk.img bs=512 of=/dev/<drive letter>
# sync
# mount -t vfat /dev/<drive letter>1 /tmp/mnt


copy your bmp file to /tmp/mnt/flash and compress it

# cd /tmp/mnt/flash
# wine cmd
# logo.bat

make sure the Total File Size shows less then 10k. Otherwise the custom logo won't be accepted during bios upgrade.

unmount it

# umount /tmp/mnt
# sync

if you choose the 2. option just boot your computer from the usb-stick. if you choose the 1. option you have tu burn a boot cd from this image.

The exciting part

After this worked, reboot your ThinkPad from the cdrom by pressing F12 while booting and wait for the IBM tool to start. Be sure to have your ThinkPad on AC power and say Yes to the questions the BIOS Upgrade Tool asks. It will then flash the BIOS, which will take about a minute.

Suddenly the laptop turns itself off with two beeps. When booting, you'll have your bootsplash picture.

Unfortunately, you won't see it really long, but it's better than the standard one, so it was worth the action.

Have fun!

BTW next time you have to flash the BIOS the IBM BIOS updater will detect a custom boot splash and ask you if you want to preserve it or restore the original.

A note for widescreen Z60m: This may be the case for all widescreen thinkpads using this method. The image you supply, 640x480, gets scaled but maintains its aspect ratio. As in, it stays 4:3, with the vertical component being the full vertical resolution, and it sits in the middle of the screen. This means that there are thick black bars to the left and right of my image (On my 1280x800 screen, I estimate each bar to be 110 pixels or so). The Centrino/Celeron/PentiumM and Lenovo branding mostly fits in the right bar, but the left bar is black. Take this into account when creating your image - it should look suitable in these conditions. I was also wondering if anyone knew a way around this - as the default Lenovo "THiNK" bootsplash does indeed occupy space in the left-most portion of the screen.

Share your custom bootsplash image

If you've created your own bootsplash image and want to share it with other you can post it here.

  • Current Thinkpad logo for models released after 2005. (for X3x, T4x, R5x only) Already in BMP format, ready to use. Use this BMP image to upgrade your older "IBM Thinkpad" logo to current Lenovo Thinkpad logo with the new Intel badge.
  • Schnappi bootsplash: Bow to the power of Schnappi. The BMP image compressed to about 6KB. Schni, schna, schnappi!
  • IBM Tux: An image of Tux with the IBM logo written on its tummy.
  • Eris, the goddess of discordia. To use it as bios bootsplash convert it to bmp with just a few (<8) colors (thinkwiki does not allow bmp uploads).
  • Simple Tux - Just convert it to bmp.
  • ThinkTux, my Linux-friendly version of the Thinkpad logo. Features Tux in all his glory and the motto, "ThinkTux," based on the Thinkpad logo. Just convert it to a .bmp with the GIMP (already is 640x480 and 16 colors).
  • ThinkPadLinux: A simple modification of Simple Tux adding "ThinkPad" and "Linux". Just convert it to .bmp using GIMP.
  • GNU ThinkPad BIOS Splash Already in BMP format ready for use.
  • apt-get install anarchism, full SVG