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

From NAS-Central Buffalo - The Linkstation Wiki
Jump to: navigation, search
m (Boot From USB)
m
 
(2 intermediate revisions by one user not shown)
Line 1: Line 1:
 
{{Articles|KuroboxPro|FreeLink|Debian}}
 
{{Articles|KuroboxPro|FreeLink|Debian}}
 +
[[image:lms_tux.gif|100px|right]]
 
=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 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 [[Armel Debian for the Kurobox Pro - Manual install | manually install Armel Debian on an internal SATA drive ]]<ref>Armel Debian for the Kurobox Pro - Manual install</ref>
+
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 [[Armel Debian for the Kurobox Pro - Manual install | manually install Armel Debian on an internal SATA drive ]]<ref>[[Armel Debian for the Kurobox Pro - Manual install]]</ref>
 
===Prepare Your Drive===
 
===Prepare Your Drive===
  
Line 10: Line 11:
 
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.
 
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
+
mount /dev/sda1 /mnt/sda1
    flash_eraseall -j /dev/mtdchar3
+
flash_eraseall -j /dev/mtdchar3
    nandwrite -p /dev/mtdchar3 /mnt/sda1/uImage
+
nandwrite -p /dev/mtdchar3 /mnt/sda1/uImage
 
+
 
+
  
 
==Prepare uboot==
 
==Prepare uboot==
Line 20: Line 19:
 
Get into uboot and enter the following.
 
Get into uboot and enter the following.
  
    setenv default_kernel_addr 0x00100000
+
setenv default_kernel_addr 0x00100000
    setenv bootargs_base console=ttyS0,115200
+
setenv bootargs_base console=ttyS0,115200
    setenv bootargs_root 'root=/dev/sda2 rw; rootdelay=10'
+
setenv bootargs_root 'root=/dev/sda2 rw; rootdelay=10'
    setenv bootargs $(bootargs_base) $(bootargs_root) $(buffalo_ver)
+
setenv bootargs $(bootargs_base) $(bootargs_root) $(buffalo_ver)
    setenv uImage_block 0
+
setenv uImage_block 0
    setenv uImage_offset 0x04400000
+
setenv uImage_offset 0x04400000
    setenv bootcmd 'nboot $(default_kernel_addr) $(uImage_block) $(uImage_offset); bootm $(default_kernel_addr)'
+
setenv bootcmd 'nboot $(default_kernel_addr) $(uImage_block) $(uImage_offset); bootm $(default_kernel_addr)'
    saveenv
+
saveenv
    boot
+
boot
 
+
 
+
  
 
Thats it. You should now be able to boot into Debian Linux and the root will be on your external usb drive.
 
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==
+
=How to Go Back=
  
 +
==Uboot settings==
 
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:
 
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 default_kernel_addr 0x00100000
    setenv bootargs_base console=ttyS0,115200
+
setenv bootargs_base console=ttyS0,115200
    setenv bootargs_root root=/dev/mtdblock2 rw
+
setenv bootargs_root root=/dev/mtdblock2 rw
    setenv bootargs $(bootargs_base) $(bootargs_root) $(buffalo_ver)
+
setenv bootargs $(bootargs_base) $(bootargs_root) $(buffalo_ver)
    setenv uImage_block 0
+
setenv uImage_block 0
    setenv uImage_offset 0x00020000
+
setenv uImage_offset 0x00020000
    setenv bootcmd 'nboot $(default_kernel_addr) $(uImage_block) $(uImage_offset); bootm $(default_kernel_addr)'
+
setenv bootcmd 'nboot $(default_kernel_addr) $(uImage_block) $(uImage_offset); bootm $(default_kernel_addr)'
    saveenv
+
saveenv
    boot
+
boot
 
+
  
 +
==Flash==
 
Then to get back the /dev/mtd3 partition the way it was:
 
Then to get back the /dev/mtd3 partition the way it was:
  
    flash_eraseall -j /dev/mtdchar3
+
flash_eraseall -j /dev/mtdchar3
    mkfs.jffs2 /dev/mtdchar3
+
mkfs.jffs2 /dev/mtdchar3
  
  

Latest revision as of 05:17, 7 September 2008

Lms tux.gif

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 [2]

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

Uboot settings

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

Flash

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
  2. Armel Debian for the Kurobox Pro - Manual install