## Last modification : 2008 September 01 at 12:07:00 (UTC+0200) ## Hi all ***************** Ipmortant notice *********************************** * * * There's now a Beta installer for the QNAP Nas TS*09 series * * You'll find it there: * * http://www.cyrius.com/debian/orion/qnap/ * * So there will be not much modifications in here anymore (not that * * there have been many yet). * * * ********************************************************************** These are the bases for a debian on your QNAP NAS TS 109-209 Pro http://www.nathael.org/Data/NAS/debian_root_arm_initial.tar.bz2 http://www.nathael.org/Data/NAS/kernel_uImage_mtdblock1_2008-04-27.data http://www.nathael.org/Data/NAS/uboot_env_mtdblock4_2008-03-29.data Tested on mine (TS 109 pro) Important NOTE: The hardware MAC address will be the same for anybody using these files so using the same files on many NAS (or even two) on the same network will not work. It's maybe possible to change the MAC addresse value with a text editor in the "uboot_env_mtdblock4_2008-03-29.data" file, but I do not know if there's a checksum of any kind, so it's not recommanded if you have no serial link to your NAS. (If you succeed, let me know) Second Important NOTE: The new 2.6.25 kernel (either 2.6.25 and 2.6.25-rc6) do not have support for ext3 file system from QNAP. (One feature is not supported, so it wont mount) So backup your mtdblocks somewhere else, and also all data you may have on any ext3 partition created with firmware from QNAP. Keep in mind that if you want to make sure you can go back to the previous state you should also keep your old hard drive untouched. Note: The filesystem provided is a base but fully functionnal root file system. You can use it even with the old 2.6.12 kernel, though this old kernel lacks LVM2 and udev support, so you will miss some things. The provided kernel has support for both USB and eSata. Leds control and HDD spindown are supported using external tools (not from debian) Leds: I did some modifications of a previous version of what you'll find there: http://qnap.nas-central.org/index.php/PIC_Control_Software but I do not like the new version, I do not want to install so many dependencies for such a simple thing. HDD Spindown: I'm using a simple script wich is an adapted version of this : http://www.nslu2-linux.org/wiki/FAQ/SpinDownUSBHarddisks#method3. I put it in /etc/init.d with a link from rc2.d so it's started upon NAS startup. Performances: I actually have very bad performances with ethernet and eSata using the Kernel 2.6.25 from kernel.org. I'll have to modify it. The interresting part: To have this system up, you must follow some steps: Create the Hard-drive structure so that your / can be on sda1 on the NAS drive This / partition can be ext2, ext3 or reiserfs untar the file debian_root_arm_initial.tar.bz2 on this newly created file system set up some files: *** mandatory *** etc/fstab etc/hosts etc/hostname etc/network/interfaces <-- take great care for this one, it will allow you to connect to the NAS... or not *** optionnal *** root/.bashrc etc/skel/* etc/vim/vimrc etc/inputrc etc/apt/sources.list Flash the files on the NAS: dd if=kernel_uImage_mtdblock1_2008-04-27.data of=/dev/mtdblock1 dd if=uboot_env_mtdblock4_2008-03-29.data of=/dev/mtdblock4 Reboot root password is "debian" Change root passwd adduser your_user_name Enjoy ! And now, as it should be for any use of GPL'ed stuff, the steps to create the above mentionned files, though I will not teach you how to use Linux here. If you need help with this, try mailing to If you are an individual: nathael -- nathael.net If you are a company: nathael.pajani -- ed3l.fr The kernel has been compiled using debian cross compiler you can have it easily with apt, adding this to your source.list file deb http://www.emdebian.org/debian/ unstable main then update and install "gcc-4.1-arm-linux-gnu" Do not use gcc-4.3 yet (as of 2008-03-29 at least) as it has bugs and your kernel wont boot The kernel is unmodified sources from kernel.org 2.6.25 The config file can be found in the kernel, or here : http://www.nathael.org/Data/NAS/config_kernel_2008-04-27 then make for arm arch. The image must then be modified to be able to boot from NAS by adding a small header at the beginning (given to me by tbm from debian) http://www.nathael.org/Data/NAS/header Do it with the following commands: cat header linux-2.6.25/arch/arm/boot/zImage > zImage.fixed mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n "The Name You Want" -d zImage.fixed uImage.new The mkimage tool is from uboot and is not yet packaged for debian (as of 2008-03-29) The filesystem is made up with debootstrap on x86 for the first step, then booted using NFS from the NAS for the config steps and so on. So everything is standard arm packages from debian. The uboot args are modified using a serial console on the NAS, as you can do using these info: http://scratchpad.wikia.com/wiki/Qnap_Turbostation:TSSerial http://www.kmitl.ac.th/~kswichit%20/MAX232/MAX232.htm http://sodoityourself.com/max232-serial-level-converter/ http://www.compsys1.com/workbench/On_top_of_the_Bench/Max233_Adapter/max233_adapter.html For the remaining info, refer to publicly available documentation Google is your friend.