Buffalo NAS-Central Forums

Welcome to the Linkstation Wiki community
It is currently Mon Sep 01, 2014 2:37 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 43 posts ]  Go to page 1, 2, 3  Next
Author Message
PostPosted: Wed Mar 09, 2011 10:08 pm 
Offline
Newbie

Joined: Mon Nov 08, 2010 6:49 am
Posts: 20
I finally did it so here is how I did. I used Debian Lenny on LS-CHLv2 and http://buffalo.nas-central.org/wiki/Open_Stock_Firmware_LS-XHL how to to do that.

Note: I also tried to update my kernel to 2.6.37.3 and I failed. TFTP recovery didn't work so I had to open my box finally :(


What you need
You have to be able to use the root account on the NAS. I used the CHL-v2/XHL 1.37 Mod 1 firmware to do that.


Debootstrap
You need to install debootstrap:
Code:
wget http://ftp.us.debian.org/debian/pool/main/d/debootstrap/debootstrap_1.0.28_all.deb
dpkg -i debootstrap_1.0.28_all.deb

Install the new rootfs:
Code:
mkdir debian-squeeze
deboostrap --verbose --arch armel squeeze debian-squeeze http://ftp.us.debian.org/debian

When you see I: Base system installed successfully. the roots FS is almost ready.

Personalize the deboostrap
You need to had some features to be able to boot on the boostrap.
Copy the initrd to the chroot environment:
Code:
cp /boot/initrd.buffalo debian-squeeze/tmp

Chroot on Debian Squeeze:
Code:
LANG=C chroot debian-squeeze /bin/bash

Copy kernel module to the /lib/module folder:
Code:
cd /tmp
dd if=initrd.buffalo of=initrd.gz ibs=64 skip=1
gunzip initrd.gz
mkdir INITRD
mount -t ext2 -o loop initrd INITRD
cp -R INITRD/lib/modules/2.6.31.8-svn22059 /lib/modules/
umount INITRD
rmdir INITRD
rm initrd*

Add missing devices:
Code:
mount -t proc proc /proc
cd /dev
apt-get install makedev
MAKEDEV generic
umount /proc

Configure locale: Suggestion is to install at least the en_US.UTF-8 and your native language locale (e.g. it_IT.UTF-8, de_DE.UTF-8, etc).
Code:
apt-get install locales
dpkg-reconfigure locales

If apt-get complains that pts aren't accessible: ignore it or mount devpts (mount -t devpts devpts /dev/pts)
Editing /etc/fstab (with vi or nano):
Code:
# /etc/fstab: static file system information.
#
# file system    mount point   type    options                  dump pass
/dev/sda2        /             xfs     defaults,noatime         0    1
/dev/sda1        /boot         ext3    ro,nosuid,nodev          0    2
/dev/sda5        none          swap    sw                       0    0
/dev/sda6        /mnt/disk1         xfs     defaults,noatime         0    0
proc             /proc         proc    defaults                 0    0
devpts           /dev/pts      devpts  gid=4,mode=620           0    0
tmpfs            /tmp          tmpfs   defaults                 0    0
sysfs            /sys          sysfs   defaults                 0    0

Create disk1 in mnt:
Code:
mkdir /mnt/disk1

Edit /etc/network/interfaces to match your LAN configuration. If you use DHCP:
Code:
# Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or
# /usr/share/doc/ifupdown/examples for more information.

# We always want the loopback interface.
auto lo
iface lo inet loopback

auto eth1
iface eth1 inet dhcp

If you have static IP:
Code:
# Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or
# /usr/share/doc/ifupdown/examples for more information.

# We always want the loopback interface.
auto lo
iface lo inet loopback

auto eth1
iface eth1 inet static
   address 192.168.1.6
   network 192.168.1.0
   netmask 255.255.255.0
   gateway 192.168.1.1

Edit /etc/hostname
Code:
NAS

Edit /etc/hosts
Code:
127.0.0.1       localhost.localdomain localhost
127.0.0.1       NAS
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

Install sshd:
Code:
apt-get install openssh-server

Change root password:
Code:
passwd root

Check that root login is enable in /etc/sshd/sshd_config:
Code:
PermitRootLogin yes

Prepare rootfs:
Code:
exit
cd debian-squeeze
tar --numeric-owner -p -czf ../hddrootfs.buffalo.updated *

Move hddrootfs.buffalo.updated to a folder that you can access from you computer.
Download empty initrd from here to your lsupdater folder.
Copy hddrootfs.buffalo.updated to your lsupdater folder.
Remove initrd.img and hddrootfs.img from your lsupdater folder. (If you use 1.37mod1 kernel you just need to replace them when you copy these file)
Add debug options to lsupdate: open LSUpdater.ini and check that it look like that :
Code:
[Application]
Title = BUFFALO LinkStation Series Updater Ver.1.37 Mod1
WaitReboot = 1200
WaitFormat = 600
WaitFileSend = 600

[Target]
ProductID = 0x00000011
ProductID2 = 0x00000012
ProductID3 = 0x00000014
ProductID4 = 0x00003006
ProductID5 = 0x00003007
ProductID6 = 0x00000015
ProductID7 = 0x00000016
ProductID8 = 0x00003008
Name = LinkStation

[Flags]
VersionCheck = 0
NoFormatting = 1

[specialflags]
debug = 1

Update your NAS, reboot. Now you are on Debian Squeeze !
If you configured your nas before, some settings should be saved in a tgz file: /boot/conf_save.tgz
Install blstools:
Code:
apt-get install smartmontools
wget http://downloads.sourceforge.net/project/blstools/releases/blstools-0.2.0.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fblstools%2Ffiles%2Freleases%2F&ts=1299707100&use_mirror=iweb
tar zxf blstools-0.2.0.tar.gz
cd blstools-0.1.0
sudo ./install.sh

Modify /etc/init.d/lsmonitor (the line where HDDTEMP is defined) to:
Code:
# Retrieve HDD temp
        HDDTEMP=$(smartctl -d marvell /dev/sda --all -T permissive | awk '$1 == "194" {print $10}')


Top
 Profile  
 
PostPosted: Thu Mar 10, 2011 8:33 am 
Offline
Moderator

Joined: Fri Jun 29, 2007 10:39 am
Posts: 2588
Is it ok for you if I add this to the wiki? Or do you like
to add it yourself?

_________________
Please do not use private mail (PN/M) to ask questions. Use the proper forum instead. (me)

If there is no verified backup of a dataset, the dataset, by definition, is unimportant. (c't 2012)

RAID (no matter which level) never ever substitutes a backup. (me)


Top
 Profile  
 
PostPosted: Thu Mar 10, 2011 3:08 pm 
Offline
Newbie

Joined: Fri Nov 20, 2009 9:12 am
Posts: 54
Location: Europe, Lower Austria
3 questions:
1) Do I lose data after upgrade?
2) Is it realy working without opening?
3) How can I go back in case of troubles?

_________________
LS-XHL @ 1.54FW with SSH
Linux Nas 2.6.31.8 #1 Mon Jul 25 18:06:49 JST 2011 armv5tel unknown


Top
 Profile  
 
PostPosted: Thu Mar 10, 2011 7:03 pm 
Offline
Newbie

Joined: Mon Nov 08, 2010 6:49 am
Posts: 20
@kenatonlie: You can add this on the wiki.

@netbus: 1. You only change rootfs so data located in /mnt/disk1 are not lost, only data located in / are.
2. It's working without opening the box. I had to open the box because I wanted to change my kernel (uImage.buffalo file) and the kernel that I compiled wasn't working.
3. Since you don't change kernel and uBoot but only rootfs and initrd, you can use lsupdate and TFTP recovery to recover your NAS. (I don't try it but I suppose it's possible)


Top
 Profile  
 
PostPosted: Thu Mar 10, 2011 8:42 pm 
Offline
Moderator

Joined: Fri Jun 29, 2007 10:39 am
Posts: 2588
You can find the wiki article here: http://buffalo.nas-central.org/wiki/Debian_Squeeze_on_%22V%22_and_%22X%22_Series
Any suggestions from your side?

_________________
Please do not use private mail (PN/M) to ask questions. Use the proper forum instead. (me)

If there is no verified backup of a dataset, the dataset, by definition, is unimportant. (c't 2012)

RAID (no matter which level) never ever substitutes a backup. (me)


Top
 Profile  
 
PostPosted: Thu Mar 10, 2011 8:56 pm 
Offline
Newbie

Joined: Fri Nov 20, 2009 9:12 am
Posts: 54
Location: Europe, Lower Austria
Pls help. I am stuck in "add missings device"
Code:
root@Nas:/dev# apt-get install makedev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  makedev
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/42.4 kB of archives.
After this operation, 152 kB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
  makedev
Install these packages without verification [y/N]? y
Can not write log, openpty() failed (/dev/pts not mounted?)
Selecting previously deselected package makedev.
(Reading database ... 8459 files and directories currently installed.)
Unpacking makedev (from .../makedev_2.3.1-89_all.deb) ...
update-rc.d: using dependency based boot sequencing
Processing triggers for man-db ...
Can not write log, openpty() failed (/dev/pts not mounted?)
Setting up makedev (2.3.1-89) ...

Whats wrong?

_________________
LS-XHL @ 1.54FW with SSH
Linux Nas 2.6.31.8 #1 Mon Jul 25 18:06:49 JST 2011 armv5tel unknown


Top
 Profile  
 
PostPosted: Fri Mar 11, 2011 12:20 am 
Offline
Newbie

Joined: Mon Nov 08, 2010 6:49 am
Posts: 20
What do you mean by stuck ? apt-get doesn't return ? or the message "Can not write log, openpty() failed (/dev/pts not mounted?)" scares you ?


Top
 Profile  
 
PostPosted: Fri Mar 11, 2011 8:04 am 
Offline
Newbie

Joined: Fri Nov 20, 2009 9:12 am
Posts: 54
Location: Europe, Lower Austria
I mean MAKEDEV is not correct installed because I can not execute MAKEDEV.
any Ideas?

_________________
LS-XHL @ 1.54FW with SSH
Linux Nas 2.6.31.8 #1 Mon Jul 25 18:06:49 JST 2011 armv5tel unknown


Top
 Profile  
 
PostPosted: Fri Mar 11, 2011 7:22 pm 
Offline
Newbie

Joined: Mon Nov 08, 2010 6:49 am
Posts: 20
Do you have something like: .udevdb or .udev presence implies active udev. Aborting MAKEDEV invocation. ?
I don't know how udev is working so maybe it does what we want but I'm not sure. So try that :
Code:
mount -t proc proc /proc
cd /dev
mv .udev udev
apt-get install makedev
MAKEDEV generic
mv udev .udev
umount /proc


Top
 Profile  
 
PostPosted: Sat Mar 12, 2011 8:04 pm 
Offline
Newbie

Joined: Fri Nov 20, 2009 9:12 am
Posts: 54
Location: Europe, Lower Austria
Correct, this is what I get
Quote:
root@Nas:/dev# apt-get install makedev
Reading package lists... Done
Building dependency tree... Done
The following NEW packages will be installed:
makedev
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 42.4 kB of archives.
After this operation, 152 kB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
makedev
Install these packages without verification [y/N]? y
Get:1 http://ftp.us.debian.org/debian/ squeeze/main makedev all 2.3.1-89 [42.4 kB]
Fetched 42.4 kB in 1s (27.2 kB/s)
Can not write log, openpty() failed (/dev/pts not mounted?)
Selecting previously deselected package makedev.
(Reading database ... 8459 files and directories currently installed.)
Unpacking makedev (from .../makedev_2.3.1-89_all.deb) ...
update-rc.d: using dependency based boot sequencing
Processing triggers for man-db ...
Can not write log, openpty() failed (/dev/pts not mounted?)
Setting up makedev (2.3.1-89) ...
.udevdb or .udev presence implies active udev. Aborting MAKEDEV invocation.
.udevdb or .udev presence implies active udev. Aborting MAKEDEV invocation.
.udevdb or .udev presence implies active udev. Aborting MAKEDEV invocation.
.udevdb or .udev presence implies active udev. Aborting MAKEDEV invocation.
.udevdb or .udev presence implies active udev. Aborting MAKEDEV invocation.
.udevdb or .udev presence implies active udev. Aborting MAKEDEV invocation.
.udevdb or .udev presence implies active udev. Aborting MAKEDEV invocation.
.udevdb or .udev presence implies active udev. Aborting MAKEDEV invocation.
.udevdb or .udev presence implies active udev. Aborting MAKEDEV invocation.
.udevdb or .udev presence implies active udev. Aborting MAKEDEV invocation.
.udevdb or .udev presence implies active udev. Aborting MAKEDEV invocation.
.udevdb or .udev presence implies active udev. Aborting MAKEDEV invocation.
root@Nas:/dev# MAKEDEV generic
.udevdb or .udev presence implies active udev. Aborting MAKEDEV invocation.
root@Nas:/dev#

_________________
LS-XHL @ 1.54FW with SSH
Linux Nas 2.6.31.8 #1 Mon Jul 25 18:06:49 JST 2011 armv5tel unknown


Top
 Profile  
 
PostPosted: Sun Mar 13, 2011 8:10 am 
Offline
Newbie

Joined: Fri Nov 20, 2009 9:12 am
Posts: 54
Location: Europe, Lower Austria
One more thing.
I have followed your steps but when I run lsupdater, linkstation is after reboot the same.
there is no debian installed.

Code:
root@Nas:~/blstools-0.2.0# /bin/bash --version
GNU bash, version 3.2.0(2)-release (arm-none-linux-gnueabi)

root@Nas:~/blstools-0.2.0# cat /etc/issue
BUFFALO INC. LinkStation series

I'm confused :?

_________________
LS-XHL @ 1.54FW with SSH
Linux Nas 2.6.31.8 #1 Mon Jul 25 18:06:49 JST 2011 armv5tel unknown


Top
 Profile  
 
PostPosted: Sun Mar 20, 2011 10:30 am 
Offline
Total Newbie

Joined: Sun Mar 20, 2011 10:28 am
Posts: 1
Same Problem here, started with firmware 1.4.0.


Top
 Profile  
 
PostPosted: Tue Mar 22, 2011 1:55 pm 
Offline
Newbie

Joined: Fri Nov 20, 2009 9:12 am
Posts: 54
Location: Europe, Lower Austria
any solutions out there?

_________________
LS-XHL @ 1.54FW with SSH
Linux Nas 2.6.31.8 #1 Mon Jul 25 18:06:49 JST 2011 armv5tel unknown


Top
 Profile  
 
PostPosted: Tue Mar 22, 2011 4:05 pm 
Offline
Newbie

Joined: Wed Mar 16, 2011 1:53 pm
Posts: 13
I have the same problem using FW 1.37 mod1 - I also had the MAKEDEV / udev problem on LS-VL.


Top
 Profile  
 
PostPosted: Wed Mar 23, 2011 9:26 am 
Offline
Newbie

Joined: Fri Nov 20, 2009 9:12 am
Posts: 54
Location: Europe, Lower Austria
I think benoqkuke conceal us a lot of information.

_________________
LS-XHL @ 1.54FW with SSH
Linux Nas 2.6.31.8 #1 Mon Jul 25 18:06:49 JST 2011 armv5tel unknown


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 3 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