Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Well, I am feeling too old for jumping through several burning hoops to upgrade several firmwares via the usual vendor-specific way: Download some DOS tools, waste some time creating a (Free-)DOS boot medium and wasting more time to make the BIOS actually boot from that and finally flash the firmware upgrade.

This is so 1980-ies.

I come across some linux flash tool from the Coreboot project. It seems to support various FLASH-chips. But how does it work in practice?

I guess there are some pitfalls converting vendor supplied firmware upgrades into the right format. Or what about indentifying the right destination chip?

Currently I probably have to upgrade for example:

  • the firmware of some Seagate 1.5 TB disks
  • the firmware of an old Abit Athlon 64 board (Award bios)
  • Bios/Embedded-Controller-Bios of a Thinkpad

How do you upgrade your devices firmware at a Linux system?

share|improve this question
add comment

7 Answers 7

Every device with upgradeable firmware is probably going to have its own methods for doing that. Motherboards in particular are notoriously incompatible in this regard.

As to hard drives, again, this is a proprietary matter. Seagate provides liveCDs and Windows downloads to perform firmware updates, but not Linux or Unix tools.

You can build bootable images for Thinkpad BIOS updates that can be booted from GRUB.

Otherwise, you're just going to have to check with the manufacturer for tools.

On the other hand, if you're working with microcontrollers, you can often program them with fairly universal tools, though still on a limited basis (e.g., Atmel chips can usually be programmed with avrdude).

share|improve this answer
add comment

for Seagate 3TB video (ST3000VX000-9YW1):

sg_write_buffer -v -m 5 -I <FW file> <dev>
share|improve this answer
add comment

Flashing with FreeDOS, one reboot and no removable devices

  1. Ensure you are using GRUB2 (check if you have the package grub-pc installed on Ubuntu)
  2. Get hold of SYSLINUX's MEMDISK. On Ubuntu, install the package syslinux-common and your memdisk will reside in /usr/lib/syslinux/memdisk
  3. Download fdboot.img, save it in your home directory, or some other directory you can easily type with a US keyboard layout
  4. Embed your flashing software in the FreeDOS image:
    1. sudo -s
    2. mkdir -p /mnt/floppy
    3. mount -o loop -t msdos fdboot.img /mnt/floppy
    4. cp -via FLASH.EXE BIOS.IMG /mnt/floppy/ (FLASH.EXE and BIOS.IMG are examples)
    5. umount /mnt/floppy
  5. Boot your system and interrupt it in the GRUB2 (press ESC)
  6. Press c to enter GRUB2's command line.
  7. Load MEMDISK:
    1. Enter linux16 (hd. Now press tab. A list of harddisks will be shown.
    2. Complete the harddisk choice so that the line says linux16 (hd0,, for example.
    3. Press tab once again to get a list of partitions. You need to find the partition where your /usr/lib/syslinux is mounted on in your Linux installation.
    4. Now you have the harddisk and partition specification, you can complete the path so that it looks like this: linux16 (hd0,msdos3)/usr/lib/syslinux/memdisk. Press enter.
  8. Load FreeDOS:
    1. Use the same tab completion to find fdboot.img, but with the command initrd16 instead of linux16. You'll end up with a line like this: initrd16 (hd0,msdos3)/home/janus/fdboot.img.
    2. Press enter.
  9. Write boot and press enter.
  10. The FreeDOS boot menu will appear.
  11. Choose the "safe mode" option, as you don't need the drivers.
  12. In the DOS prompt, write the name of the firmware flashing executable, for example: FLASH.EXE.
  13. Press enter.
  14. Wait for the flashing to finish.
  15. The firmware flasher might boot the machine itself, or you might get the prompt back. If you get the prompt back, press Control-Alt-Delete to reboot.
  16. As you didn't change the GRUB configuration permanently, it will boot right back up into your default OS.
share|improve this answer
    
You should update your existing answer instead of duplicating it. –  maxschlepzig Jul 26 '12 at 18:15
    
I would suggest putting those lines in grub.cfg to make it a menu entry. Easier to copy & paste them, or at least retype using a real text editor. –  derobert Feb 5 '13 at 22:24
    
@derobert: How do I find the Grub2 device and partition ID reliably? You'd need to know that if baking it into the config. That's why the tab completion is nice. –  Janus Troelsen Feb 5 '13 at 23:12
    
@ysangkok hd0 is the first hard disk (usually the boot disk); hd1, the second, etc. Partition numbers match the ones in the partition table. So if you're looking for /dev/sda3, its usually (hd0,3), especially if you only have one disk. You can also have grub look by UUID. Worthy of a new question, if it hasn't already been asked. –  derobert Feb 5 '13 at 23:20
    
@derobert: Are you sure you are talking about Grub2? That format looks like Grub0.* to me. When is msdos prepended? I'll try to answer your question if you post it. Let me know. –  Janus Troelsen Feb 5 '13 at 23:29
show 1 more comment

My small experience is that I used Flashrom to update my Intel Motherboard BIOS and it worked fine. In general it seems like a really nice tool.

share|improve this answer
    
Could you post an example command line you used for that? –  maxschlepzig Sep 15 '10 at 16:50
add comment

Using DOS upgrade floppy booted with GRUB as mentioned before works for majority of hardware. In some cases you can find native tools. Dell even prepares repositories which integrates with distro packaging system:

http://linux.dell.com/wiki/index.php/Repository/firmware

Sadly, most updates requires machine reboot to complete.

share|improve this answer
add comment

Try:

hdparm --fwdownload (AND BE VERY CAREFUL!)

However, be careful!

share|improve this answer
add comment

I don't see why you would do it from Linux when the manufacturers support DOS and it works great there. You even have FreeDOS, so you don't have to use non-free software. Linux is designed for normal use cases, and those do not include modifying hardware (flashing firmwares is pretty much that). DOS is the most popular minimal OS, and it does the job because it initializes only a minimal set of hardware and it is single-user.

share|improve this answer
1  
Because jumping through burning hoops is a pain. Having to use DOS with a proprietary flash tool is tedious and error prone. And FreeDOS is not even a big help - last time I looked, they didn't even provide ready to use boot images. And then what, does the flash tool really works with USB-Boot? How to enable it in the the BIOS? What about remote systems? Do I have to touch the grub config ... And btw, Linux was never designed for just 'normal use cases'. Plus, now, vendors switch to Windows only update tools ... –  maxschlepzig Jul 26 '12 at 7:30
    
Yes, flash tools work with USB-Boot. DOS loads the program into memory, so the flash tool doesn't need to know how it got there. Enable what in the BIOS? You shouldn't be remotely flashing hardware, just like you shouldn't remotely change other hardware. I'll update my answer shortly to show you how to embed the flashing tools in FreeDOS and boot it. It's not tedious or error prone if you know what you're doing. If you don't, pay someone to flash your hardware for you. –  Janus Troelsen Jul 26 '12 at 12:19
1  
Because rebooting unnecessarily is an annoyance. There's no reason I shouldn't be able to deactivate a drive in Linux, update its firmware and power-cycle it without taking down the machine. –  mikebabcock Dec 8 '13 at 20:34
add comment

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.