Upgrade Debian 5.0 (Lenny) To Debian 6.0 (Squeeze) On Buffalo Linkstation Mini

From NAS-Central Buffalo - The Linkstation Wiki
Jump to: navigation, search


There is a possibility that you could brick your NAS with these instructions. Please make sure that you read the entire page carefully. These instructions may void your warranty. Proceed at your own risk.

Linkstation Mini


The following process upgrades an existing installation of Debian 5.0 on a Buffalo Linkstation Mini (model LS-WSxxxxGL/R1) to Debian 6.0 (Squeeze) with the Debian Linux kernel (version 2.6.32-31). No disassembly required. Here is how the process works:

  1. Update package sources
  2. Upgrade distribution
  3. Install new kernel
  4. Restart device


  1. Buffalo LinkStation Mini models LS-WSxxxxGL/R1 running Debian 5.0 (LS-WSXxxxxTL/R1 models will not work)
    • This process was tested with model LS-WS1.0TGL/R1, but other models may work as well


Note: Do not attempt to execute the following commands as a single script. Instead, copy and paste each block of commands into a shell window and monitor the resulting output for errors

Nuvola apps important.png 

These instructions might not work depending on how you have configured your Debian installation.

Many problems may occur including failure to start the network interface (rendering the device unreachable). You may need to disassemble the device and mount the hard drives in another computer to correct any problems that occur.

Proceed at your own risk.

  1. Assign IP Address of device to environment variable
  2. Use SSH to login as root
     ssh root@${IP_ADDRESS}
  3. Change package source to Debian 6 repository (replace lenny with squeeze in /etc/apt/sources.list)
     sed -r "s~${SED_SEARCH}~${SED_REPLACE}~" -i "${SED_FILE}"
  4. Update package lists (from Debian 6.0 repository)
     apt-get update
  5. Install screen package (to recover from possible disconnect during upgrade)
     apt-get -q -y install screen
  6. Start screen application (if you are disconnected during upgrade, then login again and run "screen -Dr" to resume your session)
  7. Install packages to support upgrade process
     apt-get -q -y install apt aptitude dpkg
  8. Upgrade to Debian 6 (when prompted with questions, choose default answers)
     apt-get -q -y dist-upgrade
  9. Workaround bug in Debian 6 (/etc/network/run links to /dev/shm/network, but directory is missing, which prevents network interfaces from starting)
     mv /etc/network/run run.original
     mkdir /etc/network/run
     touch /etc/network/run/ifstate
  10. Install custom kernel (Debian 6.0 kernel 2.6.32-31)
     cd /
     wget http://downloads.buffalo.nas-central.org/Users/rpinchbeck/lsmini/debian/6.0/kernel-2.6.32-31-debian-lsmini.tar.gz
     tar --extract --verbose --same-permissions --gzip --file kernel-2.6.32-31-debian-lsmini.tar.gz
  11. Wait for RAID synchronization to complete
     while egrep -iq '(recovery)|(resync)' /proc/mdstat; do
         cat /proc/mdstat
         sleep 5
     cat /proc/mdstat
  12. Restart device
     sync; reboot; logout

Congratulations! Your Buffalo Linkstation Mini should now be running Debian 6.0!

See Also