On Wed, Nov 24, 2010 at 8:43 AM, Peter Daum <gator_ml@yahoo.de> wrote:
In many cases, after the next reboot the machines network interfaces have a different MAC-address -even worse, they all have _the same_ MAC address (00:19:66:97:d7:e2). I tried it in many variations, but could not really detect any system - even under identical circumstances this problem seems occurs very often, but not always. If I restore the original ROM contents (after I noticed the problem, I always saved the original firmware) the machines always get their original MAC address back (but of course also the buggy bios that I am trying to upgrade). The ROM contents of the machines do contain their MAC addresses at a certain offset but in the vendor supplied BIOS image that I flash has all bits set to 1 in this and several other (obviously data) areas, the mysterious "default" MAC address
"00:19:66:97:d7:e2" does not occur in this file. When I flash the file under DOS using afudos.exe ("AMI firmware update utility 4.14"), the machines will keep their original MAC address.(As I just noticed, that program also has an option to explicitly set the MAC address).

Does anybody have an idea, what is going on here? (As I said, the phenomenon does not even seem to be deterministic). Maybe even an idea, how to do the upgrade using flashrom? (The machines are integrated in some Linux-based management system, so using flashrom I could do the upgrade automatic; except for the problem with the duplicated MAC addresses everything seems to work just fine after flashing the BIOS with flashrom).

Indeed, sometimes the ethernet MAC ID is fuddled by the BIOS :-/ As a workaround, perhaps you can use ethtool to write the MAC ID after upgrading with Flashrom.

The "00:19:66:97:d7:e2" you're seeing can be encoded in numerous ways and probably omits the ':' character. It may also be in a compressed portion of the image. To find the bytes, try:
1. In Linux, dump the bios image using Flashrom (flashrom -r)
2. Boot into DOS or Windows to set the MAC address to a temporary value (e.g. 01:23:45:67:89:ab) using AMI's utility
3. Reboot into Linux
4. Dump the BIOS again to a separate file
5. hexdump the two files and see which bytes changed (hexdump -C old.bin > old.bin.hex; hexdump -C new.bin > new.bin.hex; sdiff -s old.bin.hex new.bin.hex)

If this does not reveal the location of the MAC ID, it will at least provide information about whether or not the relevant bytes are compressed.

-- 
David Hendricks (dhendrix)
Systems Software Engineer, Google Inc.