This is an old revision of the document!
Repository: lacie-orion.git
Here is a list of the LaCie machines based on Kirkwood SoC:
#!/bin/bash # nas_ip=192.168.1.9 # You can get it by ifconfig eth0 server_ip=192.168.1.3 server_mac=08:00:46:b6:64:17 echo -e " set mainlineLinux 2206; setenv bootargs netconsole=6666@${nas_ip}/,6666@${server_ip}/${server_mac} auto=true file=/preseed.cfg; usb reset; fatload usb 0:1 0x800000 uImage; usb stop; bootm 0x800000; " | ./clunc -i ${nas_ip} -t 60
./boot_from_usb Marvell>> Marvell>> set mainlineLinux 2206; Marvell>> setenv bootargs netconsole=6666@192.168.1.9/,6666@192.168.1.3/08:00:46:b6:64:17 auto=true file=/preseed.cfg; Marvell>> usb reset; (Re)start USB... USB: scanning bus for devices... 3 USB Device(s) found scanning bus for storage devices... 1 Storage Device(s) found Marvell>> fatload usb 0:1 0x800000 uImage; ## Valid DOS partition found ## reading uImage .......................................................................................... .......................................................................................... ....................................................................... .......................................................................................... .......................................................................................... ..... 4477180 bytes read Marvell>> usb stop; stopping USB.. Marvell>> bootm 0x800000; ## Booting image at 00800000 ... Image Name: Linux-2.6.35.4-dirty Created: 2010-09-12 13:07:05 UTC Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 4477116 Bytes = 4.3 MB Load Address: 00008000 Entry Point: 00008000 Verifying Checksum ... OK OK Starting kernel ... [ 0.000000] Linux version 2.6.35.4-dirty (luc@luc-dell) (gcc version 4.4.4 (Buildroot 2010.08) ) #5 PREEMPT Sun Sep 12 3:06:51 UTC 2010 [ 0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=00053177 [ 0.000000] CPU: VIVT data cache, VIVT instruction cache [ 0.000000] Machine: LaCie 5Big Network v2 [ 0.000000] Memory policy: ECC disabled, Data cache writeback [ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 130048 [....] [ 5.656473] Freeing init memory: 8408K
azerty
ssh installer@192.168.1.9
We patch the debian installer initrd to include a 'presseed' file. This file will contains automatic answer when the debian installer will ask to configure the network. Another solution is to put all answers on the kernel command line. I use this script to unpack the initrd and rebuild it
#!/bin/sh wget http://ftp.fr.debian.org/debian/dists/squeeze/main/installer-armel/current/images/kirkwood/network-console/qnap/ts-219/initrd.gz rm -rf unpack mkdir unpack cd unpack zcat ../initrd.gz | cpio -imd --quiet rm -rf lib/modules/2.6.32-5-kirkwood cat > preseed.cfg <<__EOF d-i debconf/priority select critical d-i auto-install/enabled boolean true d-i netcfg/choose_interface select auto d-i netcfg/get_hostname string obelix d-i network-console/password password azerty d-i network-console/password-again password azerty d-i preseed/early_command string anna-install network-console __EOF find . | cpio --quiet -H newc -o | gzip -9 -n > ../initrd-patched.gz find . | cpio --quiet -H newc -o > ../debian-installer.cpio echo done
Debian squeeze kernel (2.6.32) is too old for your board. You must use a recent kernel (>=2.6.35). Download this prebuilt kernel to boot debian-installer.
Include the ../debian-installer.cpio into the kernel.
Note: uImage must not be greater than 6Mbytes. (U-boot will not support it).
TODO
TROUBLESHOOTING
If you get “failed to download a file” error during the install, try the following clunc script with “debian-installer/allow_unauthenticated=true”:
#!/bin/bash # nas_ip=192.168.1.9 # You can get it by ifconfig eth0 server_ip=192.168.1.3 server_mac=08:00:46:b6:64:17 echo -e " set mainlineLinux 2206; setenv bootargs netconsole=6666@${nas_ip}/,6666@${server_ip}/${server_mac} auto=true debian-installer/allow_unauthenticated=true file=/preseed.cfg; usb reset; fatload usb 0:1 0x800000 uImage; usb stop; bootm 0x800000; " | ./clunc -i ${nas_ip} -t 60
TODO