Synology Diskstation 209j

Command-line upgrade of Synology Diskstation DSM 3

Motivated by the Heartbleed bug, I recently upgraded my Synology Diskstation 209j from DSM 3.0 to DSM 4.2. I think I had put this off because the update process kept failing. It took over 30 minutes to upload the firmware from my computer to the Diskstation over the web browser, and it just kept failing for lack of patience or a good WiFi connection or perhaps because I was using the wrong version. The lack of feedback in those versions of the update utility made it hard to tell. After a couple failed attempts, I figured out how to perform the update from the command line. Do this at your own risk. You have been warned.

Note: Somewhere around DSM 4.x Synology improved the firmware download process and provided a command line tool called synoupdate (or something like that), so hopefully even cheap foot-draggers like me will never have to worry about this again.

  1. Back up your Diskstation.
  2. Determine which firmware you can upgrade to. Read the release notes for your Synology device. Each new release tells which prior releases it can upgrade. (To go from 3.0 to 4.2, I had to upgrade first to 3.2, then 4.0, then finally 4.2.)
  3. Download that firmware and copy it to your Diskstation (by using a shared folder, for instance).
  4. Open a terminal session (telnet or ssh) to your Diskstation and log in as root (not admin). The root password is probably the same as the admin password. You may need to enable these services from your Diskstation control panel.
  5. Remove temporary update files, if any, with these commands:
rm /tmp/update.message
rm /tmp/update.progress
rm //upd@te.pat
rm -rf //upd@te         <---- make sure you don't have any spaces between the slashes 
                                        or you'll delete your whole Diskstation!
  1. Copy the firmware file you just downloaded to the root folder, replacing [/volumex/sharename/DSM_DSxxxx_nnnn.pat] with the correct name and location of your firmware file:
cp [/volumex/sharename/DSM_xxxx_nnnn.pat] //upd@te.pat
  1. Unpack the firmware file with:
mkdir //upd@te
tar xvpf "//upd@te.pat" -C //upd@te
  1. Verify the file contents using the cksum utility. Compare the output from the cksum command to the contents of the checksum.syno file:
cd //upd@te
cat checksum.syno
cksum -o 3 * */*
  1. If the numbers for the listed files don't match. Download the file again and repeat the previous steps. Note that the cksum command above will list more files than are contained in the checksum.syno file. That's okay.
  2. Now run the update:
//upd@te/updater -r /
  1. Watch the progress of the update by opening a second terminal window, logging in as root or admin, and using this command:
tail -f /var/log/messages
  1. Be on the lookout for error messages in lines prefixed with "updater:". At the end of update, if all went well, you should see "Congratulation!!" embedded somewhere in the output. Press <Ctrl>-C to abort the "tail" command.
  2. Log in as admin to your Diskstation via a web browser. Reboot. Wait patiently for it to restart, as it will probably take longer than usual.
  3. Congratulations!
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License