User Tools

Site Tools


debian_install

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
debian_install [2012/05/07 15:48] 82.234.233.9debian_install [2013/01/21 13:28] (current) 82.234.233.9
Line 1: Line 1:
-====== Install Debian on a Kirkwood based NAS (using the Debian installer======+====== Install Debian on a LaCie NAS (Kirkwood based) using the Debian installer ======
  
 ===== Introduction ===== ===== Introduction =====
Line 23: Line 23:
 <code> <code>
 ns2> set diskload "ide reset && ext2load ide 0:1 0x800000 uImage && ext2load ide 0:1 0x1200000 uInitrd" ns2> set diskload "ide reset && ext2load ide 0:1 0x800000 uImage && ext2load ide 0:1 0x1200000 uInitrd"
 +ns2> set bootcmd "dhcp && run netconsole; if run usbload || run diskload; then bootm 0x800000 0x1200000; fi"
 ns2> print diskload bootcmd ns2> print diskload bootcmd
 diskload=ide reset && ext2load ide 0:1 0x800000 uImage && ext2load ide 0:1 0x1200000 uInitrd diskload=ide reset && ext2load ide 0:1 0x800000 uImage && ext2load ide 0:1 0x1200000 uInitrd
Line 31: Line 32:
 </code> </code>
  
-===== Run the Debian installer =====+===== Run the network-console Debian installer =====
  
-==== Export the network-console files via TFTP ====+==== Prepare network-console files ====
  
-  * Download the network-console Debian installer files from our [[ftp://lacie-nas.org/debian-installer/|FTP server]]. Note that you could get this files from Debian. As a difference, the lacie-nas.org version provides preseed answers for the Debian installerThis allows to configure network and SSH server without any human action. For more informations about preseeding, please refer to this [[http://wiki.debian.org/DebianInstaller/Preseed|wiki page]]+First you must download the network-console files from this [[http://ftp.nl.debian.org/debian/dists/testing/main/installer-armel/current/images/kirkwood/network-console/lacie/|Debian FTP repository]]. Note that that the **uInitrd** image doesn't include any **preseed.cfg** file. In our case, preseeding is needed to configure network and SSH server without any human action. For more informations about preseeding, please refer to this [[http://wiki.debian.org/DebianInstaller/Preseed|wiki page]].
-  * Setup a TFTP server and makes the network-console files available: The NAS must be able to reach them.+
  
-==== Boot the network-console ====+To add the **preseed.cfg** file to the the **uInitrd** image, you can try the following shell commands:
  
-  From the U-Boot netconsoleload the network-console files (replace $TFTP_SERVER_IP with your TFTP server IP address):+  $ wget http://ftp.nl.debian.org/debian/dists/testing/main/installer-armel/current/images/kirkwood/network-console/lacie/uInitrd 
 +  $ dd if=uInitrd of=initrd.gz bs=64 skip=1 
 +  $ mkdir initrd; cd initrd 
 +  $ gzip -d < ../initrd.gz | cpio --extract --verbose --make-directories --no-absolute-filenames 
 +  $ wget ftp://lacie-nas.org/debian-installer/network-installer/preseed.cfg 
 +  $ find . | cpio -H newc --create --verbose | gzip -9 > ../initrd.gz 
 +  $ cd .. 
 +  $ mkimage -A arm -O linux -T ramdisk -C gzip -a "0x0" -e "0x0" -n "ramdisk with preseed.cfg" -d initrd.gz uInitrd 
 +  $ rm -rf initrd.gz initrd 
 + 
 +==== Load network-console images ==== 
 + 
 +At your convenience, you could load the network-console image over network or from an USB disk. Both methods are described here. 
 + 
 +=== From an USB disk === 
 + 
 +  * Prepare an USB disk or stick: put the network-console files into the first partition (VFAT formatted). 
 +  * Plug the USB disk at the front. 
 +  * [[uboot#connect_to_u-boot_via_netconsole|Connect to the U-Boot netconsole]] and load network-console files with the following commands: 
 + 
 +<code> 
 +ns2> usb reset 
 +ns2> fatload usb 0:1 0x800000 uImage 
 +ns2> fatload usb 0:1 0x1200000 uInitrd 
 +</code> 
 + 
 +=== From network via a TFTP server === 
 + 
 +  * On a you development machine, setup a TFTP server and put the network-console files into the exported directory. 
 +  * [[uboot#connect_to_u-boot_via_netconsole|Connect to the U-Boot netconsole]] and load network-console files with the following commands (replace $TFTP_SERVER_IP with your TFTP server IP address):
  
 <code> <code>
Line 80: Line 109:
 </code> </code>
  
-  * Boot the Debian installer: +==== Boot the Debian network installer ==== 
 +When both images are loaded, the network installer can be booted with 'bootm 0x800000 0x1200000'.
 <code> <code>
 ns2> bootm 0x800000 0x1200000 ns2> bootm 0x800000 0x1200000
Line 132: Line 161:
 ==== Complete the installation ==== ==== Complete the installation ====
  
-Simply, follow the Debian installer path...+Simply, follow the Debian installer path... IThe installer could fail to make the system bootable, how to solve this is described at the section troubleshooting.
  
 ===== Run the Debian system ===== ===== Run the Debian system =====
Line 173: Line 202:
 ~ # mount -t proc proc /target/proc/ ~ # mount -t proc proc /target/proc/
 ~ # mount -t sysfs sysfs /target/sys/ ~ # mount -t sysfs sysfs /target/sys/
-~ # chroot /target/ 
 ~ # chroot /target /bin/bash ~ # chroot /target /bin/bash
 </code> </code>
Line 185: Line 213:
 > deb-src ftp://lacie-nas.org/debian/ sid main > deb-src ftp://lacie-nas.org/debian/ sid main
 > EOF > EOF
 +</code>
 +
 +  * Import lacie-nas.org GPK key:
 +
 +<code>
 +gpg --keyserver pgpkeys.mit.edu --recv-key 0E3D4C9F7C71B58C
 +gpg -a --export 0E3D4C9F7C71B58C | apt-key add -
 </code> </code>
  
debian_install.1336398486.txt.gz · Last modified: 2012/05/07 15:48 by 82.234.233.9