Install Debian Lenny on Stock Kurobox

From NAS-Central Buffalo - The Linkstation Wiki
Revision as of 18:27, 11 August 2010 by Nicholas.robinson (Talk | contribs) (Limitations)

Jump to: navigation, search
Nuvola apps important.png 

This procedure requires repartitioning and reformatting your Kurobox's hard drive, erasing ALL existing data.
Please backup ALL important data before proceeding!

This is a guide to installing the latest stable release of Debian Lenny 5.0.5 with kernel on a KuroboxHG with stock firmware.


Whilst much information is available for installing various Debian releases on the Kurobox/KuroboxHG, most installations require re-flashing the device's firmware with uBoot. This guide details installation on a Kurobox/KuroboxHG running the stock firmware, eliminating the risk of re-flashing with uBoot. This is achieved by installing Debian Sarge 3.1 as an auxiliary operating system, using loader.o to load a kernel and then booting Debian Lenny 5.0.5 from a separate partition.

The Installation procedure is very simple and summarised by the following steps:

  1. Force EM Mode
  2. Login via Telnet
  3. Partition the Hard Drive
  4. Transfer Debian Images
  5. Extract Debian Images
  6. Configure and Reboot

Following this, Basic Configuration is discussed:

  1. Initial Configuration
  2. Install Services

Finally, Limitations are outlined to encourage further development.


Force EM Mode

EM mode is easily entered by installing a new drive in your Kurobox.


  • SSH into KuroBox
  • Erase MBR:
dd if=/dev/zero of=/dev/hda bs=512 count=1
  • Reboot:


  • Dismantle KuroBox by depressing tabs and sliding off sheath
  • Remove hard drive by further dismantling and removal of screws
  • Connect drive to another machine via IDE / USB->IDE converter
  • Erase MBR:
dd if=/dev/zero of=/dev/disk1 bs=512 count=1
  • Reassemble KuroBox
  • Boot KuroBox

Log In via Telnet

Assuming you have successfully entered EM mode, the Kurobox will assume the address in the absence of a DHCP server. If you are running DHCP, please consult your DHCP client list to determine the Kurobox's address.

Login via telnet:

  • Username: root
  • Password: kuroadmin

Partition the Hard Drive

Our goal is to create the following partiton-table:

/dev/hda1 Bootable Type 83(Linux) 2GB for Sarge
/dev/hda2 Type 82(LinuxSwap) 256MB 
/dev/hda1 Type 83(Linux) 4GB for Lenny
/dev/hda3 Type 83(Linux) the rest of the Disk 
  • Clear existing partitions:
mfdisk -e /dev/hda
  • Create new partitions map (2GB Sarge[boot], 256MB Swap, 4GB Lenny, xxGB Data):
mfdisk -c /dev/hda 
  • Create Sarge system partition:
n <enter> p <enter> 1 <enter> <enter> +2048M <enter>
  • Make Sarge system partition bootable:
a <enter> 1 <enter> 
  • Make Swap partition:
n <enter> p <enter> 2 <enter>  <enter>  +256M <enter>
  • Designate Swap:
t <enter> 2 <enter> 82 <enter>
  • Create Lenny system partition:
n <enter> p <enter> 3 <enter> <enter> +4096M <enter>
  • Make Data:
n <enter> p <enter> 4 <enter> <enter> <enter> 
  • Print partition map:
p <enter> 
  • Write partition map to disk:
w <enter>
  • Format partitions:
mkfs -j /dev/hda1
mkfs -j /dev/hda3
mkfs -j /dev/hda4
mkswap /dev/hda2
  • Mount Sarge partition:
mkdir /mnt/hda1
mount /dev/hda1 /mnt/hda1
  • Mount Lenny partition:
mkdir /mnt/hda3
mount /dev/hda3 /mnt/hda3

Transfer Debian Images

  • Connect to the KuroBox via FTP:
    • Address:
    • Username: root
    • Password: kuroadmin
  • Transfer debian-sarge- to /mnt/hda1
  • Transfer debian-lenny- to /mnt/hda3

Extract Debian Images

  • Extract Sarge image with:
cd /mnt/hda1
tar xvzf /mnt/hda1/debian-sarge-
  • Extract Lenny image with:
cd /mnt/hda3
tar xvzf /mnt/hda3/debian-lenny-
  • Delete the images with:
rm /mnt/hda1/debian-sarge-
rm /mnt/hda3/debian-lenny-

Note: If you are using a non-HG Kurobox, both Sarge and Lenny kernel images should be replaced by extracting to /mnt/hda1/boot' and /mnt/hda3/boot

Configure and Reboot

By default both debian installations are configured to acquire their address via DHCP with the hostname "KURO-BOX". If you need to change these details:

  • Configure interfaces:
    • Sarge
vi /mnt/hda1/etc/network/interfaces
    • Lenny
vi /mnt/hda3/etc/network/interfaces
  • Configure hostname:
    • Sarge
vi /mnt/hda1/etc/hostname
    • Lenny
vi /mnt/hda3/etc/hostname
  • Finally, to boot into Debian Lenny 5.05, type:

Basic Configuration

Initial Configuration

After a successful reboot, the following initial configuration steps are recommended:

  • Log in via telnet
    • Username: tmp-kun
    • Password: tmp-kun
  • Setup Terminal:
export TERM=vt100
  • Switch to super user:
    • Password = root
  • Change root password:
  • Create a user account:
adduser username
  • Reconnect via Telnet as username
  • Switch to super user
  • Remove user tmp-kun:
deluser tmp-kun
rm -Rf /home/tmp-kun/
  • Update Package List:
apt-get update
  • Upgrade installed packages:
apt-get dist-upgrade

Install Services

Services will vary dependant on usage, however most users will require SSH, installed via:

apt-get install ssh


Ideally the auxiliary Sarge installation should not be necessary, however much work is required to facilitate this. Please let me know if you have such a solution.

In the meantime, the current limitations exist and require solutions:

  1. Shutdown does not work correctly: After issuing a shutdown now command the system does not halt. This should be simple to fix
  2. Reboot does not work correctly: After issuing a reboot command the system reboots in Sarge 3.1 running the stock 2.4.17 kernel.

Please let me know or amend this article if you discover solutions or further limitations.

Change Log


The Sarge image referenced here is derived from, patched with the KuroboxHG image found at / The sources.list has been updated to reflect the current 'archived' status of Debian sarge and all updates as of 23/07/2010 have been applied.

The Lenny image referenced here is derived from, patched with the KuroboxHG image found at / All updates as of 23/07/2010 have been applied.


Feedback and discussion is welcomed via