[ltp] Re: Bios Splash

Paul Bolle linux-thinkpad@linux-thinkpad.org
Mon, 13 Feb 2012 13:07:27 +0100

On Mon, 2012-02-13 at 11:12 +0100, Adam Furmanczuk wrote:
> Allright, so with Pauls brilliant hint [1], one gets the following
> directory outline:
> [...]

I'm not sure whether it's brilliant. I did notice it's a bit sloppy. (It
could be read as saying that one loop mounts a disk, while one actually
loop mounts a filesystem on that disk's first partition.) So, to be a
bit more precise, I'll give a summary of the layout of this ISO:

8nuj08uc.iso        17891328 bytes
    ISO header          55296 bytes           (rather complicated stuff)
    boot image          17825792 bytes        (ie, exactly 17 MB)
        MBR etc.            16384 bytes
        FAT16 fs            17809408 bytes 
    zeros               10240 bytes

So a more strict command to mount(8) that FAT16 fs would be
    mount -o loop,offset=71680,sizelimit=17809408 -t vfat 8nuj08uc.iso <mount point>

(Note that running this command, using a 3.2 based kernel, generates a
number of errors in the kernel logs, like these:
    Buffer I/O error on device loop0, logical block 34816

Those errors are puzzling. It seems something is trying to read beyond
the end of the ISO image. And if I dd(1) just the 17809408 bytes of the
FAT16 fs out of this ISO and loop mount that fs image I see no errors.
Perhaps this is a bug in mount(8), losetup(8) and/or the kernel.)

> So all is left to do copy a LOGO.BMP (JPG and GIF according to readme
> also supproted), make iso and flash.

Please note that I only looked at that ISO image. I've never flashed a
BIOS with a custom "splash" image myself. So you're in "if it breaks you
get to keep both pieces" territory here.

Have fun!

Paul Bolle