NSLU2-Linux
view · edit · print · history

NAS100d.InstallDebianOnNas100d History

Hide minor edits - Show changes to markup

May 09, 2008, at 01:14 PM by osmeest --
Changed line 19 from:

Transfer and flash the root filesystem to the ramdisk partition.

to:

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

Changed line 21 from:
 fis erase -f 0x50240000 -l 0x60000
to:
 fis erase -f 0x50240000 -l 0x600000
Changed line 47 from:

Transfer and flash the initrd to the ramdisk partition.

to:

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

Changed lines 50-52 from:
 fis write -f 0x50240000 -b 0xB00000 -l sizeOfInitrd
to:
 fis write -f 0x50240000 -b 0xB00000 -l 0x600000
May 09, 2008, at 01:11 PM by osmeest --
Changed lines 68-69 from:
  • To be recognized, the initrd MUST be padded with 0's upto the end of the flash partition. So a 3MB initrd file to be installed in a 6MB partition must be padded with 3MB of 0. Easiest command is dd if=/dev/zero of=initrd.img bs=1 seek=sizeOfPartition-1 count=1 .
to:
  • 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.
May 09, 2008, at 01:08 PM by osmeest --
Changed lines 48-50 from:
 cp initrd.img-* initrd.img
 dd if=/dev/zero of=initrd.img bs=1 seek=sizeOfRamdiskPartition-1 count=1
 load -m xmodem -r -b 0xB00000 \\
to:
 mfill -b 0x00B00000 -l 0x00600000 -p 0 -1 
 load -m xmodem -r -b 0xB00000
May 09, 2008, at 12:33 PM by osmeest --
Changed lines 3-40 from:
  1. Download SlugOS/LE from slug-firmware.net (download SlugOSLE?-*-other-targets.zip).
  2. Decompress the zip file.
  3. 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).
  4. Transfer and flash apex.
    load -m xmodem -r -b 0x1000000
    fis write -f 0x50fa0000 -b 0x1000000 -l sizeOfApex.bin
  5. Transfer and flash the kernel to the kernel partition.
    load -m xmodem -r -b 0x400000
    fis write -f 0x50040000 -b 0x400000 -l sizeOfZImage.bin
  6. Transfer and flash the root filesystem to the ramdisk partition.
    load -m xmodem -r -b 0xB00000
    fis erase -f 0x50240000 -l 0x60000
    fis write -f 0x50240000 -b 0xB00000 -l sizeOfRootJffs
  7. Setup apex as a second stage bootloader.
    Use fconfig to set bootscript to fis load apex -b 0x1000000 ; g 0x1000000
  8. Run apex. Let it boot SlugOS.
    g 0x1000000
  9. In SlugOS, install the kernel-module-pata-artop (for hard disk support).
  10. Partition the hard disk (one partition for swap, one for Debian root, one for the data).
  11. Run debootstrap (follow the Bootstrap page).
  12. Copy the kernel and initrd from /boot directory to host computer.
  13. Reboot and interrupt the boot in Redboot by pressing Ctrl-C.
  14. Transfer and flash the debian kernel to the kernel partition.
    load -m xmodem -r -b 0x400000
    fis write -f 0x50040000 -b 0x400000 -l sizeOfVmlinuz
  15. Transfer and flash the initrd to the ramdisk partition.
    cp initrd.img-* initrd.img
    dd if=/dev/zero of=initrd.img bs=1 seek=sizeOfRamdiskPartition-1 count=1
    load -m xmodem -r -b 0xB00000
    fis write -f 0x50240000 -b 0xB00000 -l sizeOfInitrd
  16. Download APEX for debian on a NAS100d from http://ipkg.nslu2-linux.org/feeds/kernel/ .
  17. Transfer and flash the debian apex for NAS 100d.
    load -m xmodem -r -b 0x1000000
    fis write -f 0x50fa0000 -b 0x1000000 -l sizeOfApexDebianNas100d.bin
  18. Reboot

Note that this procedure does not work completely: on my NAS, the debian kernel boots but the initrd is not recognized... Still investigating

to:

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.

 load -m xmodem -r -b 0xB00000
 fis erase -f 0x50240000 -l 0x60000
 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.

 cp initrd.img-* initrd.img
 dd if=/dev/zero of=initrd.img bs=1 seek=sizeOfRamdiskPartition-1 count=1
 load -m xmodem -r -b 0xB00000 
fis write -f 0x50240000 -b 0xB00000 -l sizeOfInitrd

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

May 09, 2008, at 09:39 AM by osmeest --
Changed lines 29-31 from:

@@ load -m xmodem -r -b 0xB00000 \\

to:

@@ cp initrd.img-* initrd.img
dd if=/dev/zero of=initrd.img bs=1 seek=sizeOfRamdiskPartition-1 count=1
load -m xmodem -r -b 0xB00000 \\

Changed lines 48-49 from:
to:
  • To be recognized, the initrd MUST be padded with 0's upto the end of the flash partition. So a 3MB initrd file to be installed in a 6MB partition must be padded with 3MB of 0. Easiest command is dd if=/dev/zero of=initrd.img bs=1 seek=sizeOfPartition-1 count=1 .
May 08, 2008, at 01:31 PM by osmeest --
Changed lines 37-47 from:

Note that this procedure does not work completely: on my NAS, the debian kernel boots but the initrd is not recognized... Still investigating

to:

Note that this procedure does not work completely: on my NAS, the debian kernel boots but the initrd is not recognized... Still investigating

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").
May 08, 2008, at 01:21 PM by osmeest --
Added lines 36-37:

Note that this procedure does not work completely: on my NAS, the debian kernel boots but the initrd is not recognized... Still investigating

May 08, 2008, at 01:19 PM by osmeest --
Changed lines 10-11 from:
   load -m xmodem -r -b 0x400000 
fis write -f 0x50040000 -b 0x400000 -l sizeOfZImage.bin
to:

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

Changed line 13 from:
   load -m xmodem -r -b 0xB00000 \\
to:

@@ load -m xmodem -r -b 0xB00000 \\

Changed line 15 from:
   fis write -f 0x50240000 -b 0xB00000 -l sizeOfRootJffs
to:
   fis write -f 0x50240000 -b 0xB00000 -l sizeOfRootJffs @@
Changed line 17 from:
   Use fconfig to set bootscript to "fis load apex -b 0x1000000 ; g 0x1000000"
to:
   Use fconfig to set bootscript to fis load apex -b 0x1000000 ; g 0x1000000
Changed line 19 from:
   g 0x1000000
to:

g 0x1000000

Changed lines 26-27 from:
   load -m xmodem -r -b 0x400000 
fis write -f 0x50040000 -b 0x400000 -l sizeOfVmlinuz
to:

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

Changed lines 29-30 from:
   load -m xmodem -r -b 0xB00000 
fis write -f 0x50240000 -b 0xB00000 -l sizeOfInitrd
to:

load -m xmodem -r -b 0xB00000
fis write -f 0x50240000 -b 0xB00000 -l sizeOfInitrd

Changed lines 33-34 from:
   load -m xmodem -r -b 0x1000000 
fis write -f 0x50fa0000 -b 0x1000000 -l sizeOfApexDebianNas100d.bin
to:

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

May 08, 2008, at 01:18 PM by osmeest --
Changed lines 7-8 from:
   load -m xmodem -r -b 0x1000000 \\
   fis write -f 0x50fa0000 -b 0x1000000 -l ''sizeOfApex.bin'' 
to:

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

May 08, 2008, at 01:18 PM by osmeest --
Changed lines 7-8 from:
   load -m xmodem -r -b 0x1000000 
fis write -f 0x50fa0000 -b 0x1000000 -l sizeOfApex.bin
to:
   load -m xmodem -r -b 0x1000000 \\
   fis write -f 0x50fa0000 -b 0x1000000 -l ''sizeOfApex.bin'' 
May 08, 2008, at 01:17 PM by osmeest --
Changed line 8 from:
   fis write -f 0x50fa0000 -b 0x1000000 -l _sizeOfApex.bin_
to:
   fis write -f 0x50fa0000 -b 0x1000000 -l sizeOfApex.bin
Changed line 11 from:
   fis write -f 0x50040000 -b 0x400000 -l _sizeOfZImage.bin_
to:
   fis write -f 0x50040000 -b 0x400000 -l sizeOfZImage.bin
Changed line 15 from:
   fis write -f 0x50240000 -b 0xB00000 -l _sizeOfRootJffs_
to:
   fis write -f 0x50240000 -b 0xB00000 -l sizeOfRootJffs
Changed line 27 from:
   fis write -f 0x50040000 -b 0x400000 -l _sizeOfVmlinuz_
to:
   fis write -f 0x50040000 -b 0x400000 -l sizeOfVmlinuz
Changed line 30 from:
   fis write -f 0x50240000 -b 0xB00000 -l _sizeOfInitrd_
to:
   fis write -f 0x50240000 -b 0xB00000 -l sizeOfInitrd
Changed line 34 from:
   fis write -f 0x50fa0000 -b 0x1000000 -l _sizeOfApexDebianNas100d.bin_
to:
   fis write -f 0x50fa0000 -b 0x1000000 -l sizeOfApexDebianNas100d.bin
May 08, 2008, at 01:15 PM by osmeest --
Changed lines 6-7 from:
  1. Transfer and flash apex. load -m xmodem -r -b 0x1000000 \
to:
  1. Transfer and flash apex.
    load -m xmodem -r -b 0x1000000 \\
Changed lines 9-10 from:
  1. Transfer and flash the kernel to the kernel partition. load -m xmodem -r -b 0x400000 \
to:
  1. Transfer and flash the kernel to the kernel partition.
    load -m xmodem -r -b 0x400000 \\
Changed lines 12-14 from:
  1. Transfer and flash the root filesystem to the ramdisk partition. load -m xmodem -r -b 0xB00000 fis erase -f 0x50240000 -l 0x60000 \
to:
  1. Transfer and flash the root filesystem to the ramdisk partition.
    load -m xmodem -r -b 0xB00000
    fis erase -f 0x50240000 -l 0x60000 \\
Changed line 16 from:
  1. Setup apex as a second stage bootloader. \
to:
  1. Setup apex as a second stage bootloader. \\
Changed line 18 from:
  1. Run apex. Let it boot SlugOS. \
to:
  1. Run apex. Let it boot SlugOS. \\
Changed lines 25-26 from:
  1. Transfer and flash the debian kernel to the kernel partition. load -m xmodem -r -b 0x400000 \
to:
  1. Transfer and flash the debian kernel to the kernel partition.
    load -m xmodem -r -b 0x400000 \\
Changed lines 28-29 from:
  1. Transfer and flash the initrd to the ramdisk partition. load -m xmodem -r -b 0xB00000 \
to:
  1. Transfer and flash the initrd to the ramdisk partition.
    load -m xmodem -r -b 0xB00000 \\
Changed lines 32-33 from:
  1. Transfer and flash the debian apex for NAS 100d. load -m xmodem -r -b 0x1000000 \
to:
  1. Transfer and flash the debian apex for NAS 100d.
    load -m xmodem -r -b 0x1000000 \\
May 08, 2008, at 01:14 PM by osmeest --
Changed lines 6-10 from:
  1. Transfer and flash apex.
  2. Transfer and flash the kernel to the kernel partition.
  3. Transfer and flash the root filesystem to the filesystem partition.
  4. Setup apex as a second stage bootloader.
  5. Run apex. Let it boot SlugOS.
to:
  1. Transfer and flash apex. load -m xmodem -r -b 0x1000000 fis write -f 0x50fa0000 -b 0x1000000 -l _sizeOfApex.bin_
  2. Transfer and flash the kernel to the kernel partition. load -m xmodem -r -b 0x400000 fis write -f 0x50040000 -b 0x400000 -l _sizeOfZImage.bin_
  3. Transfer and flash the root filesystem to the ramdisk partition. load -m xmodem -r -b 0xB00000 fis erase -f 0x50240000 -l 0x60000 fis write -f 0x50240000 -b 0xB00000 -l _sizeOfRootJffs_
  4. Setup apex as a second stage bootloader. Use fconfig to set bootscript to "fis load apex -b 0x1000000 ; g 0x1000000"
  5. Run apex. Let it boot SlugOS. g 0x1000000
Changed lines 24-26 from:
  1. Reboot and interrupt the boot by pressing Ctrl-C.
  2. Transfer and flash the debian kernel to the kernel partition.
  3. Transfer and flash the initrd to the filesystem partition.
to:
  1. Reboot and interrupt the boot in Redboot by pressing Ctrl-C.
  2. Transfer and flash the debian kernel to the kernel partition. load -m xmodem -r -b 0x400000 fis write -f 0x50040000 -b 0x400000 -l _sizeOfVmlinuz_
  3. Transfer and flash the initrd to the ramdisk partition. load -m xmodem -r -b 0xB00000 fis write -f 0x50240000 -b 0xB00000 -l _sizeOfInitrd_
Changed lines 32-34 from:
  1. Transfer and flash the debian apex for NAS 100d.
to:
  1. Transfer and flash the debian apex for NAS 100d. load -m xmodem -r -b 0x1000000 fis write -f 0x50fa0000 -b 0x1000000 -l _sizeOfApexDebianNas100d.bin_
Deleted line 35:
May 07, 2008, at 09:34 PM by osmeest --
Changed line 3 from:
  1. Download SlugOS/LE from slug-firmware.net (download !SlugOSLE?-*-other-targets.zip).
to:
  1. Download SlugOS/LE from slug-firmware.net (download SlugOSLE?-*-other-targets.zip).
May 07, 2008, at 09:21 PM by osmeest --
Changed line 3 from:
  1. Download SlugOS/LE from slug-firmware.net (download SlugOSLE?-*-other-targets.zip).
to:
  1. Download SlugOS/LE from slug-firmware.net (download !SlugOSLE?-*-other-targets.zip).
May 07, 2008, at 09:00 PM by osmeest --
Changed line 3 from:
  1. Download SlugOS LE from slug-firmware.net (download SlugOS/LE other_targets.zip).
to:
  1. Download SlugOS/LE from slug-firmware.net (download SlugOSLE?-*-other-targets.zip).
Changed lines 6-8 from:
  1. Download and flash apex.
  2. Download and flash the kernel to the kernel partition.
  3. Download and flash the root filesystem to the filesystem partition.
to:
  1. Transfer and flash apex.
  2. Transfer and flash the kernel to the kernel partition.
  3. Transfer and flash the root filesystem to the filesystem partition.
Changed lines 16-17 from:
  1. Download and flash the debian kernel to the kernel partition.
  2. Download and flash the initrd to the filesystem partition.
to:
  1. Transfer and flash the debian kernel to the kernel partition.
  2. Transfer and flash the initrd to the filesystem partition.
Changed line 19 from:
  1. Download and flash the debian apex for NAS 100d.
to:
  1. Transfer and flash the debian apex for NAS 100d.
May 07, 2008, at 08:58 PM by osmeest --
Changed line 13 from:
  1. Run debootstrap (follow the [Debian/Bootstrap] page).
to:
  1. Run debootstrap (follow the Bootstrap page).
May 07, 2008, at 08:58 PM by osmeest --
Changed lines 3-21 from:

1) Download SlugOS LE from slug-firmware.net (download SlugOS/LE other targets.zip). 2) Decompress the zip file. 3) 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). 4) Download and flash apex. 5) Download and flash the kernel to the kernel partition. 6) Download and flash the root filesystem to the filesystem partition. 7) Setup apex as a second stage bootloader. 8) Run apex. Let it boot SlugOS. 9) In SlugOS, install the kernel-module-pata-artop (for hard disk support). 10) Partition the hard disk (one partition for swap, one for Debian root, one for the data). 11) Run debootstrap (follow the [Debian/Bootstrap] page). 12) Copy the kernel and initrd from /boot directory to host computer. 13) Reboot and interrupt the boot by pressing Ctrl-C. 14) Download and flash the debian kernel to the kernel partition. 15) Download and flash the initrd to the filesystem partition. 16) Download APEX for debian on a NAS100d from http://ipkg.nslu2-linux.org/feeds/kernel/ . 17) Download and flash the debian apex for NAS 100d. 18) Reboot

to:
  1. Download SlugOS LE from slug-firmware.net (download SlugOS/LE other_targets.zip).
  2. Decompress the zip file.
  3. 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).
  4. Download and flash apex.
  5. Download and flash the kernel to the kernel partition.
  6. Download and flash the root filesystem to the filesystem partition.
  7. Setup apex as a second stage bootloader.
  8. Run apex. Let it boot SlugOS.
  9. In SlugOS, install the kernel-module-pata-artop (for hard disk support).
  10. Partition the hard disk (one partition for swap, one for Debian root, one for the data).
  11. Run debootstrap (follow the [Debian/Bootstrap] page).
  12. Copy the kernel and initrd from /boot directory to host computer.
  13. Reboot and interrupt the boot by pressing Ctrl-C.
  14. Download and flash the debian kernel to the kernel partition.
  15. Download and flash the initrd to the filesystem partition.
  16. Download APEX for debian on a NAS100d from http://ipkg.nslu2-linux.org/feeds/kernel/ .
  17. Download and flash the debian apex for NAS 100d.
  18. Reboot
May 07, 2008, at 08:55 PM by osmeest --
Changed line 3 from:

1) Download SlugOS LE from http://www.slug-firmware.net/s-dls.php][slug-firmware.net (download SlugOS/LE other targets.zip).

to:

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

Changed line 13 from:

11) Run debootstrap (follow the Debian.Bootstrap page).

to:

11) Run debootstrap (follow the [Debian/Bootstrap] page).

Changed line 18 from:

16) Download http://ipkg.nslu2-linux.org/feeds/kernel/apex-debian-nas100d-arm-1.5.13.bin][APEX for debian on a NAS100d from http://ipkg.nslu2-linux.org/feeds/kernel/ .

to:

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

May 07, 2008, at 08:53 PM by osmeest --
Added lines 1-21:

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.

1) Download SlugOS LE from http://www.slug-firmware.net/s-dls.php][slug-firmware.net (download SlugOS/LE other targets.zip). 2) Decompress the zip file. 3) 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). 4) Download and flash apex. 5) Download and flash the kernel to the kernel partition. 6) Download and flash the root filesystem to the filesystem partition. 7) Setup apex as a second stage bootloader. 8) Run apex. Let it boot SlugOS. 9) In SlugOS, install the kernel-module-pata-artop (for hard disk support). 10) Partition the hard disk (one partition for swap, one for Debian root, one for the data). 11) Run debootstrap (follow the Debian.Bootstrap page). 12) Copy the kernel and initrd from /boot directory to host computer. 13) Reboot and interrupt the boot by pressing Ctrl-C. 14) Download and flash the debian kernel to the kernel partition. 15) Download and flash the initrd to the filesystem partition. 16) Download http://ipkg.nslu2-linux.org/feeds/kernel/apex-debian-nas100d-arm-1.5.13.bin][APEX for debian on a NAS100d from http://ipkg.nslu2-linux.org/feeds/kernel/ . 17) Download and flash the debian apex for NAS 100d. 18) Reboot

view · edit · print · history · Last edited by osmeest.
Originally by osmeest.
Page last modified on May 09, 2008, at 01:14 PM