LINKSTATION NAS SYSTEM. LinkStation 400 runs on Buffalo's LinkStation NAS System, providing a host of useful features from network file sharing and security to RAID management, remote access and more. Included on all Buffalo LinkStation devices, LinkStation NAS System simplifies your everyday data needs. At this point, your NAS will be booting a minimal image and will boot itself into EM Mode. You can close the TFTP Boot program, as we are.
I recently bought a NAS (network-attached storage) device. The device itself is a good quality piece of hardware, but the software leaves a lot to be desired.
I bought this NAS purely as a redundant (i.e. RAID1) backup solution and intended to use it as an SSH server for my backup scripts.Much to my disappointment, however, the firmware came far more locked-down than I had hoped, and provided no means to (easily) enable SSH. In my struggles to find an elegant solution to this, I ended up “bricking” the device, meaning it would no longer boot.
To make matters worse, I later found out that the LS220’s recovery features are stored on the disks’ /boot partition, which I had wiped while cleaning down the disks.The information available online for unbricking and/or opening the firmware of the LS200-series is sparse. I ended up having to contact Buffalo support in order to rectify everything. Thinking they’d tell me I’d voided my warranty and couldn’t help me as such, I was pleasantly surprised at how helpful they were in providing me Boot instructions, including all the relevant software and images required.This post should act as a definitive guide to unbricking your LS200-series. I’ve even provided instructions on how to open up the firmware, enabling SSH, Telnet and more. Note that you will lose all data on your NAS, so perform any backups where possible.This guide assumes you are running Linux and that your NAS is a LinkStation LS220. Part 1: Wiping the drives. Open up the front plate on your LS220 and remove both hard drives.
Take a Phillips-head screwdriver and remove the screws on both hard drive mounting plates, so that the drives come away. Attach the hard drives to your computer. You can do this using a USB-SATA hard drive (3.5″) dock (I bought one)or, if you have spare SATA and power cables, just connect it directly to your computer’s motherboard. Open up a terminal and run GNU Parted on the block device representing the connected hard drive.
Be careful during this part, as you don’t want to wipe your computer’s primary drive.In my case, the NAS drive shows up as /dev/sdb so I run Parted as follows: $ sudo parted /dev/sdb. Using the parted print command, we can see that there are six partitions on the NAS drive by default:(parted) printNumber Start End Size.1 17.4kB 1024MB 1024MB.2 1024MB 6144MB 5119MB.3 6144MB 6144MB 394kB.4 6144MB 6144MB 512B.5 6144MB 7168MB 1024MB.6 7168MB 2992GB 2985GB. Let’s go ahead and remove all of them:(parted) rm 1(parted) rm 2(parted) rm 3(parted) rm 4(parted) rm 5(parted) rm 6. Great! You can now unplug this hard drive and repeat the above process for the other drive. Once both drives are done, screw the mounting plates back on to the hard drives and install them back into the NAS.Part 2: TFTP BootThis step involves flashing a minimal image to the drives, allowing it to boot into. EM Mode allows us to get our final, fully-working firmware image on to the NAS.Unfortunately, you’ll need a Windows PC for this part.
I just ran a Windows 7 VM with a network interface bridged to my host’s eth0 interface. Connect your PC directly to your NAS with an Ethernet cable. Plug in and power on your NAS. After a few seconds, the LED on the front will flash red to let you know it failed to boot anything. The NAS will assign itself an IP address of 192.168.11.150/24. You will need to set Windows to a static IP of 192.168.11.1/24 in order to serve up the TFTP Boot image.To do this, open up Control Panel Network and Sharing Center and click Change adapter settings.Right-click your network adapter and click Properties.Double-click Internet Protocol Version 4 (TCP/IPv4).Choose Use the following IP address and set the below values: IP address: 192.168.11.1Subnet mask: 255.255.255.0Default gateway: (leave blank)Then click OK and OK again to leave the Properties screen. Download the TFTP Boot server and images from the link below.
I received these from Buffalo support and am hosting them here for convenience:. Unzip the downloaded file and launch the TFTP Boot.exe program. The program should tell you its “listening On: 192.168.11.1:69”. If not, you have not configured your network adapter correctly.The bottom line should read “accepting requests” with a flashing cursor.
Press the physical Function button on the back of your NAS until the LEDs start flashing white.The TFTP Boot window should now output two messages like below: Client 192.168.11.150. Blocks ServedClient 192.168.11.150. Blocks Served. Great! At this point, your NAS will be booting a minimal image and will boot itself into EM Mode. You can close the TFTP Boot program, as we are done with it now.Part 3: Opening up the stock firmware image (SSH, Telnet, ). Download the NAS Navigator program from the link below.
This should work in Linux under Wine/Crossover:. Unzip and install the program by running NasNaviInst.exe. Now run the NAS Navigator program. After a few seconds, your NAS should show up. Note that it is in Emergency mode and has an IP address in the range 169.254.0.0/16.
Repeat the instructions from Part 2, Step 3 above, but this time set an IP address of 169.254.11.1 and a subnet mask of 255.255.0.0Very important: Note the subnet mask’s third number is a 0 (zero) and not 255. Download and unzip the latest firmware for your device from the Buffalo website below:. Download and unzip the linkstation-mod tools from GitHub below:You can also clone the repo if you’re comfortable using Git.
Open up a terminal and browse to the linkstation-mod directory. Run the open-ls-rootfs.sh script on the hddrootfs.img file as below.Bonus – root login to NAS:Add your SSH public key to the “ data” directory and rename it idrsa.key. This will automatically install the key and grant you root access to the NAS.Very important: If you are not the root user, you must use sudo to execute the script due to some permissions requirements making /dev files. I spent hours trying to figure out why my LinkStation wouldn’t boot as a result of running this as a regular user. $ chmod +x./scripts/open-ls-rootfs.sh$ sudo./scripts/open-ls-rootfs.sh /path/to/firmware-directory/hddrootfs.img. After the script has completed, you will see a new directory: “ out“.
Inside this directory is the (hacked/opened) hddrootfs.img file.You will need to change the permissions on this back to your regular user. For example, if your username is “aaron”: $ sudo chown aaron:aaron./out/hddrootfs.imgCopy this new hddrootfs.img file to the firmware directory, overwriting the old version.
Back in Windows (sorry), open up the firmware directory and open up the configuration file LSUpdater.ini. Add the following lines to the bottom to enable Debug Mode:SpecialFlagsDebug = 1. Run the LSUpdater.exe program. It should find your NAS. Click the window decoration in the top-left corner and click Debug(D)Tick and untick the appropriate options until your configuration looks as below:. Click OK, then Update. You should now get a pop-up window saying “Formatting”, followed by “Transferring firmware”.And that’s it!
Your LinkStation LS200-series is now fully recovered and is now running an open firmware. Thanks for your time.here is their response when I asked for a link to the right boot image:Dear John,Thank you for contacting Buffalo Support.Unfortunately, we do not support TFTP imaging. You may find suggestions from user contributions in the forum.If you have any questions, you may also contact us 24/7 at (866)752-6210.Buffalo Support Email is intended for non-critical support for customers in the United States and Canada. Any replies to this response will be handled in the order it was received. If you have an urgent issue that requires immediate attention, please contact our 24×7 support center at (866)752-6210.Thanks,Ronald ParrishTechnical Support AssociateBuffalo Americas(866) 752-6210. Sorry I am a little confused here,“This post should act as a definitive guide to unbricking your LS200-series.
I’ve even provided instructions on how to open up the firmware, enabling SSH, Telnet and more. Note that you will lose all data on your NAS, so perform any backups where possible.This guide assumes you are running Linux and that your NAS is a LinkStation LS220.”That is the model I have. Well, mine is a Link Station LS220DE.I was just wondering if “opening” the firmware was possible from part 3 with a working unit. Meaning enabling SSH, TelNet. In the article you stated that yours was bricked.
I was just curious if this had to be done from EM mode.Other wise I am very confused, as I thought that is what this article in part was about,unless I have read it wrong.Thanks for your time!! Tried parts of this at home this weekend.
My goal is to enable rsync so that I can backup my other NAS to this one.Downloaded the latest firmware for my LS220D0602 NAS, modified the hddrootfs.img including adding my public key (generated using PuttyGen on a Windows PC). After updating the firmware on my LS220 it boots into EM mode. I can get it back into working order by uploading the latest firmware to it, but the modified one won’t work.Are there limitations to what versions of the firmware the linkstation-mod scripts will work with?
Will I be able to rsync even if I don’t add my SSH public key? Hi AaronAppreciate that its some time that you looked at this, but I am after some advice here. Purchased a 2x4TB version of this unit the other day from Amazon for a cracking price. Currently waiting for it to arrive.I already have a Zyxel NAS (better – quicker 1.6MHz CPU, with twice the memory) with 2x2TB WD drives in it running RAID1/mirrored. I wanted to swap out the two 4TB drives we get with the Buffalo and use these in my Zyxel.Then slot my orig 2TB drives in the Buffalo and use that as a RAID0/striped config and as a backup to the Zyxel.I also wanted to look at rooting and setting up ssh on the Buffalo, so obviously your guide above is interesting to me.
I note that you say that the recovery code in on one partition of one of the disks. So I assume if I was to do this I would have to replicate the partition tables on my orig 2TB drives if possible and sync the code across? Is the OS also on the drives, or in flash?Do you think this is possible, and are there any other things I need to consider?Have to say I was a tad surprise that there was little additional support for these units when you need to look at outside the box stuff like this. I struggle to find any mention of these units on the the Buffalo NAS-Central Wiki and forum.
Odd, since they are not exactly new units.Appreciate any help here mate. This might be slightly off topic but does this also apply to the LS441D 4 disk bay model of the Buffalo Linkstation? I stumbled upon this looking for some kind of “speed” to completing a “4th disk add” to an existing three disk RAID 5 setup, but considering all options offered by the Linkstation-mod repo code; particularly, running Debian instead of the stock firmware but have scoured the web and have never gotten a definitive answer as to whether or not this has ever been successfully done with the LS441D or not. Excellent information!
I’ll keep it at hand just when I may need it. For now I’m considering my Buffalo Linkstation as a dumb (but redundant) storage system. Geez I have the old MyBookLive (single HDD) and it offers easier “hacking”, by a simple (not so) hidden url to the SSH goodies. I enabled quite a few things there. The MBL still works (fingers crossed) but I’m starting to build something that I can rely on.
Additionally, for pure fun, I built a DIY miniITX box with freenas 11. And it finally behaves the way I want! I’ll keep it around, as I find that you cannot add apps in the LS220DE unit (just Torrent which is alright but I need at least ARIA2 too). Firstly – thanks soooo much for this page and the hosting. It wasn’t enough for me on its own but without this i’d never have got started.For me I didn’t wipe the drives as described as my home setup is win 10/mac. I followed the guide regarding the NAS regardless and stalled at the point where the update was supposed to flash the firmware and init the disk partitions. Without a 3.5″ caddy I couldn’t flash the drives myself.
A bit of research showed me that the Windows flash tool could do it if you change/add the following ini file settings:FlagsVersionCheck = 0NoFormatting = 0SpecialFlagsDebug = 1Hope this helps. I’ve had a LS-CHL 1TB since around 2008 (10 years!). I’ve managed to fix my LS420D, it was quite easy in the end but the above is missing a couple of points.1. You have to call Buffalo tech support and get the correct software as it’s different for every unit.2. Once you have run the TFTP and get to the second part you have to wait for the light on the unit to go solid white before you can access it via the NAS Navigator.The guy at tech support was super helpful and it only spoke to him for about 2 mins, he emailed me a link with detailed instructions which are almost identical to the above however there are a couple of crucial elements missing including the de-bug mode and all the link to the correct software and firmware.I hope this will help, apparently these cant be bricked which is nice.