Buffalo NAS-Central Forums

Welcome to the Linkstation Wiki community
It is currently Sat Jul 26, 2014 6:17 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 13 posts ] 
Author Message
PostPosted: Sun Jun 15, 2008 1:20 pm 
Offline
Regular Member

Joined: Sun Nov 25, 2007 11:32 am
Posts: 109
This is a step-by-step on how to install Lenny on a TeraStation Pro II (will refer to this by TS in this guide)

Warning! – This is NOT a simple task! – read the entire guide and understand what you need to do before you continue. There is no easy way of installing Lenny on the TS for now! (I struggled myself and had to redo the partitioning tables on another machine – you might need to do the same!)
I will not guarantee it will work for you – do it at your own risk…

There are a couple of guides available that describe how to install Lenny on a LinkStation device (single drive devices):
- http://buffalo.nas-central.org/forums/viewtopic.php?f=18&t=5241
- http://buffalo.nas-central.org/forums/viewtopic.php?p=72241#p72241
All credit to the authors of these posting and thanks for all their effort in providing those guides. I have used a combination of these in order to get my TS working. There are however significant differences between the devices used in these guides and the TS!

Backup your data before you continue. While the backup run read the entire guide as you need to copy some files to your TS before you start or you will end up with a lot of wasted time!

I assume your TS are running and you have serial access – if not go fix that before you continue!

First we need to fetch some files and store them on the drive on the boot partition. The ramdisk needs to be converted to u-boot format with mkimage

First, let’s sure we can access the boot partition – we mount it as “b”
Code:
cd /
mkdir b
mount /dev/md0 /b
cd /b


The ramdisk is the Versatile installer of the Lenny distribution but we need to convert it into an image readable mby u-root. You can download the sources of mkimage here http://buffalo.nas-central.org/download/Users/lb_worm/mkimage/ , or grab the compiled version here:

Do EITHER
Code:
wget http://buffalo.nas-central.org/download/Users/gnyf/initrd.buffalo

OR

Code:
   wget http://buffalo.nas-central.org/download/Users/gnyf/mkimage    
wget http://debian.corenetworks.net/dists/lenny/main/installer-armel/current/images/versatile/netboot/initrd.gz    
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x0 -e 0x0 -n initrd -d ramdisk.gz initrd.buffalo


We will need micro_evtd as well to replace to Buffalo micon stuff. Read all about here: http://buffalo.nas-central.org/forums/viewtopic.php?f=7&t=4490 You can get the source from here and compile for the TS: http://buffalo.nas-central.org/download/Users/lb_worm/micro_evtd/

There are some packages avail elsewhere but again only for a LS device. Download the one I have compiled for the TS device here:

wget http://buffalo.nas-central.org/download ... TSP.tar.gz

We will need a kernel as well. This kernel is a plain 2.6.16.16 like the stock Buffalo one. Only change is that I have added support for USB Print – and oh yes, I have recompiled it of cause.

Code:
cd /b
wget http://buffalo.nas-central.org/download/Users/gnyf/uImage.buffalo
wget http://buffalo.nas-central.org/download/Users/gnyf/kernel-2.6.16.16_TSP-usblp.tar.gz


Copy initrd.buffalo and your kernel named uImage.buffalo into a tftp server – for windows I only managed to get tftp32 working (properly my fault!) – YOU WILL NEED TO CHANGE YOUR TFTP SERVER’S IP TO 192.168.11.1

You have remembered to backup all your data?

Now let’s ensure you have the following filed in the /boot partition – your /b directory for now:
    initrd.buffalo
    kernel-2.6.16.16_TSP-usblp.tar.gz
    micro_evtd_TSP.tar.gz
    mkimage
    uImage.buffalo

then copy the kernel – I really wan’t to skip all Buffalo
Code:
cp uImage.buffalo uImage

Now we should be ready to install Lenny of the TS.

Connect the serial console and boot – follow carefully on the console – on the FIRST countdown press enter and you are now in the u-boot menu. I can only suggest you learn how to use this but that’s beyond this guide.

Code:
setenv bootargs_root root=/dev/ram0 rw inirtd=0x00800040,15M panic=5 mem=128M   
boot


u-boot will now acquire the two files from your tftp server and starts the installer. Install lenny as you wish.

You will need to repartition your disk: delete all raid sets and partitions and then setup new partitions as you like.
I chose to have: boot partition (md0 – raid 1) of 512 MB, swap of 128 MB, root (md1 – raid 1) of 15 Gig and the rest for a raid5 set (md2)
Complete the installation.

Now we want to boot into the just installed lenny and not the installer so we change the bootcmd again:

Code:
>> setenv bootcmd 'ide reset; ext2load ide 0:1 0x00100000 /uImage; setenv bootargs console=ttyS0,115200 root=/dev/md1 rw; bootm 0x00100000'
>> saveenv
>> boot


WARNING – the installer left my md2 set dirty thus a full fsck was needed. This is a huge problem as the micon controller will shut down the box before this completes. How to solve? – simple, just press ctrl-c when the fsck begins.

Let the boot finish and then we need to hurry up – within 5 minutes the micon controller will shut down the TS if not told otherwise.

Code:
cd /boot
cp micro_evtd_TSP.tar.gz /
cd /
tar xvf micro_evtd_TSP.tar.gz
/usr/local/sbin/micro_evtd

Verify its running (ps –ef), and check /tmp/micro_evtd/my_status

Assuming everything works we can now check md2 as follows
Code:
cd /
umount /opt (or whatever mount point you have)
fsck /dev/md2
mount /opt


Now install the kernel modules.
Code:
cd /
cp /boot/kernel-2.6.16.16_TSP-usblp.tar.gz .
tar xvzf kernel-2.6.16.16_TSP-usblp.tar.gz
depmod –a


Now reboot again, and check it’s working as expected.
Log in again, then change /etc/apt/sources.list – change sid to testing
Code:
aptitude update
aptitude upgrade

aptitude install ssh


If you wish install webmin as well.
At this point I configured samba so I could restore my backups. As for Samba performance, add this line to the global section of your /etc/samba/smb.conf:
Code:
   socket options = TCP_NODELAY IPTOS_LOWDELAY SO_SNDBUF=20480 SO_RCVBUF=20480

I have also attached a Canon Pixma MP500 Printer to the USB Port. This is setup via CUPS and Gutenprint. It was a straightforward process after I found the “Allowed from” option in locations in the cupsd.conf file.
When I plugged in the printer it showed under CUPS as “Gutenprint USB#1 (Canon MP500)” –easy!

Well now you ought to have a running lenny on your TS Pro without any Buffalo leftovers.

Enjoy :-)


Top
 Profile  
 
PostPosted: Sun Jun 15, 2008 1:21 pm 
Offline
Regular Member

Joined: Sun Nov 25, 2007 11:32 am
Posts: 109
Reserved for updates/comments to the guide


Top
 Profile  
 
PostPosted: Sun Jun 15, 2008 10:09 pm 
Offline
Site Admin
User avatar

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

as you are recreating all partitions and especially the filesystems from scratch i guess you could have used a vanilla kernel as well.

the main difference between the stock kernel and the vanilla kernel is the incompatibility of the XFS partitions.

so who wants to verify this guide :D ?

_________________
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 Jun 16, 2008 10:49 am 
Offline
Newbie
User avatar

Joined: Mon Oct 15, 2007 12:25 pm
Posts: 10
Location: Lyon (France)
I'll try this guide on a LS-WTGL, it seems to be the same approach.

I'm just waiting a Serial cable and i'll start my tests.


Top
 Profile  
 
PostPosted: Fri Jun 27, 2008 3:58 pm 
Offline
Newbie

Joined: Fri May 09, 2008 5:40 am
Posts: 11
Thanks for this info. I was able to use this to get a Terastation Live running lenny, though with a couple of changes. I'm not terribly keen on filling my TS with molten lead, so I don't have a serial console installed. Instead I used the stock initrd in EM mode to install. I thought I'd post a few notes on the process for anyone insane enough to try the same.

First I unpacked the initrd on another system (no cpio in the stock OS), repacked it as a tarball and copied that over to the boot partition. This can also be done on the terastation with the optware cpio, but either way it has to be done as root for the device nodes to be extracted.

Code:
wget http://debian.corenetworks.net/dists/lenny/main/installer-armel/current/images/versatile/netboot/initrd.gz
gunzip initrd.gz
mkdir deb_init
cd deb_init
cpio -i < ../initrd
tar cf ../deb_init.tar *


I copied deb_init.tar to /boot on the TS, replaced the PRODUCTID in /etc/linkstation_release with junk to force EM on the next boot, and rebooted.

After rebooting and opening up telnet with acp_commander, I reassembled the boot raid partition, created a new tmpfs mount (not enough space in the ramdisk for debian) and unpacked the debian files there. There is also a little cleanup that needs to be done in the ramdisk before starting the debian installer. I think it's safe to leave all the monitoring processes running, but I went ahead and killed them to avoid any problems. dhcpcd should definitely be killed to avoid confusing the installer, but, since this releases the lease, a new network address needs to be set in the same command.

Replacing ip_addr and netmask with whatever is being used:
Code:
miconapl -a system_set_watchdog 0
killall daemonwatch
killall miconmon clientUtil_server kernelmon errormon cat  # I think the cat is part of kernelmon
killall dhcpcd ; ifconfig eth0 <ip_addr> netmask <netmask>


And to switch to the installer initrd:
Code:
mdadm -A /dev/md0 /dev/sda1 /dev/sdb1 /dev/sdc1 /dev/sdd1
mount -o ro /dev/md0 /boot
mkdir /debian
mount -t tmpfs tmpfs /debian
cd /debian
tar xf /boot/deb_init.tar
umount /boot
mdadm -S /dev/md0
chroot .


Once in the new root, the debian installer can't just be run as it would from init since it seems to expect a real console. Instead I ran about the first half of the startup scripts to get udev running and proc mounted and then ran the installer.

Code:
/lib/debian-installer/init-udev-devices
sh /lib/debian-installer-startup.d/S01mount
sh /lib/debian-installer-startup.d/S02udev
sh /lib/debian-installer-startup.d/S10syslog
sh /lib/debian-installer-startup.d/S15lowmem
sh /lib/debian-installer-startup.d/S20templates
sh /lib/debian-installer-startup.d/S30env-preseed
debian-installer


And before it reboots either start up a new telnet session or have the installer start a shell, install ssh, the kernel, initrd and micro_evtd. For the initrd on the new system I'm just using the stock buffalo initrd modified (using the process at http://buffalo.nas-central.org/index.php/How_to_modify_an_initrd) to comment out most of HddRoot() in /linuxrc. AssembleSysMd is needed, but the only other two lines I kept are echoing the /dev/md1 device number into /proc/sys/kernel/real-root-dev and setting IS_HDDROOT to 1. I also removed the prompt near the bottom for whether to boot into ramdisk or hdd, since this isn't very useful without a serial console. At this point the initrd will do enough to boot on /dev/md1 but not do any of the annoying things like check the firmware version or copy files into /etc/init.d.

I've noticed a couple of oddities with micro_evtd on the TS, mostly related to the microapl shell script (the fan rpm multiplier seems to be different, and I can't seem to change the LCD/LED brightness), but other than that it's working great. It hasn't crashed, so the watchdog is obviously working.

I wouldn't really recommend this to anyone, since it's easy to mess up and pretty difficult to get the system running again. Before I started any of this I just took the disks out and copied the data from all of the first and second partitions with dd (takes about 3GB), along with the output of fdisk -l, so I was at least able to restore to the beginning from this.

Have you had any luck running newer kernels on a TS? Now that I have a recompiled kernel and a libc able to handle access control lists, I decided to expand my wishlist to include lvm, which it turns out doesn't work. I don't know if it's a driver/kernel mismatch, but device mapper is acting all kinds of wonky. I can create a physical volume but then I can't add it to a volume group.

But thanks for the help. My Terastation is certainly in more useful state than it was before.


Top
 Profile  
 
PostPosted: Fri Jun 27, 2008 5:47 pm 
Offline
Site Admin
User avatar

Joined: Tue Jul 12, 2005 11:26 am
Posts: 3701
Location: JAPAN
dshea: What is the difference in the fan rpm speed? I had asked for info on this before but did not get very far. Can you say by how much it is out by so I can fix it?

_________________
LS used as PVR and streaming source


Top
 Profile  
 
PostPosted: Sat Jun 28, 2008 4:34 am 
Offline
Newbie

Joined: Fri May 09, 2008 5:40 am
Posts: 11
lb_worm: It looks like the fan speed reported by the stock miconapl is the third byte returned times 10 instead of times 30, which I guess isn't a huge deal. I have gcc and gdb and all that on the terastation now if you want any numbers.


Top
 Profile  
 
PostPosted: Thu Jul 10, 2008 1:39 pm 
Offline
Regular Member

Joined: Sun Nov 25, 2007 11:32 am
Posts: 109
mindbender wrote:
as you are recreating all partitions and especially the filesystems from scratch i guess you could have used a vanilla kernel as well.

You are right - will http://www.kernel.org/pub/linux/kernel/v2.6/patch-2.6.25.10.bz2 just compile or is more work required?


Top
 Profile  
 
PostPosted: Sat Aug 09, 2008 12:00 pm 
Offline
Newbie

Joined: Thu Nov 08, 2007 12:03 pm
Posts: 6
Can someone please add the original u-boot environment to http://buffalo.nas-central.org/index.ph ... and_Values

Thanks

_________________
Martin Michlmayr
http://www.cyrius.com/


Top
 Profile  
 
PostPosted: Wed Oct 01, 2008 5:29 pm 
Offline
Newbie

Joined: Wed Jul 18, 2007 4:49 pm
Posts: 22
Question. Is this something that would work on the TSPro1. I have two of them. I read the instructions and it looks pretty straight forward. I'm just not sure about the micro_evtd.

Also I'm sure I need to do the mkimage with the correct processor type also. Any think else I'm missing? I've been jones'n to run Debian on these hogs since I bought them 2-1/2 years ago.

Sui


Top
 Profile  
 
PostPosted: Wed Oct 01, 2008 10:12 pm 
Offline
Regular Member

Joined: Sun Nov 25, 2007 11:32 am
Posts: 109
SuiDog wrote:
Question. Is this something that would work on the TSPro1. I have two of them. I read the instructions and it looks pretty straight forward. I'm just not sure about the micro_evtd.

Also I'm sure I need to do the mkimage with the correct processor type also. Any think else I'm missing?
Sui

Should be stright forward considering but you really donøt know until the end of it ;-)
I'd post in the micro_evtd thread to verify this. For mimage you will need one for this platform

Good luck


Top
 Profile  
 
PostPosted: Fri Apr 24, 2009 9:03 pm 
Offline
Newbie
User avatar

Joined: Tue May 01, 2007 1:01 pm
Posts: 18
Location: Switzerland
hello together,
i try to install debian lenny on my ts pro ll.
what i have:
ts pro ll, 4x segate 1,5tb, serial console to ts pro ll, the directory /b, mount /dev/md0 to /b.

the following files are in /b:
initrd.buffalo
kernel-2.6.16.16_TSP-usblp.tar.gz
micro_evtd_TSP.tar.gz
mkimage
uImage.buffalo

i have tftp-server running to with the following files:
initrd.buffalo
uImage.buffalo

all files are downloaded from "http://buffalo.nas-central.org/download/Users/gnyf".
after rebooting of ts pro ll i stop the booting on the first countdown and put the following in the serial console:

Code:
setenv bootargs_root root=/dev/ram0 rw inirtd=0x00800040,15M panic=5 mem=128M   
boot


the ts pro ll start and the debian installer to.
i take the english language and a swiss download-server.
the first problem is :"no kernel modules were found". i continue the installation. the downloading of files begin but stop with following failure window:

failed to load installer component
loading libc6-udeb failed for unknown reasons. aborting.

what's wrong with my installation way :roll:

thx for any help

_________________
Clevo D900K, AMD-X2 4800 2GB/1x120GB +1x160GB
Win-XP-Pro, Kubuntu Gutsy, Debian, OpenSuse , Bluewhite64, Slackware, Mandriva
Workstations in 32 and 64 Bit for testing Linux-Hard- and Software
TS-Pro v2 with NFS 1TB (testing), TS-Pro v2 2TB with NFS (production)


Top
 Profile  
 
PostPosted: Thu Nov 12, 2009 3:52 am 
Offline
Newbie

Joined: Sun Jun 14, 2009 3:18 am
Posts: 6
waldgeist wrote:
hello together,
i try to install debian lenny on my ts pro ll.
what i have:
ts pro ll, 4x segate 1,5tb, serial console to ts pro ll, the directory /b, mount /dev/md0 to /b.

the following files are in /b:
initrd.buffalo
kernel-2.6.16.16_TSP-usblp.tar.gz
micro_evtd_TSP.tar.gz
mkimage
uImage.buffalo

i have tftp-server running to with the following files:
initrd.buffalo
uImage.buffalo

all files are downloaded from "http://buffalo.nas-central.org/download/Users/gnyf".
after rebooting of ts pro ll i stop the booting on the first countdown and put the following in the serial console:

Code:
setenv bootargs_root root=/dev/ram0 rw inirtd=0x00800040,15M panic=5 mem=128M   
boot


the ts pro ll start and the debian installer to.
i take the english language and a swiss download-server.
the first problem is :"no kernel modules were found". i continue the installation. the downloading of files begin but stop with following failure window:

failed to load installer component
loading libc6-udeb failed for unknown reasons. aborting.

what's wrong with my installation way :roll:

thx for any help


I have the same problem!!

Does anyone tell me why?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 posts ] 

All times are UTC [ DST ]


Who is online

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