[Discuss] updating hard drive firmware from a VM

Tom Metro tmetro+blu at gmail.com
Tue Feb 19 02:45:07 EST 2013


Tom Metro wrote:
> What I'm wondering is whether this sort of FreeDOS image could be booted
> (as an emulated floppy or CD) in a VM (VirtualBox), which would be
> configured to pass through the target disk as its primary drive.
> 
> Will the VM adequately "get out of the way" enough to pass IDE commands
> to the drive, if configured as a "raw" device?

I'm surprised this harebrained idea didn't illicit some comments. :-)

If you're curious, I investigated further and confirmed my suspicion
that it isn't possible.

I did run across an article suggesting it might be possible:
http://romaimperator.com/?p=29

This blog posting explains how to use a raw disk in VirtualBOX so you
can then run SpinRite on the physical disk. SpinRite is a quite
low-level program, so this sounds promising. Though ultimately SpinRite,
although it can use SMART data, it is primarily just concerned with the
standard APIs for randomly accessing specific sectors.

In "Chapter 9. Advanced topics" of the VirtualBox manual, right below
where they explain how to set up a raw disk, they have a section titled
"Configuring the hard disk vendor product data":
https://www.virtualbox.org/manual/ch09.html#changevpd

where they explain:
  VirtualBox reports vendor product data for its virtual hard disks
  which consist of hard disk serial number, firmware revision and model
  number.

and it shows how you can customize these parameters. There was no option
listed to "pass through" these parameters from the underlying raw disk.
This is a good indication for how much the virtual disk driver is
brokering the relationship with the raw disk, and pretty much says it is
game over for the idea of dong a firmware update through this layer.

Just to confirm things, I created a raw disk per:
https://www.virtualbox.org/manual/ch09.html#rawdisk

And booted up a copy of SeaTools for DOS:
http://www.seagate.com/support/internal-hard-drives/consumer-electronics/ld25-series/seatools-dos-master/

in a VM to see what drive it would see. After bootup it reports:

  Device 0 is ATA Device VBOXHARDDISK on generic PCI ATA
  Model ID: VBOX HARDDISK
  Serial Number: VBOX07...
  Revision: 1.0
  SMART is not supported

So clearly a firmware update will never work this way.

 -Tom

-- 
Tom Metro
Venture Logic, Newton, MA, USA
"Enterprise solutions through open source."
Professional Profile: http://tmetro.venturelogic.com/



More information about the Discuss mailing list