FreeLink for the Kurobox Pro - Manual install

From NAS-Central Buffalo - The Linkstation Wiki
Revision as of 07:07, 15 February 2008 by Ramuk (Talk | contribs)

Jump to: navigation, search

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. Serial port access
    1. Use bottom Slot
    2. Use daughterboard
  3. FreeLink zip archive: http://downloads.nas-central.org/LSPro_ARM9/Distributions/Freelink/
  4. 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[5].

Partition 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 in EM Mode[6] or using Parted on an external workstation[7].

Sample Partition scheme

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

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

tar -xvzf hddrootfs.tar.gz

Untar the kernel Modules

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[9] 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)'

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: Accessing Partions from Samba
  6. Custom Partitions on the LS Pro
  7. Resizing the system partition with parted magic live cd
  8. KuroBoxPro: Default Settings
  9. KuroBoxPro: UBoot Linux Console Message - bootup
{"cc_re__cc_re__cc_by_sa_3_0": ["-permalink\"><a href=\"/w/index.php?title=FreeLink_for_the_Kurobox_Pro_-_Manual_install&amp;oldid=18036\" title=\"Permanent link to this revision of the page\">Permanent link</a></li>\n\t\t\t\t<li id=\"t-info\"><a href=\"/w/index.php?title=FreeLink_for_the_Kurobox_Pro_-_Manual_install&amp;action=info\">Page information</a></li>\n\t\t\t</ul>\n\t\t</div>\n\t</div>\n</div><!-- end of the left (by default at least) column -->\n<div class=\"visualClear\"></div>\n<div id=\"footer\" role=\"contentinfo\">\n\t<div id=\"f-copyrightico\">\n\t\t<a href=\"http://creativecommons.org/licenses/by-sa/3.0/\"><img src=\"http://i.creativecommons.org/l/by-sa/3.0/88x31.png\" alt=\"Attribution-Share Alike 3.0 Unported\" width=\"88\" height=\"31\" /></a>\n\t</div>\n\t<div id=\"f-poweredbyico\">\n\t\t<a href=\"//www.mediawiki.org/\"><img src=\"/w/skins/common/images/poweredby_mediawiki_88x31.png\" alt=\"Powered by MediaWiki\" width=\"88\" height=\"31\" /></a>\n\t</div>\n\t<ul id=\"f-list\">\n\t\t<li id=\"copyright\">Content is available under <a class=\"external\" rel=\"nofollow\" href=\"http://creativecommons.org/licenses/by-sa/3.0/\">Attribution-S", "=\"contentinfo\">\n\t<div id=\"f-copyrightico\">\n\t\t<a href=\"http://creativecommons.org/licenses/by-sa/3.0/\"><img src=\"http://i.creativecommons.org/l/by-sa/3.0/88x31.png\" alt=\"Attribution-Share Alike 3.0 Unported\" width=\"88\" height=\"31\" /></a>\n\t</div>\n\t<div id=\"f-poweredbyico\">\n\t\t<a href=\"//www.mediawiki.org/\"><img src=\"/w/skins/common/images/poweredby_mediawiki_88x31.png\" alt=\"Powered by MediaWiki\" width=\"88\" height=\"31\" /></a>\n\t</div>\n\t<ul id=\"f-list\">\n\t\t<li id=\"copyright\">Content is available under <a class=\"external\" rel=\"nofollow\" href=\"http://creativecommons.org/licenses/by-sa/3.0/\">Attribution-Share Alike 3.0 Unported</a> unless otherwise noted.</li>\n\t\t<li id=\"privacy\"><a href=\"/wiki/Http://www.nas-central.org/privacy-policy\" title=\"Http://www.nas-central.org/privacy-policy\">Privacy policy</a></li>\n\t\t<li id=\"about\"><a href=\"/wiki/NAS-Central_Buffalo_-_The_Linkstation_Wiki:About\" title=\"NAS-Central Buffalo - The Linkstation Wiki:About\">About NAS-Central Buffalo - The Linkstation Wiki</a></li>\n\t\t<li id=\"disclaimer\"><a href=\"http://www.nas-central.org/index.php/NAS-Central_Ma"], "copyright__copyright__copyright": ["", "ap partition\n\nmkswap /dev/sda2\n\nReferences\n\n  1. FreeLink for the Kurobox Pro - Automatic Install\n  2. GPL kernel recompilation progress - 2.6.12.6 & 2.6.16.16\n  3. Serial Port Use daughterboard or Use bottom Slot\n  4. Kurobox Pro u-boot environment variable settings\n  5. KuroBoxPro: Accessing Partions from Samba\n  6. Custom Partitions on the LS Pro\n  7. Resizing the system partition with parted magic live cd\n  8. KuroBoxPro: Default Settings\n  9. KuroBoxPro: UBoot Linux Console Message - bootup", "ap partition\n\nmkswap /dev/sda2\n\nReferences\n\n  1. FreeLink for the Kurobox Pro - Automatic Install\n  2. GPL kernel recompilation progress - 2.6.12.6 & 2.6.16.16\n  3. Serial Port Use daughterboard or Use bottom Slot\n  4. Kurobox Pro u-boot environment variable settings\n  5. KuroBoxPro: Accessing Partions from Samba\n  6. Custom Partitions on the LS Pro\n  7. Resizing the system partition with parted magic live cd\n  8. KuroBoxPro: Default Settings\n  9. KuroBoxPro: UBoot Linux Console Message - bootup"]}