Welcome! Log In Create A New Profile

Advanced

Debian on NSA310S?

Posted by pengu 
Debian on NSA310S?
June 08, 2015 06:51AM
I'm running Debian on Pogoplug E02, V4 Mobile, Goflex Net, Iconnect, NSA320, NSA310, so I tried this on NSA310S.
After changing the U-Boot environment to dual boot ZyxelOS or Debian (USB Stick) I'm trying to boot Debian from USB.
To boot newer Kernels (>3.16) I have to embed the DTS file (nsa310 or nsa310s).
Debian is up and running but without networking, see this link for deteils:

http://archlinuxarm.org/forum/viewtopic.php?f=57&t=8827&hilit=nsa310s


According to the first post on second page, there is e modified 320S DTS file which could help:

by bodhi » Sun May 10, 2015 12:06 am
...
...

I have the 320S DTS in my patch at Doozan forum. It was from user chrlee who created and tested it on the actual hardware.

-bodhi

I didn't have this DTS file so I tried the NSA325 one.
This is because the hardware of the NSA310S is nearer to the NSA325 then NSA310.
Now, the ethernet is working as expected.

[    0.171082] [Firmware Info]: /ocp@f1000000/ethernet-controller@72000/ethernet0-port@0: local-mac-address is not set
[    1.910643] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
[    1.918749] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address
....
The MAC adress is set via /etc/network/interfaces (as known on NSA310)

The only problem that remains is that the box couldn't power off.


 [  830.299811] ------------[ cut here ]------------
[  830.304421] WARNING: CPU: 0 PID: 2202 at drivers/power/reset/gpio-poweroff.c:45 SyS_reboot+0x14c/0x1f8()
[  830.313859] Modules linked in: ipv6 adt7475 hwmon_vid evdev orion_wdt hmac mv_cesa uio_pdrv_genirq uio gpio_keys sg sd_mod uas usb_stord
[  830.328993] CPU: 0 PID: 2202 Comm: halt Not tainted 4.0.0-kirkwood-tld-2 #1
[  830.335916] Hardware name: Marvell Kirkwood (Flattened Device Tree)
[  830.342181] [<c0014fcc>] (unwind_backtrace) from [<c00114dc>] (show_stack+0x10/0x14)
[  830.349903] [<c00114dc>] (show_stack) from [<c001dec4>] (warn_slowpath_common+0x88/0xb0)
[  830.357969] [<c001dec4>] (warn_slowpath_common) from [<c001df7c>] (warn_slowpath_null+0x18/0x20)
[  830.366720] [<c001df7c>] (warn_slowpath_null) from [<c003851c>] (SyS_reboot+0x14c/0x1f8)
[  830.374780] [<c003851c>] (SyS_reboot) from [<c000e060>] (ret_fast_syscall+0x0/0x30)

Another this is related to the NSA325 dtb: LED configuration isn't working



Edited 3 time(s). Last edit at 06/08/2015 07:04AM by pengu.
Re: Debian on NSA310S?
June 08, 2015 07:18AM
pengu,

325 GPIOs are different from the 310S. Perhaps the 310 GPIOs are the correct ones to use.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 2 time(s). Last edit at 06/08/2015 07:21AM by bodhi.
Re: Debian on NSA310S?
June 14, 2015 09:08AM
SUCCESS!!!

sorry for the late response

I've found the NSA320s DTB (included in your linux-4.0.0-kirkwood-tld-1(and -2) but not in the 3.18.5 rootfs.
So ist wasn't there because I didn't unpack dtb tar file.

...
[    0.000000] Linux version 4.0.0-kirkwood-tld-2 (root@tldDebian) (gcc version 4.9.1 (Debian 4.9.1-19) ) #1 PREEMPT Thu Apr 30 10:09:56 PDT 2015
[    0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=0005397f
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] Machine model: Zyxel NSA320S
[    0.000000] Memory policy: Data cache writeback
[    0.000000] On node 0 totalpages: 65536
...

...
[    1.895843] libphy: Fixed MDIO Bus: probed
[    1.900252] libphy: orion_mdio_bus: probed
[    1.910617] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
[    1.918740] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address ....

- network is working fine
- the LEDs are working fine
- shootdown is working fine, the device gets powered off
Re: Debian on NSA310S?
June 14, 2015 11:43AM
pengu Wrote:
-------------------------------------------------------
> SUCCESS!!!
>
> sorry for the late response
>
> I've found the NSA320s DTB (included in your
> linux-4.0.0-kirkwood-tld-1(and -2) but not in the
> 3.18.5 rootfs.
> So ist wasn't there because I didn't unpack dtb
> tar file.
>
>
> ...
> [    0.000000] Linux version 4.0.0-kirkwood-tld-2
> (root@tldDebian) (gcc version 4.9.1 (Debian
> 4.9.1-19) ) #1 PREEMPT Thu Apr 30 10:09:56 PDT
> 2015
> [    0.000000] CPU: Feroceon 88FR131 [56251311]
> revision 1 (ARMv5TE), cr=0005397f
> [    0.000000] CPU: VIVT data cache, VIVT
> instruction cache
> [    0.000000] Machine model: Zyxel NSA320S
> [    0.000000] Memory policy: Data cache
> writeback
> [    0.000000] On node 0 totalpages: 65536
> ...
> 
> ...
> [    1.895843] libphy: Fixed MDIO Bus: probed
> [    1.900252] libphy: orion_mdio_bus: probed
> [    1.910617] mv643xx_eth: MV-643xx 10/100/1000
> ethernet driver version 1.4
> [    1.918740] mv643xx_eth_port mv643xx_eth_port.0
> eth0: port 0 with MAC address ....
> 
>
>
> - network is working fine
> - the LEDs are working fine
> - shootdown is working fine, the device gets
> powered off

Thanks pengu!

Update: I think we need further confirmation whether the NSA320S DTS can be used for the NSA310S.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 06/23/2015 07:36AM by bodhi.
Re: Debian on NSA310S?
June 22, 2015 03:50PM
Hi pengu, i have the same NSA310S and i'm interested in installing Debian on it, can you provide a step by step guide if you're kind enough?
Thanks in advance.
Re: Debian on NSA310S?
June 22, 2015 04:46PM
First you have to modify U-Boot environment via telnet or serial console
The ZyxelOS comes with fw_setenv so you can make the changes:


fw_setenv bootcmd 'run bootcmd_usb; run bootcmd_nand; reset'
fw_setenv bootcmd_usb 'usb start; run set_bootargs_usb; run usb_boot'
fw_setenv set_bootargs_usb 'setenv bootargs console=ttyS0,115200 root=$(usb_root) rootdelay=$(usb_rootdelay) rootfstype=$(usb_rootfstype) mtdparts=orion_nand:0x100000(uboot),0x80000(uboot_env)'
fw_setenv console 'ttyS0,115200'
fw_setenv usb_root 'LABEL=rootfs'
fw_setenv usb_rootdelay 6
fw_setenv usb_rootfstype ext4
fw_setenv usb_boot 'run usb_load_uimage; run usb_load_uinitrd; bootm 0x800000 0x1100000'
fw_setenv usb_load_uimage 'fatload usb 0:1 0x800000 /uImage'
fw_setenv usb_load_uinitrd 'fatload usb 0:1 0x1100000 /uInitrd'
fw_setenv bootcmd_nand 'run set_bootargs_nand; run nand_load_kernel; bootm 0x2000000'
fw_setenv set_bootargs_nand 'setenv bootargs console=$(console) mtdparts=$(mtdparts_zyxel) root=/dev/nfs rw init=/init'
fw_setenv mtdparts_zyxel 'nand_mtd:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2)'
fw_setenv nand_load_kernel 'nand read.e 0x2000000 $(kernel_addr) 0xA00000'
fw_setenv bootdelay 5
Same changes I've made to the nsa310 environment.
It's possible that the nsa310s hasn't the "console bug' but now you're save.

I have 3 partitions on the stick:

first partition: FAT16 with kernel files
second partition: : swap
third partition: labeled "rootfs" EXT4 formatted

http://www.directupload.net/file/d/4029/domrrwnb_jpg.htm

If you don't want this, change usb_load_uimage and usb_load_uinitrd to your needs.
with no seperate boot partition it should be as follow:
Please note that the stock U-Boot couldn't read ext4 so you have to use ext3 for the partition and please label it "rootfs"

fw_setenv usb_load_uimage 'ext2load usb 0:1 0x800000 /boot/uImage'
fw_setenv usb_load_uinitrd 'ext2load usb 0:1 0x1100000 /boot/uInitrd'
fw_setenv usb_rootfstype ext3

let's make the stick.
make partitions according to your needs and copy the 3.18.5 rootfs to it
I'm using a up do date rootfs (3.18.5 from bodhi) with up-to-date kernel (4.0.0-tld-2)
so I only have to delete uImage, uInitrd, recreate it with mkimage and embed the dts.

With kernel 3.18.5 you will run into problems because the working kirkwood-nsa320s.dtb isn't there.
please download bodhi's 4.0.0-tld-2 kernel package and extract the mentioned dtb file.
Now you can embed it as described in bodhi's guide.

cp -a zImage-3.18.5-kirkwood-tld-1  zImage.fdt
cat dts/kirkwood-nsa320s.dtb  >> zImage.fdt
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-3.18.5-kirkwood-tld-1 -d /boot/zImage.fdt /boot/uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-3.18.5-kirkwood-tld-1 -d /boot/initrd.img-3.18.5-kirkwood-tld-1 /boot/uInitrd

Now sync and unmount the stick.
plug it into your nsa310s and reboot


I've modified the /etc/rc.local for correct LED use:

if [ -d /sys/class/leds/nsa320s:green:sys ]; then
   echo default-on  > /sys/class/leds/nsa320s:green:sys/trigger
 # echo none        > /sys/class/leds/nsa320s:orange:sys/trigger
fi

if [ -d /sys/class/leds/nsa320s:green:hdd1 ]; then
   echo ide-disk1  > /sys/class/leds/nsa320s:green:hdd1/trigger
fi

if [ -d /sys/class/leds/nsa320s:green:hdd2 ]; then
   echo ide-disk2  > /sys/class/leds/nsa320s:green:hdd2/trigger
fi

if [ -d /sys/class/leds/nsa320s:green:usb ]; then
   echo usb-host > /sys/class/leds/nsa320s\:green\:usb/trigger
fi

I think the hdd2 is useless because it hasn't eSATA or a second SATA Port but I was too lazy to check which one is working :-)



Edited 6 time(s). Last edit at 06/25/2015 07:46AM by pengu.
Re: Debian on NSA310S?
June 22, 2015 04:50PM
Thanks alot for your fast response, tommorow i'll get home and follow your guide, if anything bad will happen i'll message you here.
Cheers my friend, beer is on me ;)
Re: Debian on NSA310S?
June 22, 2015 05:03PM
ok ;-)
I've updated some things, it's late
Re: Debian on NSA310S?
June 23, 2015 02:02AM
Brilliant @pengu. One more thing since i'm totally noob when comes to all this advanced stuff(i've worked on linux before normal user level only).
Considering i don't do any mistakes, do i really need the serial stuff since i'm missing at the moment the nokia cable.

Also, is there any advantage in running Debian on HDD instead of USB stick? What about running it from NAND?
And if it's better running it from HDD/NAND could you make some tuts for this also?

I know there are already some guides around but they are for other models. Since you managed to do it on 310s, i'd like your input on the matter.

Thanks again in advance! Cheers!
Re: Debian on NSA310S?
June 23, 2015 06:07AM
@pengu,

Since you are using the NSA320S DTS, have you verified that the all specs is the same? Ie. find the differences between NSA310S and NSA320S and make sure they are taken cared of.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on NSA310S?
June 23, 2015 11:17AM
@JohnnyUSA

as described here you can enable telnet:

http://zyxel.nas-central.org/wiki/Telnet_backdoor

This works for NSA320, NSA310, NSA310s and also NSA325(V2).
U-Boot tools were installed so you can set the environment there.

If you don't need the ZyxelOS stuff, you can flash the kernel into NAND.
Running from HDD is very similar to USB.
The only difference is that you have to start/reset the IDE bus.
In my opinion, it's better to run from USB because running from HDD meens more power consumtation and the HDD coudn't sleep. This cound shorten the lifetime.

@bodhi
I don't have a NSA320s, so it's a bit difficult to compare.
It has the same amount of RAM and HDD slots and I think the hardware is neerer to the NSA325 then NSA320.
Re: Debian on NSA310S?
June 23, 2015 02:14PM
Ok, i've tried right now but sadly it doesn't work, i suppose i've messed up something. When i plug the USB stick and Reboot the NAS, every led on my NAS is lid and i can't SSH or whatever ---> Destination unreachable.

Fac is, if i remove the USB stick, the NAS is booting ok in the Zyxel OS and everything is working as it previously did.
Re: Debian on NSA310S?
June 23, 2015 02:34PM
So it works as expected.
This also appies to other Zyxel NSAxxx devices (NSA310, NSA320 and NSA325(V2))
Now you can prepare the stick and try if this works
If not, let's see if we get netconsole working :-)



fw_setenv serverip (ip address of your machine)
fw_setenv ipaddr (ip address reachable in your network)
fw_setenv if_netconsole 'ping $serverip'
fw_setenv start_netconsole 'setenv ncip $serverip; setenv bootdelay 5; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;'
fw_setenv preboot 'run if_netconsole start_netconsole'

I didn't try it but I could later.

You can use "nc" as mentioned here:
http://forum.doozan.com/read.php?3,14,14

or build "netconsole" from U-Boot git



Edited 3 time(s). Last edit at 06/23/2015 02:37PM by pengu.
Re: Debian on NSA310S?
June 23, 2015 02:40PM
ok, gonna test this in a min.

EDIT: nothing is happening even if i edited the correct IP's, gonna try again tommorow when i'll get a DKU-5 cable. Is there any pic with the correct pins connections on 310S?

Cheers!



Edited 1 time(s). Last edit at 06/23/2015 03:01PM by JohnnyUSA.
Re: Debian on NSA310S?
June 23, 2015 03:18PM
http://i.imgur.com/B4eM6iD.jpg

As you can see, the serial connection is on the right between the ethernet and the usb connectors.

GND


RX
TX
VCC

(only GND/RX/TX is needed)



Edited 1 time(s). Last edit at 06/23/2015 03:19PM by pengu.
Re: Debian on NSA310S?
June 23, 2015 03:20PM
Perfect thanks! Gonna debug tomorrow and post results here ;)
Re: Debian on NSA310S?
June 23, 2015 03:23PM
Its similar to the NSA310 layout
gnd restet with a multimeter



Edited 1 time(s). Last edit at 06/24/2015 03:17AM by pengu.
Re: Debian on NSA310S?
June 24, 2015 09:37AM
Finally managed to make it work. Sadly, Netcat didn't work on my box, also, the DKU-5 cable that arrived today wasn't ok, it outputs 4.5v, way too much.

But when i was about to give up, tried one more time combining steps from your tutorial @pengu and @bodhi's topic and magic... i got ssh access.

More details later on when i'll get more time to stay on my PC.
Re: Debian on NSA310S?
June 24, 2015 11:27AM
nice to hear,
as I sad before (?) you don't need the VCC.
Re: Debian on NSA310S?
June 24, 2015 02:41PM
Ok, i decided to reformat the USB Stick and make a bigger partition for rootfs (previously i've had only 2gb), did all the steps that were working previously and now it doesn't work again. I think i'm going crazy.

Tried that DKU-5 cable, no luck connecting through serial, tried to inverse RX/TX pins, nothing.

I have only one ROOTFS partition on Stick marked as BOOT, labeled as "rootfs" + below lines on Telnet

./fw_setenv bootcmd 'run bootcmd_usb; run bootcmd_nand; reset'
./fw_setenv bootcmd_usb 'usb start; run set_bootargs_usb; run usb_boot'
./fw_setenv set_bootargs_usb 'setenv bootargs console=ttyS0,115200 root=$(usb_root) rootdelay=$(usb_rootdelay) rootfstype=$(usb_rootfstype) mtdparts=orion_nand:0x100000(uboot),0x80000(uboot_env)'
./fw_setenv console 'ttyS0,115200'
./fw_setenv usb_root 'LABEL=rootfs'
./fw_setenv usb_rootdelay 6
./fw_setenv usb_boot 'run usb_load_uimage; run usb_load_uinitrd; bootm 0x800000 0x1100000'
./fw_setenv usb_load_uimage 'ext2load usb 0:1 0x800000 /boot/uImage'
./fw_setenv usb_load_uinitrd 'ext2load usb 0:1 0x1100000 /boot/uInitrd'
./fw_setenv usb_rootfstype ext3
./fw_setenv bootcmd_nand 'run set_bootargs_nand; run nand_load_kernel; bootm 0x2000000'
./fw_setenv set_bootargs_nand 'setenv bootargs console=$(console) mtdparts=$(mtdparts_zyxel) root=/dev/nfs rw init=/init'
./fw_setenv mtdparts_zyxel 'nand_mtd:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2)'
./fw_setenv nand_load_kernel 'nand read.e 0x2000000 $(kernel_addr) 0xA00000'
./fw_setenv bootdelay 5

and

cp -a zImage-3.18.5-kirkwood-tld-1  zImage.fdt
cat dts/kirkwood-nsa320s.dtb  >> zImage.fdt
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-3.18.5-kirkwood-tld-1 -d /boot/zImage.fdt /boot/uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-3.18.5-kirkwood-tld-1 -d /boot/initrd.img-3.18.5-kirkwood-tld-1 /boot/uInitrd

basically i delete uImage and uInitrd and rebuild them with the above lines to include kirkwood-nsa320s.dtb.

What am i doing wrong?

PS: I'm preparing the USB Stick on Ubuntu running in VMWare on Windows 10.



Edited 2 time(s). Last edit at 06/24/2015 02:50PM by JohnnyUSA.
Re: Debian on NSA310S?
June 24, 2015 03:12PM
Johnny,

cd to the USB boot directory (assuming the USB is mounted as sdb1), and then

cd /media/sdb1/boot

cp -a zImage-3.18.5-kirkwood-tld-1  zImage.fdt
cat dts/kirkwood-nsa320s.dtb  >> zImage.fdt
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-3.18.5-kirkwood-tld-1 -d zImage.fdt uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-3.18.5-kirkwood-tld-1 -d initrd.img-3.18.5-kirkwood-tld-1 uInitrd
sync

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on NSA310S?
June 24, 2015 03:33PM
Thanks for the reply @bodhi, did what you said, plugged in the USB, rebooted the NAS, all leds were lid for 1-2 minutes or so and after they went dark and only the sys led is blinking, trying to ping the NAS --> "Destination host unreachable"..

As i've said, today worked once and i'm sure i did the same steps. After i've formatted the USB and recreated the rootfs partition all went dark.

Losing my mind really.

Img of rootfs partition:

http://s10.postimg.org/6mujlvf3d/image.png

printenv from Telnet:

bootargs=console=ttyS0,115200 mtdparts=nand_mtd:0x100000(uboot),0x80000(uboot_en                                                                                                                               v),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(r                                                                                                                               ootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2) root=/dev/nfs rw init=/init
baudrate=115200
loads_echo=0
rootpath=/srv/ubuntu
netmask=255.255.255.0
nandEcc=1bit
kernel_addr=C80000
MODEL_ID=AD03
PRODUCT_NAME=STG-315
FEATURE_BIT=00
CONTRY_TYPE=FF
VENDOR_NAME=MitraStar Technology Corp.
run_diag=yes
ethaddr=5C:F4:AB:DF:07:2B
if_netconsole=ping $serverip
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; se                                                                                                                               tenv stdout nc; setenv stderr nc; version;
preboot=run if_netconsole start_netconsole
ipaddr=192.168.1.174
serverip=192.168.1.100
bootcmd=run bootcmd_usb; run bootcmd_nand; reset
bootcmd_usb=usb start; run set_bootargs_usb; run usb_boot
set_bootargs_usb=setenv bootargs console=ttyS0,115200 root=$(usb_root) rootdelay                                                                                                                               =$(usb_rootdelay) rootfstype=$(usb_rootfstype) mtdparts=orion_nand:0x100000(uboo                                                                                                                               t),0x80000(uboot_env)
console=ttyS0,115200
usb_root=LABEL=rootfs
usb_rootdelay=6
usb_boot=run usb_load_uimage; run usb_load_uinitrd; bootm 0x800000 0x1100000
usb_load_uimage=ext2load usb 0:1 0x800000 /boot/uImage
usb_load_uinitrd=ext2load usb 0:1 0x1100000 /boot/uInitrd
bootcmd_nand=run set_bootargs_nand; run nand_load_kernel; bootm 0x2000000
set_bootargs_nand=setenv bootargs console=$(console) mtdparts=$(mtdparts_zyxel)                                                                                                                                root=/dev/nfs rw init=/init
mtdparts_zyxel=nand_mtd:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x                                                                                                                               80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_                                                                                                                               2),0x2FC0000(rootfs2)
nand_load_kernel=nand read.e 0x2000000 $(kernel_addr) 0xA00000
bootdelay=5
usb_rootfstype=ext3



Edited 2 time(s). Last edit at 06/24/2015 03:38PM by JohnnyUSA.
Re: Debian on NSA310S?
June 25, 2015 01:03AM
Johnny,

Your u-boot envs look sane. So it's not that. Since you did this on a Ubuntu VM, retrace your steps to make sure:

- When you copied rootfs, you were the root user?
- The USB has only one partition and it must be Ext3
- The partition label must be rootfs

When preparing the rootfs (either new or update), you must be the root user.

If you still can't boot afer verifyingthe above steps, then use a new USB stick (or wipe out the existing one), and going through the whole process of creating rootfs again.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on NSA310S?
June 25, 2015 02:01AM
@JohnnyUSA
all LEDs are flashing (green) only at U-Boot stage.
when booting the kernel, only the sys LED is blinking and at some point nothing bot the power LED is on.
This is the normal way.
After finishing the boot process, the LEDs comes back (with correct configuration).
I think the long delay before the sys LED starts to blink is because U-Boot finds nothing usable on the USB Stick or when it finds something , then it doesn't boot.
This could be as bodhi mentioned, because of the sticks.
Some usb sticks aren't usable for booting, they doesn't get recognized on one or all USB ports.
This happens to me this week using a seagate dockstar.


As I can see you have a small ex3 boot partition right?
So the U-Boot env is correct.
Now you create another partition labeled "rootfs" as bodhi said.
You can also use one (ext3) partition for all (also labeled "rootfs".

than go to the boot directory and recreate uImage and uInitrd.
If there is something wrong because there is no nsa320s in the rootfs copy it from the tar file inside the 4.0.0-tld2 package.
If you use a saperate boot partition as I do, mount it into the rootfs first.
Re: Debian on NSA310S?
June 25, 2015 02:38AM
What pengu said were all true, but one item: the u-boot envs are not set up properly for 2 partition rootfs, yet. So Johnny should use only one Ext3 partition, to ensure successful booting.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on NSA310S?
June 25, 2015 02:47AM
Thanks again for replies guys. Fact is, I did managed to boot Debian once on the same stick. So the stick it's not the culprit here, just to remove this from our equation.

PS: I'm instaling Debian on VM now just to try it on it also.



Edited 1 time(s). Last edit at 06/25/2015 02:48AM by JohnnyUSA.
Re: Debian on NSA310S?
June 25, 2015 02:52AM
as given first, this works for me

first partition FAT16 with the kernel stuff thats why I use "fatload" for loading kernel/initrd
second partition swap
third partition labeled rootfs as given (filesystem could be all that the kernel supports, ext3/4/btrfs, ...)

if hi would use one partition as you mentioned it should be ext3 formatted and labeled "rootfs and hi has to use "ext2load"

This should work
Re: Debian on NSA310S?
June 25, 2015 02:57AM
Sure, but you will run into problem later! See "u-boot and kernel booting process" in my signature for explanation.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on NSA310S?
June 25, 2015 02:59AM
So to get things straight,

1. I should create a partition FAT16 and put only kernel files in its root. (how large this partition should be?)
2. I should create a swap partition type Linux Swap? and if so (how large? 500mb should suffice?)
3. I should create a 3rd partition labelled "rootfs" ext3 formatted on any size i want to? A partition where i put all rootfs files from @bohdi.

Something like this, right?

But the thing that is annoying me is that i've managed to boot once with only rootfs partition labelled "rootfs" and marked with "boot" flag.

Basically what i do is the following:

1. create the rootfs partition, label it as "rootfs", mark it with boot flag.
2. unpack Debian-3.18.5-kirkwood-tld-1-rootfs-bodhi.tar.bz2 on its root.
3. unpack/extract and move kirkwood-nsa320s.dtb from bodhi's 4.0.0-tld-2 kernel package to /boot/dts directory
4. delete the old uImage/uInitrd and recreate uImage/uInitrd with nsa320s.dtb with the above commands.
5. sync (this takes 1-3 seconds)
6. unplug the NAS, unplug the USB from my PC, plug my USB into NAS, plug the NAS back and start.



Edited 1 time(s). Last edit at 06/25/2015 03:08AM by JohnnyUSA.
Re: Debian on NSA310S?
June 25, 2015 04:13AM
Johnny,

I'd strongly recommend using a SINGLE partition of type Ext3. Extract the rootfs to it. Dont worry about swap until you can boot consistently.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: