Revive your arm9 box from scratch

From NAS-Central Buffalo - The Linkstation Wiki
Revision as of 15:39, 7 September 2007 by Ramuk (Talk | contribs)

Jump to: navigation, search

Contents

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.

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


General Procedure

1. Download and install tftpd server ( tftpd32 or Solarwinds Tftp Server (Registration Required) )

2. Install java

3. Download acp_commander.jar to the directory of your choice. Checkout the readme.

3. Download the proper firmware package for your box. Always start with the stock firmware.

4. Unpack the firmware package

5. There are 2 files inside that need to be served via tftp Rename the initrd.img to initrd.zip and unzip it to get the initrd.buffalo.
you need to provide one of this 4 passwords:

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.

7. Change the IP (or only one IP if you have several NICs) of your computer to 192.168.11.1

8. Disable all firewalls and start the tftpd-server (so it binds to the new IP)

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.

10. Modify the lsupdater.ini, add the following

[SpecialFlags]
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.

Now it depends what you want to do:
a) If you have data on your box and you just want to reflash then check

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): java -jar acp_commander.jar -t 192.168.11.150 –cb


b) In case you want to setup a blank hdd from scratch or a) did not work check

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. Anyway, your box will be in stock condition afterwards!

Box Specific Hints

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.

1. Disassemble your box:
LS Pro & LS Live v1
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 11b from the general instructions.

6. In case even 11b 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 11a. and if 11b. 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 11b.

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.

16. If you are still having problems, rebuild all remaining TSP disk in the same manner. Then run TSUpdater again.
{"cc_re__cc_re__cc_by_sa_3_0": ["n</a></li>\n\t\t\t\t<li id=\"t-permalink\"><a href=\"/w/index.php?title=Revive_your_arm9_box_from_scratch&amp;oldid=14142\" title=\"Permanent link to this revision of the page\">Permanent link</a></li>\n\t\t\t\t<li id=\"t-info\"><a href=\"/w/index.php?title=Revive_your_arm9_box_from_scratch&amp;action=info\">Page information</a></li>\n\t\t\t</ul>\n\t\t</div>\n\t</div>\n</div><!-- end of the left (by default at least) column -->\n<div class=\"visualClear\"></div>\n<div id=\"footer\" role=\"contentinfo\">\n\t<div id=\"f-copyrightico\">\n\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</div>\n\t<div id=\"f-poweredbyico\">\n\t\t<a href=\"//www.mediawiki.org/\"><img src=\"/w/skins/common/images/poweredby_mediawiki_88x31.png\" alt=\"Powered by MediaWiki\" width=\"88\" height=\"31\" /></a>\n\t</div>\n\t<ul id=\"f-list\">\n\t\t<li id=\"copyright\">Content is available under <a class=\"external\" rel=\"nofollow\" href=\"http://creativecommons.org/licenses/by-sa/3.0/\">Attribution-S", "=\"contentinfo\">\n\t<div id=\"f-copyrightico\">\n\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</div>\n\t<div id=\"f-poweredbyico\">\n\t\t<a href=\"//www.mediawiki.org/\"><img src=\"/w/skins/common/images/poweredby_mediawiki_88x31.png\" alt=\"Powered by MediaWiki\" width=\"88\" height=\"31\" /></a>\n\t</div>\n\t<ul id=\"f-list\">\n\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<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<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<li id=\"disclaimer\"><a href=\"http://www.nas-central.org/index.php/NAS-Central_Ma"], "copyright__copyright__copyright": ["", "d to /rootfs:\n\ncd /rootfs\ntar zxvf /home/ubuntu/Desktop/tsp/hddrootfs.buffalo.updated\n\n12. Unmount the 2 file systems:\n\numount /dev/sda1\numount /dev/sda2\n\n13. Disconnect the disk from your computer and reinstall the disk in the TSP\n\n14. Turn on (reboot) your TSP\n\n15. Your TSP should boot normally and you should see Loading Kernel on the LCD display, try running the TSUpdater again.\n\n16. If you are still having problems, rebuild all remaining TSP disk in the same manner. Then run TSUpdater again.", "d to /rootfs:\n\ncd /rootfs\ntar zxvf /home/ubuntu/Desktop/tsp/hddrootfs.buffalo.updated\n\n12. Unmount the 2 file systems:\n\numount /dev/sda1\numount /dev/sda2\n\n13. Disconnect the disk from your computer and reinstall the disk in the TSP\n\n14. Turn on (reboot) your TSP\n\n15. Your TSP should boot normally and you should see Loading Kernel on the LCD display, try running the TSUpdater again.\n\n16. If you are still having problems, rebuild all remaining TSP disk in the same manner. Then run TSUpdater again."]}