Skip to main content

Step-by-Step Guide: Firmware Update and Sector Alignment for Samsung PM983 SSD

·9 mins

Samsung is notorious for not releasing firmware for their Enterprise SSDs. But here we are - let’s get to updating!

Downloads: #

GitHub Firmware Downloads here

For Example PM983: #

  • PM983 U.2 Firmware starts with EDAxxxxx eg. EDA5702Q

  • (SAMSUNG MZ1LB3T8HMLA-00007) PM983 M.2 Firmware starts with EDBxxxxx eg. EDB7602Q

Don’t flash the wrong Firmware!

Model Codes for Samsung PM983: #

  • M.2 Models:

    • SAMSUNG MZ1LB3T8HMLA-00007 (3.84 TB)
    • SAMSUNG MZ1LB1T9HALS-00007 (1.92 TB)
    • SAMSUNG MZ1LB960HAJQ-00007 (960 GB)
  • U.2 Models:

    • SAMSUNG MZQLB7T6HMLA-00007 (7.68 TB)
    • SAMSUNG MZQLB3T8HALS-00007 (3.84 TB)
    • SAMSUNG MZQLB1T9HAJR-00007 (1.92 TB)
    • SAMSUNG MZQLB960HAJR-00007 (960 GB)

Identify the correct SSD: #

To identify your SSD, use the nvme list command to display all NVMe devices connected to your system. Look for the device path, model number, and firmware version.

$ nvme list
Node                  Generic               SN                   Model                                    Namespace Usage                      Format           FW Rev
--------------------- --------------------- -------------------- ---------------------------------------- --------- -------------------------- ---------------- --------
/dev/nvme0n1          /dev/ng0n1            xxxxxxxxxx       SAMSUNG MZ1LB3T8HMLA-00007               1         179.77  GB /   3.84  TB      4 KiB +  0 B   EDB7602Q

We have our SSD in /dev/nvme0n1. Let’s check some SSD information.

$ nvme id-ctrl -H /dev/nvme0
$ nvme id-ctrl -H /dev/nvme0n1
NVME Identify Controller:
vid       : 0x144d
ssvid     : 0x144d
sn        : xxxxxxxxxxxxx
mn        : SAMSUNG MZ1LB3T8HMLA-00007
fr        : EDB7602Q
rab       : 2
ieee      : 002538
cmic      : 0
  [3:3] : 0     ANA not supported
  [2:2] : 0     PCI
  [1:1] : 0     Single Controller
  [0:0] : 0     Single Port

mdts      : 9
cntlid    : 0x4
ver       : 0x10200
rtd3r     : 0x7a1200
rtd3e     : 0x7a1200
oaes      : 0
  [31:31] : 0   Discovery Log Change Notice Not Supported
  [27:27] : 0   Zone Descriptor Changed Notices Not Supported
  [15:15] : 0   Normal NSS Shutdown Event Not Supported
  [14:14] : 0   Endurance Group Event Aggregate Log Page Change Notice Not Supported
  [13:13] : 0   LBA Status Information Notices Not Supported
  [12:12] : 0   Predictable Latency Event Aggregate Log Change Notices Not Supported
  [11:11] : 0   Asymmetric Namespace Access Change Notices Not Supported
  [9:9] : 0     Firmware Activation Notices Not Supported
  [8:8] : 0     Namespace Attribute Changed Event Not Supported

ctratt    : 0
  [19:19] : 0   Flexible Data Placement Not Supported
  [15:15] : 0   Extended LBA Formats Not Supported
  [14:14] : 0   Delete NVM Set Not Supported
  [13:13] : 0   Delete Endurance Group Not Supported
  [12:12] : 0   Variable Capacity Management Not Supported
  [11:11] : 0   Fixed Capacity Management Not Supported
  [10:10] : 0   Multi Domain Subsystem Not Supported
  [9:9] : 0     UUID List Not Supported
  [8:8] : 0     SQ Associations Not Supported
  [7:7] : 0     Namespace Granularity Not Supported
  [6:6] : 0     Traffic Based Keep Alive Not Supported
  [5:5] : 0     Predictable Latency Mode Not Supported
  [4:4] : 0     Endurance Groups Not Supported
  [3:3] : 0     Read Recovery Levels Not Supported
  [2:2] : 0     NVM Sets Not Supported
  [1:1] : 0     Non-Operational Power State Permissive Not Supported
  [0:0] : 0     128-bit Host Identifier Not Supported

rrls      : 0
cntrltype : 0
  [7:2] : 0     Reserved
  [1:0] : 0     Controller type not reported
fguid     : 00000000-0000-0000-0000-000000000000
crdt1     : 0
crdt2     : 0
crdt3     : 0
nvmsr     : 0
  [1:1] : 0     NVM subsystem Not part of an Enclosure
  [0:0] : 0     NVM subsystem Not part of an Storage Device

vwci      : 0
  [7:7] : 0     VPD Write Cycles Remaining field is Not valid.
  [6:0] : 0     VPD Write Cycles Remaining

mec       : 0
  [1:1] : 0     NVM subsystem Not contains a Management Endpoint on a PCIe port
  [0:0] : 0     NVM subsystem Not contains a Management Endpoint on an SMBus/I2C port

oacs      : 0xf
  [10:10] : 0   Lockdown Command and Feature Not Supported
  [9:9] : 0     Get LBA Status Capability Not Supported
  [8:8] : 0     Doorbell Buffer Config Not Supported
  [7:7] : 0     Virtualization Management Not Supported
  [6:6] : 0     NVMe-MI Send and Receive Not Supported
  [5:5] : 0     Directives Not Supported
  [4:4] : 0     Device Self-test Not Supported
  [3:3] : 0x1   NS Management and Attachment Supported
  [2:2] : 0x1   FW Commit and Download Supported
  [1:1] : 0x1   Format NVM Supported
  [0:0] : 0x1   Security Send and Receive Supported

acl       : 7
aerl      : 3
frmw      : 0x17
  [5:5] : 0     Multiple FW or Boot Update Detection Not Supported
  [4:4] : 0x1   Firmware Activate Without Reset Supported
  [3:1] : 0x3   Number of Firmware Slots
  [0:0] : 0x1   Firmware Slot 1 Read-Only

lpa       : 0x3
  [6:6] : 0     Telemetry Log Data Area 4 Not Supported
  [5:5] : 0     LID 0x0, Scope of each command in LID 0x5, 0x12, 0x13 Not Supported
  [4:4] : 0     Persistent Event log Not Supported
  [3:3] : 0     Telemetry host/controller initiated log page Not Supported
  [2:2] : 0     Extended data for Get Log Page Not Supported
  [1:1] : 0x1   Command Effects Log Page Supported
  [0:0] : 0x1   SMART/Health Log Page per NS Supported

elpe      : 63
  [7:0] : 63 (0's based)        Error Log Page Entries (ELPE)

npss      : 0
  [7:0] : 0 (0's based) Number of Power States Support (NPSS)

avscc     : 0x1
  [0:0] : 0x1   Admin Vendor Specific Commands uses NVMe Format

apsta     : 0
  [0:0] : 0     Autonomous Power State Transitions Not Supported

wctemp    : 360
 [15:0] : 87°C (360 Kelvin)     Warning Composite Temperature Threshold (WCTEMP)

cctemp    : 361
 [15:0] : 88°C (361 Kelvin)     Critical Composite Temperature Threshold (CCTEMP)

mtfa      : 0
hmpre     : 0
hmmin     : 0
tnvmcap   : 3,840,755,982,336
[127:0] : 3,840,755,982,336
        Total NVM Capacity (TNVMCAP)

unvmcap   : 0
[127:0] : 0
        Unallocated NVM Capacity (UNVMCAP)

rpmbs     : 0
 [31:24]: 0     Access Size
 [23:16]: 0     Total Size
  [5:3] : 0     Authentication Method
  [2:0] : 0     Number of RPMB Units

edstt     : 0
dsto      : 0
fwug      : 0
kas       : 0
hctma     : 0
  [0:0] : 0     Host Controlled Thermal Management Not Supported

mntmt     : 0
 [15:0] : -273°C (0 Kelvin)     Minimum Thermal Management Temperature (MNTMT)

mxtmt     : 0
 [15:0] : -273°C (0 Kelvin)     Maximum Thermal Management Temperature (MXTMT)

sanicap   : 0
  [31:30] : 0   Additional media modification after sanitize operation completes successfully is not defined
  [29:29] : 0   No-Deallocate After Sanitize bit in Sanitize command Supported
    [2:2] : 0   Overwrite Sanitize Operation Not Supported
    [1:1] : 0   Block Erase Sanitize Operation Not Supported
    [0:0] : 0   Crypto Erase Sanitize Operation Not Supported

hmminds   : 0
hmmaxd    : 0
nsetidmax : 0
endgidmax : 0
anatt     : 0
anacap    : 0
  [7:7] : 0     Non-zero group ID Not Supported
  [6:6] : 0     Group ID does change
  [4:4] : 0     ANA Change state Not Supported
  [3:3] : 0     ANA Persistent Loss state Not Supported
  [2:2] : 0     ANA Inaccessible state Not Supported
  [1:1] : 0     ANA Non-optimized state Not Supported
  [0:0] : 0     ANA Optimized state Not Supported

anagrpmax : 0
nanagrpid : 0
pels      : 0
domainid  : 0
megcap    : 0
sqes      : 0x66
  [7:4] : 0x6   Max SQ Entry Size (64)
  [3:0] : 0x6   Min SQ Entry Size (64)

cqes      : 0x44
  [7:4] : 0x4   Max CQ Entry Size (16)
  [3:0] : 0x4   Min CQ Entry Size (16)

maxcmd    : 0
nn        : 1
oncs      : 0x1f
  [8:8] : 0     Copy Not Supported
  [7:7] : 0     Verify Not Supported
  [6:6] : 0     Timestamp Not Supported
  [5:5] : 0     Reservations Not Supported
  [4:4] : 0x1   Save and Select Supported
  [3:3] : 0x1   Write Zeroes Supported
  [2:2] : 0x1   Data Set Management Supported
  [1:1] : 0x1   Write Uncorrectable Supported
  [0:0] : 0x1   Compare Supported

fuses     : 0
  [0:0] : 0     Fused Compare and Write Not Supported

fna       : 0x4
  [3:3] : 0     Format NVM Broadcast NSID (FFFFFFFFh) Supported
  [2:2] : 0x1   Crypto Erase Supported as part of Secure Erase
  [1:1] : 0     Crypto Erase Applies to Single Namespace(s)
  [0:0] : 0     Format Applies to Single Namespace(s)

vwc       : 0
  [2:1] : 0     Support for the NSID field set to FFFFFFFFh is not indicated
  [0:0] : 0     Volatile Write Cache Not Present

awun      : 127
awupf     : 0
icsvscc   : 1
  [0:0] : 0x1   NVM Vendor Specific Commands uses NVMe Format

nwpc      : 0
  [2:2] : 0     Permanent Write Protect Not Supported
  [1:1] : 0     Write Protect Until Power Supply Not Supported
  [0:0] : 0     No Write Protect and Write Protect Namespace Not Supported

acwu      : 0
ocfs      : 0
  [1:1] : 0     Controller Copy Format 1h Not Supported
  [0:0] : 0     Controller Copy Format 0h Not Supported

sgls      : 0
 [15:8] : 0     SGL Descriptor Threshold
 [1:0]  : 0     Scatter-Gather Lists Not Supported

mnan      : 0
maxdna    : 0
maxcna    : 0
subnqn    :
ioccsz    : 0
iorcsz    : 0
icdoff    : 0
fcatt     : 0
  [0:0] : 0     Dynamic Controller Model

msdbd     : 0
ofcs      : 0
  [0:0] : 0     Disconnect command Not Supported

ps      0 : mp:8.00W operational enlat:0 exlat:0 rrt:0 rrl:0
            rwt:0 rwl:0 idle_power:- active_power:-
            active_power_workload:-

Important Infos #

From the output of the nvme id-ctrl command, we can gather all infos we need. For example:

mn        : SAMSUNG MZ1LB3T8HMLA-00007
fr        : EDB7602Q
...
frmw      : 0x17
  [5:5] : 0     Multiple FW or Boot Update Detection Not Supported
  [4:4] : 0x1   Firmware Activate Without Reset Supported
  [3:1] : 0x3   Number of Firmware Slots
  [0:0] : 0x1   Firmware Slot 1 Read-Only

From the output of the nvme id-ctrl command, we can gather the model number and firmware information.

[3:1] : 0x3 => 3 Firmwareslots
[0:0] : 0x1 => Read-Only Firmwareslot - DONT FLASH HERE

First, we need to send the firmware file to the controller SRAM:

$ nvme fw-download -f EDB7602Q.bin /dev/nvme0
Firmware download success

This command uploads the firmware file to the SSD’s memory. Next, let’s flash our downloaded firmware to slot 2 without activating it:

$ nvme fw-commit -s 2 -a 0 /dev/nvme0
Success committing firmware action:0 slot:2

-s 2 = Slot 2
-a 0 = Don’t activate it

After successfully flashing, let’s activate it:

$ nvme fw-commit -s 2 -a 2 /dev/nvme0
Success committing firmware action:2 slot:2

Congratulations, you just updated the firmware! Now, shutdown and power-cycle the SSD and hope for the best :)

How to align Sectors on the Samsung PM983 #

The PM983 can support 4k or 512 sector sizes. Here’s how to switch it to 4k sector size. To check the current sector size, use the nvme id-ns command:

$ nvme id-ns /dev/nvme0n1
...
lbaf  0 : ms:0   lbads:9  rp:0
lbaf  1 : ms:0   lbads:12 rp:0 (in use)

Look for the lbaf (Logical Block Addressing Format) entries: lbaf 0: 512 bytes sector size (lbads:9) lbaf 1: 4k sector size (lbads:12)

To switch the sector size, use the nvme format command. Warning: This will format the drive! Backup your data.

Warning: This formats the drive! Backup your Data
$ nvme format /dev/nvme0n1 --lbaf=1 --reset

lbaf=x where x is the slot with the lbads:y we want.

Now, we have switched the sector size to 4k sectors. :)