Getting OpenLink working on a LS-HS

From NAS-Central Buffalo - The Linkstation Wiki
Revision as of 23:09, 6 December 2006 by Brecksled (Talk | contribs) (PHASE 5: Update the Linux Kernel)

Jump to: navigation, search

Introduction

The HS version of the Linkstation has the unique problem of rebooting every five minutes after being flashed with a custom firmware like OpenLink or FreeLink This write-up documents the path taken to perform an OpenLink install on a Linkstation HS. It is detail-oriented (perhaps too much so) to help beginners make the required changes to their box.


This document is heavily based on the work of others:

Hardware and software configuration

  1. Host platform is MS Windows XP (SP2)
  2. Hardware is the HS-D400GL [9]. I had previously installed my own files (backups, music, etc.) on this disk drive prior to the f/w change, and they were preserved following the f/w change.
  3. Original HS-D400GL firmware is v1.49.
  4. Software to be installed is OpenLink v051b and the v2.6 Andre Linux Kernel

The Process

This process can be broken down into four phases:

  1. Phase 1: Know Your Hardware
  2. Phase 2: Collect the Tools and Software
  3. Phase 3: Update The Firmware
  4. Phase 4: Configure Internet Access
  5. Phase 5: Update Linux Kernel

...and your done.

PHASE 1: Know Your Hardware

Find out which firmware version your LinkStation has[10] and make very sure you have an HS-DGL (PowerPC) Linkstation. This could either these two model numbers:

If you do not have this specific hardware, it is advised that you find another write-up to help you with the install.

It is advised that you back up the files on this drive before performing this work. However, a normal installation process should preserve your files.

PHASE 2: Collect the Tools and Software

Perform the following steps using the computer you will eventually directly connect to the LinkStation to perform the firmware update.[4]

  1. Download both the HS-DGL-Firmware and the HG-Openlink
    1. http://downloads.linkstationwiki.net/stock_firmware/hs-dgl_DirectCopy_149_107.zip (stock or the telnet-enabled, both have the firmware-updater included)
    2. http://linkstationwiki.net/downloads/openlink/hg-openlink-051b.zip
  2. Unzip both packages in a seperate folder
  3. Copy the image.dat from the openlink-HG-package over the image.dat of the HS-DGL-Folder.

Now you have the tools to perform the firmware change and you're ready for Phase 3.

PHASE 3: Update the Firmware

Here you will actually change the operating firmware of the HS-DGL box. You will directly connect to the LinkStation, then perform the update. It is strongly recommended that you connect both the computer and the LinkStation to an UPS to make sure a power failure does not impact your update.

1) Using the LinkStation web application, if you wish to use a static IP disable the DHCP client function. You'll then need to select an IP address the box will use. Pick an IP address that is in the same sub-range as your network. For example, if your own computer's IP address is 192.168.0.5, you can set the LinkStation IP to an unused IP address on your network (perhaps 192.168.0.20). The LinkStation will take a minute to restart with the new IP address. See the screenshot below for what this looks like:

2) Now change your own computer over to using a static IP address. This can be done by right-clicking the Network Connection icon and selecting Properties. Again, choose an unused IP address in the same sub-range as your network (and the LinkStation). I chose 192.168.0.21.

3) Disconnect the LinkStation and your own computer from the network. Connect them together directly (do not use a hub or a router). I used a crossover cable, but this is likely not required as the LinkStation auto-senses the connection. You should see network connectivity on your computer now.

4) This step is very important: Disable any and all firewalls, virus checkers, spyware filters, etc. you have running on your computer. Examples of this include Norton, MacAfee, OneCare, etc. Also, go to Start, Control Panel, Windows Firewall and make sure this is OFF. Finally, make sure the only enabled network adapter in your computer is the one that is connected to the LinkStation. If you're using a laptop, make sure the wireless networking is disabled.

5) Now you are ready to actually udpate the firmware. Double-click on the file called "hs-dgl_DirectCopy_149_107\hs-dgl_DirectCopy_149_107" that you have on your hard drive. Remember, this is the folder in which you replaced the "image.dat" file in the previous phase. This will start up the firmware update utility.

6) You will be prompted for the administrator password. I left this blank. I had no password set on my linkstation (except for secure folder access).

7) Click the "Renew Firmware" button. The f/w will load (it took about 2 minutes in my case). You will then see a "Settings are being restored message" and a couple of LinkStation soft re-boots will occur. When you see the message "Firmware has been renewed" you can click OK to exit the updater.

Note
For the remainder of this Phase, the box may appear to re-boot every 5 minutes or so. This will require you to re-log back into the box. This annoyance will be fixed in Phases 4 and 5


8) Now you will log into your 'opened' LinkStation using Telnet. Open up a command dialog on your computer using Start, Run, cmd. In this black dialog box, enter the following:

telnet 192.168.0.20  (or the actual static IP you used for the LinkStation)

If you get the prompt "bash-2.05a#" - you successfully opened up up your box!

Now your LinkStation is using firmware that has OpenLink available and the version 2.4 Linux kernel. You can also communicate to the LinkStation securely using telnet. Unfortunately, your LinkStation will now appear to soft reboot about every 5 minutes. This will be fixed in the next two Phases.

PHASE 4: Configure Internet Access

The LinkStation will need to communicate to the internet in Phase 5 to update the Linux kernel from v2.4 to v2.6. You need to tell the LinkStation how to do this. That is, you need to specify a gateway address. This is the address of your router on your normal network. Mine is 192.168.0.1. If you are using a Linksys router, it is likely 192.168.1.1.

1) For the kernel 2.6-webinstaller to run you need your HS be able to connect to the internet. If you use DHCP all is fine. If you use a static IP, execute

echo 'nameserver 217.115.138.24' > /etc/resolv.conf

This is a public nameserver....you can replace the IP with the nameserver of your choice...for example the same you use on your other hosts. If you are familiar with the VI text editor, you can simply edit the /etc/resolv.conf file and add the line to the end of the file.

2) Now perform a hard re-boot of the LinkStation (Press and hold the power button).

3) You can now disconnect the LinkStation from your computer and connect both the LinkStation and your computer back to the router. If you like, you can set your computer back to using DHCP for it's IP address. Leave the LinkStation's IP static for now.

PHASE 5: Update the Linux Kernel

  • Solve the "soft-reboot" problem[7]

You will now use the webinstaller to update the Linux kernel on your LinkStation. This will fix the rebooting problem. This is best done by copying and pasting the command lines directly into the cmd dialog box running telnet.

You must perform these steps soon as possible following a reboot of the LinkStation. Suggestion: Set up two windows side-by-side on your monitor: One with these commands ready to copy, and the other is the cmd dialog box.

The following steps differ slightly from the Tago Thread[5] which is also referred to in the Beginner's Questions Thread[4]. These steps also differ slightly from the Master Set of instructions found in the original Andre Kernel instructions[7]. Please check this reference before proceding to find any changes that might have been made since this document was last updated.

The process below does not use a temp folder. I found the temp folder was wiped out with each reboot, and I'm not fast enough to complete the process without a reboot occurring! However, the steps below seemed to work just fine.

Finally, the wget commands shown in step 2 and 3 below can be omitted if you use the host computer to manually place the two files into a sub-folder called 'kernelinst' in the share folder of the LinkStation. This might be necessary if you are unable to get web-access from your LinkStation at this stage of the process.

1) Log into the LinkStation using telnet.

2) execute these commands (about 2 minutes to execute if broadband internet connection):

cd /mnt/share
mkdir kernelinst
cd kernelinst
wget http://hvkls.dyndns.org/downloads/latest-openlinkhelper.tar.gz
tar -C / -xvzf latest-openlinkhelper.tar.gz
chmod 1777 /mnt/share/kernelinst

3) Now execute these commands (less than 20 seconds to execute):

wget http://hvkls.dyndns.org/downloads/latest-webinstaller.tar.gz
tar -C / -xvzf latest-webinstaller.tar.gz

4) Now is a good time to let the LinkStation re-boot itself so there's time to execute the next step without interuption.

5) As soon as a reboot occurs, log back into the LinkStation using telnet. Execute this command to perform a 'dry run' of the kernel installation. This just checks to make sure everything will work OK

/usr/local/sbin/webinstaller-kernelinst-dryrun.sh

6) If the above looks OK (takes about 3 minutes to complete), wait for the next reboot, then do the installation for real:

/usr/local/sbin/webinstaller-kernelinst.sh

this will ask you to re-boot when completed.

7) Once re-booted, log back into the LinkStation and execute the following command:

uname -a

and this should reply with a version 2.6 kernal confirmation.

Congratulations! You're now running with OpenLink 051b and the version 2.6 Linux kernel.

References

  1. Upgrade to the 2.6-kernel: The boot process and how to control it
  2. AVR watch-dog daemon for Linkstation
  3. The Linkstation Community Forum / Linkstation HS (ppc) / Beginner's Questions
  4. 4.0 4.1 4.2 The Linkstation Community Forum / Linkstation HS (ppc) / 300GB Home Server Questions
  5. 5.0 5.1 The Linkstation Community Forum / Linkstation HS (ppc) / Patch a HS-D300GL - NFS Server
  6. The Linkstation Community Forum / Linkstation HS (ppc) / HS-D300GL - 5 Min Reboot Returning after shutdown
  7. 7.0 7.1 7.2 Andre's Webinstaller for the Linux Kernel
  8. The LinkStation firmware flasher
  9. HS-D400GL Buffalo Product Page
  10. FAQ: How can I find out which Firmware version my LinkStation has?
{"cc_re__cc_re__cc_by_sa_3_0": ["\"/w/index.php?title=Getting_OpenLink_working_on_a_LS-HS&amp;oldid=8429\" title=\"Permanent link to this revision of the page\">Permanent link</a></li>\n\t\t\t\t\t\t\t\t\t\t\t<li id=\"t-info\"><a href=\"/w/index.php?title=Getting_OpenLink_working_on_a_LS-HS&amp;action=info\">Page information</a></li>\n\t\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t</div>\n\t\t</div>\n\t\t\t</div><!-- end of the left (by default at least) column -->\n\t\t<div class=\"visualClear\"></div>\n\t\t\t\t\t<div id=\"footer\" role=\"contentinfo\">\n\t\t\t\t\t\t<div id=\"f-copyrightico\">\n\t\t\t\t\t\t\t\t\t<a href=\"http://creativecommons.org/licenses/by-sa/3.0/\"><img src=\"http://i.creativecommons.org/l/by-sa/3.0/88x31.png\" alt=\"Attribution-Share Alike 3.0 Unported\" width=\"88\" height=\"31\" /></a>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t<div id=\"f-poweredbyico\">\n\t\t\t\t\t\t\t\t\t<a href=\"//www.mediawiki.org/\"><img src=\"/w/resources/assets/poweredby_mediawiki_88x31.png\" alt=\"Powered by MediaWiki\" width=\"88\" height=\"31\" /></a>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t<ul id=\"f-list\">\n\t\t\t\t\t\t\t\t\t<li id=\"copyright\">Content is available under <a class=\"external\" rel=\"nofollow\" href=\"http://creativecommons.org/lic", "co\">\n\t\t\t\t\t\t\t\t\t<a href=\"http://creativecommons.org/licenses/by-sa/3.0/\"><img src=\"http://i.creativecommons.org/l/by-sa/3.0/88x31.png\" alt=\"Attribution-Share Alike 3.0 Unported\" width=\"88\" height=\"31\" /></a>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t<div id=\"f-poweredbyico\">\n\t\t\t\t\t\t\t\t\t<a href=\"//www.mediawiki.org/\"><img src=\"/w/resources/assets/poweredby_mediawiki_88x31.png\" alt=\"Powered by MediaWiki\" width=\"88\" height=\"31\" /></a>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t<ul id=\"f-list\">\n\t\t\t\t\t\t\t\t\t<li id=\"copyright\">Content is available under <a class=\"external\" rel=\"nofollow\" href=\"http://creativecommons.org/licenses/by-sa/3.0/\">Attribution-Share Alike 3.0 Unported</a> unless otherwise noted.</li>\n\t\t\t\t\t\t\t\t\t<li id=\"privacy\"><a href=\"/wiki/Http://www.nas-central.org/privacy-policy\" title=\"Http://www.nas-central.org/privacy-policy\">Privacy policy</a></li>\n\t\t\t\t\t\t\t\t\t<li id=\"about\"><a href=\"/wiki/NAS-Central_Buffalo_-_The_Linkstation_Wiki:About\" title=\"NAS-Central Buffalo - The Linkstation Wiki:About\">About NAS-Central Buffalo - The Linkstation Wiki</a></li>\n\t\t\t\t\t\t\t\t\t<li id=\"disclaimer\"><a href=\"http://www.nas-central.org/ind"], "copyright__copyright__copyright": ["", " Linkstation Community Forum / Linkstation HS (ppc) / 300GB Home Server Questions\n  5. 5.0 5.1 The Linkstation Community Forum / Linkstation HS (ppc) / Patch a HS-D300GL - NFS Server\n  6. The Linkstation Community Forum / Linkstation HS (ppc) / HS-D300GL - 5 Min Reboot Returning after shutdown\n  7. 7.0 7.1 7.2 Andre's Webinstaller for the Linux Kernel\n  8. The LinkStation firmware flasher\n  9. HS-D400GL Buffalo Product Page\n  10. FAQ: How can I find out which Firmware version my LinkStation has?", " Linkstation Community Forum / Linkstation HS (ppc) / 300GB Home Server Questions\n  5. 5.0 5.1 The Linkstation Community Forum / Linkstation HS (ppc) / Patch a HS-D300GL - NFS Server\n  6. The Linkstation Community Forum / Linkstation HS (ppc) / HS-D300GL - 5 Min Reboot Returning after shutdown\n  7. 7.0 7.1 7.2 Andre's Webinstaller for the Linux Kernel\n  8. The LinkStation firmware flasher\n  9. HS-D400GL Buffalo Product Page\n  10. FAQ: How can I find out which Firmware version my LinkStation has?"]}