Difference between revisions of "Upgrade (or replace) the existing LinkStation hard drive"

From NAS-Central Buffalo - The Linkstation Wiki
Jump to: navigation, search
Line 1: Line 1:
{{Template:Articles|Rescue-Backup}}
+
{{Template:Articles|Rescue-Backup|General|Hardware}}
''<font color=red><small>
+
<font color=red><small>This article based on work by DC and frontalot. Originally by frontalot at Linkstationwiki.org</small></font><br>
This article  
+
=Methods=
Based on work by DC and frontalot.
+
There are two methods on how to go about this
Originally by frontalot.
+
#'''Backup your entire hard drive, partition a blank drive on a Knoppix workstation''' - then use it to to restore your backup then reinsert drive in Linkstation
at Linkstationwiki.org
+
#'''Use the Firmware updater to create partitions and flash the firmware'''
</small></font>''<br>
+
{{Postit|An easier method | You don't need to do any of the following if you run the firmware updater ([[Recover a non working "bricked" Linkstation]]) it will automatically create the necessary partitions. When you boot the LS up for the first time, the disk full LED will flash, this is the LS creating the partitions, wait until the flashing stops, then run the firmware update (you may need to run it twice as the first may fail). The following instructions are intended for people who wish to preserve their existing data.}}
+
1. Start by making a backup of your existing hard drive. See [[Articles/GeneralBackup]] for instructions on how to perform a backup.
+
  
2. Download a Knoppix bootable Linux CD (see [http://www.knoppix.org Knoppix] or possibly [http://www.damnsmalllinux.org/ Damn Small Linux](not tried)), place the new hard drive in a workstation, and boot using the Knoppix CD.
 
  
3. Now you need to partition the hard drive according to your needs (replacing "x" with whatever letter you have installed the hard drive as):
+
==Backup your entire hard drive, partition a blank drive on a Knoppix workstation==
  
fdisk /dev/hdx
 
  
4. The standard LinkStation setup uses 3 partitions, hda1 (main ~ 400MB), hda2 (swap ~ 300MB), and hda3 (mount ~ remaining). If you want a larger main partition you should do so at this time. Restore your backup:
+
===Backup Data===
 +
Start by making a backup of your existing hard drive: [[Create a perfect backup of the LinkStation filesystem]].
 +
===Download Knoppix==
 +
Download a [[w:Knoppix|Knoppix]] bootable Linux CD (see [http://www.knoppix.org Knoppix] or possibly [http://www.damnsmalllinux.org/ Damn Small Linux](not tried)), place the new hard drive in a workstation, and boot using the Knoppix CD.
  
dd if=/mnt/whatever/hda1.bin of=/dev/hda1
+
===Partition Hard Drive===
 +
Now you need to partition the hard drive according to your needs (replacing <font color=red>x</font> with whatever letter you have installed the hard drive as):
  
5. You must run fix_ext2_magic, check for errors, and resize the backup image if you created a larger main partition:
+
fdisk /dev/hd<font color=red>x</font>
  
 +
The standard LinkStation setup uses 3 partitions:
 +
*<tt>hda1 (main ~ 400MB)</tt>
 +
*<tt>hda2 (swap ~ 300MB)</tt>
 +
*<tt>hda3 (mount ~ remaining)</tt>
 +
If you want a larger main partition you should do so at this time.
 +
 +
===Restore your backup===
 +
Restore your backup first
 +
dd if=/mnt/whatever/hda1.bin of=/dev/hda1
 +
You must run fix_ext2_magic, check for errors, and resize the backup image if you created a larger main partition:
 
  ./fix_ext2_magic --fix /dev/hdx1
 
  ./fix_ext2_magic --fix /dev/hdx1
 
  e2fsck /dev/hdx1
 
  e2fsck /dev/hdx1
 
  resize2fs /dev/hdx1
 
  resize2fs /dev/hdx1
 
+
You may have to use the force option (-f) if resize2fs complains about not running e2fsck.  
6. You may have to use the force option (-f) if resize2fs complains about not running e2fsck. Next create the ext2 filesystem and swap partition. You can turn off drive checking since we are using ext2 with journaling:
+
===Create the ext2 filesystem and swap partition===
 
+
You can turn off drive checking since we are using ext2 with journaling:
 
  mke2fs -j /dev/hdx3
 
  mke2fs -j /dev/hdx3
 
  tune2fs -c0 -i0 /dev/hdx2
 
  tune2fs -c0 -i0 /dev/hdx2
 
  mkswap /dev/hdx2
 
  mkswap /dev/hdx2
 +
===Reboot===
 +
Place the hard drive in the LinkStation and reboot. Be patient as the first boot may take longer than normal.
  
7. Place the hard drive in the LinkStation and reboot. Be patient as the first boot may take longer than normal.
+
<small>Some of this information courtesy of http://www.geishuettner.de/docs/Linkstation/ </small>
 
+
Some of this information courtesy of http://www.geishuettner.de/docs/Linkstation/.
+
 
+
 
+
[[Category:General]]
+
  
[[Category:Hardware]]
+
==Use the Firmware updater to create partitions and flash the firmware==
[[Category:Howto]]
+
===Backup Data===
 +
Backup the data that you want to save either by copying it off of your LinkStation using [[Samba]] or [[w:FTP|FTP]] a [[w:USB|USB]] drive or use these backup instructions: [[Create a perfect backup of the LinkStation filesystem]].
 +
{{Reconnect disk to LS and flash firmware}}

Revision as of 02:24, 11 October 2006

This article based on work by DC and frontalot. Originally by frontalot at Linkstationwiki.org

Contents

Methods

There are two methods on how to go about this

  1. Backup your entire hard drive, partition a blank drive on a Knoppix workstation - then use it to to restore your backup then reinsert drive in Linkstation
  2. Use the Firmware updater to create partitions and flash the firmware


Backup your entire hard drive, partition a blank drive on a Knoppix workstation

Backup Data

Start by making a backup of your existing hard drive: Create a perfect backup of the LinkStation filesystem.

=Download Knoppix

Download a Knoppix bootable Linux CD (see Knoppix or possibly Damn Small Linux(not tried)), place the new hard drive in a workstation, and boot using the Knoppix CD.

Partition Hard Drive

Now you need to partition the hard drive according to your needs (replacing x with whatever letter you have installed the hard drive as):

fdisk /dev/hdx

The standard LinkStation setup uses 3 partitions:

  • hda1 (main ~ 400MB)
  • hda2 (swap ~ 300MB)
  • hda3 (mount ~ remaining)

If you want a larger main partition you should do so at this time.

Restore your backup

Restore your backup first

dd if=/mnt/whatever/hda1.bin of=/dev/hda1

You must run fix_ext2_magic, check for errors, and resize the backup image if you created a larger main partition:

./fix_ext2_magic --fix /dev/hdx1
e2fsck /dev/hdx1
resize2fs /dev/hdx1

You may have to use the force option (-f) if resize2fs complains about not running e2fsck.

Create the ext2 filesystem and swap partition

You can turn off drive checking since we are using ext2 with journaling:

mke2fs -j /dev/hdx3
tune2fs -c0 -i0 /dev/hdx2
mkswap /dev/hdx2

Reboot

Place the hard drive in the LinkStation and reboot. Be patient as the first boot may take longer than normal.

Some of this information courtesy of http://www.geishuettner.de/docs/Linkstation/

Use the Firmware updater to create partitions and flash the firmware

Backup Data

Backup the data that you want to save either by copying it off of your LinkStation using Samba or FTP a USB drive or use these backup instructions: Create a perfect backup of the LinkStation filesystem.

Connect disk to LS and flash firmware

  • power on LS (Reset button not pressed)
  • Using The LinkStation firmware flasher, you could flash OpenLink, FreeLink or the Stock Firmware.
  • Open the archive and carefully read the included README file for any specific instructions.
  • Disable any firewall(s), including any built-in Windows firewall
  • If you are running some virus checker or worm detection software, disable this also
  • 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 and router to a different IP address in EM Mode it will have a static IP address of 192.168.11.150 or to connect your PC and LinkStation directly with a crossover cable.
  • unpack HD-H*.zip (use the proper firmware for your LS)
  • start HD-H*FWUpdate.exe (use the proper updater for your LS)
GeneralFreeLink1.jpg
  • press "search", should find Linkstation "EM" (Emergency Mode)
  • 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.
  • start update, following messages appear:
Settings are being saved
Firmware is being transmitted
LinkStation Firmware has been renewed
Settings are being restored
  • if You get the following message You are done.
The firmware has been renewed
  • But because the reformatting and partitioning takes too long, the Diskfull LED may blink or you can hear the disk being active (withoug LED indication).

Then you will get:

Attempt to renew firmware has failed
  • if so, wait until Diskfull LED goes off or the disk activity stops after some minutes.
  • press "search" again.
  • start update again.
  • after all the other messages You should get this time:
The firmware has been renewed
  • After flashing connect your LinkStation up to the network with subnet 192.168.1.XXX the LS is now reachable via telnet and the "old" IP. so switch back IP settings and reenable the windows firewall.

Login to the LinkStation

  • Find your LinkStation on the network and Telnet to it with PuTTYtel You will be at the root shell prompt:
telnet linkstation
  • set root password:
passwd
  • change bash to login:
vi /etc/init.d/telnet
  • add a new guest user
useradd -m -d /home/guest guest

Reboot

Be patient as the first boot may take longer than normal.