Buffalo NAS-Central Forums

Welcome to the Linkstation Wiki community
It is currently Sun Sep 21, 2014 1:04 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 49 posts ]  Go to page 1, 2, 3, 4  Next
Author Message
PostPosted: Sat Nov 29, 2008 9:40 pm 
Offline
Newbie

Joined: Mon Nov 17, 2008 12:23 am
Posts: 38
Location: Stuttgart, Germany
Hi,

I failed to update without removing the HDD: I bricked my linkstation live with torrent.

By disassembling the HDD and mirroring a second Linkstation live, I could recover the linkstation.

Finally, here is the way how I backed-up and got Lenny to run.

The way is a quick hack and the description is kept short. However, I thought better a short description than no description :)

Do not forget to do a static IP assignment using your DHCP server.

Backup the linkstation

acp_commander works also for the LS-CHL.

open the LinkStation with acp_commander and telnet to it

Assume "LS" the linkstation and "PC" your linux PC:

PC: netcat -l -p 9876 -w 10 | bzip2 -9 -c > ~/Buffalo/rescue/start.img.bz2
LS: dd if=/dev/disk bs=245670 count=26267 | nc <IP-adress of PC> 9876

Then:
Goto / at the Linkstation

PC: netcat -l -p 9876 -w 10 | bzip2 -9 -c > ~/Buffalo/rescue/disk1.tar.bz2
LS: tar c --one-file-system . | nc <IP-adress of PC> 9876


bs=245670 is approx 100k-Blocksize (to gain reading speed)
count=26267 copies the first 6,1 GB (maybe you can use less)

Restoring the backup
These steps are needed in case you bricked your Linkstation somehow. E.g. trying different kernel, different roots, ...
Or you just want to go back to the original distribution

I only tried it with a disassembled HDD connected to a Linux-PC:

Code:
bzcat start.img.bz2 | dd of=/dev/sdb bs=245670
mkswap /dev/sdb5
mkfs.xfs /dev/sdb6
cd /tmp
mkdir sdb6
mount /dev/sdb6 sdb6
cd sdb6
tar xjf ~/Buffalo/rescue/disk1.tar.bz2
cd ..
umount sdb6


Upgrade to Lenny

1. Disassemble the harddrive
If you do not want to do that, then wait for others to find out the better solution

Hints for disassembling:
  • Remove the fan
  • At the bottom side: cut through the labels along the line
  • Each label covers a screw
  • The first screw is right of the crossed trash symbol
  • The second screw is below the number of the Amperes (right of 12VDC)

2. Attach the HDD at your LINUX-PC
(e.g. by a SATA-external (icy-)box)

(assume the drive is now sdb)

3. Repartion your harddisk.
  • Do NOT delete/alter sdb1
  • enlarge sdb2 to 10 GB

4. Format the new partitions
  • mkswap /dev/sdb5
  • mkfs.ext3 /dev/sdb2
  • mkfs.ext3 /dev/sdb6
  • tune2fs -i 171 -c 0 -r 100 /dev/sdb2
    • check-interval: 171 days, root has far less reserved blocks than the default
  • tune2fs -i 169 -c 0 -r 100 /dev/sdb6

5. Mount parititions to be modified
  • cd /tmp
  • mkdir sdb1
  • mkdir sdb2
  • mount /dev/sdb1 sdb1
  • mount /dev/sdb2 sdb2

6. Goto http://buffalo.nas-central.org/download ... l%20Lenny/
and read README.1st :)

7. Install new initrd.buffalo

8. Install new rootfs

9. Tweak new system
  • cd etc
  • vi hostname and adjust the name
  • vi fstab and adjust "jfs" for /dev/sda6 to "ext3"

10. unmount partitions
  • cd ..
  • umount sdb2
  • umount sdb6

11. Put the hdd back to the Buffalo case

12. You're done (in principle).
Don't know the root password, but admin/admin works.

Tweaking lenny-installation

1. Adjust rights of home-directory
  • In admin's home-directory: sudo chown -R admin.users .
    --> /home/admin belongs to root, which seems to be wrong

2. Adjust sources.list
  • /etc/apt/sources.list: add "contrib non-free" to first line
  • disable third line.

3. Fixing ftp.gtlib.gatech.edu -> not necessary, since it got disabled at the second step
  • Import missing PGP-key
    • gpg --keyserver pgp.mit.edu --recv-key 0792182443229C06
    • gpg -armor --export 0792182443229C06 | sudo apt-key add -

4. Install missing packages
  • add "export LC_CTYPE=en_US" to ~/.bashrc
  • apt-get install locales
  • dpkg-reconfigure locales
    • select en_US* and other locales you need
    • select en_US as default locale
  • apt-get install less ssmtp anacron powermgmt-base
    • ssmtp is needed for anacron
    • anacron is a replacement for cron. It runs all jobs even if the machine was not online at job start time
  • apt-get remove tasksel
  • use aptitude to upgrade perl, samba, ...

(to be continued - any hints and links welcome)

5. Enable micro-evtd
micro-evtd seems to be needed for a proper shutdown of the Linkstation.
  • apt-get install micro-evtd
  • patch /etc/init.d/micro-evtd as described [url ref="http://forum.buffalo.nas-central.org/viewtopic.php?f=39&t=15921"]in this post[/url]
The patch simply adds "Feroceon" to the list of supported platforms

Notes
USB-disks doen't seem to work under Lenny (2.6.22, 2.6.26)


Last edited by dsplayer on Thu Apr 09, 2009 8:36 am, edited 2 times in total.

Top
 Profile  
 
PostPosted: Sun Nov 30, 2008 5:01 pm 
Offline
Site Admin
User avatar

Joined: Mon Jul 11, 2005 7:19 am
Posts: 7702
Location: Austria, Vienna
nice post.

_________________
LS1 (2.6 kernel, foonas svn1062, 750 GB, UBoot 1.2) & LS Pro (FreeLink/jtymod/GenLink, changes all the time)
Thx to all donators!


Top
 Profile  
 
PostPosted: Mon Dec 01, 2008 8:54 pm 
Offline
Total Newbie

Joined: Thu Nov 13, 2008 1:59 pm
Posts: 1
Thanks a lot for your post.
Can you give a link to dowload the tar archive of your backup of your linkstation live LS-CHL ?

Bests reguards,

Caboche


Top
 Profile  
 
PostPosted: Wed Dec 03, 2008 10:14 pm 
Offline
Newbie

Joined: Wed Dec 03, 2008 10:04 pm
Posts: 7
Great tutorial!
But unfortunately it looks like that my sda1 is broken. After your steps done, my LS still shows me the orange button. Do you have an idea of resetting the boot partition to delivery status? Maybe from the Firmware 1.02 i downloaded on buffalotech.com? Otherwise, i would be very happy to get an image of your sda1!

Best regards,
Imbafreak


Top
 Profile  
 
PostPosted: Mon Jan 05, 2009 12:42 pm 
Offline
Newbie

Joined: Mon Nov 17, 2008 12:23 am
Posts: 38
Location: Stuttgart, Germany
Sorry for delay.

http://rapidshare.de/files/41279678/start.img.bz2.html
http://rapidshare.de/files/41279717/disk1.tar.bz2.html

Hope, you have success!


Top
 Profile  
 
PostPosted: Mon Jan 05, 2009 12:45 pm 
Offline
Newbie

Joined: Mon Nov 17, 2008 12:23 am
Posts: 38
Location: Stuttgart, Germany
Imbafreak wrote:
But unfortunately it looks like that my sda1 is broken. After your steps done, my LS still shows me the orange button.


I had the same issue, but after resetting the disk and then re-installing, it worked. Therefore, I thought, it was a mistake by me.

Imbafreak wrote:
Do you have an idea of resetting the boot partition to delivery status?


No. Therefore I ordered a second Linkstation, made the image from there and copied the image to the broken linkstation. Thanks to the "Fernabsatzgesetz", I only paid the postal fee :)


Top
 Profile  
 
PostPosted: Fri Jan 09, 2009 8:07 pm 
Offline
Total Newbie

Joined: Fri Jan 09, 2009 7:58 pm
Posts: 3
Just bought myself a LS-CHL (I had a nslu2 with armel lenny but it broke) and installed Lenny with your instructions. Everything went fairly well. I didn't create the files needed (I should have read the readme.1st more carefully) but after I created those everything went well.

Few corrections/additions to the instructions:

I didn't have screws at the bottom of LS-CHL but tabs?
Creating the three files needed to /dev/sda1 (I missed that)
apt-get update is needed before you can install locales

Have you updated the kernel in this install?

edit:
I'm getting the error
fopen: Permission denied
when installing with aptitude. Everything seems to install correctly though. You did not encounter this?


Top
 Profile  
 
PostPosted: Fri Jan 09, 2009 8:40 pm 
Offline
Site Admin
User avatar

Joined: Tue Jul 12, 2005 11:26 am
Posts: 3701
Location: JAPAN
root password is lspro.

For the update, did you type sudo apt? Otherwise, su - and log in as root.

_________________
LS used as PVR and streaming source


Top
 Profile  
 
PostPosted: Fri Jan 09, 2009 10:13 pm 
Offline
Total Newbie

Joined: Fri Jan 09, 2009 7:58 pm
Posts: 3
lb_worm wrote:
For the update, did you type sudo apt? Otherwise, su - and log in as root.


Thanks for the lenny_hddimage package, installing the system was a breeze.

If you are referring to the error I get (fopen: Permission denied), I used sudo, not an actual
root shell. Is there a difference? The apps seemed to install correctly though (the error displays multiple times but the install continues). I got my previous server configuration from NSLU2 running (basically screen with rtorrent and irssi + lighttpd and vsftpd) and everything runs well. The additional ram (nslu2 has 32mb) seems to help a lot, and I haven't yet removed any unneeded services etc.

Are there any kernel updates available without compiling myself? lsmod doesn't display anything and lsusb command is not available. The usb port doesn't seem to give power to devices (tried with a flash drive and an external hd). I'm running 2.6.22.7 kernel that was in the package you have provided.


Top
 Profile  
 
PostPosted: Sat Jan 10, 2009 11:42 am 
Offline
Site Admin
User avatar

Joined: Tue Jul 12, 2005 11:26 am
Posts: 3701
Location: JAPAN
You can look in the downloads area. I am sure Davy has got a few available.

_________________
LS used as PVR and streaming source


Top
 Profile  
 
PostPosted: Fri Jan 23, 2009 11:21 pm 
Offline
Newbie

Joined: Sun Jan 11, 2009 10:52 pm
Posts: 14
Hi,

I've also just bought an LS-CHL and was wondering how your boxen was doing now that you have Lenny running on it.

Have you encountered any gotchas with solutions so far?

Cheers,
Ewano

_________________
Linkstation Live V3 AKA LS-CHL.v1 - running a bootstrapped Debian Lenny.


Top
 Profile  
 
PostPosted: Sun Feb 01, 2009 11:26 am 
Offline
Newbie

Joined: Wed Dec 03, 2008 10:04 pm
Posts: 7
Hey dsplayer, please check out your PMs :-)


Top
 Profile  
 
PostPosted: Sun Feb 01, 2009 2:27 pm 
Offline
Total Newbie

Joined: Fri Jan 09, 2009 7:58 pm
Posts: 3
ewano wrote:
Have you encountered any gotchas with solutions so far?


I cannot get the usb port to work. Pluggin a device doesn't show anything in dmesg, and device doesn't seem to get power. I don't need it right now, but later on it would be nice for WLAN. I haven't seen any other issues, my FTP speeds are 8MB/s and everything seems to be stable.

I've had one failure so far: My LS-CHL worked alright until yesterday when I couldn't ssh into it. When I tried to reset it, it just blinked blue light and would not respond to ping/telnet/ssh. I removed the HD and plugged it into my main pc and found out that the first partition (/boot or /dev/sda1) had some errors. I fixed the errors with fsck (boot.log was not there, and i had to "touch rootfs_ok" again) and the system boots again. This is probably only a hardware issue though (I swapped the original HD to more quiet 2,5 inch one which might be defective).


Top
 Profile  
 
PostPosted: Wed Feb 18, 2009 10:12 am 
Offline
Total Newbie

Joined: Wed Feb 18, 2009 10:09 am
Posts: 1
Hi.

Im also total Newbie on this device and all tools. But im a bit dissapointed on the torrent client on the device LS-CHL, what is this
Lenny. Can someone explain what it does, and please compare with Buffalos original fw and web interface.

Anyone is welcome to PM me.

//T


Top
 Profile  
 
PostPosted: Wed Feb 25, 2009 2:00 am 
Offline
Newbie

Joined: Wed Feb 25, 2009 1:15 am
Posts: 11
I bricked my LS-Live, but I don't want to buy a second LS-Live. I revived successfully with tftp and proceed directly to upgrade to Lenny. Here's what I did:

1. boot partition
- mount /dev/sdb1 to /mnt/sdb1
- install new initrd
* mv initrd.buffalo initrd.buffalo.orig
* wget http://buffalo.nas-central.org/download ... rd.buffalo
* wget http://buffalo.nas-central.org/download ... ot_options
- create files as in readme said
* touch linkstation_release hddrootmode rootfs_ok
2. rootfs
- mount /dev/sdb2 to /mnt/sdb2
- Install new rootfs
* wget http://buffalo.nas-central.org/download ... _24.tar.gz
* tar xvzf Lenny_hddimage_2008_06_24.tar.gz
* rm Lenny_hddimage_2008_06_24.tar.gz
- vi etc/fstab and adjust "jfs" for /dev/sda6 to "xfs"


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 49 posts ]  Go to page 1, 2, 3, 4  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 16 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:

Protected by Anti-Spam ACP
Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group