Difference between revisions of "Boot Kurobox Pro from USB drive"

From NAS-Central Buffalo - The Linkstation Wiki
Jump to: navigation, search
m
m
Line 1: Line 1:
 +
{{Articles|KuroboxPro|FreeLink|Debian}}
 
=Boot From USB=
 
=Boot From USB=
The following instructions will allow you to boot from an external usb drive.<ref>http://buffalo.nas-central.org/forums/viewtopic.php?f=51&t=11211</ref> You will lose the mtd3(samba) partition on the internal nand flash, but I assume you will not need this storage once you are running off of an external drive. This guide assumes you are already comfortable using uboot and that you have already read the instructions for the conventional way to manually install Armel Debian on an internal SATA drive http://buffalo.nas-central.org/index.ph ... al_install
+
The following instructions will allow you to boot from an external usb drive.<ref>[http://buffalo.nas-central.org/forums/viewtopic.php?f=51&t=11211 Forum Post:Boot Kurobox Pro from USB drive]</ref> You will lose the mtd3(samba) partition on the internal nand flash, but I assume you will not need this storage once you are running off of an external drive. This guide assumes you are already comfortable using uboot and that you have already read the instructions for the conventional way to manually install Armel Debian on an internal SATA drive http://buffalo.nas-central.org/index.ph ... al_install
  
 
===Prepare Your Drive===
 
===Prepare Your Drive===
Line 57: Line 58:
 
Note: you may have to install mkfs.jffs2 as it appears to not be installed by default.
 
Note: you may have to install mkfs.jffs2 as it appears to not be installed by default.
  
==References==
+
=References=
 
<references />
 
<references />

Revision as of 05:06, 7 September 2008

Contents

Boot From USB

The following instructions will allow you to boot from an external usb drive.[1] You will lose the mtd3(samba) partition on the internal nand flash, but I assume you will not need this storage once you are running off of an external drive. This guide assumes you are already comfortable using uboot and that you have already read the instructions for the conventional way to manually install Armel Debian on an internal SATA drive http://buffalo.nas-central.org/index.ph ... al_install

Prepare Your Drive

Just follow the instructions provided for the manual installation of Armel Debian. It will not make any difference that you are using a usb drive, it should still show up as /dev/sda. You need to partition your drive, create the file systems, and create the armel-lenny root file system.

Prepare the Kernel

Assuming your external drive is on /dev/sda do the following to load the kernel into nand flash. This will erase anything stored in your samba directory.

   mount /dev/sda1 /mnt/sda1
   flash_eraseall -j /dev/mtdchar3
   nandwrite -p /dev/mtdchar3 /mnt/sda1/uImage


Prepare uboot

Get into uboot and enter the following.

   setenv default_kernel_addr 0x00100000
   setenv bootargs_base console=ttyS0,115200
   setenv bootargs_root 'root=/dev/sda2 rw; rootdelay=10'
   setenv bootargs $(bootargs_base) $(bootargs_root) $(buffalo_ver)
   setenv uImage_block 0
   setenv uImage_offset 0x04400000
   setenv bootcmd 'nboot $(default_kernel_addr) $(uImage_block) $(uImage_offset); bootm $(default_kernel_addr)'
   saveenv
   boot


Thats it. You should now be able to boot into Debian Linux and the root will be on your external usb drive.

How to Go Back

If you decide that you want to go back to the way it was and not boot from an external drive just do the following. In uboot:

   setenv default_kernel_addr 0x00100000
   setenv bootargs_base console=ttyS0,115200
   setenv bootargs_root root=/dev/mtdblock2 rw
   setenv bootargs $(bootargs_base) $(bootargs_root) $(buffalo_ver)
   setenv uImage_block 0
   setenv uImage_offset 0x00020000
   setenv bootcmd 'nboot $(default_kernel_addr) $(uImage_block) $(uImage_offset); bootm $(default_kernel_addr)'
   saveenv
   boot


Then to get back the /dev/mtd3 partition the way it was:

   flash_eraseall -j /dev/mtdchar3
   mkfs.jffs2 /dev/mtdchar3


Note: you may have to install mkfs.jffs2 as it appears to not be installed by default.

References

  1. Forum Post:Boot Kurobox Pro from USB drive