Tuesday, January 5, 2010

Flashing BIOS on a Linux Only System

Flashing BIOS for Linux only system

Linux only system and BIOS flashing

Ever faced a need to flash your PC's BIOS?

I was facing this issue ever I got this MSI Neo K8M board 5 years back. The kernel CPU frequency scaling would never work; and the problem was traced to a BIOS bug.

Flashing BIOS was a daunting task for me - first, there was no DOS available. Finding reliable floppies was next to impossible. I once purchased 4 different floppies from 4 different shops in 3 districts, but none would work the second time I inserted them.

And darn'ed Wipro UPS was not very reliable. Worse, it had no cold start feature. Any power cut in between the flash process, and I would be stranded.

I had no choice except to put up with up the inability to use cpufreq and a noisy CPU fan. I slowly realised that there is a good reason why the BIOS option was called "Cool'n'quiet".

That was till I hijacked a thread on FireFox came up in the Goa Linux Users' Yahoo groups. (Ilug-goa at yahoo groups dot com).

Edgar D' Souza was mentioning a Core 2 duo Intel processor running at 800 MHz. And poor me, who was yet to see frequency scaling thought it was a typo.

Somewhere towards end of that thread, Dhaval Giani said:-


 > Update your BIOS then. Laziness is not a good enough excuse to use up
 > extra power!

That was reason enough to work hard. But you can hardly call issuing "apt-cache search bios" from the command line as "work".

That command produced 2 pages of text. The lazy man I am, I decided to do some more hard work. Out comes


apt-cache search bios |grep bios

That yields just 4 lines. 4 very useful lines.


paivakil@home:~$ apt-cache search bios |grep flash
amideco - Decompress flashfiles equipped with an AMI BIOS
awardeco - Decompress flashfiles equipped with an AWARD BIOS
flashrom - Identify, read, write, erase, and verify BIOS/ROM/flash chips
phnxdeco - Decompress flashfiles equipped with a PHOENIX BIOS

about 45 seconds later, "flashrom" is installed. In another 10 seconds, I have gone through the man pages. In next 50, I realise that I have not learnt anything from the man pages. So, I do "flashrom -h", which is far more helpful.

"flashrom - r oldbios.old" dumps a backup of the old bios into file, "oldbios.old". (Never mind about how the BIOS is going to read that file, which sits on an ext4 filesystem, on a SATA drive, in case things go awry.)

The update files were already downloaded from the official MSI site eons ago, so finding them was never a problem. I go ahead and do:-


flashrom -w A7032VMS.370



Couple of seconds later, I am told that the bios is written successfully.

I reboot, and am disappointed that every thing seems to be very familiar, and old options stay that way. That is till I notice that the bios set up utility version has changed.

So, I boot up, upgrade the BIOS another couple of time (I am upgrading from version 3.20 something to 3.50 first.

Each reboot goes smoothly, and finally, version 7.00 of the BIOS is also installed.

In less than 40 minutes, I have flashed the BIOS 4 times!!! In between, I have composed mails to the Goa Linux users' group too.

Things cannot get any easier, right??

No comments:

Post a Comment