Freelink upgrade to lenny with SATA-USB adapter

From NAS-Central Buffalo - The Linkstation Wiki
Revision as of 23:17, 7 January 2009 by JonSenior (Talk | contribs)

Jump to: navigation, search


Kurobrick.png
WARNING!

There is a possibility that you could brick your NAS with these instructions. Please make sure that you read the entire page carefully.



23:42 7th Jan 2009 - This is a work in progress and may change dramatically over the next few hours. - JonSenior

Usual warnings and caveats apply. This is my experience using a Linkstation Live v2. You brick it... you bought it.

Preamble

SATA<->USB

The goal was to make the Linkstation work with a USB sound card, and thus to act as a media player, not a media server. With this in mind and using Add_a_USB_sound_card as a proof of concept, I installed Freelink following the instructions on FreeLink_for_the_LinkStation_PRO/LIVE. The first problem was Alsa which didn't play well on the 2.6.12 kernel that came with Freelink. After a lot of searching I found that there was a problem with the Alsa tools when running an EABI kernel with OABI userspace tools. This is well-documented on-line. My first attempts to [Buffalo_ARM9_Kernel_Port upgrade the kernel to a vanilla 2.6.28] were disastrous and resulted in the box going into a reboot every 30 seconds, before even allowing a connection. Since it wasn't attempting to contact a TFTP server, I couldn't get it to go into [EM_Mode] and I didn't own a serial cable, I was left with no option but to access the drive directly. So I browsed around and found a SATA<->USB adapter that I could use to access the HDD without complete disassembly. The version to the right requires that the either the HDD be removed, or the device be hacked apart.

Modifying and connecting the adapter

The second time I connected it, I opted for the later. The case comes apart fairly easily and you'll need to pull off the plastic cover from the switch and then use a pair of wire cutters to cut the switch shorter. With that done, the HDD can be connected by removing the front of the case and the daughterboard. If you have nimble fingers you don't even need to remove the side panel. See [Disassemble_the_LS_Pro_v2_/_LS_Live_v2] for further instructions. Since the switch will be near inaccessible, you will need to connect the adapter to the HDD, then plug it into the USB port and connect the molex connecter which provides power.

Installation

  • Follow the instructions in [Buffalo_ARM9_Kernel_Port] to create a kernel and modules for your Linkstation.
  • Connect the drive and mount the partitions. They should appear as /dev/sdXY. Assuming a default partitioning and /dev/sdb as the root you should see
    • sdb1 = The boot partition
    • sdb2 = The root filesystem
    • sdb4 = The extended partition containing the rest
    • sdb5 = A swap partition
    • sdb6 = The media partition (You do want to store stuff on this, right?)
  • In a default setup sdb2 and sdb6 will be in XFS format. As of 08 Jan 2009 there are ongoing issues with XFS on Arm. I had an error on my rootfs after only two boots. It is worth switching to another filesystem. I used ext3 as I'm familiar with it, but there appears to be a strong consensus on using JFS for the media partition.
  • Back up the old root system. You will want to be able to revert if anything goes wrong. From within the mounted system use

tar cjf /path/to/backup.tar.bz2 *

  • Reformat to a new filesystem if you wish to do so.
  • Decompress the Lenny image using the following from within the mounted system:

tar xf /path/to/lennyimage.tar.gz

Instructions end here for the minute. More to be added tomorrow.