Foonas-em:HDInstall-lspro

From foonas

Jump to: navigation, search

Contents

How To Install foonas-em for lspro

Get Ready

Since the LSPro and LSLive have no NAND flash, foonas-em must be installed on a hard drive partition. This means it can be installed on any ext2/3 partition. It is probably safest to install it on a partition that is not used for data or the rootfs, or best of all, on a separate /boot partition.

You should already be familiar with U-Boot, and connecting to it with minicom or nc, and checking/saving U-Boot environment variables before starting this procedure. You will also need some sort of access via shell (either telnet or ssh).

We will be assuming that you are using a U-Boot that is either stock, or a variant like one of these that is based closely on the stock Buffalo/Marvell U-Boot. The stock U-Boots have no "run" command, and also have a 16-argument limit to changes in U-Boot env vars. Both custom U-Boots do have a "run" command, so in these cases you can build a env var script for booting into foonas-em or any other variant. The custom ones also have a 32-argument limit, making it possible to easily restore stock-like env var values to bootcmd, or to define complex env var scripts.

Get Shell Access

You will need to gain shell access so that you can place the foonas-em image on the partition. The easiest way to do this is by TFTP-booting foonas-em.


Prepare Hard Drive Partition and foonas-em Image

This can be on any ext2/3 partition, but if you have a /boot partition, that's the best choice. We'll assume that this boot partition is /dev/sda1, of type ext3. So there's no mess to clean up, first cd to /tmp. Then download the latests stable foonas-em image, rename it (to avoid confusion with other uImage's you might have already), and move it to where it to the partition that it will be loaded from. Unmount the /boot partition after you're done.

cd /tmp
wget http://downloads.foonas.org/foonas-em/0.1.0-r2/lspro/uImage_2.6.25.1
mv  uImage_2.6.25.1   uImage_2.6.25.1_foonas-em
mkdir tmpboot
mount -t ext3 /dev/sda1 tmpboot
cp uImage_2.6.25.1_foonas-em tmpboot/
umount /dev/sda1

If you are placing the foonas-em image in some other location, adjust the commands as necessary.

Configure U-Boot

Using Serial Connection or NetConsole

Reconnect via nc or minicom and reconfigure your U-Boot environment to include the following change (note differences between V1 and V2):

One-Time Boot into foonas-em

If you use the stock U-Boot for LSPro, since it has no "run" command, you will probably want just a single-time boot into foonas-em. Choose the commands for your V1 or V2 machine: Linkstation LSPro-V1/LSLive-V1:

ide reset
ext2load ide 1:1 0x00100000 /uImage_2.6.25.1_foonas-em 
setenv bootargs console=ttyS0,115200 root=/dev/ram0 rw 
bootm 0x00100000

Linkstation LSPro-V2/LSLive-V2:

ide reset
ext2load ide 0:1 0x00100000 /uImage_2.6.25.1_foonas-em 
setenv bootargs console=ttyS0,115200 root=/dev/ram0 rw
bootm 0x00100000

Persistent Settings to Boot into foonas-em

This is less likely to be needed, but is shown for reference. Again, note the difference between V1 and V2:

Linkstation LSPro-V1/LSLive-V1:

setenv bootcmd 'ide reset ; ext2load ide 1:1 0x00100000 /uImage_2.6.25.1_foonas-em ; setenv bootargs console=ttyS0,115200 root=/dev/ram0 rw ; bootm 0x00100000'
saveenv

Linkstation LSPro-V2/LSLive-V2:

setenv bootcmd 'ide reset ; ext2load ide 0:1 0x00100000 /uImage_2.6.25.1_foonas-em ; setenv bootargs console=ttyS0,115200 root=/dev/ram0 rw ; bootm 0x00100000'
saveenv

Optional-Fallback tftp foonas-em booting

If your LSPro ever has a problem with its hard drive, the foonas-em image might not be available for booting. If, in this case, you would like U-Boot to automatically search for a tftp-served foonas-em image of same name, then make the following adjustment to the U-Boot "def_tftp" env var:

setenv def_tftp 'tftp 0x00800000 uImage_2.6.25.1_foonas-em ; setenv bootargs console=ttyS0,115200 root=/dev/ram0 rw ; bootm 0x00800000' 

and make sure you have a tftp server set up correctly, with the uImage_2.6.25.1_foonas-em image properly located. You should check to see that your tftp server IP is set correctly in the U-Boot env vars, for instance

setenv serverip 192.168.11.149
saveenv
boot

Using fw_setenv while in foonas

The foonas distro and its variants all have the U-Boot utility programs fw_printenv and fw_setenv , which allow one to examine and change (virtually) any U-Boot env var while booted in Linux. Commands generally have the form like this:

fw_setenv 'serverip 192.168.11.149'

and the saveenv function is automatically executed. Any of the U-Boot commands in this article that change env vars can be performed with the fw_setenv command. For instance, you can set a LSPro-V1/LSLive-V1 to boot into foonas-em this way:

fw_ setenv bootcmd 'ide reset ; ext2load ide 1:1 0x00100000 /uImage_2.6.25.1_foonas-em ; setenv bootargs console=ttyS0,115200 root=/dev/ram0 rw ; bootm 0x00100000'

Make a note of the original bootcmd value so that you can change it back, when necessary.

Username and Password

Username and password is root/hydr0g3n and you can login via telnet or serial port. By default foonas-em uses DHCP but will revert to the IP 192.168.11.150 if this fails. The ftpd should be enabled by default however you will need to login and mount partitions manually. You may also access foonas-em via your web browser to install supported Linux distributions.

Personal tools