Ubuntu 8.10 For N1200

From NAS-Central Thecus Wiki
Jump to: navigation, search
Ubuntu logo.png
N1200.jpg

Introduction

General Disclaimer: Note that if this guide is not followed correctly that you could damage your N1200 in a non-recoverable manner. Also through some unlikely event it may not work for you and you may be unable to use your NAS. We have however tested this guide thoroughly on our hardware and not had any issues whatsoever!

Note that you are responsible for backing up your device before carrying out this procedure.

Known Issues

Be aware that this distribution does not include a daemon/utility/scripts for LED or button event control. Hence some of the LEDs will not function correctly and the buttons will not work.

To be able to use the switch ports (lan1-lan4 not eth1-eth4) you need to bring up eth1 without giving it an ip (this is normal behavior) also you need something plugged into lan1 (this is a bug) you will then be able to up lan1-4, assign the ports IPs, etc.

Despite the small issue with having to have to plug something into lan1 to bring up the switch ports this still means you can do lots of cool stuff with your switch now that you could not before!

Pre-Requisites

Hardware

  • Serial port access to your N1200

Files

Installation

Boot foonas-em

Download the files in the foonas-em link above and follow the guide on this wiki on how to boot a kernel and ramdisk on a N1200. Once you have booted this firmware login with the user root and the password hydr0g3n.

Partition Device And Format

The Gentoo image ships with the fstab configured for the following layout:

  • /dev/sda1 - 128MB for boot (ext2, not used)
  • /dev/sda2 - 512MB for swap
  • /dev/sda3 - The rest for root (ext3)

You may wish to use other filesystem types such as jfs for the root partition, or even store your data on another partition altogether. If you wish to do so, change /etc/fstab accordingly. Use fdisk to create this partition layout. Following this format the filesystems and mkswap the swap partition:

mke2fs /dev/sda1
mkswap /dev/sda2
swapon /dev/sda2
mke2fs -j /dev/sda3

Mount Partitions And Install

Firstly mount the partitions in the correct places:

mount /dev/sda3 /mnt
cd /mnt
mkdir boot
mount /dev/sda1 /mnt/boot

Now wget the distribution and extract it, in our case tar has no z option so we use tar and gunzip to extract the archive:

wget http://downloads.thecus.nas-central.org/N1200/Distributions/Ubuntu_8.10/ubuntu-8.10-n1200.tar.gz
gunzip ubuntu-8.10-n1200.tar.gz
tar xf ubuntu-8.10-n1200.tar

Install And Flash Kernel

wget the kernel to the correct place:

cd /mnt/boot
wget http://downloads.thecus.nas-central.org/N1200/Distributions/Gentoo_2008.0/cuImage.thecus_n1200

Check that mtd3 is the kernel mtd:

cat /proc/mtd

You should see output similar to:

dev:    size   erasesize  name
mtd0: 00040000 00020000 "u-boot"
mtd1: 00040000 00020000 "u-boot config"
mtd2: 00100000 00020000 "user"
mtd3: 001a0000 00020000 "kernel"
mtd4: 004e0000 00020000 "ramdisk"

Now flash the kernel to the corresponding /dev/mtdblock device - in this case /dev/mtdblock3:

dd if=/mnt/boot/cuImage.thecus_n1200 of=/dev/mtdblock3 bs=1k

This will take some time, following this you should see output similar to (but maybe not exactly the same as):

1611+1 records in
1611+1 records out

You should now unmount /mnt/boot:

cd /mnt
umount /mnt/boot

Configure Distribution

  • Configure the hostname by editing /mnt/etc/hosts and /mnt/etc/hostname

Finally use the fw_setenv utility within foonas-em to configure u-boot to load your distro:

fw_setenv genboot 'setenv bootargs root=/dev/sda3 rw console=ttyS0,115200;bootm FE180000'
fw_setenv bootcmd 'run genboot'
  • Edit /mnt/etc/fstab and change jfs to ext3 for sda3

Finishing Up

Unmount the remaining partition and reboot into your distribution. Use the root user with the password hydr0g3n to login with once it has finished booting up for the first time. Both serial and ssh will be available to login to:

cd /
umount /mnt
reboot

Post-Install Configuration

Install Fan Control Script

Alas this was finished after the distribution was posted and hence is not integrated already. Read the N1200 fan control page for more information. When we have added this to the images this will be removed from the how to.

Set A Password

It is important that you change the root password as soon as possible:

passwd