{"id":409,"date":"2015-03-17T09:08:34","date_gmt":"2015-03-17T08:08:34","guid":{"rendered":"http:\/\/www.phildev.net\/phil\/blog\/?p=409"},"modified":"2015-03-17T09:08:34","modified_gmt":"2015-03-17T08:08:34","slug":"updating-crucial-ssd-firmware-from-linux","status":"publish","type":"post","link":"https:\/\/www.phildev.net\/phil\/blog\/?p=409","title":{"rendered":"Updating Crucial SSD Firmware From Linux"},"content":{"rendered":"<p>Some Crucial SSDs have a bug that causes them to be unstable. Fortunately there&#8217;s a firmware upgrade <a href=\"http:\/\/www.tomshardware.com\/news\/Crucial-m4-Firmware-BSOD,14544.html\" target=\"_blank\">available<\/a>. Even more fortunately, in addition to the usual Windows updaters, Crucual kindly makes a version available that&#8217;s an ISO image so it&#8217;s OS independent.<\/p>\n<p>Great, right? Except the ISO doesn&#8217;t actually work when you dd it to a drive. Ugh. I spent a few hours on this and finally figured out how to make this work.<\/p>\n<p>First, write the ISO to your USB drive as normal (I&#8217;ll assume your USB drive is <tt>\/dev\/sde<\/tt>):<br \/>\n<code>$ sudo dd bs=512k if=\/tmp\/crucial-m4-070h-07-00.iso of=\/dev\/sde<br \/>\n$ sudo sync<br \/>\n<\/code><\/p>\n<p>A filesystem and the data is now on your USB drive, but there&#8217;s no valid partition table and a corrupt MBR. You can see this by using fdisk:<\/p>\n<p><code>$ sudo fdisk -l \/dev\/sde<br \/>\nDisk \/dev\/sde: 4048 MB, 4048551936 bytes<br \/>\n125 heads, 62 sectors\/track, 1020 cylinders, total 7907328 sectors<br \/>\nUnits = sectors of 1 * 512 = 512 bytes<br \/>\nSector size (logical\/physical): 512 bytes \/ 512 bytes<br \/>\nI\/O size (minimum\/optimal): 512 bytes \/ 512 bytes<br \/>\nDisk identifier: 0x00000000<br \/>\n<br \/>\nDisk \/dev\/sde doesn't contain a valid partition table<br \/>\n<\/code><\/p>\n<p>Ooops! However, on the ISO is a copy of the MBR that should be on the drive. Mount the drive and grab that:<br \/>\n<code>$ sudo mount \/dev\/sde \/mnt<br \/>\n$ cp \/mnt\/boot\/isolinux\/boot2880.img \/tmp<br \/>\n$ sudo umount \/mnt<\/code><\/p>\n<p>Now, write that boot sector to your USB drive:<\/p>\n<p><code>$ sudo dd if=\/tmp\/boot2880.img of=\/dev\/sde<\/code><br \/>\nAlmost done. Now you can see there&#8217;s a mostly-valid partition table:<br \/>\n<code>$ sudo fdisk -l \/dev\/sde<br \/>\n<br \/>\nDisk \/dev\/sde: 4048 MB, 4048551936 bytes<br \/>\n125 heads, 62 sectors\/track, 1020 cylinders, total 7907328 sectors<br \/>\nUnits = sectors of 1 * 512 = 512 bytes<br \/>\nSector size (logical\/physical): 512 bytes \/ 512 bytes<br \/>\nI\/O size (minimum\/optimal): 512 bytes \/ 512 bytes<br \/>\nDisk identifier: 0xc9d0c9d0<br \/>\n<br \/>\nThis doesn't look like a partition table<br \/>\nProbably you selected the wrong device.<br \/>\n<br \/>\nDevice Boot Start End Blocks Id System<br \/>\n\/dev\/sde1 ? 28886110 638537311 304825601 c4 DRDOS\/sec (FAT-16 &lt; 32M)<br \/>\n\/dev\/sde2 ? 1183556331 4412578037 1614510853+ 30 Unknown<br \/>\n\/dev\/sde3 ? 1325451862 2509223114 591885626+ 46 Unknown<br \/>\n\/dev\/sde4 ? 1394614348 1394635684 10668+ 45 Unknown<\/code><\/p>\n<p>Better, but not quite right. The only change we need to make is to set that first partition to be bootable. Modify the disk by running <tt>fdisk<\/tt> without <tt>-l<\/tt>:<\/p>\n<p><code>$ sudo fdisk \/dev\/sde<br \/>\nCommand (m for help):<\/code><\/p>\n<p>You want the <tt>a<\/tt> command, then when it asks for a partition, type 1:<\/p>\n<p><code>Command (m for help): a<br \/>\nPartition number (1-4): 1<\/code><\/p>\n<p>But that will have set it to non-bootable, so do that again:<\/p>\n<p><code>Command (m for help): a<br \/>\nPartition number (1-4): 1<\/code><\/p>\n<p>Then print the table to be sure:<\/p>\n<p><code><br \/>\nCommand (m for help): p<br \/>\n<br \/>\nDisk \/dev\/sde: 4048 MB, 4048551936 bytes<br \/>\n125 heads, 62 sectors\/track, 1020 cylinders, total 7907328 sectors<br \/>\nUnits = sectors of 1 * 512 = 512 bytes<br \/>\nSector size (logical\/physical): 512 bytes \/ 512 bytes<br \/>\nI\/O size (minimum\/optimal): 512 bytes \/ 512 bytes<br \/>\nDisk identifier: 0xc9d0c9d0<br \/>\n<br \/>\nThis doesn't look like a partition table<br \/>\nProbably you selected the wrong device.<br \/>\n<br \/>\nDevice Boot Start End Blocks Id System<br \/>\n\/dev\/sde1 * 28886110 638537311 304825601 c4 DRDOS\/sec (FAT-16 &lt; 32M)<br \/>\n\/dev\/sde2 ? 1183556331 4412578037 1614510853+ 30 Unknown<br \/>\n\/dev\/sde3 ? 1325451862 2509223114 591885626+ 46 Unknown<br \/>\n\/dev\/sde4 ? 1394614348 1394635684 10668+ 45 Unknown<\/code><\/p>\n<p>You&#8217;re looking for that <tt>*<\/tt> under <tt>Boot<\/tt> for the first partition. Now write your changes:<\/p>\n<p><code>Command (m for help): w<br \/>\nThe partition table has been altered!<br \/>\n<br \/>\nCalling ioctl() to re-read partition table.<br \/>\nSyncing disks.<br \/>\n$<\/code><\/p>\n<p>And now your drive is ready &#8211; it should boot.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Some Crucial SSDs have a bug that causes them to be unstable. Fortunately there&#8217;s a firmware upgrade available. Even more fortunately, in addition to the usual Windows updaters, Crucual kindly makes a version available that&#8217;s an ISO image so it&#8217;s OS independent. Great, right? Except the ISO doesn&#8217;t actually work when you dd it to [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[5],"tags":[],"_links":{"self":[{"href":"https:\/\/www.phildev.net\/phil\/blog\/index.php?rest_route=\/wp\/v2\/posts\/409"}],"collection":[{"href":"https:\/\/www.phildev.net\/phil\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.phildev.net\/phil\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.phildev.net\/phil\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.phildev.net\/phil\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=409"}],"version-history":[{"count":14,"href":"https:\/\/www.phildev.net\/phil\/blog\/index.php?rest_route=\/wp\/v2\/posts\/409\/revisions"}],"predecessor-version":[{"id":423,"href":"https:\/\/www.phildev.net\/phil\/blog\/index.php?rest_route=\/wp\/v2\/posts\/409\/revisions\/423"}],"wp:attachment":[{"href":"https:\/\/www.phildev.net\/phil\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=409"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.phildev.net\/phil\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=409"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.phildev.net\/phil\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=409"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}