FreeLink for the Kurobox Pro - Automatic Install

FreeLink (Debian)
The following procedure creates the following partition scheme, and untars a root file system onto p2 (/dev/sda2). Somehow it rewrites the uboot variables allowing a boot from the hard drive. Serial Console access can be used instead to change these uboot settings.


 * 1) p1 : /boot (16MB)
 * 2) p2 : /rootfs (3GB)
 * 3) p4 : extend (others)
 * 4) p5 : swap (128MB)
 * 5) p6 : /share (others)

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/sda3      swap       swap    defaults                            0 0 /dev/sda1      /boot      ext3    defaults,noatime,errors=remount-ro  0 1 /dev/sda4      /mnt/disk1 xfs     defaults,noatime,nodiratime         0 0
 * 1) Use a virgin kurobox pro (ie : no system ever installed on it), if not you will have to change u-boot settings (require a serial console access) to set  u-boot to boot on /dev/mtdblock2
 * 2) Attention "non-virgins": if you are using a hard disk which has already been used to set up either Freelink or the Kurobox linux distribution, you need to erase the previous data, not just delete the partitions with fdisk: if leftover remnants of the previous installation are there, they may reappear when the identical partitions are recreated, and prevent the new installation from proceeding.   It's not clear how thoroughly the old data must be erased: if you have this problem, overwrite the the older data with zeros (empty space too). You have a couple of choices here: {Note ... that either of these methods are best done on another box. (HINT: boot off of a DVD-ROM Ubuntu Distro (or similar) ... and have the drive to be reformatted connected to an open SATA port)}
 * 3) One is 'shred' which will allow for multiple re-writes and is used for secure disk wipes. Shred can literally take days on a large terabyte size drive.
 * 4) The other method is to use a command like cat /dev/zeros > /dev/sda1 for each partition. If a partition was formally a swap and you have i/o errors performing the zero fill, then simply delete the offending partitions, recombine them, and issue the cat /dev/zero fill on the new partion.  Once this is complete you now have a drive filled with 'zeros', and this takes only hours as opposed to days with 'shred'.
 * 1) Connect up the blank unformatted hard drive and power on
 * 2) Access the Samba share on the kurobox named mtd_device
 * 3) Download the FreeLink zip archive: http://downloads.nas-central.org/LSPro_ARM9/Distributions/Freelink/FreeLink_arm9-1.0rev2.zip
 * 4) Unzip it and find the hddrootfs.img file
 * 5) Rename it to have the .zip extension
 * 6) Unzip this file with the following password: IeY8omJwGlGkIbJm2FH_MV4fLsXE8ieu0gNYwE6Ty
 * 7) Rename the resultant file to hddrootfs.tar.gz</tt> and copy it over to the Samba Share
 * 8) Copy over these files to the samba share from the provided CD-ROM
 * 9) ChangeMeDevHDD</tt>
 * 10) ChangeMyUbootEnv</tt>
 * 11) uImage.buffalo </tt>
 * 12) Press the red init button on the back till it beeps
 * 13) The Info LED will flash and the drive will be partitioned and FreeLink Installed.
 * 14) Reboot and use ssh to login to your newly FreeLinked KuroBox Pro with login:root and   password:lspro
 * 15) 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"
 * 16) 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.
 * 17) Format the swap partition (otherwise you won't have any swap memory) using the mkswap command
 * 18) Remember to change the /etc/fstab</tt> to reflect the location of linux swapand the share. Also remove the ,acl</tt> from the xfs declaration. My /etc/fstab</tt> looks like this after update:
 * 1) /etc/fstab: static file system information.