WD Blue SA510 SATA SSD Firmware Update in Linux
Here's how our SSD appears fresh from the factory:
# smartctl -i /dev/sda smartctl 7.1 2020-04-05 r5049 [x86_64-linux-4.18.0-425.19.2.el8_7.x86_64] (local build) Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org === START OF INFORMATION SECTION === Model Family: WD Blue / Red / Green SSDs (additional) Device Model: WD Blue SA510 M.2 2280 500GB Serial Number: 222813804265 LU WWN Device Id: 5 001b44 8b0d08432 Firmware Version: 52008100 User Capacity: 500,107,862,016 bytes [500 GB] Sector Size: 512 bytes logical/physical Rotation Rate: Solid State Device Form Factor: M.2 Device is: In smartctl database [for details use: -P show] ATA Version is: ACS-4, ACS-2 T13/2015-D revision 3 SATA Version is: SATA 3.2, 6.0 Gb/s (current: 6.0 Gb/s) Local Time is: Tue May 9 18:39:33 2023 UTC SMART support is: Available - device has SMART capability. SMART support is: Enabled
There is a CRITICAL FIRMWARE UPDATE available! Except that the update can only be installed from Windows via the Western Digital Dashboard tool.
Fortunately, with the help of this guide we can reverse-engineer the firmware update system and perform an update from Linux!
Obtain the firmware
Starting at https://wddashboarddownloads.wdc.com/wdDashboard/config/devices/lista_devices.xml and searching for the device model (WD Blue SA510 M.2 2280 500GB) we get the path wdDashboard/firmware/WD_Blue_SA510_M.2_2280_500GB/52020100/device_properties.xml.
Combining that with the base URL, we get https://wddashboarddownloads.wdc.com/wdDashboard/firmware/WD_Blue_SA510_M.2_2280_500GB/52020100/device_properties.xml which shows us that the latest firmware version is 52020100; and that our current firmware (52008100) is a dependency, i.e. we can upgrade directly from our current version to this new version.
Combining the fwfile element text with the previous URL gives us https://wddashboarddownloads.wdc.com/wdDashboard/firmware/WD_Blue_SA510_M.2_2280_500GB/52020100/52020100.fluf which we download.
Prepare the update disk
We download WD's update software from https://wddashboarddownloads.wdc.com/wdDashboard/application/EmbeddedLinux.zip and extract it. We copy the contents of Img/to-esp directory to the root directory of a FAT32 filesystem on a USB disk.
That's the following files/directories:
- boot
- EFI
- rootfs.cpio.gz
- syslinux
- vmlinuz
Finally we create an empty file named embedded-toolkit.cfg and put it in the root directory.
Booting from the update disk
Now the moment of truth...
Well this is exactly as janky as I expected.
I guess one of these is my WD Blue SSD, the other is the other internal SATA SSD from a different manufacturer, and the third is the godawful no-name USB flash disk I booted from.
Let's just hope I pick the right one!
(Not pictured: you actually have to type in the firmware update filename (52020100.fluf); there's no file selector...)
Nonetheless, it has worked!
# smartctl -i /dev/sda smartctl 7.1 2020-04-05 r5049 [x86_64-linux-4.18.0-425.19.2.el8_7.x86_64] (local build) Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org === START OF INFORMATION SECTION === Model Family: WD Blue / Red / Green SSDs (additional) Device Model: WD Blue SA510 M.2 2280 500GB Serial Number: 222813804265 LU WWN Device Id: 5 001b44 8b0d08432 Firmware Version: 52020100 User Capacity: 500,107,862,016 bytes [500 GB] Sector Size: 512 bytes logical/physical Rotation Rate: Solid State Device Form Factor: M.2 Device is: In smartctl database [for details use: -P show] ATA Version is: ACS-4, ACS-2 T13/2015-D revision 3 SATA Version is: SATA 3.2, 6.0 Gb/s (current: 6.0 Gb/s) Local Time is: Tue May 9 23:04:06 2023 UTC SMART support is: Available - device has SMART capability. SMART support is: Enabled
Depressingly predictable questions
Why can't WD use the Linux vendor firmware service, so that firmware updates are as simple as an fwupdmgr update?
Failing that, why can't they at least release a proprietary firmware update tool, so that you don't have to boot off a special USB disk?