Difference between revisions of "FreeLink for the Kurobox Pro - Manual install"

From NAS-Central Buffalo - The Linkstation Wiki
Jump to: navigation, search
m (Move and link the kernel uimage)
m
 
(47 intermediate revisions by one user not shown)
Line 1: Line 1:
 
{{Articles|KuroboxPro|FreeLink|Debian}}
 
{{Articles|KuroboxPro|FreeLink|Debian}}
 +
 +
{{Warning| <big> This document is close to being deprecated,  please look towards the armel article: <br><br>'''<big>[[Armel Debian for the Kurobox Pro - Manual install]]'''</big></big>}}
 +
 
<table align=right>
 
<table align=right>
 
<tr>
 
<tr>
Line 9: Line 12:
 
=FreeLink (Debian) on the KuroPro=
 
=FreeLink (Debian) on the KuroPro=
  
Rather than using the automatic install method <ref>[[FreeLink for the Kurobox Pro - Automatic Install]]</ref> you can partition the hard drive yourself (forgoing Buffalo's partition scheme) and change up the kernel too<ref>[http://forum.nas-central.org/viewtopic.php?f=18&t=4329 GPL kernel recompilation progress - 2.6.12.6 & 2.6.16.16]</ref>.  You will need [[Serial port]]<ref> Serial Port [[SCON-KIT/ PRO quick manual | Use daughterboard]] or [[Add a Serial port to the ARM9 Linkstation| Use bottom Slot]]</ref>
+
Rather than using the automatic install method <ref>[[FreeLink for the Kurobox Pro - Automatic Install]]</ref> you can partition the hard drive yourself (foregoing Buffalo's partition scheme) and use a custom kernel too<ref>[http://forum.nas-central.org/viewtopic.php?f=18&t=4329 GPL kernel recompilation progress - 2.6.12.6 & 2.6.16.16]</ref>.  You will need [[Serial port]]<ref> Serial Port [[SCON-KIT/ PRO quick manual | Use daughterboard]] or [[Add a Serial port to the ARM9 Linkstation| Use bottom Slot]]</ref>
access to have control over the uboot settings <ref>[[Kurobox Pro u-boot environment variable settings]]</ref>.
+
access to have control over the [[:Category:UBoot|Uboot]] settings <ref>[[Kurobox Pro u-boot environment variable settings]]</ref>.
  
 
<big>'''Prerequisites:'''</big>
 
<big>'''Prerequisites:'''</big>
 
# [[:Category:KuroboxPro|KuroboxPro]] (of course)
 
# [[:Category:KuroboxPro|KuroboxPro]] (of course)
 +
# [[w:SATA|SATA]] Hard Drive (bigger is better) [[Disassemble|installed]]<ref>[http://www.kurobox.com/downloads/KuroboxPro/KUROPRO_guide.pdf KuroboxPro User's Guide in English]</ref>
 
# [[Serial port]] access  
 
# [[Serial port]] access  
 
## [[Add a Serial port to the ARM9 Linkstation| Use bottom Slot]]
 
## [[Add a Serial port to the ARM9 Linkstation| Use bottom Slot]]
 
## [[SCON-KIT/ PRO quick manual | Use daughterboard]]
 
## [[SCON-KIT/ PRO quick manual | Use daughterboard]]
# FreeLink zip archive: http://downloads.nas-central.org/LSPro_ARM9/Distributions/Freelink/
+
# FreeLink ARM<ref>{{forumpost|39|2153|FreeLink v1.0 (arm9) rev2 released!!! (Permission Issues Fix)}}</ref>: http://downloads.nas-central.org/LSPro_ARM9/Distributions/Freelink/
 
# Custom Kernel: http://downloads.nas-central.org/Users/colchaodemola
 
# Custom Kernel: http://downloads.nas-central.org/Users/colchaodemola
  
Line 27: Line 31:
 
# Rename the resultant file to <tt>'''hddrootfs.tar.gz'''</tt> and copy it over to the Samba Share<ref>[[KuroBoxPro#Accessing Partions from Samba| KuroBoxPro: Accessing Partions from Samba]]</ref>.
 
# Rename the resultant file to <tt>'''hddrootfs.tar.gz'''</tt> and copy it over to the Samba Share<ref>[[KuroBoxPro#Accessing Partions from Samba| KuroBoxPro: Accessing Partions from Samba]]</ref>.
  
==Partition Drive==
+
==Partition Hard Drive==
XFS support is still poor (especially in a custom kernel).  So we'll use EXT3, and use a sane partition scheme. There are detailed instructions on partitioning on the wiki<ref>[[Custom Partitions on the LS Pro]]</ref>.
+
XFS support is still poor (especially in a custom kernel).  So we'll use EXT3, and use a sane partition scheme.  
===Sample Partition scheme===
+
 
 +
{{Warning| This is not the partition scheme used in [[FreeLink for the Kurobox Pro - Automatic Install]] which uses a total of 6 partitions. This scheme uses only 3 partitions and thus very different uboot settings then those that the automatic "installer" generates.  }}
 +
For more information look at this forum thread: {{forumpost|51|7671| Freelink Manual install issues}}
 +
 
 +
===Partition scheme===
  
 
{|class=wikitable
 
{|class=wikitable
Line 37: Line 45:
 
||p1 || / ||10GB ||  EXT3
 
||p1 || / ||10GB ||  EXT3
 
|-
 
|-
||p2 || swap ||128MB || SWAP
+
||p2 || swap ||512MB || SWAP
 
|-
 
|-
||p3 ||/share || Remaining Space || EXT3
+
||p3 ||/mnt/disk1 || Remaining Space || EXT3
 
|}
 
|}
 +
 +
There are detailed instructions on partitioning in EM Mode<ref>[[Custom Partitions on the LS Pro]]</ref><ref>[http://www.tldp.org/HOWTO/Partition/fdisk_partitioning.html Linux Partition HOWTO - Partitioning with fdisk]</ref> or using Parted on an external workstation<ref>[[Resizing the system partition with parted magic live cd]]</ref>.  But here are the Fdisk commands to get you to this partition scheme.
 +
 +
====Use Fdisk====
 +
{| class=wikitable
 +
! Device !! Partition Type !! Size !! fdisk Command
 +
|-
 +
||/dev/sda1|| Linux [83] || 10 GB || n -> p -> 1 -> <enter> -> +10000M
 +
|-
 +
||/dev/sda2|| Linux Swap [82] || 512 MB || n -> p -> <enter> ->  +512M -> t -> 5 -> 82
 +
|-
 +
||/dev/sda3|| Linux [83] || Remainder || n -> p -> <enter> -> <enter>
 +
|}
 +
 +
====Format all the Partitons====
 +
mkfs.ext3 /dev/sda1
 +
mkswap /dev/sda2
 +
mkfs.ext3 /dev/sda3
  
 
==Get a newer Kernel and modules==
 
==Get a newer Kernel and modules==
  
I used this kernel image, there will probably be better in the future
+
I used this kernel image, big thanks to [http://forum.nas-central.org/memberlist.php?mode=viewprofile&u=1822 Colchaodemola]
  
 
* http://downloads.nas-central.org/Users/colchaodemola/uImage5
 
* http://downloads.nas-central.org/Users/colchaodemola/uImage5
Line 59: Line 85:
  
 
==Extract everything over to the Hard Drive==
 
==Extract everything over to the Hard Drive==
Log into the Kurobox and <tt>'''cd'''</tt> over to the share you transferred the files over to.
+
Log into the Kurobox using the default settings<ref>[[KuroBoxPro#Default_Settings|KuroBoxPro: Default Settings]]</ref> and go to the directory that you transferred your files over to (likely <tt>'''/mnt/mtd'''</tt>)
 +
 
 +
cd /mnt/mtd
  
 
===Mount Hard Drive===
 
===Mount Hard Drive===
 +
 
  mount /dev/sda1 /mnt/drive1
 
  mount /dev/sda1 /mnt/drive1
 +
 
===Move everything over===
 
===Move everything over===
 
  mv hddrootfs.tar.gz /mnt/drive1
 
  mv hddrootfs.tar.gz /mnt/drive1
 
  mv uImage-2.6.16.57-arm5_oabi /mnt/drive1
 
  mv uImage-2.6.16.57-arm5_oabi /mnt/drive1
 
  mv 2.6.16.57-arm5_oabi_modules.tgz /mnt/drive1
 
  mv 2.6.16.57-arm5_oabi_modules.tgz /mnt/drive1
cd /mnt/drive1
+
 
 
===Untar the rootfs===
 
===Untar the rootfs===
 +
cd /mnt/drive1
 
  tar -xvzf hddrootfs.tar.gz
 
  tar -xvzf hddrootfs.tar.gz
 +
 
===Untar the kernel Modules===
 
===Untar the kernel Modules===
 +
cd /mnt/drive1
 
  tar -xvzf 2.6.16.57-arm5_oabi_modules.tgz
 
  tar -xvzf 2.6.16.57-arm5_oabi_modules.tgz
 +
 
===Move and link the kernel uimage===
 
===Move and link the kernel uimage===
 
  mkdir /mnt/drive1/boot
 
  mkdir /mnt/drive1/boot
Line 81: Line 115:
 
  reboot
 
  reboot
  
The final step is to modify your uboot environment to boot into the rootfs (freelink). interrupt uboot over serial again and type the following to configure your Kurobox Pro to boot from the hard disk with the new kernel:
+
The final step is to modify your uboot environment to boot into the rootfs (freelink). Interrupt uboot over the serial console<ref>[[Kurobox Pro UBoot/Linux Console Message - bootup]]</ref> and type the following to configure your Kurobox Pro to boot from the hard disk with the new kernel:
  
 
<pre>
 
<pre>
Line 101: Line 135:
 
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)'
 
</pre>
 
</pre>
 +
 +
'''''Should you be doing this from [[foonas]] EM (and have fw_setenv installed):'''''
 +
 +
To get to foonas-em from debian:
 +
 +
fw_setenv bootcmd ide reset \;  ext2load ide 0:1 0x00100000 /boot/uImage \; setenv bootargs console=ttyS0,115200 \;nboot 0x00100000 0 0x01000000 \; bootm 0x00100000;
 +
reboot
 +
 +
 +
To get to debian from foonas:
 +
 +
fw_setenv  bootcmd ide reset \;  ext2load ide 0:1 0x00100000 /boot/uImage \;setenv bootargs console=ttyS0,115200 root=/dev/sda1 rw \; bootm 0x00100000
 +
reboot
  
 
==Post install==
 
==Post install==
  
 
===Login===
 
===Login===
* Reboot and use ssh to login to your newly FreeLinked KuroBox Pro with  
+
Reboot and use ssh to login to your newly FreeLinked KuroBox Pro with an [[w:SSH|SSH]] session.  In windows [[w:PuTTY|PuTTY]] is a good client
**'''login: ''root'''''
+
 
**'''password: ''lspro'''''
+
* login:<tt>'''root'''</tt>
 +
* password: <tt>'''lspro'''</tt>
 +
 
 +
or
 +
 
 +
* login:<tt>'''admin'''</tt>
 +
* password: <tt>'''admin'''</tt>
  
 
===Change kernelmon script===
 
===Change kernelmon script===
Line 129: Line 182:
 
tmpfs          /tmp      tmpfs  size=10M,mode=1777                  0 0
 
tmpfs          /tmp      tmpfs  size=10M,mode=1777                  0 0
 
/dev/sda2      swap      swap    defaults                            0 0
 
/dev/sda2      swap      swap    defaults                            0 0
/dev/sda1      /          ext3    defaults,noatime,errors=remount-ro  0 1
 
 
/dev/sda3      /mnt/disk1 ext3    defaults,noatime,nodiratime        0 0
 
/dev/sda3      /mnt/disk1 ext3    defaults,noatime,nodiratime        0 0
 
  </nowiki>
 
  </nowiki>
 +
 +
===Mkswap===
 +
Format the swap partition
 +
 +
mkswap /dev/sda2
  
 
=References=
 
=References=
 
<references />
 
<references />

Latest revision as of 20:31, 23 June 2008


Nuvola apps important.png 
WARNING!

This document is close to being deprecated, please look towards the armel article:

Armel Debian for the Kurobox Pro - Manual install


400px-Ford_Design_3-speed_OD_Transmission_w._Hurst_Shifter.jpg

Contents

FreeLink (Debian) on the KuroPro

Rather than using the automatic install method [1] you can partition the hard drive yourself (foregoing Buffalo's partition scheme) and use a custom kernel too[2]. You will need Serial port[3] access to have control over the Uboot settings [4].

Prerequisites:

  1. KuroboxPro (of course)
  2. SATA Hard Drive (bigger is better) installed[5]
  3. Serial port access
    1. Use bottom Slot
    2. Use daughterboard
  4. FreeLink ARM[6]: http://downloads.nas-central.org/LSPro_ARM9/Distributions/Freelink/
  5. Custom Kernel: http://downloads.nas-central.org/Users/colchaodemola

Get it

  1. Download the FreeLink zip archive: http://downloads.nas-central.org/LSPro_ARM9/Distributions/Freelink/FreeLink_arm9-1.0rev2.zip
  2. Unzip it and find the hddrootfs.img file
  3. Rename it to have the .zip extension
  4. Unzip this file with the following password:
    IeY8omJwGlGkIbJm2FH_MV4fLsXE8ieu0gNYwE6Ty
  5. Rename the resultant file to hddrootfs.tar.gz and copy it over to the Samba Share[7].

Partition Hard Drive

XFS support is still poor (especially in a custom kernel). So we'll use EXT3, and use a sane partition scheme.

Nuvola apps important.png 
WARNING!

This is not the partition scheme used in FreeLink for the Kurobox Pro - Automatic Install which uses a total of 6 partitions. This scheme uses only 3 partitions and thus very different uboot settings then those that the automatic "installer" generates.


For more information look at this forum thread: Freelink Manual install issues

Partition scheme

Partition Path Size Filesystem
p1 / 10GB EXT3
p2 swap 512MB SWAP
p3 /mnt/disk1 Remaining Space EXT3

There are detailed instructions on partitioning in EM Mode[8][9] or using Parted on an external workstation[10]. But here are the Fdisk commands to get you to this partition scheme.

Use Fdisk

Device Partition Type Size fdisk Command
/dev/sda1 Linux [83] 10 GB n -> p -> 1 -> <enter> -> +10000M
/dev/sda2 Linux Swap [82] 512 MB n -> p -> <enter> -> +512M -> t -> 5 -> 82
/dev/sda3 Linux [83] Remainder n -> p -> <enter> -> <enter>

Format all the Partitons

mkfs.ext3 /dev/sda1
mkswap /dev/sda2
mkfs.ext3 /dev/sda3

Get a newer Kernel and modules

I used this kernel image, big thanks to Colchaodemola

rename it to the following:

  • uImage-2.6.16.57-arm5_oabi

Get the Modules:

Copy these over to the samba share too.

Extract everything over to the Hard Drive

Log into the Kurobox using the default settings[11] and go to the directory that you transferred your files over to (likely /mnt/mtd)

cd /mnt/mtd

Mount Hard Drive

mount /dev/sda1 /mnt/drive1

Move everything over

mv hddrootfs.tar.gz /mnt/drive1
mv uImage-2.6.16.57-arm5_oabi /mnt/drive1
mv 2.6.16.57-arm5_oabi_modules.tgz /mnt/drive1

Untar the rootfs

cd /mnt/drive1 
tar -xvzf hddrootfs.tar.gz

Untar the kernel Modules

cd /mnt/drive1 
tar -xvzf 2.6.16.57-arm5_oabi_modules.tgz

Move and link the kernel uimage

mkdir /mnt/drive1/boot
mv uImage-2.6.16.57-arm5_oabi /mnt/drive1/boot/
cd /mnt/drive1/boot
ln -s uImage-2.6.16.57-arm5_oabi uImage

Reboot and Change uboot settings

reboot

The final step is to modify your uboot environment to boot into the rootfs (freelink). Interrupt uboot over the serial console[12] and type the following to configure your Kurobox Pro to boot from the hard disk with the new kernel:

setenv bootcmd 'ide reset;ext2load ide 0:1 0x00100000 /boot/uImage;setenv bootargs console=ttyS0,115200 root=/dev/sda1 rw; bootm 0x00100000'
saveenv
boot


By the way, the command set to get it to boot from the flash (like it was originally) should you ever want to is:

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)'

Should you be doing this from foonas EM (and have fw_setenv installed):

To get to foonas-em from debian:

fw_setenv bootcmd ide reset \;  ext2load ide 0:1 0x00100000 /boot/uImage \; setenv bootargs console=ttyS0,115200 \;nboot 0x00100000 0 0x01000000 \; bootm 0x00100000;
reboot


To get to debian from foonas:

fw_setenv  bootcmd ide reset \;  ext2load ide 0:1 0x00100000 /boot/uImage \;setenv bootargs console=ttyS0,115200 root=/dev/sda1 rw \; bootm 0x00100000
reboot

Post install

Login

Reboot and use ssh to login to your newly FreeLinked KuroBox Pro with an SSH session. In windows PuTTY is a good client

  • login:root
  • password: lspro

or

  • login:admin
  • password: admin

Change kernelmon script

  • You will now need to change a line in the the /usr/local/sbin/kernelmon script:
cat /proc/driver/kernevnt 

to

cat /proc/buffalo/kernevnt

Enable root login on serial console

  • If you use the console on the serial port, you need to change the permissions on /etc/securetty so it is not world-writable
chmod 0744 /etc/securetty
  • until you do this, root logins on the serial console will not be permitted.

Fix fstab

Remember to change the /etc/fstab to reflect the location of linux swap and the share. Also remove the ,acl from the xfs declaration. My /etc/fstab looks like this after update:

# /etc/fstab: static file system information.
# <file system> <mount point>   <type>  <options>               <dump>  <pass>
proc            /proc      proc    defaults                            0 0
none            /dev/pts   devpts  gid=5,mode=20                       0 0
tmpfs           /tmp       tmpfs   size=10M,mode=1777                  0 0
/dev/sda2       swap       swap    defaults                            0 0
/dev/sda3       /mnt/disk1 ext3    defaults,noatime,nodiratime         0 0
 

Mkswap

Format the swap partition

mkswap /dev/sda2

References

  1. FreeLink for the Kurobox Pro - Automatic Install
  2. GPL kernel recompilation progress - 2.6.12.6 & 2.6.16.16
  3. Serial Port Use daughterboard or Use bottom Slot
  4. Kurobox Pro u-boot environment variable settings
  5. KuroboxPro User's Guide in English
  6. FreeLink v1.0 (arm9) rev2 released!!! (Permission Issues Fix)
  7. KuroBoxPro: Accessing Partions from Samba
  8. Custom Partitions on the LS Pro
  9. Linux Partition HOWTO - Partitioning with fdisk
  10. Resizing the system partition with parted magic live cd
  11. KuroBoxPro: Default Settings
  12. Kurobox Pro UBoot/Linux Console Message - bootup