Difference between revisions of "Revive your arm9 box from scratch"

From NAS-Central Buffalo - The Linkstation Wiki
Jump to: navigation, search
m
 
(32 intermediate revisions by 13 users not shown)
Line 1: Line 1:
 +
{{Articles|LSLive|LSPro|Rescue-Backup|TerastationLive|TerastationProV2}}
 
= About =
 
= About =
The Uboot Bootloader is the ONLY thing in flash on this boxes. Most boot problems therefore are related to messed up HDDs. As long as it is working you can always revive your box via tftp from scratch. Even with (a) completely blank HDDs. If you encounter the problem that tftp does not work anymore your only chance might be JTAG for revival.  
+
The Uboot Bootloader is the ONLY thing in flash on this boxes (the Kurobox Pro is an exception here with its 256 MB NAND flash). Most boot problems therefore are related to messed up HDDs. As long as it is working you can always revive your box via tftp from scratch. Even with (a) completely blank HDD(s). If you encounter the problem that tftp does not work anymore your only chance might be JTAG for revival.  
 
<br><br>'''''This guide should help you in the quest of reviving your arm9 box as long as your Bootloader is still working properly.'''''
 
<br><br>'''''This guide should help you in the quest of reviving your arm9 box as long as your Bootloader is still working properly.'''''
  
 +
{| align="center" width="80%" style="border: 2px dashed #FF0000; background-color: Lemonchiffon; padding: 10px"
 +
|-
 +
|align="left" width="99%"|<center><big>'''NOTE:'''</big></center>
 +
<p><center>This procedure has been found not to work on some LS Live v2 boxes (or more) as its dependant on uboot being programmed to request tftp kernel/initrd.  YMMV</center></p>
 +
|}
  
 
= General Procedure =
 
= General Procedure =
'''1.''' Download and install tftpd server
+
==1) Get TFTP Server + Kernel and initrd + Firmware==
 +
* Download the appropriate TFTP Boot program from Buffalo's FTP site (road runner cable modem!!) ftp://{{Buffalo FTP IP}}/array1/share/nas-recovery
 +
::The TFTP Boot program contains an TFTP server for Windows, the Kernel and initrd for the Buffalo.
 +
::If there is no recovery pack for your box, you may [[Build your own NAS recovery|build your own]].
 +
* Also download the firmware from Buffalo's website http://www.buffalotech.com/support/downloads/
  
'''2.''' Install [http://www.java.com/ java]
+
Note: If you also have troubles with the previous mentioned website where you can get the TFTP Boot program from, try connecting to it using a FTP client (and thus not your browser). You will find the connection stable and reliable.
  
'''3.''' Download [http://downloads.linkstationwiki.net/TOOLS/ALL_LS_KB_ARM9/ACP_COMMANDER/acp_commander.jar acp_commander.jar] to the directory of your choice. Checkout the [http://downloads.linkstationwiki.net/TOOLS/ALL_LS_KB_ARM9/ACP_COMMANDER/README.TXT readme].
+
==2) Configure Nics==
 +
*Connect the Buffalo directly to a computer.
 +
*Set the IP address of the computer to '''192.168.11.1'''
 +
==3) Boot The Unit==
 +
{|border=0
 +
|-
 +
|
 +
*Launch the TFTP Boot program.
 +
:Make sure is says is is ''Listening On: 192.168.11.1''
 +
::If it is not listening on 192.168.11.1, then it does not see the network adapter as being active. So either briefly power the NAS on, and restart the TFTP Boot program, then power off the Buffalo. Or try using a hub or a router.
 +
*Power on the Buffalo
 +
*The TFTP Boot Program should say that two files where pulled - '''initrd.buffalo''' and '''uImage.buffalo'''
 +
:It should only take ~30 seconds for the boot loader to pull these two files. If it takes longer than 2 minutes then the boot loader is not going to pull the files and you need to look at [[Building_a_JTAG_Interface|JTAG]] recovery.
 +
*If the box is stuck permanently pulling the '''initrd.buffalo''' and '''uImage.buffalo''' files over and over again or simply fails to appear in LSUpdate checkout the troubleshooting section below.
 +
|[[Image:Buffalo TFTP Boot After.png|right|thumb|TFTP Boot]]
 +
|-
 +
|}
  
'''3.''' Download the proper firmware package for your box. Always start with the stock firmware.
+
==4) Update Firmware==
 +
{|border=0
 +
|-
 +
|
 +
*If the Buffalo pulled the kernel and initrd from TFTP, wait till the power led is green.
 +
*Modify the lsupdater.ini files, which is included in the firmware update.
 +
:Add the following lines to the bottom of the file
 +
[specialflags]
 +
debug = 1
 +
*Launch the firmware updater - which can be downloaded off Buffalo's website http://www.buffalotech.com/support/downloads/
 +
*Right-Click on the two golden rings in the top left hand corner of the updater, and select debug.
 +
:In the config section of the window that opens - select ''Do not check version'', ''Delete user-config'', and ''Force Update''
 +
*Finally Update Firmware
 +
|[[Image:LSUpdater debug option.jpg|right|thumb|Debug Options]]
 +
|-
 +
|}
  
'''4.''' Unpack the firmware package
+
==5) If upgrading the drive, or if step 4 fails ==
  
'''5.''' There are 2 files inside that need to be served via tftp
+
<big>Warning: This will format the data partition</big>
Rename the ''initrd.img'' to initrd.zip and unzip it to get the ''initrd.buffalo''. <br>
+
you need to provide one of this 4 passwords:<br>
+
1NIf_2yUOlRDpYZUVNqboRpMBoZwT4PzoUvOPUp6l
+
aAhvlM1Yp7_2VSm6BhgkmTOrCN1JyE0C5Q6cB3oBB
+
YvSInIQopeipx66t_DCdfEvfP47qeVPhNhAuSYmA4
+
IeY8omJwGlGkIbJm2FH_MV4fLsXE8ieu0gNYwE6Ty
+
The ''uImage.buffalo'' is directly there...copy both to the folder which is server via the tftpd server.
+
  
'''6.''' Directly connect the Box to your computer or connect it via a switch. Do not connect it via a router. It won`t work as we are changing the IP in the next step.
+
*Run the same firmware updater, and go to the Debug options and additionally check the following:
 +
:Rebuild partition table
 +
This should return your NAS to out of the box conditions.
  
'''7.''' Change the IP (or only one IP if you have several NICs) of your computer to 192.168.11.1
+
= Troubleshooting =
  
'''8.''' Disable all firewalls and start the tftpd-server (so it binds to the new IP)
+
If the box is stuck permanently pulling the '''initrd.buffalo''' and '''uImage.buffalo''' files over and over again or simply fails to appear in LSUpdate extract the HD as described below and connect it a PC running Linux - Knoppix is ideal for the purpose if you typically use windows.
 +
:Mount the first partition (where the kernel and initrd live) as root and delete the contents replacing the capital X in the command below with the appropriate letter. This is system dependent so check the output of dmesg to discover which one it is:
 +
<pre>
 +
mkdir ~/boot
 +
mount /dev/sdX1 /root/boot
 +
rm -rf /root/boot/*
 +
</pre>
 +
:Download the Buffalo firmware for the device. We need to copy uImage.buffalo and initrd.img to /root/boot.
 +
:The final step is to unzip initrd.img from inside /root/boot (it is a zip file, it is just in disguise!).
 +
<pre>
 +
cd /root/boot
 +
unzip initrd.img
 +
</pre>
 +
:The password is one of these:
 +
<pre>
 +
1NIf_2yUOlRDpYZUVNqboRpMBoZwT4PzoUvOPUp6l
 +
aAhvlM1Yp7_2VSm6BhgkmTOrCN1JyE0C5Q6cB3oBB
 +
YvSInIQopeipx66t_DCdfEvfP47qeVPhNhAuSYmA4
 +
IeY8omJwGlGkIbJm2FH_MV4fLsXE8ieu0gNYwE6Ty
 +
</pre>
 +
:For example, the LS Pro's password is YvSInIQopeipx66t_DCdfEvfP47qeVPhNhAuSYmA4
  
'''9.''' Start your arm9-box. If your box is requesting the uImage.buffalo (Linux-kernel) and the initrd.buffalo (ramdisk for Emergency Mode) then your bootloader is ok. If there is not even a tftp-request then your bootloader is dead maybe. Check your IP Settings again. If the box is requesting continously the files there maybe something wrong with them or they were made for a different box.
+
:Recommended: Format the second partition of the NAS as ext3. This can be done using GParted (Ubuntu 10.10 LiveCD has it within the Admin menu already).  
  
'''10.''' Modify the lsupdater.ini, add the following
+
:Reinsert the HDD and reboot the box - it should now boot to EM mode correctly (or sometimes to the original state depending what you did to get here) and appear in the updater ready for the firmware of your choice.
[SpecialFlags]
+
Note that you can use this method to install Freelink or other firmwares manually however they will not appear to the buffalo updater so be sure to get them right. It might be better to install the buffalo firmware and use the updater according to the correct instructions than follow this route.
Debug = 1
+
Also modify this
+
[Flags]
+
VersionCheck = 1
+
to
+
[Flags]
+
VersionCheck = 0
+
Normally the updater does not even find the box if it uses the same firmware which should be flashed.....this flag disables this behaviour.
+
  
'''11.''' Your box should be visible in the Firmware updater now. Even better you should be able to get into debug mode of the firmware updater(either LSUpdater.exe or TSUpdater.exe) by left-clicking the 2 rings in the top left of the window. In any case i recommend to uncheck "Update BOOT" there. It is the only thing that can severly brick your box if a power cut happens.<br><br>
+
= Box Specific Hints =
''Now it depends what you want to do:''<br>
+
== LS Pro, Old LS Live ==
'''a)''' If you have data on your box and you just want to reflash then check
+
If you have a arm9-Linkstation and you tried '''Step 4''' and if '''Step 5''' is no choice because you have valuable data on the box then you need to recover the data before.
Update ROOTFS
+
Update INITRD
+
UPDATE KERNEL
+
Force Update
+
  
If the update is still not working try using acp_commanger by opening a command (prompt) window and running the following command from the same directory as the acp_commander.jar file (after booting via tftp to EM again):
+
===HD removal===
java -jar acp_commander.jar -t 192.168.11.150 –cb
+
'''1.''' Disassemble your box:<br>
 +
[[Disassemble_the_LS_Pro|LS Pro & LS Live v1]]<br>
  
 +
'''2.''' Connect the hdd to a workstation running Linux. Knoppix for example is recommended as you can boot it directly from CD/DVD.
  
'''b)''' In case you want to setup a blank hdd from scratch or '''a)''' did not work check
+
'''3.''' If the HDD isn`t defective then the partitions should even be mounted automatically.
Update ROOTFS
+
Update INITRD
+
UPDATE KERNEL
+
Do not check version
+
Rebuild partition table
+
Delete user-config
+
Force Update
+
  
These even rebuilds /boot from scratch. Notice that the HDD is repartitioned to the stock partitions and all data on the box might be lost.
+
'''4.''' Backup your data (most easiest if you connect a second hdd for backup)
Anyway, your box will be in stock condition afterwards!
+
  
= Box Specific Hints =
+
'''5.''' Now try '''Step 5''' from the general instructions.
== LS Pro, LS Live ==
+
If you have a arm9-Linkstation and you tried '''11a.''' and if '''11b.''' is no choice because you have valueable data on the box then you need to recover the data before.
+
  
 +
'''6.''' In case even '''Step 5''' did not work then you can rebuild the partitions from scratch.
 +
Look at [[Custom_Partitions_on_the_LS_Pro]] for instructions.
 +
 +
== LS Live v2 ==
 +
'''SEVERAL BOXES were bricked by flashing the stock firmwares. use the 2.06 for unbricking!'''
 +
'''Followup to the above warning - schurl85 used 2.10 with success, as 2.06 was unavailable for him.  Read more here: [http://buffalo.nas-central.org/forums/viewtopic.php?f=39&t=11746| Bricked LSLiveV2 ]
 +
 +
 +
If you have a arm9-Linkstation and you tried '''Step 4''' and if '''Step 5''' is no choice because you have valuable data on the box then you need to recover the data before.
 +
 +
===HD removal===
 
'''1.''' Disassemble your box:<br>
 
'''1.''' Disassemble your box:<br>
[[Disassemble_the_LS_Pro|LS Pro & LS Live v1]]<br>
 
 
[[Disassemble_the_LS_Live_v2|LS Live v2]]<br>
 
[[Disassemble_the_LS_Live_v2|LS Live v2]]<br>
  
Line 81: Line 127:
 
'''4.''' Backup your data (most easiest if you connect a second hdd for backup)
 
'''4.''' Backup your data (most easiest if you connect a second hdd for backup)
  
'''5.''' Now try '''11b''' from the general instructions.
+
'''5.''' Now try '''Step 5''' from the general instructions.
  
'''6.''' In case even '''11b''' did not work then you can rebuild the partitions from scratch.
+
'''6.''' In case even '''Step 5''' did not work then you can rebuild the partitions from scratch.
 
Look at [[Custom_Partitions_on_the_LS_Pro]] for instructions.
 
Look at [[Custom_Partitions_on_the_LS_Pro]] for instructions.
  
 
== Terastation Pro v2, Terastation Live ==
 
== Terastation Pro v2, Terastation Live ==
If you have a arm9-terastation and you tried '''11a.''' and if '''11b.''' is no choice because you have valueable data on the box then you need to recover the data before.
+
If you have a arm9-terastation and you tried '''Step 4''' and if '''Step 5''' is no choice because you have valueable data on the box then you need to recover the data before.
  
 
Look at [http://www.terastation.org/wiki/Data_Recovery Manual Recovery on a seperate computer].
 
Look at [http://www.terastation.org/wiki/Data_Recovery Manual Recovery on a seperate computer].
  
After you recovered the data try '''11b.'''
+
After you recovered the data try '''Step 5.'''
  
 
In case even the "Rebuild Partition Table" Option does not help follow this steps to rebuild the partitions on all HDDs:
 
In case even the "Rebuild Partition Table" Option does not help follow this steps to rebuild the partitions on all HDDs:
Line 150: Line 196:
  
 
'''15.''' Your TSP should boot normally and you should see Loading Kernel on the LCD display, try running the TSUpdater again.
 
'''15.''' Your TSP should boot normally and you should see Loading Kernel on the LCD display, try running the TSUpdater again.
 
+
'''15a.''' In case of LiveStation box, it will get into the EM mode. Use acp_commander.jar to get telnet access to the system. Execute /usr/local/bin/chghddroot and than reboot. This should enable the system to come out of the EM mode.
 
'''16.''' If you are still having problems, rebuild all remaining TSP disk in the same manner. Then run TSUpdater again.
 
'''16.''' If you are still having problems, rebuild all remaining TSP disk in the same manner. Then run TSUpdater again.

Latest revision as of 21:29, 11 January 2013

Contents

About

The Uboot Bootloader is the ONLY thing in flash on this boxes (the Kurobox Pro is an exception here with its 256 MB NAND flash). Most boot problems therefore are related to messed up HDDs. As long as it is working you can always revive your box via tftp from scratch. Even with (a) completely blank HDD(s). If you encounter the problem that tftp does not work anymore your only chance might be JTAG for revival.

This guide should help you in the quest of reviving your arm9 box as long as your Bootloader is still working properly.

NOTE:

This procedure has been found not to work on some LS Live v2 boxes (or more) as its dependant on uboot being programmed to request tftp kernel/initrd. YMMV

General Procedure

1) Get TFTP Server + Kernel and initrd + Firmware

The TFTP Boot program contains an TFTP server for Windows, the Kernel and initrd for the Buffalo.
If there is no recovery pack for your box, you may build your own.

Note: If you also have troubles with the previous mentioned website where you can get the TFTP Boot program from, try connecting to it using a FTP client (and thus not your browser). You will find the connection stable and reliable.

2) Configure Nics

  • Connect the Buffalo directly to a computer.
  • Set the IP address of the computer to 192.168.11.1

3) Boot The Unit

  • Launch the TFTP Boot program.
Make sure is says is is Listening On: 192.168.11.1
If it is not listening on 192.168.11.1, then it does not see the network adapter as being active. So either briefly power the NAS on, and restart the TFTP Boot program, then power off the Buffalo. Or try using a hub or a router.
  • Power on the Buffalo
  • The TFTP Boot Program should say that two files where pulled - initrd.buffalo and uImage.buffalo
It should only take ~30 seconds for the boot loader to pull these two files. If it takes longer than 2 minutes then the boot loader is not going to pull the files and you need to look at JTAG recovery.
  • If the box is stuck permanently pulling the initrd.buffalo and uImage.buffalo files over and over again or simply fails to appear in LSUpdate checkout the troubleshooting section below.
TFTP Boot

4) Update Firmware

  • If the Buffalo pulled the kernel and initrd from TFTP, wait till the power led is green.
  • Modify the lsupdater.ini files, which is included in the firmware update.
Add the following lines to the bottom of the file
[specialflags]
debug = 1
In the config section of the window that opens - select Do not check version, Delete user-config, and Force Update
  • Finally Update Firmware
Debug Options

5) If upgrading the drive, or if step 4 fails

Warning: This will format the data partition

  • Run the same firmware updater, and go to the Debug options and additionally check the following:
Rebuild partition table

This should return your NAS to out of the box conditions.

Troubleshooting

If the box is stuck permanently pulling the initrd.buffalo and uImage.buffalo files over and over again or simply fails to appear in LSUpdate extract the HD as described below and connect it a PC running Linux - Knoppix is ideal for the purpose if you typically use windows.

Mount the first partition (where the kernel and initrd live) as root and delete the contents replacing the capital X in the command below with the appropriate letter. This is system dependent so check the output of dmesg to discover which one it is:
mkdir ~/boot
mount /dev/sdX1 /root/boot
rm -rf /root/boot/*
Download the Buffalo firmware for the device. We need to copy uImage.buffalo and initrd.img to /root/boot.
The final step is to unzip initrd.img from inside /root/boot (it is a zip file, it is just in disguise!).
cd /root/boot
unzip initrd.img
The password is one of these:
1NIf_2yUOlRDpYZUVNqboRpMBoZwT4PzoUvOPUp6l
aAhvlM1Yp7_2VSm6BhgkmTOrCN1JyE0C5Q6cB3oBB
YvSInIQopeipx66t_DCdfEvfP47qeVPhNhAuSYmA4
IeY8omJwGlGkIbJm2FH_MV4fLsXE8ieu0gNYwE6Ty
For example, the LS Pro's password is YvSInIQopeipx66t_DCdfEvfP47qeVPhNhAuSYmA4
Recommended: Format the second partition of the NAS as ext3. This can be done using GParted (Ubuntu 10.10 LiveCD has it within the Admin menu already).
Reinsert the HDD and reboot the box - it should now boot to EM mode correctly (or sometimes to the original state depending what you did to get here) and appear in the updater ready for the firmware of your choice.

Note that you can use this method to install Freelink or other firmwares manually however they will not appear to the buffalo updater so be sure to get them right. It might be better to install the buffalo firmware and use the updater according to the correct instructions than follow this route.

Box Specific Hints

LS Pro, Old LS Live

If you have a arm9-Linkstation and you tried Step 4 and if Step 5 is no choice because you have valuable data on the box then you need to recover the data before.

HD removal

1. Disassemble your box:
LS Pro & LS Live v1

2. Connect the hdd to a workstation running Linux. Knoppix for example is recommended as you can boot it directly from CD/DVD.

3. If the HDD isn`t defective then the partitions should even be mounted automatically.

4. Backup your data (most easiest if you connect a second hdd for backup)

5. Now try Step 5 from the general instructions.

6. In case even Step 5 did not work then you can rebuild the partitions from scratch. Look at Custom_Partitions_on_the_LS_Pro for instructions.

LS Live v2

SEVERAL BOXES were bricked by flashing the stock firmwares. use the 2.06 for unbricking! Followup to the above warning - schurl85 used 2.10 with success, as 2.06 was unavailable for him. Read more here: Bricked LSLiveV2


If you have a arm9-Linkstation and you tried Step 4 and if Step 5 is no choice because you have valuable data on the box then you need to recover the data before.

HD removal

1. Disassemble your box:
LS Live v2

2. Connect the hdd to a workstation running Linux. Knoppix for example is recommended as you can boot it directly from CD/DVD.

3. If the HDD isn`t defective then the partitions should even be mounted automatically.

4. Backup your data (most easiest if you connect a second hdd for backup)

5. Now try Step 5 from the general instructions.

6. In case even Step 5 did not work then you can rebuild the partitions from scratch. Look at Custom_Partitions_on_the_LS_Pro for instructions.

Terastation Pro v2, Terastation Live

If you have a arm9-terastation and you tried Step 4 and if Step 5 is no choice because you have valueable data on the box then you need to recover the data before.

Look at Manual Recovery on a seperate computer.

After you recovered the data try Step 5.

In case even the "Rebuild Partition Table" Option does not help follow this steps to rebuild the partitions on all HDDs:

1. To rebuild your disk you will need to connect your disk to a PC running Ubuntu, Knoppix or similar. These two programs offer a downloadable bootable CD which you can use on most computers. Simply install/connect the TSP disk to your computer and boot up your computer with the bootable Ubuntu or Knoppix CD. The information below is based on commands used on a computer running Ubuntu. Please remember that you will require all the files you extracted from the firmware file in the directory of your choice once you have booted with Ubuntu. A USB memory stick is quite useful for this purpose.

2. Once booted with Ubuntu, create a directory on your desktop called tsp (right click the desktop and choose new folder). Copy all the firmware files, including the unzipped password protected files to the tsp directory on your desktop.

3. Open a terminal window from the applications menu at the top left hand side of the screen and type:

sudo –s -H
fdisk –l

(you should see the name of your disk, probably something like /dev/hda or /dev/hdb or /dev/sda or /dev/sdb. If you have more than one disk you might be able to differentiate them by size) this might help to find out the device name

cat /proc/partitions

4. Once you know the name of your disk type:

cfdisk /dev/???

(replace ??? with the three letter code of your disk. We will use sda as the three letter code for the following example)

5. If there are any existing partitions delete all of them using the up and down arrow and the delete menu at the bottom of the screen

6. Create the following partitions using the arrow keys and the menus on the bottom of the screen:

sda1 Bootable Primary Linux 205MB
sda2 Primary Linux 500MB
sda5 Extented Linux/Swap 510MB (might be optional)
sda6 Extended Linux XXXXMB (remainder of the disk – might be optional)

(If you are planning on "customising" your unit, you should consider increasing the sda2 partition size)

7. Write the changes before you exit cfdisk

8. You should now format your partitions:

mkfs.ext3 /dev/sda1
mkfs.xfs /dev/sda2
mkfs.xfs /dev/sda6
mkswap –c /dev/sda5

(the –c is optional)

9. Mount the /boot and /rootfs file systems:

mount –t ext3 /dev/sda1 /boot
mount –t xfs /dev/sda2 /rootfs

10. Copy the files initrd.buffalo and uImage.buffalo to /boot:

cd /home/ubuntu/Desktop/tsp/
cp initrd.buffalo /boot
cp uImage.buffalo /boot

11. Extract the content of hddrootfs.buffalo.updated to /rootfs:

cd /rootfs
tar zxvf /home/ubuntu/Desktop/tsp/hddrootfs.buffalo.updated

12. Unmount the 2 file systems:

umount /dev/sda1
umount /dev/sda2

13. Disconnect the disk from your computer and reinstall the disk in the TSP

14. Turn on (reboot) your TSP

15. Your TSP should boot normally and you should see Loading Kernel on the LCD display, try running the TSUpdater again. 15a. In case of LiveStation box, it will get into the EM mode. Use acp_commander.jar to get telnet access to the system. Execute /usr/local/bin/chghddroot and than reboot. This should enable the system to come out of the EM mode. 16. If you are still having problems, rebuild all remaining TSP disk in the same manner. Then run TSUpdater again.