NSLU2-Linux
view · edit · print · history

Although Debian Installer supports NSLU2, it does not support the NAS100d. The only way to install it is by using debootstrap. Here is a summary of the procedure to be used for installing Debian Etch on a NAS100d.

Download SlugOS/LE from slug-firmware.net (download SlugOSLE?-*-other-targets.zip).

Decompress the zip file.

Boot the device with serial cable attached. Interrupt the boot process by pressing Ctrl-C.

Resize the sysconfig partition and create a partition for apex (see in FisList page for the partition scheme to install and the procedure to follow).

Transfer and flash apex.

 load -m xmodem -r -b 0x1000000
 fis write -f 0x50fa0000 -b 0x1000000 -l sizeOfApex.bin

Transfer and flash the kernel to the kernel partition.

 load -m xmodem -r -b 0x400000
 fis write -f 0x50040000 -b 0x400000 -l sizeOfZImage.bin

Transfer and flash the root filesystem to the ramdisk partition. (Erase the partition first to make JFFS2 happy.)

 load -m xmodem -r -b 0xB00000
 fis erase -f 0x50240000 -l 0x600000
 fis write -f 0x50240000 -b 0xB00000 -l sizeOfRootJffs

Setup apex as a second stage bootloader. Use fconfig to set bootscript to fis load apex -b 0x1000000 ; g 0x1000000

Run apex. Let it boot SlugOS.

 g 0x1000000

In SlugOS, install the kernel-module-pata-artop (for hard disk support).

 ipkg update
 ipkg install kernel-module-pata-artop

Partition the hard disk (one partition for swap, one for Debian root, one for the data).

 fdisk /dev/sda

Run debootstrap (follow the Bootstrap page). Don't forget to install an up-to-date kernel (> 2.6.18) otherwise you will miss the support for the harddisk in debian.

Copy the kernel and initrd from /boot directory to host computer.

Reboot and interrupt the boot in Redboot by pressing Ctrl-C.

Transfer and flash the debian kernel to the kernel partition.

 load -m xmodem -r -b 0x400000
 fis write -f 0x50040000 -b 0x400000 -l sizeOfVmlinuz

Transfer and flash the initrd to the ramdisk partition. (Use a 0 filled buffer for padding the partition.)

 mfill -b 0x00B00000 -l 0x00600000 -p 0 -1 
 load -m xmodem -r -b 0xB00000
 fis write -f 0x50240000 -b 0xB00000 -l 0x600000

Download APEX for debian on a NAS100d from http://ipkg.nslu2-linux.org/feeds/kernel/ .

Transfer and flash the debian apex for NAS 100d.

 load -m xmodem -r -b 0x1000000
 fis write -f 0x50fa0000 -b 0x1000000 -l sizeOfApexDebianNas100d.bin

Reboot

Things to remember

  • NAS' Redboot is big endian
  • NAS' Redboot has no limit on the kernel size so APEX is not strictly required to work around big kernel problems found in NSLU2. However, as it is BE, kernel would need a prefix that toggles the CPU endianness. Apex does that making life easier with existing images.
  • APEX found in feeds is configured to be located in flash at 0x50FA0000. Its environment is stored at the end of the erase block (starting at 0x50FBC000).
  • You must use APEX compiled for NAS100d (it has board specific code)
  • You could use SlugOS version of APEX to boot Debian but you need to change the cmdline variable in the environment and the boot script.
  • SlugOS kernel found on the download site contains the firmware for the network interface. This firmware is copied in the Debian root during the bootstrap procedure. Another option is to store the firmware in flash (in a partition called "microcode").
  • To be recognized, the initrd MUST be padded with 0's upto the end of the flash partition. The easiest way is to prepare a 0 filled buffer having the same size as the partition to be flashed, transfer in that buffer and flash the full buffer (not just the part that contains the initrd).
  • On the contrary, SlugOS runs from the root filesystem being in the flash (using jffs2). To work, the partition must be erased completely, then only the part containing the jffs2 filesystem needs to be written. Otherwise, the kernel will issue tons of errors about pages supposedly free but not erased.
view · edit · print · history · Last edited by osmeest.
Originally by osmeest.
Page last modified on May 09, 2008, at 01:14 PM