Live data from Hacker News

Update Firmware of Samsung SSDs in Linux

blog.quindorian.org

111–120 of 131 posts

Re: Update Firmware of Samsung SSDs in Linux

#111
post #24

Reminds me when about ten years ago, working in an all-Linux company there was an issue with some Lenovo docking stations. I don't recall anymore what the issue was exactly, just that something wouldn't work properly when you plugged in a laptop with Linux. The problem was solved by a firmware upgrade, but upgrading the docking station firmware was possible only from Windows. So there was this one poor person in IT w…

I ran into that on my T470s. The last ThinkPad I've owned and likely will own, for a variety of reasons. I used to be a die-hard Thinkpad guy.

In my case, I was the only one in the company with a Thinkpad, so my process for upgrading the docking station firmware was:

"dd" off my drive to another box. "dd" on the copy of the disc I had saved when I got the computer. Boot it and set it up. Run all the updates. "dd" my drive image back onto the box.

The company I'm at now prefers buying Dell, but I had special requested that Thinkpad. It was kind of disappointing. It had two batteries, which made it slim, but sometimes one of them would be flaky. But not reliably flaky, so sometimes it'd just power off, but most of the time both batteries reported tons of life. And the docking station was basically useless (don't remember the issues, I just never was able to get a satisfactory docking experience from it). It had the ultra high res screen and that was nice.

Re: Update Firmware of Samsung SSDs in Linux

#112
post #72

Earlier quoted context omitted.

>I'm not sure what would have happened if I had been a purely MacOS and Linux household. Passthrough to a VM, though I suppose the Windows license could be an issue.

Actually, since Win 10 you can run the OS indefinitely without a license. It just doesn't allow you to customize stuff like the wallpaper etc. Ref: https://www.howtogeek.com/244678/you-dont-need-a-product-key...

I see pre built PCs come with free demo version of win11. They expect you to crack it yourself.

Microsoft stopped giving a shit about piracy from consumers. Its a far cry from the days when windows cost €300.

Re: Update Firmware of Samsung SSDs in Linux

#113
post #24

Reminds me when about ten years ago, working in an all-Linux company there was an issue with some Lenovo docking stations. I don't recall anymore what the issue was exactly, just that something wouldn't work properly when you plugged in a laptop with Linux. The problem was solved by a firmware upgrade, but upgrading the docking station firmware was possible only from Windows. So there was this one poor person in IT w…

I ran into that on my T470s. The last ThinkPad I've owned and likely will own, for a variety of reasons. I used to be a die-hard Thinkpad guy. In my case, I was the only one in the company with a Thinkpad, so my process for upgrading the docking station firmware was: "dd" off my drive to another box. "dd" on the copy of the disc I had saved when I got the computer. Boot it and set it up. Run all the updates. "dd" my…

This, except I always buy a new SSD for my own use, then just swap the factory drive back when needed.

Re: Update Firmware of Samsung SSDs in Linux

#114
post #76

I was confronted with this last Saturday and ended up following this how-to. I simply couldn't believe that their tool required a PS/2 keyboard, when most modern Mainboards no longer have such a port. In any case, updating the firmware didn't fix the issue that my 980 Pro NVMes (all 4 of them) only have a write speed of between 400 and 500 MB/s (read is at ~6.7 GB/s), using Ubuntu 20.04. A WD_BLACK SN850 NVMe manages…

Maybe there's hope. I just got a regular 980 (not Pro) last week, which was showing around 660-680 MB/s write speed on both direct disk (and through file system). Just moments ago downloaded the new firmware and ran the installer, and suddenly: 1.8 GB/s on direct disk. I'm using dd if=/dev/zero of=/dev/nvme0n1 bs=1000M count=100 to test the direct access speed.

BTW, I followed the wget & cpio route from the how-to and ran the "fumagician" binary just fine on the headless box over ssh, no need to PS/2 anything.

Re: Update Firmware of Samsung SSDs in Linux

#115
post #96
post #72

Earlier quoted context omitted.

Actually, since Win 10 you can run the OS indefinitely without a license. It just doesn't allow you to customize stuff like the wallpaper etc. Ref: https://www.howtogeek.com/244678/you-dont-need-a-product-key...

I had myself a hearty laugh recently when I was in Vegas and the casino elevator wall screen panels had the ACTIVATE WINDOWS banner overlaid on the videos.

[deleted]

Re: Update Firmware of Samsung SSDs in Linux

#116
post #2

" If it’s your boot drive, no luck there and you can try flashing while it’s mounted." Err no, that's when you boot from USB stick. Or do it from initramfs. Or anything, other than modifying the firmware of a drive you are running from.

You ought to be able to flash the firmware on a mounted drive. Anyone sane implementing the firmware flashing algorithm will either : 1. Just reject all IO requests from the point of the firmware update onwards. The system will see the drive disappear, but since you are using a journaling filesystem, it will be like you just pulled the power, and no data corruption will happen. 2. Complete all IO requests before the…

#3 is the correct option, I think, except you update the firmware but don't start using it. The OS should handle powercycling the drive at a convenient moment, at which point it'll load the new firmware.

Netapp filers do this; they update disk firmware online by installing it and then just rebooting the drive. The RAID controller/software handles the momentary interruption with zero issues, but even without redundancy an OS can handle a drive disappearing for a few moments.

Re: Update Firmware of Samsung SSDs in Linux

#118

Earlier quoted context omitted.

You ought to be able to flash the firmware on a mounted drive. Anyone sane implementing the firmware flashing algorithm will either : 1. Just reject all IO requests from the point of the firmware update onwards. The system will see the drive disappear, but since you are using a journaling filesystem, it will be like you just pulled the power, and no data corruption will happen. 2. Complete all IO requests before the…

#3 is the correct option, I think, except you update the firmware but don't start using it. The OS should handle powercycling the drive at a convenient moment, at which point it'll load the new firmware. Netapp filers do this; they update disk firmware online by installing it and then just rebooting the drive. The RAID controller/software handles the momentary interruption with zero issues, but even without redundanc…

I don't think Linux can do this... When hardware is powercycled, that would be a disconnect event followed by a connect event. There is no way to be sure it's the same drive connected, or that it will connect again at all. And on the disconnect event, all the datastructures associated with the device get discarded, so all file handles are invalid and nothings gonna work again...

Re: Update Firmware of Samsung SSDs in Linux

#119

I already tried that method a while ago. For some reason fumagician refuses to recognize my 970 Evo Plus. > No supported SSD detected for Firmware Update It also doesn't work if you flash the ISO and boot "properly" as Samsung expects you to do.

Your 970 EVO Plus is likely a newer model with different internals thus the firmware doesn't really apply to it

Re: Update Firmware of Samsung SSDs in Linux

#120

Earlier quoted context omitted.

#3 is the correct option, I think, except you update the firmware but don't start using it. The OS should handle powercycling the drive at a convenient moment, at which point it'll load the new firmware. Netapp filers do this; they update disk firmware online by installing it and then just rebooting the drive. The RAID controller/software handles the momentary interruption with zero issues, but even without redundanc…

I don't think Linux can do this... When hardware is powercycled, that would be a disconnect event followed by a connect event. There is no way to be sure it's the same drive connected, or that it will connect again at all. And on the disconnect event, all the datastructures associated with the device get discarded, so all file handles are invalid and nothings gonna work again...

Linux has support for multipath devices, so disks disappearing and re-appearing at runtime definitely isn't a new concept. Making it work with a single disk might take some work though.

If the power cycle is controlled, then the kernel can be reasonably sure that the re-appearing device is the same one. File handles wouldn't really be affected as long as the mounted filesystem can resume IO after the device reappears.

Most likely you'd still want to use a RAID scheme and/or data checksumming as an extra layer to ensure data integrity though.

Post reply on HN