This page describes briefly how to setup Debian on Airlive (OvisLink) WMU-6000FS NAS.
Note that the sources and binaries on this page are distributed in hope that they will be useful, but WITHOUT ANY WARRANTY.
Firmware version A
Firmware version B
for i in /tmp/mnt/? /tmp/share/?; do umount $i; done
Go to directory /tmp, download file tools.tar.gz and unpack it:
cd /tmp
wget http://rafald.neostrada.pl/hacking-airlive/tools.tar.gz
tar xzf tools.tar.gz
The package contains four files: fdisk, mke2fs, embed, and minigrub.img. Use fdisk to prepare the Debian root partition. The partition should have at least 1 GB. It would be good to prepare also a swap partition.Next, create ext3 filesystem on the prepared partition. If the partition is on /dev/hda1, invoke:
/tmp/mke2fs -j /dev/hda1
/tmp/embed /tmp/minigrub.img /dev/hda 0
Note: mini-grub may work incorrectly with hard drivers greater than 137 GB.
mkdir /tmp/deb mount -t ext2 /dev/hda1 /tmp/deb cd /tmp/deb cp -a /bin /dev /etc /home /lib /libexec /linuxrc /mnt /root /sbin /share /usr /var . mkdir proc tmp cd / umount /tmp/debNow, we have to install Linux kernel, which will be loaded by mini-grub. The best would be to keep the kernel image in /boot directory of Debian system, together with all remaining kernel images and other mini-grub files.
mount -t ext3 /dev/hda2 /tmp/deb cd /tmp/deb wget http://rafald.neostrada.pl/hacking-airlive/boot-2.4.28.tar.gz tar xzf boot-2.4.28.tar.gz rm boot-2.4.28.tar.gz
Archive contains /boot subdirectory. If the partition, which the system is moved to, is not /dev/hda1, then in file boot/grub/menu.lst replace second 0 occurrence in (hd0,0) with appropriate partition number. Also /dev/hda1 change to apropriate partition number. Haven't you editor? Try vi from busybox.
Unmount partition and reboot.cd / umount /tmp/deb rebootHold "backup" button (unless we have firmware in version B). The system from hard drive should be loaded.
title kernel 2.6.29, root /dev/hda1, no initrd root (hd0,1) kernel /boot/vmlinuz-2.6.29 root=/dev/hda1 it821x.noraid=1 rwOf course, /dev/hda1 and (hd0,1) should be set appropriately.
After reboot, choose this entry in mini-grub "menu"
Up to prepare Debian installation, you need a PC with Debian or other Debian-based distribution, like Ubuntu. On the PC create an empty directory and run debootstrap tool. Let's name the empty directory debian-root. Invoke:
sudo debootstrap --arch=i386 squeeze debian-root http://ftp.pl.debian.org/debian
The above command creates in the directory system squeeze. This means, Linux started with root partition containing the directory contents is Debian squeeze. But, before copy of the directory contents to Airlive, we have to perform a few modifications.Edit debian-root/etc/fstab file. This file should contain information about partitions: root, swap and proc. Something like:
# <file system> <mount point> <type> <options> <dump> <pass> proc /proc proc defaults 0 0 /dev/hda2 / ext3 defaults 0 1 /dev/hda3 none swap sw 0 0When finish, go to sub-directory debian-root/etc/network. In file interfaces add:
auto lo
iface lo inet loopback
allow-hotplug eth1
iface eth1 inet static
address 192.168.0.1
netmask 255.255.255.0
hwaddress ether 00:11:22:33:44:55
Instead of 192.168.0.1 enter some address from our network. Also, instead of 00:11:22:33:44:55 enter appropriate MAC adress of eth1 interface. We can get the MAC address after logon to OvisLink by run ifconfig command.We should also install a telnet, ssh, rsh or similar server. Otherwise we will be unable to logon to AirLive. Let's be a telnet server. We can install it by:
sudo chroot debian-root apt-get install telnetd
For all possible apt-get questions we answer positive.We have also to create an user accout. Let's be "airlive":
sudo chroot debian-root adduser airlive
Also, it would be useful to set root password:
sudo chroot debian-root passwd
We have also to generate initrd file. Unpack in debian-root directory the Linux kernel - file linux-2.6.29.tar.gz, and run:
sudo chroot debian-root apt-get install initramfs-tools
sudo chroot debian-root update-initramfs -c -k 2.6.29
When finish with all changes, pack the debian-root directory contents:
cd debian-root
sudo tar cf ../root.tar *
On OvisLink machine, mount our Debian partition in a temporary directory:
mkdir /tmp/deb
mount -t ext2 /dev/hda1 /tmp/deb
Next, load root.tar file to /tmp/deb directory on OvisLink. Unpack it and then delete:
cd /tmp/deb
tar xf root.tar
rm root.tar
In boot/grub/menu.lst file add:
title Debian 2.6.29, initrd 2.6.29 root (hd0,1) kernel /boot/vmlinuz-2.6.29 root=/dev/hda2 it821x.noraid=1 ro initrd /boot/initrd.img-2.6.29If our partition is other than /dev/hda2, change it, and (hd0,1), appropriately.
We have finished. Now, we can unmount partition and restart system:
cd /
umount /tmp/deb
reboot