# MTD                Size in
Block Starts at  Bytes Long Words Contains
    0 0xF8000000  512K 0x020000   U-Boot
    4 0xF8080000  256K 0x010000   U-Boot Config
    5 0xF80C0000 1280K 0x050000   NAS Config
    1 0xF8200000    2M 0x080000   Kernel
    2 0xF8400000    9M 0x240000   RootFS1
    3 0xF8D00000    3M 0x0C0000   RootFS2
Installing Arch Linux on your QNAP NAS involves the following 3 main activities:
  1. Flashing a kernel
  2. Creating a partition on the HDD and copying the root filesystem
  3. Configuring the booloader (u-boot) to boot the new kernel

1. Flashing a kernel

Connect to the NAS using SSH and issue the following commands:

$ curl -L 'http://archlinuxarm.org/os/ArchLinuxARM-kirkwood-latest.tar.gz' | tar -xzv ./boot/uImage

2. Creating a partition on the HDD and unpacking the root filesystem

3. Creating a partition on the HDD and unpacking the root filesystem

Connect to the NAS

$ ubootcfg -b 0 -f /dev/mtdblock4 -o - | sed "s/^ethaddr=.*/ethaddr=$(iface_get_mac)/" > uboot-arch.config
$ sed -i "s/^mainlineLinux=.*/mainlineLinux=yes\narcNumber=2139/" uboot-arch.config
$ sed -i "s/^bootargs=.*/bootargs=console=ttyS0,115200 root=PARTUUID=B16B00B5-01 rootfstype=ext4 rootwait rw/" uboot-arch.config
$ sed -i "s/^bootcmd=.*/bootcmd=cp.l 0xF8400000 0x800000 0x240000;bootm 0x800000/" uboot-arch.config
$ ubootcfg -b 0 -f /dev/mtdblock4 -i ./uboot-arch.config