Quantcast
Channel: Debian on NSA325 V1/V2
Viewing all articles
Browse latest Browse all 359

Re: NSA 325 V2 Debian Is Possible!

$
0
0
Hi, I recently got an nsa-325 so I thought I share my experience running debian on it.
After reading and looking at all the excellent work from bodhi, buttzy and others I decided I go ahead
without a serial cable, so I hope its useful:

Procedure to run debian on nsa-325, no need for serial cable, no need to open the box,
no need to interact with u-boot.

# prepare usb stick to boot debian
Prepare a USB Stick with rootfs / bootfs as from bodhi's thread
I used a SanDisk Cruzer Fit 8GB USB stick which seems to be proven to work.
- Create 2 partitions on the usb stick:
one small (e.g. 100MB) ext2 filesystem named boot
one ext4 filesystem named rootfs
- expand the rootfs tar file from bodhi into rootfs, I used linux-3.16.0-kirkwood-tld-2-bodhi.tar.bz2,
which I understood is the latest that works with stock u-boot, so no flash of u-boot needed.
- copy files from rootfs /boot to boot filesystem
- edit etc/fstab in rootfs and adapt filesystem type (ext4)
# usb stick ready to boot debian

# change u-boot env.vars so that debian will be booted from usb
# we can do this from the userspace on nsa-325 without relying on usb_key_func stuff

telnet to nsa-325 box (I had stock firmware 4.71 on it), user admin default password 1234
su root (password 1234)
execute following commands (put into a script and execute):
(commands taken from usb-debian-uboot.tar.gz)

#
fw_setenv arcNumber 4495
fw_setenv mainlineLinux yes
fw_setenv bootargs_stock 'console=ttyS0,115200 mtdparts=nand_mtd:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2) root=/dev/nfs rw init=/init'
fw_setenv bootargs_linux 'console=ttyS0,115200 mtdparts=nand_mtd:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2) root=LABEL=rootfs loglevel=8'
fw_setenv bootcmd_linux 'setenv bootargs $(bootargs_linux); mw.l f1010100 0020c000; usb reset; ext2load usb 0:1 $(loadaddr) /uImage; ext2load usb 0:1 0x01100000 /uInitrd; bootm $(loadaddr) 0x01100000'
fw_setenv bootcmd_stock 'setenv bootargs $(bootargs_stock); nand read.e $(loadaddr) $(kernel_addr) 0xA00000; bootm $(loadadr)'
fw_setenv to_stock "setenv mainlineLinux no; setenv bootcmd \'run bootcmd_stock\'; saveenv; reset"
fw_setenv to_linux "setenv mainlineLinux yes; setenv bootcmd \'run bootcmd_linux\'; saveenv; reset"
fw_setenv bootcmd 'run to_linux'
#

# boot env vars now correctly setup in uboot-env flash block
now (just to be on safe side), execute fw_printenv and doublecheck vars

now plug the usb stick into nsa-325 (rear usb-1 connector)
reboot

# nsa-325 should now boot into debian, using dhcp

locate IP address on router, ssh to nsa-325 box with root and password root
success :-)

Of course for eventual troubleshooting the serial cable will be needed, but
it looks like if sticking to instructions closely this is not mandatory for initial setup.

hans

Viewing all articles
Browse latest Browse all 359

Trending Articles