From LinkstationWiki
Originally by frontalot and edited
by: nix, jor, flavoie, tklee and moomoo from linkstationwiki.org
(edited more by Ricky Gode)
|
WARNING!
There is a possibility that
you could brick
your LinkStation with these instructions. Please make sure
that you read the entire page carefully. Probably hundreds
of thousands of LinkStation users have sucsessfully flashed
their firmware. Real problems are rare. Typically, problems
are home-made when people don't manage to follow instructions. |
Problems?
The
FAQ covers many common problems.
Caution
|
|
Note: A handful
of users have reported that the update process hangs at the
end. This is a very rare situation! In this situation wait
an extended period of time (perhaps an hour or two) to make
sure the firmware update is really done then power-cycle the
LinkStation. |
Flashing the LinkStation's firmware
Flashing the LinkStation firmware is a straight-forward procedure.
However, there is always the possibility that something could
go wrong and damage your LinkStation in the process. Flashing
your LinkStation with an unofficial firmware will probably void
your warranty. Proceed at your own risk!
Do not attempt to flash your LinkStation if you
- can't afford to lose it
- don't know how to work on a Unix/Linux command
line
- have difficulties following instructions -
e.g. turning off all firewalls
- just want to be cool
- can't stay calm and level-headed when things
go haywire
- can't do some systematic troubleshooting
- Have a Non Flashable HD-HG300
If you think the above is meant as a joke, think
again.
Buffalo's Firmware
Updater
Buffalo Tech provides a tool to run on Windows
that writes new firmware onto a LinkStation. It's called LSupdater.exe
and you can get it by downloading a firmware ZIP: it comes in
the ZIP along with the other firmware files. The firmware updater
only runs under Windows. Users of other operating systems must
manually flash the LinkStation or copy Debian manually to the
hard drive.
OpenLink & FreeLink
This page describes how to install OpenLink and FreeLink software
by flashing a LinkStation, using the firmware updater from Buffalo
Tech.
1 - Preparation
Read these instructions carefully before doing any changes to
your LinkStation. The instructions are organized in a relatively
linear fashion, but you should make sure that you understand why
things are done in a certain way, rather than following the instructions
blindly.
Start by checking the LinkStation firmware version. You can obtain
the version number by calling "Maintenance/System Status" in the
web interface or by running the IP setup software which comes
with the LinkStation. You can also identify the LinkStation firmware
version by checking for a small cable selection switch (below
the red init button) on the back of the LinkStation. Powerpc-hdhlan
LinkStations have such a switch; mipsel-hdhlan and powerpc-hdhglan
LinkStations do not.
If your LinkStation is new, this is also a good time to make
sure that you can connect to the linkstation in all the setups
you intend to use - through a direct cable connection, or through
a router or hub. You should also make sure that your LinkStation
can get an IP address both with and without DHCP - especially
if you are installing FreeLink, since it is configured to use
DHCP by default.
It is also a good idea to try flashing your LinkStation with
the stock firmware. In the case that there is a problem with your
device which results in a failed flash process, it is best to
know of it before voiding your warranty by flashing the unofficial
firmware. Instructions for flashing with the stock firmware are
provided at the bottom of this page.
2 - Download
Download the version of OpenLink or FreeLink for your LinkStation.
Different firmware versions and architectures are NOT interchangeable;
they are for different hardware versions.
- Powerpc-hdhlan LinkStations use powerpc-hdhlan-XXX
firmware,
- mipsel-hdhlan LinkStations use mipsel-hdhlan-XXX
firmware, and
- powerpc-hdhglan LinkStation use powerpc-hdhglan-XXX
firmware.
Carefully read the included README file
for any specific instructions.
Read these instructions again after reading the
README file.
Read the included README file again.
3 - Connect the LinkStation directly
to your computer
Location of cable selection switch on an LS1
To reduce the possibility of serious errors, connect
the LinkStation directly to your PC and disable any firewall(s),
including any built-in Windows firewall. Do not connect
the LS and PC via a router or hub. Use a simple direct cable connection.
Users with powerpc-hdhlan LinkStations must activate the cable
selection switch by moving it down (there is a little "x" icon).
Make sure the LinkStation and your PC are on the
same sub-network. This likely requires that you change the IP
address (and probably the subnet-mask) of your PC to a different
(and static) IP address (see the README file for the
subnet).
4 - Flashing your device: The moment
of truth
Before doing anything else, check again that you disabled all
firewalls. Yes, we mean it. Disable anything which can interfere
with the communication. Your linkstation should now be directly
connected to your completely unfirewalled PC with a good CAT5
cable. Both should be securely connected to your power outlet.
Run the firmware updater executable (HD-HLAN FWUpdate.exe
for the powerpc-hdhlan and mipsel-hdhlan, HD-HGLAN FWUpdate.exe
for the powerpc-hdhglan, HS-DGL FWUpdate.exe for the
powerpc-hsdgl). Do not disconnect the LinkStation or in any other
way interrupt the flash process. Interrupting the flash process
can result in serious damage to your LinkStation!
CAUTION! If you experience problems
loading the updater (e.g. no dialogue box appears), try creating
a shortcut, right click, properties, check the compatibility mode
for Windows 2000.
After finding your LinkStation, press the "Renew
Firmware" button, and wait. Have patience, and keep your calm.
If you think the Firmware updater is acting strange, do not try
to disconnect the LinkStation or abort the update in another way.
- A few users have reported that the flash
process hangs at the end. In this situation wait an extended
period of time (perhaps an hour or two) to make sure the firmware
update is really done, then press the power button to turn off
the LinkStation.
- Some users have reported that when installing
FreeLink, the updater finishes flashing, but then displays a
"Firmware update failed" message (on a HD-HGLAN300 at least),
even if the update actually succeeded. This is most likely because
the LinkStation reboots, and FreeLink does not fall back on
the default IP when it cannot get a DHCP address. However, there
should not be any required steps to perform after the reboot.
If you see this message, press the OK button, exit the firmware
flasher, and then press the power button to turn off the LinkStation.
- Some users have suggested that if you do
have a stable hub/switch/router on your network, it is in fact
OK to flash through the router. This should prevent the "Firmware
update failed" message from appearing when installing FreeLink.
You could try this approach (at your own risk of course), and
report back. In any case, do not flash through a wireless
connection, it is much too unstable.
After the flash process has completed, press the
power button to turn off the LinkStation before proceeding to
the next step.
5 - Communicating with your newly
flashed LinkStation
You now need to change the network connection to the setup you
intend to use, before communicating with your newly flashed Linkstation.
Powerpc-hdhlan LinkStation users will need to return the crossover
switch to its original position. Then reconnect the LinkStation
and PC to your Router
(device in a network that handles message transfer between
computers) or Hub
(device used to connect several computers together), and
change your PC's settings to the original configuration.
OpenLink(LS1,LS2,HG) and FreeLink-PowerPC(LS1,HG)
Use a Telnet
(insecure communications protocol used for remote access to
a host) client (we recommend PuTTYtel)
to connect to the LinkStation. You will be at the root shell.
Set the terminal emulation in your Telnet and SSH client to VT102,
because the OpenLink Busybox vi editor uses hard-coded
VT102 escape-sequences. If your client doesn't support VT102,
you can instead use a VT100, ANSI, xterm,
suncmd, dtterm or e.g. hpterm emulation.
Or change to a better terminal emulator.
After establishing communications with your newly flashed LinkStation,
you must secure your LinkStation and ensure that it requires a
password for login. However, before you do so, it is imperative
that you change the root password, since the default root password
is unknown to the LinkStation community. Type the following at
the command prompt, and then enter a new password:
FreeLink-MIPSel(LS2)
The MIPSel version of FreeLink does not have telnet
enabled as a default but rather SSH.
You will have to use a SSH client (for Windows we reccomend PuTTY).
Open a SSH session to: 192.168.11.150
(it has a static IP)
Then login:
|
login
as: root
Using keyboard-interactive authentication.
Password: freelink |
6 Terminal Server
6A - Configuring SSH
with OpenLink/Dropbear
If you are installing OpenLink, and if you want to use
SSH
(SSH provides secure shell for encrypted communications between
two hosts) you can use Dropbear, which is installed with OpenLink
and is ready for use. There are other SSH daemons available for
your LinkStation such as OpenSSH,
which you can also use, if you prefer. Again, for a client application,
we recommend PuTTY)
To use dropbear, you need to create the appropriate SSH keys,
and then start the Dropbear daemon:
|
dropbearkey
-t dss -f /etc/dropbear/dropbear_dss_host_key
dropbearkey -t rsa -f /etc/dropbear/dropbear_rsa_host_key
/etc/init.d/dropbear start |
Make sure that SSH is fully operational, and that you can use
it to login to your LinkStation. Reboot your LinkStation, to make
sure that the SSH daemon starts automatically and successfully
after the LinkStation is turned on.
Once you've fully tested you can get in
via SSH, disable the utelnetd startup link (Make sure you test
this properly in case something goes wrong and you have no shell
access):
|
chmod
0644 /etc/init.d/S05utelnetd |
Note: If that file doesn't exist try this:
|
rm
/etc/rc.d/rc2.d/S05utelnetd |
6B - Configuring utelnetd with OpenLink
If you do not want to use SSH, use vi
to adjust the utelnetd startup script, so that the Telnet daemon
asks for login details when you connect to the LinkStation (see
Vi text editor tutorial if you need help with the vi
editor). At the command prompt write:
Change:
|
/sbin/utelnetd -l /bin/bash &
|
to
|
/sbin/utelnetd -l /bin/login &
|
Before rebooting, create a non-root-account, (i.e. normal
user), using the default LinkStation Web Admin pages. Now test
your login via Telnet or SSH before you reboot. Even if you leave
telnet open, if things have gone wrong you won't be able to log
in as root after the reboot.
6C - Configuring SSH with FreeLink/OpenSSH
If you are installing Freelink, the sshd_config installed
by doing an
has PasswordAuthentication set to no,
meaning you can't log in with a password. Personally I set that
to yes. Otherwise, you need to generate some keys. PermitRootLogin
is set to yes, so once done, you can log in directly as root if
you insist. Once you're done with all this, restart the sshd service
(perhaps using:)
and verify you can log in successfully.
There is more information on configuring OpenSSH,
and on general Freelink configuration: Freelink
- Convert the LinkStation into a Full-fledged Debian Linux Server.
7 - Setting up a connection to the
Internet
After making absolutely sure that you will be able to
connect (with Telnet or SSH) after your configuration changes,
reboot your LinkStation.
Since it is more than likely you will want to download items
from the web onto your Linkstation, you should log in again and
set up a connection to the Internet.
If you just installed Freelink, your Linkstation should now be
configured to use DHCP. For more information, both on DHCP and
on static IP configuration, look at the separate articles on installing
Freelink(Debian) using flash and on installing
Debian through a manual disk-to-disk copy.
If you are using OpenLink, and your LinkStation is connected
to a Router then edit:
append a line:
where <IP> is the IP Address of your
router - for example:
Stock Firmware
1 - Check the LinkStation firmware
version
You can obtain the version number by calling "Maintenance/System
Status" in the web interface or by running the IP setup software
which comes with the LinkStation. You also can identify the LinkStation
firmware version by checking for a small cable selection switch
(below the red init button) on the back of the LinkStation. Powerpc-hdhlan
LinkStations have such a switch; mipsel-hdhlan and powerpc-hdhglan
LinkStations do not.
- Powerpc-hdhlan LinkStations use 1.x firmware
- Mipsel-hdhlan LinkStations use 2.x firmware.
- Powerpc-hdhglan LinkStation also uses 1.x firmware
but features gigabit ethernet connectivity.
Different firmware versions and architectures
are NOT interchangeable; they are for different hardware
versions.
2 - The firmware updater
only runs under Windows. Users of other operating systems must
manually flash the LinkStation.
3 - Reduce the possibility of serious
errors
connect the LinkStation directly to your PC and disable any firewall(s),
including the Windows XP firewall. Users with powerpc-hdhlan
LinkStations must activate the cable selection switch by moving
it down (there is a little "x" icon)
4 - Make sure the LinkStation and
your PC are on the same sub-network
5 - Run the firmware updater executable
(HD-HLAN FWUpdate.exe for the powerpc-hdhlan and mipsel-hdhlan,
HD-HGLAN FWUpdate.exe for the powerpc-hdhglan, HS-DGL
FWUpdate.exe for the powerpc-hsdgl). Do not disconnect the
LinkStation or in any other way interrupt the flash process. Interrupting
the flash process can result in serious damage to your LinkStation!
CAUTION! If you experience problems
loading the updater (e.g. no dialogue box appears), try creating
a shortcut, right click, properties, check the compatibility mode
for Windows 2000.
6 - Crossover Switch
Powerpc-hdhlan LinkStation users will need to return the crossover
switch to its original position. Then reconnect the LinkStation
to your {:router:device in a network that handles message transfer
between computers} or {:hub:device used to connect several computers
together}.