Armel Debian for the Kurobox Pro - Manual install
From NAS-Central Buffalo - The Linkstation Wiki
m (→Foonas-em=) |
Mindbender (Talk | contribs) (→Foonas-em) |
||
| Line 185: | Line 185: | ||
Run depmod after cd-ing to the appropriate directory, so that any new modules are recognized. | Run depmod after cd-ing to the appropriate directory, so that any new modules are recognized. | ||
===Foonas-em=== | ===Foonas-em=== | ||
| - | Option: (highly suggested!) : add a foonas-em on some read-only partition (like sda1 in the default setup) so you have an em-image to fall back on. Also, consider learning how to tftp-boot into foonas-em, procedure shown here. | + | Option: (highly suggested!) : add a foonas-em on some read-only partition (like sda1 in the default setup) so you have an em-image to fall back on. Also, consider learning how to tftp-boot into foonas-em, procedure shown [http://foonas.org/index.php/Foonas-em:TFTPBoot-kuropro here]. |
===Samba tuning=== | ===Samba tuning=== | ||
Revision as of 09:12, 20 June 2008
|
Contents |
Armel Debian on the KuroPro
Lenny-armel*-Debian rootfs image for testing available...[1]
Features
- Enough Debian to get you up and running, with ssh access and scp for easy file tranfer in & out of the box
- 2.6.25+ kernel w/ a fairly wide variety of modules, courtesy of foonas/OE/bitbake
- Built-in kernel support for ext2/3, jfs & reiserfs
- micro_evtd (fan & temperature control, LED's, buttons)
- u-boot utils (fw_{print|set}env)
- no initrd
What you will need
Install using the native EM mode (or foonas-em if you have it) via command line (manually). You will need Serial port[2] access to have control over the Uboot settings [3]. Serial access will provide a safety net, it is strongly suggested that you have serial access already, and you know how to safely change uboot env vars. It is not a good idea to try to install this without understanding completely, get into a problem, and then try to get serial access and try to learn this. Note that for Buffalo's stock U-Boot, if you change bootcmd from the default values, you will have to either edit them w/ fw_setenv while in foonas-em, or use serial access and reset them all to defaults.
Prerequisites:
- KuroboxPro (of course)
- SATA Hard Drive (bigger is better) installed[4]
- Serial port access
Installation
Get it
Download the archive and updated Kernel/modules and move them over to the KuroPro using Samba
- http://buffalo.nas-central.org/download/Users/davy_gravy/armel-lenny-for-lspro-dgv2.tgz
- http://buffalo.nas-central.org/download/Users/davy_gravy/kernel_and_modules_for_debian-armel-kuropro-2.6.25.6.tar.gz
The flash memory is available via Samba with the native EM mode at:
smb://kuroip/mtd_device
Log in to EM
Using a Kurobox that is booting into EM (the default) you should login first over the serial console
KUROBOX-PRO login: root Password: kuroadmin login[756]: root login on `ttyS0' BusyBox v1.1.1 (2007.04.06-12:02+0000) Built-in shell (ash) Enter 'help' for a list of built-in commands. ~ #
Partition
There are detailed instructions on partitioning in EM Mode[5][6] or using Parted on an external workstation[7].
/dev/sda1 ext2 100M /dev/sda2 ext3 10,000M /dev/sda4 W95 Ext'd (LBA) REST /dev/sda5 swap 512M /dev/sda6 ext3 REST
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
mkdir /mnt/drive1 mkdir /mnt/drive2 mount /dev/sda1 /mnt/drive1 mount /dev/sda2 /mnt/drive2
Move everything over
mv armel-lenny*.tgz /mnt/drive2 mv kernel_and_modules_for_debian*.tar.gz /mnt/drive2
Untar the rootfs
cd /mnt/drive2 tar -xvzf armel-lenny*.tgz tar -xvzf kernel_and_modules_for_debian*.tar.gz
Copy the uImage over Modules
cp /mnt/drive2/boot/* /mnt/drive1
Reboot and Change uboot settings
reboot
The final step is to modify your uboot environment to boot into the rootfs (Debian). 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 /uImage; setenv bootargs console=ttyS0,115200 root=/dev/sda2 rw ; bootm 0x00100000' saveenv boot
Just in case
Can't Set UBoot Env Vars Because of the 16-arg Limit?
Buffalo gave us a UBoot that has some shortcomings...including the 16-arg limit... While in foonas-em, set bootcmd with fw_setenv, which gets around this limit, by executing the following:
fw_setenv bootcmd 'ide reset; ext2load ide 0:1 0x00100000 /uImage; setenv bootargs console=ttyS0,115200 root=/dev/sda2 rw ; bootm 0x00100000'
Executing the following will allow you to see if you were successful:
fw_printenv bootcmd
Original EM Mode
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)'
Foonas EM
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
Post install
Login
Reboot and use ssh to login to your newly Debianized KuroBox Pro with an SSH session. In windows PuTTY is a good client. Networking is set up for static ip.
Open an SSH session to:
- Static IP: 192.168.11.50
Login with:
- login:root
- password: armel
Other
Change the hostname
nano /mnt/drive2/etc/hostname
Edit it to be something more KuroPro-ish, like kpro-armel.
Fix a typo in /etc/network/interfaces
nano /mnt/drive2/etc/network/interfaces
Change the auto lo eth0 below
# we always want the loopback interface # auto lo eth0 iface lo inet loopback # default dynamic setup (no adjustment necessary)
to be just
# we always want the loopback interface # auto lo iface lo inet loopback # default dynamic setup (no adjustment necessary)
This mistake will only affect dhcp, but it will kill networking, so fix it. Otherwise you might change to dhcp and forget about it.
Fstab
If you want some other setup, do so, but remember to adjust your /etc/fstab, and anything else that matters.
Dhcp
Networking is set up for static ip on 192.168.11.50. Edit /etc/network/interfaces to your liking/needs, especially if you use dhcp.
Netcat
Kernel has netcat/nc capability, so you can monitor part of the boot process that way without needing any serial connection. Also excellent with netconsole-enabled u-boot.
Depmod
Run depmod after cd-ing to the appropriate directory, so that any new modules are recognized.
Foonas-em
Option: (highly suggested!) : add a foonas-em on some read-only partition (like sda1 in the default setup) so you have an em-image to fall back on. Also, consider learning how to tftp-boot into foonas-em, procedure shown here.
Samba tuning
Filesharing : for faster samba, include in /etc/samba/smb.conf - [global]:socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=4096 SO_SNDBUF=8192
Problems?
Problems? This is not a supported distro - just a test run. If you see problems and can relay a solution back, that would be great. If you see problems but can't give a fix, that's appreciated also.
References
- ↑ (Towards) an armel root-fs image for Freelink
- ↑ Serial Port Use daughterboard or Use bottom Slot
- ↑ Kurobox Pro u-boot environment variable settings
- ↑ KuroboxPro User's Guide in English
- ↑ Custom Partitions on the LS Pro
- ↑ Linux Partition HOWTO - Partitioning with fdisk
- ↑ Resizing the system partition with parted magic live cd
- ↑ KuroBoxPro: Default Settings
- ↑ Kurobox Pro UBoot/Linux Console Message - bootup


