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):
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”
mount /dev/md0 /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
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 184.108.40.206 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.
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:
then copy the kernel – I really wan’t to skip all Buffalo
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.
setenv bootargs_root root=/dev/ram0 rw inirtd=0x00800040,15M panic=5 mem=128M
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:
>> setenv bootcmd 'ide reset; ext2load ide 0:1 0x00100000 /uImage; setenv bootargs console=ttyS0,115200 root=/dev/md1 rw; bootm 0x00100000'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.
cp micro_evtd_TSP.tar.gz /
tar xvf micro_evtd_TSP.tar.gz
Verify its running (ps –ef), and check /tmp/micro_evtd/my_status
Assuming everything works we can now check md2 as follows
umount /opt (or whatever mount point you have)
Now install the kernel modules.
cp /boot/kernel-220.127.116.11_TSP-usblp.tar.gz .
tar xvzf kernel-18.104.22.168_TSP-usblp.tar.gz
Now reboot again, and check it’s working as expected.
Log in again, then change /etc/apt/sources.list – change sid to testing
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:
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.