Difference between revisions of "Debian Squeeze on 'V' and 'X' Series (LS-WXL and others)"

From NAS-Central Buffalo - The Linkstation Wiki
Jump to: navigation, search
(Debootstrap)
 
(38 intermediate revisions by 7 users not shown)
Line 12: Line 12:
 
== What you need beforehand ==
 
== What you need beforehand ==
  
You have to be able to use the root account on the NAS.<br>
+
You have to be able to use the root account on the NAS.
You can use [http://forum.buffalo.nas-central.org/viewtopic.php?f=68&t=21865] CHL-v2/XHL 1.37 Mod 1 firmware to do that.
+
You can follow [[Open Stock Firmware LS-VL]] or use [http://forum.buffalo.nas-central.org/viewtopic.php?f=68&t=23603] CHL-v2/XHL 1.xx Mod 1 firmware to do that.
  
 
== Debootstrap ==
 
== Debootstrap ==
 
You need to install debootstrap.<br>
 
You need to install debootstrap.<br>
 
To be able to do this, you need to download the package.<br>
 
To be able to do this, you need to download the package.<br>
Log on as user root on your box and and execute this:
+
 
   wget http://ftp.us.debian.org/debian/pool/main/d/debootstrap/debootstrap_1.0.28_all.deb
+
{{tip|It doesn't really matter which directory you're in for this step. There is no harm in being in /root, which is where you'll be anyway by default once you log on as root.}}
   dpkg -i debootstrap_1.0.28_all.deb
+
 
To install the new rootfs into a directory "debian-squeeze" execute this:
+
Log on as user root on your LinkStation. Execute this:
 +
   wget http://ftp.us.debian.org/debian/pool/main/d/debootstrap/debootstrap_1.0.42_all.deb
 +
   dpkg -i debootstrap_1.0.42_all.deb
 +
To install the new rootfs into a directory ''debian-squeeze'' execute this:
 
   mkdir debian-squeeze
 
   mkdir debian-squeeze
 
   debootstrap --verbose --arch armel squeeze debian-squeeze http://ftp.us.debian.org/debian
 
   debootstrap --verbose --arch armel squeeze debian-squeeze http://ftp.us.debian.org/debian
 
You may want to select a [http://www.debian.org/mirror/list mirror nearby yourself] for faster downloads.
 
You may want to select a [http://www.debian.org/mirror/list mirror nearby yourself] for faster downloads.
  
When you see ''I: Base system installed successfully.'' the roots FS is almost ready.
+
This takes some time. When you see ''I: Base system installed successfully.'' the roots FS is almost ready.
  
 
== Personalize the deboostrap ==
 
== Personalize the deboostrap ==
 +
 
You need to have some other stuff to be able to boot off the boostrap.<br>  
 
You need to have some other stuff to be able to boot off the boostrap.<br>  
 +
 
Copy the initrd to the chroot environment:
 
Copy the initrd to the chroot environment:
 
   cp /boot/initrd.buffalo debian-squeeze/tmp
 
   cp /boot/initrd.buffalo debian-squeeze/tmp
 +
 
Chroot on Debian Squeeze:
 
Chroot on Debian Squeeze:
 
   LANG=C chroot debian-squeeze /bin/bash
 
   LANG=C chroot debian-squeeze /bin/bash
Copy kernel module to the /lib/module folder:
+
 
 +
First of all update the package database to have the correct GPG-keys:
 +
  apt-get update
 +
 
 +
Copy kernel modules from the linkstations initrd to the /lib/module folder:
 
   cd /tmp
 
   cd /tmp
 
   dd if=initrd.buffalo of=initrd.gz ibs=64 skip=1
 
   dd if=initrd.buffalo of=initrd.gz ibs=64 skip=1
Line 40: Line 50:
 
   mkdir INITRD
 
   mkdir INITRD
 
   mount -t ext2 -o loop initrd INITRD  
 
   mount -t ext2 -o loop initrd INITRD  
   cp -R INITRD/lib/modules/2.6.31.8-svn22059 /lib/modules/
+
   cp -R INITRD/lib/modules/2.6.[3-9]?* /lib/modules/
 
   umount INITRD
 
   umount INITRD
 
   rmdir INITRD
 
   rmdir INITRD
 
   rm initrd*
 
   rm initrd*
Add missing devices:
+
 
  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).
 
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).
 
   apt-get install locales
 
   apt-get install locales
 
   dpkg-reconfigure locales
 
   dpkg-reconfigure locales
If apt-get complains that pts isn't accessible: ignore it or mount devpts (''mount -t devpts devpts /dev/pts'')<br>
+
 
 +
If apt-get complains that pts isn't accessible: ignore it or mount devpts (''mount -t devpts devpts /dev/pts'').
 +
 
 +
If you are going to set up a raid, install mdadm:
 +
mount -t proc proc /proc
 +
apt-get install --no-install-recommends mdadm
 +
umount /proc
 +
 
 +
 
 
Editing /etc/fstab (with vi or nano):
 
Editing /etc/fstab (with vi or nano):
  # /etc/fstab: static file system information.
+
# /etc/fstab: static file system information.
  #
+
#
  # file system    mount point  type    options                  dump pass
+
# file system    mount point  type    options                  dump pass
  /dev/sda2        /            xfs    defaults,noatime        0    1
+
/dev/sda2        /            xfs    defaults,noatime        0    1
  /dev/sda1        /boot        ext3    ro,nosuid,nodev          0    2
+
/dev/sda1        /boot        ext3    ro,nosuid,nodev          0    2
  /dev/sda5        none          swap    sw                      0    0
+
/dev/sda5        none          swap    sw                      0    0
  /dev/sda6        /mnt/disk1    xfs    defaults,noatime        0    0
+
/dev/sda6        /mnt/disk1    xfs    defaults,noatime        0    0
  proc            /proc        proc    defaults                0    0
+
proc            /proc        proc    defaults                0    0
  devpts          /dev/pts      devpts  gid=4,mode=620   0    0
+
devpts          /dev/pts      devpts  gid=4,mode=620   0    0
  tmpfs            /tmp          tmpfs  defaults                0    0
+
tmpfs            /tmp          tmpfs  defaults                0    0
  sysfs            /sys          sysfs  defaults                0    0
+
sysfs            /sys          sysfs  defaults                0    0
 +
 
 +
If you are going to set up a raid, install mdadm:
 +
mount -t proc proc /proc
 +
apt-get install --no-install-recommends mdadm
 +
umount /proc
 +
 
 
Create disk1 in mnt:
 
Create disk1 in mnt:
 
   mkdir /mnt/disk1
 
   mkdir /mnt/disk1
Edit /etc/network/interfaces to match your LAN configuration.<br>
+
 
If you use DHCP:
+
If you are going to set up a raid, create array1 in mnt instead:
  # Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or
+
  mkdir /mnt/array1
  # /usr/share/doc/ifupdown/examples for more information.
+
 
 
+
Edit /etc/network/interfaces to match your LAN configuration.
  # We always want the loopback interface.
+
 
  auto lo
+
If you use DHCP, simply request an IP on eth0 an eth1:
  iface lo inet loopback
+
# Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or
 
+
# /usr/share/doc/ifupdown/examples for more information.
  auto eth1
+
  iface eth1 inet dhcp
+
# We always want the loopback interface.
If you have static IP:
+
auto lo
  # Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or
+
iface lo inet loopback
  # /usr/share/doc/ifupdown/examples for more information.
+
 
+
auto eth0
  # We always want the loopback interface.
+
iface eth0 inet dhcp
  auto lo
+
  iface lo inet loopback
+
auto eth1
 
+
iface eth1 inet dhcp
  auto eth1
+
 
  iface eth1 inet static
+
If you have static IP: Make sure to use the correct interface name, otherwise your Linkstation may boot up but will not get an IP address. Check etc/udev/rules.d/70-persistent-net.rules for this.
        address 192.168.1.6
+
 
        network 192.168.1.0
+
# Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or
        netmask 255.255.255.0
+
# /usr/share/doc/ifupdown/examples for more information.
        gateway 192.168.1.1
+
Edit /etc/hostname  
+
# We always want the loopback interface.
  MYNAS
+
auto lo
Edit /etc/hosts
+
iface lo inet loopback
  127.0.0.1      localhost.localdomain localhost
+
  127.0.0.1      NAS
+
auto eth0
  # The following lines are desirable for IPv6 capable hosts
+
iface eth0 inet static
  ::1 ip6-localhost ip6-loopback
+
      address 192.168.1.6
  fe00::0 ip6-localnet
+
      network 192.168.1.0
  ff00::0 ip6-mcastprefix
+
      netmask 255.255.255.0
  ff02::1 ip6-allnodes
+
      gateway 192.168.1.1
  ff02::2 ip6-allrouters
+
 
  ff02::3 ip6-allhosts
+
Set /etc/hostname  
 +
  echo > /etc/hostname MYNAS
 +
 
 +
Edit /etc/hosts to resolve your hostname
 +
127.0.0.1      localhost.localdomain localhost
 +
127.0.0.1      MYNAS
 +
# 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:
 
Install sshd:
   apt-get install openssh-server
+
   apt-get install --no-install-recommends openssh-server
 +
 
 
Change root password:
 
Change root password:
 
   passwd root
 
   passwd root
Check that root login is enable in /etc/sshd/sshd_config:
+
 
   PermitRootLogin yes
+
Check that root login is enable in /etc/ssh/sshd_config:
 +
   grep PermitRootLogin /etc/ssh/sshd_config
 +
should show a line "PermitRootLogin yes".
 +
 
 +
Clean up the package database (this reduces the size quite a lot)
 +
  aptitude clean
 +
 
 
Prepare rootfs:
 
Prepare rootfs:
 
   exit
 
   exit
 
   cd debian-squeeze
 
   cd debian-squeeze
 
   tar --numeric-owner -p -czf ../hddrootfs.buffalo.updated *
 
   tar --numeric-owner -p -czf ../hddrootfs.buffalo.updated *
Move hddrootfs.buffalo.updated to a folder that you can access from you computer.<br>
+
  cd ..
Download empty initrd from [http://tyche.pu-toyama.ac.jp/~a-urasim/lsxhl/data/initrd.buffalo] to your lsupdater folder.<br>
+
 
Copy hddrootfs.buffalo.updated to your lsupdater folder.<br>
+
=== Prepare an initrd image ===
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)<br>
+
 
Add debug options to lsupdate: open LSUpdater.ini and check that it look like that :
+
If you are going to set up a raid, you need to build an [[Initrd for Raid-Boot]].
  [Application]
+
 
  Title = BUFFALO LinkStation Series Updater Ver.1.37 Mod1
+
If you are not going to use an Raid:  Download empty initrd from [http://tyche.pu-toyama.ac.jp/~a-urasim/lsxhl/data/initrd.buffalo]. If you do not trust an external source like this you may either a) follow the instructions in [[Initrd for Raid-Boot]] (but leave teh content away) or b) check the content of this one as shown [[#Personalize_the_deboostrap|above]].
  WaitReboot = 1200
+
  wget http://tyche.pu-toyama.ac.jp/~a-urasim/lsxhl/data/initrd.buffalo
  WaitFormat = 600
+
Yes, an empty initrd is okay: When the kernel boots up, it will just find nothing to do in the initrd and continue booting from the harddisk. The boot device is defined by the uboot bootloader image.
  WaitFileSend = 600
+
 
 
+
In both cased, put the ''intrd.buffallo'' into the current directory.
  [Target]
+
 
  ProductID = 0x00000011
+
== Perform the Update ==
  ProductID2 = 0x00000012
+
 
  ProductID3 = 0x00000014
+
<span style="color:red">'''Warning 1:'''</span> This will delete '''all''' data on the root partition, including all ''/etc'' and ''/root''. If you have valuable data there, put it on another computer first.
  ProductID4 = 0x00003006
+
 
  ProductID5 = 0x00003007
+
<span style="color:red">'''Warning 2:'''</span> While this should ''only'' delete the root partition, make a backup of your data first.
  ProductID6 = 0x00000015
+
 
  ProductID7 = 0x00000016
+
=== Installmethod 1: Copy file to /boot ===
  ProductID8 = 0x00003008
+
 
  Name = LinkStation
+
As [[Analysis of the ARM9 boot process]] shows, it's absolutely okay to simply copy the required files into /boot and reboot. Running LSUpdater in the end does the same, but using LSUdater is more cumbersome.
 
+
 
  [Flags]
+
* Still on your LS, working directory is where you've put ''hddrootfs.buffalo.updated'' ''intrd.buffallo''
  VersionCheck = 0
+
 
  NoFormatting = 1
+
* You may want to make an (additional)  backup of the original files. The update/boot process will create a copy, too, but will happily overwrite any existing. So it's better to have a reliable copy.
 
+
cp /boot/initrd.buffalo /boot/initrd.buffalo.orig
  [specialflags]
+
mv /boot/hddrootfs.buffalo.updated.done /boot/hddrootfs.buffalo.updated.orig
  debug = 1
+
 
Update your NAS, reboot.<br>
+
{{tip|It's possible that ''/boot/hddrootfs.buffalo.updated.done'' doesn't exist. If it doesn't, don't worry about it.}}
Now you are on Debian Squeeze !<br>
+
 
If you configured your nas before, some settings should be saved in a tgz file: /boot/conf_save.tgz <br>
+
* Now install the new files
 +
cp hddrootfs.buffalo.updated /boot/hddrootfs.buffalo.updated
 +
cp initrd.buffalo /boot/initrd.buffalo.updated
 +
 
 +
* Reboot
 +
 
 +
The *.updated files in /boot will be automatically picked up after the reboot and the new debootstrapped filesystem will be put in place. This is pretty much what LSUpdater itself does.
 +
 
 +
* Now you are on Debian Squeeze!
 +
 
 +
=== Installmethod 2: Using LSupdater ===
 +
 
 +
* Still on your LS: Move ''hddrootfs.buffalo.updated'' and the ''intrd.buffallo'' file to a folder that you can access from you computer.
 +
 
 +
Now continue on you Windows or OSX PC (unfortunately LSUpdater does not run on Linux, not even in Wine)
 +
 
 +
* Go 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 Flags and specialflags are set like this:
 +
[Flags]
 +
VersionCheck = 0
 +
NoFormatting = 1
 +
 +
[specialflags]
 +
debug = 1
 +
 
 +
* Copy ''hddrootfs.buffalo.updated'' and ''intrd.buffallo'' rom your LS.
 +
 
 +
* Update your NAS (ignoring any errors about files not found), 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
 +
 
 +
== After install ==
 +
 
 +
If you are an experiened ssh-user, you may want to copy your public key to ease login. On a Unix/Linux system this is a breeze:
 +
ssh-copy-id -i ~/.ssh/id_rsa.pub root@IPADDR
 +
 
 
Install blstools:
 
Install blstools:
  apt-get install smartmontools
+
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
+
wget http://downloads.sourceforge.net/project/blstools/releases/blstools-0.3.0.tar.gz
  tar zxf blstools-0.2.0.tar.gz
+
tar zxf blstools-0.3.0.tar.gz
  cd blstools-0.1.0
+
cd blstools-0.3.0
  sudo ./install.sh
+
./install.sh
 +
 
 
Modify /etc/init.d/lsmonitor (the line where HDDTEMP is defined) to:
 
Modify /etc/init.d/lsmonitor (the line where HDDTEMP is defined) to:
  # Retrieve HDD temp
+
  # Retrieve HDD temp
        HDDTEMP=$(smartctl -d marvell /dev/sda --all -T permissive | awk '$1 == "194" {print $10}')
+
      HDDTEMP=$(smartctl -d marvell /dev/sda --all -T permissive | awk '$1 == "194" {print $10}')
 +
 
 +
Turn on bootlogging:
 +
  # nano /etc/default/bootlogd
 +
      BOOTLOGD_ENABLE=yes
 +
 
 +
Install xfs tools:
 +
apt-get install xfsprogs
 +
Configure timezone
 +
dpkg-reconfigure tzdata
 +
 +
Install Debian security updates. Edit the file /etc/apt/sources.list and add the following line:
 +
deb http://security.debian.org/ squeeze/updates main contrib non-free
 +
Then install security upgrades
 +
apt-get update && apt-get upgrade
 +
 
 +
=== Some other cleanup ===
 +
 
 +
Some other stuff you may want to do after installation.
 +
<span style='color:red'>Warning:</span> Check by your own whether you want to do this!
  
 +
rm /etc/motd.tail
 +
apt-get install less file
 +
apt-get install --no-install-recommends emacs23-nox
  
 
[[Category:LS-CHLv2]]
 
[[Category:LS-CHLv2]]
Line 163: Line 264:
 
[[Category:LS-WSXL]]
 
[[Category:LS-WSXL]]
 
[[Category:LS-WVL]]
 
[[Category:LS-WVL]]
 +
[[Category:Debian]]

Latest revision as of 08:03, 20 September 2012

Contents

Credits

This is based on Debian Lenny on LS-CHLv2 and Open Stock Firmware LS-XHL and was published first here [1] by user benoqkuke.

What will you get?

You will not have to open your box (at least not unless you make a fatal mistake)!
You will have a Debian Squeeze userland and the stock Buffalo kernel of your already installed firmware.
So it is not a full replacement of Buffalos firmware, but mostly. ;-)
To have a "complete" Debian Squeeze installation one would need to replace the kernel also. But user benoqkuke hasn't managed to build his own kernel (newer than 2.6.31) yet. So stay tuned, if you want to have a more recent kernel also.

What you need beforehand

You have to be able to use the root account on the NAS. You can follow Open Stock Firmware LS-VL or use [2] CHL-v2/XHL 1.xx Mod 1 firmware to do that.

Debootstrap

You need to install debootstrap.
To be able to do this, you need to download the package.

Tip.png
TIP

It doesn't really matter which directory you're in for this step. There is no harm in being in /root, which is where you'll be anyway by default once you log on as root.

Log on as user root on your LinkStation. Execute this:

  wget http://ftp.us.debian.org/debian/pool/main/d/debootstrap/debootstrap_1.0.42_all.deb
  dpkg -i debootstrap_1.0.42_all.deb

To install the new rootfs into a directory debian-squeeze execute this:

  mkdir debian-squeeze
  debootstrap --verbose --arch armel squeeze debian-squeeze http://ftp.us.debian.org/debian

You may want to select a mirror nearby yourself for faster downloads.

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

Personalize the deboostrap

You need to have some other stuff to be able to boot off the boostrap.

Copy the initrd to the chroot environment:

  cp /boot/initrd.buffalo debian-squeeze/tmp

Chroot on Debian Squeeze:

  LANG=C chroot debian-squeeze /bin/bash

First of all update the package database to have the correct GPG-keys:

 apt-get update

Copy kernel modules from the linkstations initrd to the /lib/module folder:

  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.[3-9]?* /lib/modules/
  umount INITRD
  rmdir INITRD
  rm initrd*

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).

  apt-get install locales
  dpkg-reconfigure locales

If apt-get complains that pts isn't accessible: ignore it or mount devpts (mount -t devpts devpts /dev/pts).

If you are going to set up a raid, install mdadm:

mount -t proc proc /proc
apt-get install --no-install-recommends mdadm
umount /proc


Editing /etc/fstab (with vi or nano):

# /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

If you are going to set up a raid, install mdadm:

mount -t proc proc /proc
apt-get install --no-install-recommends mdadm
umount /proc

Create disk1 in mnt:

  mkdir /mnt/disk1

If you are going to set up a raid, create array1 in mnt instead:

  mkdir /mnt/array1

Edit /etc/network/interfaces to match your LAN configuration.

If you use DHCP, simply request an IP on eth0 an eth1:

# 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 eth0
iface eth0 inet dhcp

auto eth1
iface eth1 inet dhcp

If you have static IP: Make sure to use the correct interface name, otherwise your Linkstation may boot up but will not get an IP address. Check etc/udev/rules.d/70-persistent-net.rules for this.

# 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 eth0
iface eth0 inet static
     address 192.168.1.6
     network 192.168.1.0
     netmask 255.255.255.0
     gateway 192.168.1.1

Set /etc/hostname

 echo > /etc/hostname MYNAS

Edit /etc/hosts to resolve your hostname

127.0.0.1       localhost.localdomain localhost
127.0.0.1       MYNAS
# 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:

  apt-get install --no-install-recommends openssh-server

Change root password:

  passwd root

Check that root login is enable in /etc/ssh/sshd_config:

  grep PermitRootLogin /etc/ssh/sshd_config 

should show a line "PermitRootLogin yes".

Clean up the package database (this reduces the size quite a lot)

  aptitude clean

Prepare rootfs:

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

Prepare an initrd image

If you are going to set up a raid, you need to build an Initrd for Raid-Boot.

If you are not going to use an Raid: Download empty initrd from [3]. If you do not trust an external source like this you may either a) follow the instructions in Initrd for Raid-Boot (but leave teh content away) or b) check the content of this one as shown above.

 wget http://tyche.pu-toyama.ac.jp/~a-urasim/lsxhl/data/initrd.buffalo

Yes, an empty initrd is okay: When the kernel boots up, it will just find nothing to do in the initrd and continue booting from the harddisk. The boot device is defined by the uboot bootloader image.

In both cased, put the intrd.buffallo into the current directory.

Perform the Update

Warning 1: This will delete all data on the root partition, including all /etc and /root. If you have valuable data there, put it on another computer first.

Warning 2: While this should only delete the root partition, make a backup of your data first.

Installmethod 1: Copy file to /boot

As Analysis of the ARM9 boot process shows, it's absolutely okay to simply copy the required files into /boot and reboot. Running LSUpdater in the end does the same, but using LSUdater is more cumbersome.

  • Still on your LS, working directory is where you've put hddrootfs.buffalo.updated intrd.buffallo
  • You may want to make an (additional) backup of the original files. The update/boot process will create a copy, too, but will happily overwrite any existing. So it's better to have a reliable copy.
cp /boot/initrd.buffalo /boot/initrd.buffalo.orig
mv /boot/hddrootfs.buffalo.updated.done /boot/hddrootfs.buffalo.updated.orig
Tip.png
TIP

It's possible that /boot/hddrootfs.buffalo.updated.done doesn't exist. If it doesn't, don't worry about it.

  • Now install the new files
cp hddrootfs.buffalo.updated /boot/hddrootfs.buffalo.updated
cp initrd.buffalo /boot/initrd.buffalo.updated
  • Reboot

The *.updated files in /boot will be automatically picked up after the reboot and the new debootstrapped filesystem will be put in place. This is pretty much what LSUpdater itself does.

  • Now you are on Debian Squeeze!

Installmethod 2: Using LSupdater

  • Still on your LS: Move hddrootfs.buffalo.updated and the intrd.buffallo file to a folder that you can access from you computer.

Now continue on you Windows or OSX PC (unfortunately LSUpdater does not run on Linux, not even in Wine)

  • Go 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 Flags and specialflags are set like this:
[Flags]
VersionCheck = 0
NoFormatting = 1

[specialflags]
debug = 1
  • Copy hddrootfs.buffalo.updated and intrd.buffallo rom your LS.
  • Update your NAS (ignoring any errors about files not found), 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

After install

If you are an experiened ssh-user, you may want to copy your public key to ease login. On a Unix/Linux system this is a breeze:

ssh-copy-id -i ~/.ssh/id_rsa.pub root@IPADDR

Install blstools:

apt-get install smartmontools
wget http://downloads.sourceforge.net/project/blstools/releases/blstools-0.3.0.tar.gz
tar zxf blstools-0.3.0.tar.gz
cd blstools-0.3.0
./install.sh

Modify /etc/init.d/lsmonitor (the line where HDDTEMP is defined) to:

 # Retrieve HDD temp
     HDDTEMP=$(smartctl -d marvell /dev/sda --all -T permissive | awk '$1 == "194" {print $10}')

Turn on bootlogging:

 # nano /etc/default/bootlogd
     BOOTLOGD_ENABLE=yes

Install xfs tools:

apt-get install xfsprogs

Configure timezone

dpkg-reconfigure tzdata

Install Debian security updates. Edit the file /etc/apt/sources.list and add the following line:

deb http://security.debian.org/ squeeze/updates main contrib non-free

Then install security upgrades

apt-get update && apt-get upgrade

Some other cleanup

Some other stuff you may want to do after installation. Warning: Check by your own whether you want to do this!

rm /etc/motd.tail
apt-get install less file
apt-get install --no-install-recommends emacs23-nox