Most Popular Posts

Saturday, 12 May 2012

Flashing your NSA310 with Debian Squeeze to run Sabnzbd, Sickbeard & CouchPotato - Part 3

If you missed parts 1 and 2 of this blogpost they can be found below:


otherwise lets get started with part 3!

In part 2 I left you at the point of having installed Debian. To test our image before flashing Debian to NAND stop at Uboot again and type:

usb start
fatload usb 0 0x800000 uImage-3.2
setenv bootargs 'console=ttyS0,115200 root=dev/sda1'
bootm 0x800000

It will then disconnect you, if you reconnect and wait it will come up with debian login :)

This means you are ready to flash to NAND, login as root and then type "halt" to poweroff your unit, then power it back on via the button.

Once powered back on stop at uBoot again and type

usb start
fatload usb 0 0x800000 uImage-3.2
nand erase 0x4640000 0x300000
nand write.e 0x800000 0x4640000 0x300000

In the case that you installed Debian to sda1 then type:

setenv bootargs 'consoles=ttyS0,115200 root/dev/sda1'

now prepare your boot command:

setenv bootcmd 'nand read.e 0x2000000 0x4640000 0x400000; bootm 0x2000000'
saveenv

now attempt to boot by typing:

boot 

If all is well, your NSA-310 will boot from NAND into debian :)


To install Debian to hard disk I first installed Webmin to allow me to mount my USB Pen and then copy the files from it.
There are easier ways to do this but I'm no expert, and besides you will need webmin for management of this box


so below is the webmin install:


SSH to your NSA, login and type:


pico /etc/apt/sources.list


this will bring up a basic text editor (below) that will allow you to edit your sources.list file.
Dont worry about the lines in my file, this is just an example
This file is used when you issue the "apt" command.


Add the following to your sources.list file:


deb http://download.webmin.com/download/repository sarge contrib
deb http://webmin.mirror.somersettechsolutions.co.uk/repository sarge contrib



save and exit.


Now back in console:


cd /root
wget http://www.webmin.com/jcameron-key.asc
apt-key add jcameron-key.asc 



You will now be able to install with the commands:
apt-get update
apt-get install webmin


Thats it, webmin is installed and you can access it via https://<ipaddress>:10000


Mounting your USB


Connect up via webmin, login and open the "system" node from the left hand side, then select "Disk and Network Filesystems"


you can then add a mount of type "MS-DOS Filesystem" to mount your USB pen.


Once mounted make note of what it is mounted as, in my case below /mnt/sdb1




Now click on the "Others" node and then "File Manager"


From within File Manager navigate to /mnt/sdb1and you will see the contents of the USB Pen:


Mounted Usb Pen showing files
use the copy button from the toolbar to copy uImage-3.2 into the /boot folder.


Installing to hard disk


With uImage now in the /boot directory connect back to your NSA via serial and interrupt the boot process again, type:
cat /etc/fstab

This will produce output similar to below


Results of cat /etc/fstab
As you can see my file system is mounted on /dev/sda1, if this is not the case adjust the commands below accordingly (see NOTE before launching commands):


setenv bootargs 'console=ttyS0,115200 root=/dev/sda1'
setenv bootcmd 'ide reset; ext2load ide 0:1 0x800000 /uImage-3.2; bootm 0x800000'
saveenv
boot


**NOTE**
1) Above I had to type /boot/uImage-3.2 as just uImage-3.2 on its own would NOT work.
2) You MUST change 0:1 to match your mount, e.g if you have /dev/sda1 then use 0:1, if you have /dev/sda2 then use 0:2 and so on...


Thats it! congratulations, you should have a fully working NSA-310 running Debian squeeze!


One final thing to do via Serial is stop at uboot and type printenv, make a note of the mac address assigned to eth1 you will need it in part 4.


Now you can put the box back together...


In part 4 we will get on with a few tweaks before finally installing SAB, CP and SB

Part 4

No comments:

Post a Comment