Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Using this tutorial "Using the PCI sysfs interface to dump the Video BIOS ROM" I tried to repeat the steps for dumping BIOS ROM from the network card.

My network card is:

polipo@polipo:~$ lspci
[snip]
03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 01)
polipo@polipo:~$

So I typed this to be sure where's my network card rom:

polipo@polipo:~$ find /sys/devices -name "rom"
/sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/rom
/sys/devices/pci0000:00/0000:00:1c.3/0000:03:00.0/rom
polipo@polipo:~$

It's the second result. Now I have to dump it.

So typing what has to be typed, I'm getting error:

polipo@polipo:~$ echo 1 | sudo tee /sys/devices/pci0000:00/0000:00:1c.3/0000:03:00.0/rom
1
polipo@polipo:~$ sudo cat /sys/devices/pci0000:00/0000:00:1c.3/0000:03:00.0/rom > netbios.rom
cat: /sys/devices/pci0000:00/0000:00:1c.3/0000:03:00.0/rom: Input/output error
polipo@polipo:~$

See? Input/output error.. Using ethtool I also get an error:

polipo@polipo:~$ sudo ethtool -e eth0 > romdump.rom
Cannot get EEPROM data: Operation not supported
polipo@polipo:~$

Here's more info:

polipo@polipo:~$ ethtool -i eth0
driver: r8169
version: 2.3LK-NAPI
firmware-version: 
bus-info: 0000:03:00.0
supports-statistics: yes
supports-test: no
supports-eeprom-access: no
supports-register-dump: yes
polipo@polipo:~$

So it looks like my network card doesn't allow me to make dumps of it's BIOS ROM, using eeprom access? But to me it's a bit confusing - I mean, it should be possible to dump any hardware's firmware, right?

share|improve this question
    
Is there a message in dmesg after sudo cat /sys/devices/pci0000:00/0000:00:1c.3/0000:03:00.0/rom ? On my box, I got : r8169 0000:02:00.0: Invalid ROM contents but it's normal because I screw up my rom with a wrong flash. As side effect my MAC address has changed and I try to revert my mistake. –  user200310 Oct 9 '13 at 21:25

1 Answer 1

The sysfs rom file allows you to read the PCI ROM contents, but apparently the device does not expose that information. It is not available or not implemented by the device.

About why ethtool -e eth0 fails, the current r8169 driver (up to and including 3.19-rc3) does not implement a method to read from the EEPROM. If your Realtek network device has an Atmel 93C46 or 93C56 EEPROM, then you can add this r8169 functionality with this patch (for Linux 3.11) (same patch, rebased for 3.17, works for 3.19 too).

For those whose device is "bricked" (symptoms: garbage MAC address such as bb:6f:ff:ff:ff:ff, vendor/device ID reported as 10ec:8129), you could try to follow the instructions in that message. I have tried it in the past and from time to time I have to repeat it when the power is fully removed from the machine. Unfortunately, the instructions are not 100% reliable and every time I have to try much more tricks in order to get it to work. As of this writing, this RTL8169sb/8110sb is still defunct since yesterday.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.