User Tools

Site Tools


usbboot

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
usbboot [2010/02/08 17:43] 84.14.5.202usbboot [2011/01/24 23:13] (current) 82.234.233.9
Line 5: Line 5:
 This project intends to provide help for booting an alternative distribution on a LaCie NAS. An USB key is an attractive way to do that because it is rather non intrusive for the legacy OS and the hardware (no need to open a case). This project intends to provide help for booting an alternative distribution on a LaCie NAS. An USB key is an attractive way to do that because it is rather non intrusive for the legacy OS and the hardware (no need to open a case).
  
-This document provides information on how to boot a Debian ARM on a Network Space v2 board. Any other Linux ARM distributions or any other Kirkwood based board _could_ be used, but hasn'been tested so far.+This document provides information on how to boot a Debian ARM on a Network Space v2 board. Any other Linux ARM distributions or any other Kirkwood based board _could_ probably be used, but has not been tested.
  
 This howto has been written in the hope to be useful but it comes without any warranty. In other words, the lacie-nas project is not responsible if you break your Kirkwood board during an USB boot attempt. So take care! This howto has been written in the hope to be useful but it comes without any warranty. In other words, the lacie-nas project is not responsible if you break your Kirkwood board during an USB boot attempt. So take care!
  
-All kinds of feedbacks are welcome, so if you've tried applying some of the information found on this page on your own device, don't hesitate dropping us a line on the [[http://sequanux.org/cgi-bin/mailman/listinfo/lacie-nas|lacie-nas mailing list]]+All kinds of feedbacks are welcome, so if you've tried to apply some of the information found on this page on your own device, don't hesitate dropping us a line on the [[http://sequanux.org/cgi-bin/mailman/listinfo/lacie-nas|lacie-nas mailing list]]
  
 ===== USB key setup ===== ===== USB key setup =====
  
 You could initialize your USB disk or key with the raw image You could initialize your USB disk or key with the raw image
-[[ftp://lacie-nas.org/usb_boot_kw_sid_arm.img.gz|usb_boot_kw_sid_arm.img]]+[[ftp://lacie-nas.org/images/usb_boot_kw_sid_arm.img.gz|usb_boot_kw_sid_arm.img]]
  
 This disk image embeds two partitions. The first contains a kernel uImage and the second a Debian (unstable flavour) ARM rootfs. This disk image embeds two partitions. The first contains a kernel uImage and the second a Debian (unstable flavour) ARM rootfs.
Line 22: Line 22:
   zcat usb_boot_kw_sid_arm.img.gz > /dev/sd${scsi_dev_letter}   zcat usb_boot_kw_sid_arm.img.gz > /dev/sd${scsi_dev_letter}
  
-Please keep in mind that any kind of data that might reside on the target drive would be irremediably lost, so proceed with extreme caution!+Please keep in mind that any kind of data that might reside on the target drive would be irremediably lost, so proceed with caution.
  
 ===== U-Boot and USB boot ===== ===== U-Boot and USB boot =====
  
-One word about the LaCie flavoured U-Boot: to prevent users from doing bad things, the critical environment variables are hardcoded into the U-Boot binary image. For example if the U-Boot "bootargs" variable is modified and saved, all the changes would be overwritten at the next boot. That's a major drawback and as a consequence, U-Boot must be configured for each USB boot attempt.+One word about the LaCie flavoured U-Boot: to prevent users from doing bad things, some critical environment variables are hardcoded into the U-Boot binary image. For example if the U-Boot "''bootargs''" variable is modified and saved, all the changes would be overwritten at the next boot. That's a major drawback and as a consequence, U-Boot must be configured again for each USB boot attempt.
  
 By default, the LaCie flavoured U-Boot tries to find a kernel in a disk partition (6 or 10). To use a USB device some extra U-Boot configuration must be done. A serial console or a [[CLUNC|clunc]] netconsole can be used. By default, the LaCie flavoured U-Boot tries to find a kernel in a disk partition (6 or 10). To use a USB device some extra U-Boot configuration must be done. A serial console or a [[CLUNC|clunc]] netconsole can be used.
Line 32: Line 32:
 Here is a [[CLUNC|clunc]] command line example: Here is a [[CLUNC|clunc]] command line example:
      
-  echo -e "setenv bootargs console=ttyS0,115200 netconsole=6666@${ipaddr}/,6666@${serverip}/ root=/dev/sda2 rootwait+  echo -e 'setenv bootargs ip=dhcp console=ttyS0,115200 netconsole=6666@${ipaddr}/,6666@${serverip}/ root=/dev/sda2 rootwait
   usb reset   usb reset
   usbboot 0x800000 0:1   usbboot 0x800000 0:1
   usb stop   usb stop
-  bootm| ./clunc -i ${ipaddr}+  bootm| ./clunc -i <NAS_IP> -t 60
  
-''ipaddr'' is the target IP used by U-Boot and the kernel netconsole. +''NAS-IP'' is the source IP used by U-Boot and Linux for the netconsole.
  
-Here is the [[CLUNC|clunk]] output during an successful USB boot:+Here is the [[CLUNC|clunc]] output during successful USB boot:
  
-  simon@X31:~/work/lacie/src/clunc$ echo -e "setenv bootargs ip=dhcp netconsole=6666@192.168.0.16/,6666@192.168.0.14/ root=/dev/sda2 rootwait;+  simon@X31:~/work/lacie/src/clunc$ echo -e 'setenv bootargs ip=dhcp netconsole=6666@${ipaddr}/,6666@${serverip}/ 
 +  root=/dev/sda2 rootwait;
   usb reset;   usb reset;
   usbboot 0x800000 0:1;   usbboot 0x800000 0:1;
   usb stop;   usb stop;
-  bootm| ./clunc -i 192.168.0.16 -w 60 +  bootm| ./clunc -i 192.168.0.16 -w 60 
-  Marvell>> setenv bootargs ip=dhcp netconsole=6666@192.168.0.16/,6666@192.168.0.14/ root=/dev/sda2 rootwait;+  Marvell>> setenv bootargs ip=dhcp netconsole=6666@${ipaddr}/,6666@${serverip}/ root=/dev/sda2 rootwait;
   Marvell>> usb reset;   Marvell>> usb reset;
   (Re)start USB...   (Re)start USB...
Line 62: Line 63:
      Load Address: 00008000      Load Address: 00008000
      Entry Point:  00008000      Entry Point:  00008000
-  ..............................................................................................................................................................................................................................................................................................+   
 +  ................................................................................................................. 
 +  ................................................................................................................. 
 +  ................................................
   Marvell>> usb stop;   Marvell>> usb stop;
   stopping USB..   stopping USB..
Line 78: Line 82:
   Starting kernel ...   Starting kernel ...
      
-  Linux version 2.6.33-rc6-00217-g4e4a8c1-svn (simon@X31) (gcc version 4.4.2 (crosstool NG-hg_default@1665_60a47ac6cae1) ) #3 PREEMPT Fri Feb 5 15:46:12 CET 2010+  Linux version 2.6.33-rc6-00217-g4e4a8c1-svn (simon@X31) (gcc version 4.4.2 (crosstool NG-hg_default@1665_60a47ac6cae1) ) 
 +  #3 PREEMPT Fri Feb 5 15:46:12 CET 2010
   CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=00053177   CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=00053177
   CPU: VIVT data cache, VIVT instruction cache   CPU: VIVT data cache, VIVT instruction cache
Line 124: Line 129:
   Linux sid-arm 2.6.33-rc6-00217-g4e4a8c1-svn #3 PREEMPT Fri Feb 5 15:46:12 CET 2010 armv5tel GNU/Linux   Linux sid-arm 2.6.33-rc6-00217-g4e4a8c1-svn #3 PREEMPT Fri Feb 5 15:46:12 CET 2010 armv5tel GNU/Linux
  
-It might be a very good idea to set a password for root, as leaving a passwordless root access to your device is probably not what you want. So we'd recommend using the "passwd" command upon your first login to set the new root password +It might be a very good idea to set a password for root, as leaving a passwordless root access to your device is probably not what you want.
- +
  
 ===== Troubleshooting ===== ===== Troubleshooting =====
  
-  * CLUNC doesn't display the kernel console message: check that the clunc target IP and the netconsole source IP are the same. An utility like tcpdump could provide useful debugging information.+  * CLUNC doesn't display the kernel console message: check that the clunc target IP and the netconsole source IP are the same. An utility like tcpdump could provide useful debugging information. Perhaps you have plug the ethernet cable in the wrong slot, and the kernel assign an ip address to the other one.
  
   * U-Boot fails to scan the USB bus: retry.   * U-Boot fails to scan the USB bus: retry.
  
-  * How to get my system IP ? use a tool like dhcpdump or set the NAS IP by configuring your dhcp server.+  * How to get the system IP ? use a tool like dhcpdump or set the NAS IP by configuring your dhcp server.
  
-  * no rootfs not found: the SCSI device name for USB key depends on a lots of parameters. On the majority of LaCie products the kernel command line argument "''root=/dev/sda2''" should be correct. But possibly you will have to turn this into "''root=/dev/sdb2''".+  * rootfs not found: the SCSI device name for USB key depends on a lots of parameters. On the majority of LaCie products the kernel command line argument "''root=/dev/sda2''" should be correct. But possibly you will have to turn this into "''root=/dev/sdb2''".
  
 ===== TODO ===== ===== TODO =====
  
 Set the U-Boot parameters at each USB boot attempt is quite boring. Provide an U-Boot image with no hardcoded boot parameters could be very smart.  Set the U-Boot parameters at each USB boot attempt is quite boring. Provide an U-Boot image with no hardcoded boot parameters could be very smart. 
usbboot.1265647414.txt.gz · Last modified: 2010/02/08 17:43 by 84.14.5.202