[vox-tech] [fwd] Creating a bootable CD from Linux to reflash your BIOS

Bill Kendrick nbs at sonic.net
Mon Feb 20 12:20:50 PST 2006


Thought I'd pass this along, since it looks so useful!

----- Forwarded message from Richard Sharpe <rsharpe AT richardsharpe {dot} com> -----

Date: Sun, 19 Feb 2006 16:10:26 -0800 (PST)
From: Richard Sharpe
Subject: [svlug] Creating a bootable CD from Linux to reflash your BIOS

Hi,

Here are the steps I used:

1. wget http://fdos.org/bootdisks/autogen/FDSTD.288.imz

I used the 2.88MB floppy image version to ensure there was enough space 
for the new BIOS and the flash utility.

2. Decompress it: zcat FDSTD.288.imz > FDSTD.288.img

3. Mount the image: mount -o loop -t msdos FDSTD.288.img /mnt

Note, you will have to ensure that you have fat.ko and msdos.ko loaded. 
You might have to build them in your kernel source tree and insmod them. 
There are other ways to ensure that they load as well.

4. Replace config.sys with something that is less likely to cause 
problems. You don't need himem.exe and other things loaded, and you don't 
need it prompting you if you want them loaded:

cat > /mnt/config.sys << EOF
DOS=HIGH
;DEVICE=\FDOS\HIMEM.EXE /VERBOSE
;DEVICE=\FDOS\EMM386.EXE /VERBOSE
;DEVICE=\UMBPCI.SYS
FILES=20
BUFFERS=20
SHELLHIGH=\COMMAND.COM /E:256 /P
EOF

5. If you need to do this from a serial console (COM1) because you don't 
have a graphics device, find and download the mode.com program:

wget http://www.coli.uni-saarland.de/~eric/stuff/soft/mode-205may12.zip

and extract mode.com and copy it to the fdos directory:

cp mode.com /mnt/fdos

If you have a graphics console, skip to step 6.

6. Copy your flashing program and BIOS image file to the floppy image:

cp phlash16.exe /mnt
cp pdsm4215.rom /mnt

Note, you might need to copy a different flash utility and ROM file.

7. Create an autoexec.bat file:

cat > /mnt/autoexec.bat << EOF
@ECHO OFF
CLS
ECHO Welcome to FreeDOS (http://www.freedos.org)!
path fdos;.
EOF

8. If you need to flash your BIOS from COM1, add the following to 
autoexec.bat

cat >> /mnt/autoexec.bat << EOF
rem Setting up to switch to COM1
mode com1 9600,none,8,1
ctty aux
EOF

Note, you can do steps 7 and 8 together of you want to.

9. Unmount the floppy image

umount /mnt

10. Create the CD image

mkdir flashcd
mv FDSTD.288.img flashcd
mkisofs -r -b FDSTD.288.img -c boot.cat -o ./flashcd.iso ./flashcd

11. Burn your image to a CD.

You could put much of the above into a shell script if you want.

NOTE! These steps might need changing for your environment and might need 
some troubleshooting. It took me about 6 CDs before I got things right. 
YMMV. However, they are the steps.

Regards
-------
Richard Sharpe, rsharpe[at]richardsharpe.com, rsharpe[at]samba.org,
sharpe[at]ethereal.com, http://www.richardsharpe.com

----- End forwarded message -----

-- 
-bill!                                    Tux Paint 2006 wall calendar,
bill at newbreedsoftware.com                CDROM, bumper sticker & apparel
http://www.newbreedsoftware.com/       http://www.cafepress.com/newbreedsw


More information about the vox-tech mailing list