Welcome! Log In Create A New Profile

Advanced

Debian on NSA325 V1/V2

Posted by Buttzy10169 
Re: NSA 325 V2 Debian Is Possible!
August 14, 2015 05:17AM
Dieter,

It depends if you have installed new u-boot and flashed the default u-boot envs image or not. If you did, then more u-boot envs adjustment is needed to boot back to stock OS. If not sure how, pls list your u-boot envs here.
fw_printenv

And do you have serial console or netconsole?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NSA 325 V2 Debian Is Possible!
August 14, 2015 06:43AM
bodhi Wrote:
-------------------------------------------------------
> Dieter,
>
> It depends if you have installed new u-boot and
> flashed the default u-boot envs image or not. If
> you did, then more u-boot envs adjustment is
> needed to boot back to stock OS. If not sure how,
> pls list your u-boot envs here.
>
> fw_printenv
>
>
> And do you have serial console or netconsole?

I have a netconsole via ssh. I didn't change the u-boot, just some env parameters as hans wrote here:
http://forum.doozan.com/read.php?2,14351,19481#msg-19481

Current env seems defect?
root@debian:~# fw_printenv
Warning: Bad CRC, using default environment
bootcmd=bootp; setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; bootm
bootdelay=5
baudrate=115200
root@debian:~#



Edited 1 time(s). Last edit at 08/14/2015 06:58AM by edinger.
Re: NSA 325 V2 Debian Is Possible!
August 14, 2015 07:26AM
yeah .. with two 2,5 '' Toshiba HDD,
only the following is possible:

read: 60 MB/s
write: 45 - 48 MB/s

I'll try two WD Green soon ;-)

bodhi Wrote:
-------------------------------------------------------
> You're welcome, Davide!
>
> > Some samba reports on internal drive, ext4 with
> > Gbps net:
> > read 98MB/sec sustained
> > write 60MB/sec sustained
>
> Now that's some impressive stats! the best I've
> seen for Samba on these boxes :)

Edit

now 50 MB/s write, 80 MB/s read with the mentioned Toshiba 2,5 '' HDDs
(depending on the OS more or less)with the following SMB tweaks:

      socket options = TCP_NODELAY IPTOS_LOWDELAY       
      min receivefile size = 128k 
      use sendfile = yes
      use mmap = yes

all other SAMBA tweaks makes the read / write (more) unstable and slower

Edit 2

with two WD Green:

read: 50 MB/s write: 90 MB/s (depending on the OS more or less)



Edited 5 time(s). Last edit at 08/15/2015 06:08AM by pengu.
Re: NSA 325 V2 Debian Is Possible!
August 14, 2015 12:13PM
davidedg Wrote:
-------------------------------------------------------
> bodhi Wrote:
> --------------------------------------------------
> -----
>
> > Not a real problem. You can ignore it.
>
> Thanks. My new system is ready at last!
> I finally finished fighting against Kernel 4.x,
> Debian8, SystemD, Bluez5 and PulseAudio5 :D
>
> Some samba reports on internal drive, ext4 with
> Gbps net:
> read 98MB/sec sustained
> write 60MB/sec sustained
>
> This is a little pleasantly unexpected! (kernel
> 3.x and debian 7 was at ~50MB/sec R/W).
>
>
> Again, thank you T... Mr. Bodhi for your endless
> and untiring work and support!!


Holy cow. You did samba tweaks as in your signature, but did you also apply the tweaks from here (in debian the tools are in /sbin/ so change the line) ?
https://linuxengineering.wordpress.com/2014/08/03/performance-tuning-with-pogoplug-v4/

I'm still trying to get mine to go anywhere beyond 30 MB/s, on kernel 3.17 (I have OMV on it, but I did tests also without it).
Re: NSA 325 V2 Debian Is Possible!
August 14, 2015 06:03PM
@edinger,

Do you want to run stock OS as full system, or just want to be able to use it as a simple "rescue" system in case you need to login to fix the USB file system?

In either cases, you should connect with netconsole and get the output of your u-boot envs and post here. Boot into Debian and also get output of:
uname -a
mount
cat /etc/fw_env.config

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NSA 325 V2 Debian Is Possible!
August 15, 2015 12:09AM
Hi bodhi,
best would be the possibility to switch between stock os and debian on usb.
I managed to install a serial console in case it is needed :).
Currently without hard disks, because of the serial console.
Do you recommend to install latest u-boot?

root@debian:~# uname -a
Linux debian 3.16.0-kirkwood-tld-2 #2 PREEMPT Sun Aug 31 18:56:01 PDT 2014 armv5tel GNU/Linux
root@debian:~# mount
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,relatime,size=10240k,nr_inodes=63198,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=51176k,mode=755)
/dev/disk/by-label/rootfs on / type ext4 (rw,noatime,errors=remount-ro,data=ordered)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /run/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=102340k)
tmpfs on /tmp type tmpfs (rw,relatime)
rpc_pipefs on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw,relatime)
root@debian:~# cat /etc/fw_env.config
# MTD device name	Device offset	Env. size	Flash sector size	Number of sectors
/dev/mtd1 0x0000 0x20000 0x20000
[\code]

Thanks for your support.
Attachments:
open | download - fw_printenv.txt (2.4 KB)
Re: NSA 325 V2 Debian Is Possible!
August 15, 2015 03:28AM
@edinger,

You are running stock u-boot with WarheadsSE's setup to enable switching beween Linux and stock OS.
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
bootcmd_stock=setenv bootargs $(bootargs_stock); nand read.e $(loadaddr) $(kernel_addr) 0xA00000; bootm $(loadadr)
bootcmd='run bootcmd_linux'

1. To boot stock OS when there is no USB drive attached, try this:

- Remove the USB drive. And power up.
- Interrupt serial console at countdown, and then
setenv bootcmd 'run bootcmd_linux; run bootcmd_stock'
boot

Once you observe that it booted into stock OS, and everything seems to be normal, reboot and let it boot into Debian.

2. The issue about the env CRC errors can be taken care of once you're done with testing the setup above. In Debian, outputs of the following commands are needed to determine why that error occured:

cat /proc/cmdline
cat /proc/mtd
cat /etc/fw_env.config

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NSA 325 V2 Debian Is Possible!
August 15, 2015 04:17AM
@bodhi:

I solved the problem with the CRC error under debian with the following change https://micha.stoecker.me/p/X9M4

I tried your command, but it didn't work at first.
Then I used the commands from the to_stock variable and that worked to boot stock os:
setenv mainlineLinux no; setenv bootcmd \'run bootcmd_stock\'; saveenv; reset
After that I retried your command and now it boots always in stock. Have I done something wrong?
With the commands in to_linux I am able to boot into debian.



Edited 1 time(s). Last edit at 08/15/2015 04:24AM by edinger.
Re: NSA 325 V2 Debian Is Possible!
August 15, 2015 07:49AM
> Holy cow. You did samba tweaks as in your
> signature, but did you also apply the tweaks from
> here (in debian the tools are in /sbin/ so change
> the line) ?
> https://linuxengineering.wordpress.com/2014/08/03/
> performance-tuning-with-pogoplug-v4/

My only customizations are:

1) the ones in my signature (under the samba section ofc)
2) kernel customization (I didn't try with bodhi's, but I hardly think this makes any difference)
3) rc.local (these are taken from Zyxel original firmware - I don't know if they do real difference in kernel 4.x):

I'm curious to try those you mentioned, though, cause I remember I've actually used smth similar for my work (for an NFS server).

--
DavideDG
My NAS userspace configs
My Zyxel NSA325 mod
My D-Link DNS325 mod
My Lacie NS2MAX mod
Re: NSA 325 V2 Debian Is Possible!
August 15, 2015 04:29PM
@edinger,

In serial console,
setenv bootcmd 'setenv mainlineLinux yes; run bootcmd_linux; setenv mainlineLinux no; run bootcmd_stock'
boot
See if this works. And post the serial boot log when you boot without the USB.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NSA 325 V2 Debian Is Possible!
August 16, 2015 10:08AM
bodhi Wrote:
-------------------------------------------------------
> @edinger,
>
> In serial console,
>
> setenv bootcmd 'setenv mainlineLinux yes; run
> bootcmd_linux; setenv mainlineLinux no; run
> bootcmd_stock'
> boot
>
> See if this works. And post the serial boot log
> when you boot without the USB.

1. Boot into stock os without usb stick after booting into debian does not work with your command. I needed to_stock commands - see file screenlog_boot_stock.log
2. Boot into debian os from usb stick after booting into stock os does not work with your command. I needed to_linux commands - see files screenlog_boot_usb_with_your_command.log and screenlog_boot_usb_with_to_linux.log

I found command to log screen output
screen -L /dev/ttyUSB0 115200



Edited 1 time(s). Last edit at 08/16/2015 10:35AM by edinger.
Attachments:
open | download - screenlog_boot_usb_with_your_command.log (4.6 KB)
open | download - screenlog_boot_usb_with_to_linux.log (29.7 KB)
open | download - screenlog_boot_stock.log (63.3 KB)
Re: NSA 325 V2 Debian Is Possible!
August 16, 2015 06:25PM
edinger,

First, the approach to boot between to_linux and to_stock is a non-optimal technique. You should avoid it when possible. It is best to set it up so that you can boot to stock by removing the stick. That way it can serve as a rescue system.

> 1. Boot into stock os without usb stick after
> booting into debian does not work with your
> command. I needed to_stock commands - see file
> screenlog_boot_stock.log

This might have been due to a lack of the ability of stock u-boot to "remember" the arcNumber in your envs.

Try
setenv bootcmd 'setenv mainlineLinux yes; setenv arcNumber 4495; saveenv; run bootcmd_linux; setenv mainlineLinux no; setenv arcNumber 4495; saveenv; run bootcmd_stock'
boot
The saveenv above is what I want to avoid, but if stock u-boot can't handle it, then you'll have no choice.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NSA 325 V2 Debian Is Possible!
August 17, 2015 01:18PM
bodhi Wrote:
-------------------------------------------------------

> Try
>
> setenv bootcmd 'setenv mainlineLinux yes; setenv
> arcNumber 4495; saveenv; run bootcmd_linux; setenv
> mainlineLinux no; setenv arcNumber 4495; saveenv;
> run bootcmd_stock'
> boot
>
> The saveenv above is what I want to avoid,
> but if stock u-boot can't handle it, then you'll
> have no choice.
Bad luck. It does not work. It hangs after loading the kernel. Would it work with your u-boot? Should I try that? There is only mentioned nsa325. Does your description also work for nsa325v2?
Attachments:
open | download - screenlog.txt (9.5 KB)
Re: NSA 325 V2 Debian Is Possible!
August 17, 2015 08:34PM
edinger,

The NSA325 and NSA325-V2 are the same box (differences are only cosmetics).

It is OK to update to new u-boot. But if booting back to stock OS from the new U-Boot is important to you, then you should wait until I have some time to try that.

I can't promise that it will work :)

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NSA 325 V2 Debian Is Possible!
August 18, 2015 03:54AM
bodhi Wrote:
-------------------------------------------------------
> edinger,
>
> The NSA325 and NSA325-V2 are the same box
> (differences are only cosmetics).
>
> It is OK to update to new u-boot. But if booting
> back to stock OS from the new U-Boot is important
> to you, then you should wait until I have some
> time to try that.
>
> I can't promise that it will work :)
Ok. Thanks. As long as I can restore old U-Boot that would be ok for me.
When I understand it right that is possible. Is that correct? Then I will give it a try.
I don't need stock os in the next weeks.

I noticed, that firmware 4.80 had been released. I'm currently on 4.71. Does updating the firmware eventually help me?



Edited 1 time(s). Last edit at 08/18/2015 04:19AM by edinger.
Re: NSA 325 V2 Debian Is Possible!
August 18, 2015 04:21AM
edinger Wrote:
-------------------------------------------------------
> bodhi Wrote:
> --------------------------------------------------
> -----
> > edinger,
> >
> > The NSA325 and NSA325-V2 are the same box
> > (differences are only cosmetics).
> >
> > It is OK to update to new u-boot. But if
> booting
> > back to stock OS from the new U-Boot is
> important
> > to you, then you should wait until I have some
> > time to try that.
> >
> > I can't promise that it will work :)
> Ok. Thanks. As long as I can restore old U-Boot
> that would be ok for me.
> When I understand it right that is possible. Is
> that correct? Then I will give it a try.
> I don't need stock os in the next weeks.

Yes. The new u-boot works fine for NSA325v2 (I use my v2 to build this). And this box has UART booting recovery, so it is quite safe.

Remember to do exactly what the steps in installation describes. If you've not sure about anything, pls post.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NSA 325 V2 Debian Is Possible!
August 20, 2015 05:24AM
edinger Wrote:
-------------------------------------------------------
> bodhi Wrote:
> --------------------------------------------------
> -----
> > edinger,
> >
> > The NSA325 and NSA325-V2 are the same box
> > (differences are only cosmetics).
> >
> > It is OK to update to new u-boot. But if
> booting
> > back to stock OS from the new U-Boot is
> important
> > to you, then you should wait until I have some
> > time to try that.
> >
> > I can't promise that it will work :)
> Ok. Thanks. As long as I can restore old U-Boot
> that would be ok for me.
> When I understand it right that is possible. Is
> that correct? Then I will give it a try.
> I don't need stock os in the next weeks.
>
> I noticed, that firmware 4.80 had been released.
> I'm currently on 4.71. Does updating the firmware
> eventually help me?

With firmware 4.80 they killed the watchdog with their own u-boot, then you can use my installer scripts and debian package from here that sets multiboot from usb, if no usb system is found it boots its own firmware http://forum.doozan.com/read.php?2,22432

might be better to do a resetenv followed by a saveenv before running it.
Re: NSA 325 V2 Debian Is Possible!
August 24, 2015 07:28AM
bobafetthotmail Wrote:
-------------------------------------------------------
>
> With firmware 4.80 they killed the watchdog with
> their own u-boot, then you can use my installer
> scripts and debian package from here that sets
> multiboot from usb, if no usb system is found it
> boots its own firmware
> http://forum.doozan.com/read.php?2,22432
>
> might be better to do a resetenv followed
> by a saveenv before running it.
Thanks. I'll give it a try. Do I have to revert back to original mtd0 to use your installation?



Edited 1 time(s). Last edit at 08/24/2015 07:40AM by edinger.
Re: NSA 325 V2 Debian Is Possible!
August 26, 2015 02:39AM
edinger Wrote:
-------------------------------------------------------
> bobafetthotmail Wrote:
> --------------------------------------------------
> Thanks. I'll give it a try. Do I have to revert
> back to original mtd0 to use your installation?

No need to revert. It will work fine also with the new u-boot, it will just not use most of its newer and better capabilities as it is supposed to work with stock u-boot that lacks them.

Please note that my script installs a kernel 3.17 rootfs where there is also OpenMediaVault (OMV needs Debian Wheezy), if you don't want that, you need to change the install script to load a bodhi's rootfs instead.

If you need that, I can do that too.

Otherwise, these are the uboot envs to allow multibooting (if you are adding them from u-boot console write only "setenv" instead of "fw_setenv")

I am assuming you have a 150MB ext2 partition with the contents of the /boot folder that has partition label "boot", and a ext4 partition with the rest of the space with label "rootfs".

If you have a single ext4 partition, change all "ext2load" into "ext4load" all "/uImage" in "/boot/uImage" and all "/uInitrd" in "/boot/uInitrd", and label that partition "rootfs" with a linux partition editor (like gparted)

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 pre_bootcmd_linux_usb 'setenv mainlineLinux yes; setenv bootargs $(bootargs_linux); mw.l f1010100 0020c000; usb reset'
fw_setenv bootcmd_linux_usb_0 'ext2load usb 0:1 $(loadaddr) /uImage; ext2load usb 0:1 0x01100000 /uInitrd ; bootm $(loadaddr) 0x01100000'
fw_setenv bootcmd_linux_usb_1 'ext2load usb 1:1 $(loadaddr) /uImage; ext2load usb 1:1 0x01100000 /uInitrd ; bootm $(loadaddr) 0x01100000'
fw_setenv bootcmd_linux_usb_2 'ext2load usb 2:1 $(loadaddr) /uImage ; ext2load usb 2:1 0x01100000 /uInitrd ; bootm $(loadaddr) 0x01100000'
fw_setenv bootcmd_stock 'setenv mainlineLinux no; setenv bootargs $(bootargs_stock); nand read.e 0x2000000 $(kernel_addr) 0xA00000; bootm 0x2000000'
fw_setenv bootcmd 'run pre_bootcmd_linux_usb; run bootcmd_linux_usb_0; run bootcmd_linux_usb_1; run bootcmd_linux_usb_2; run bootcmd_stock; reset'

If you want to have also Sata boot in the multiboot, add this

fw_setenv bootcmd_linux_sata_0 'setenv mainlineLinux yes; setenv bootargs $(bootargs_linux); ide reset; ext2load ide 0:1 $(loadaddr) /uImage ; ext2load ide 0:1 0x01100000 /uInitrd ; bootm $(loadaddr) 0x01100000 0x1c00000'

and this (a modified version of the last line above to add a check for sata at boot)

fw_setenv bootcmd_linux_sata_0 'setenv mainlineLinux yes; setenv bootargs $(bootargs_linux); ide reset; ext2load ide 0:1 $(loadaddr) /uImage ; ext2load ide 0:1 0x01100000 /uInitrd ; bootm $(loadaddr) 0x01100000 0x1c00000'
Re: NSA 325 V2 Debian Is Possible!
August 28, 2015 05:36AM
Hi bobafetthotmail, hi bodhi

@bobafetthotmail: it didn't work. I attached log on your post
@bodhi: how can I restore old mtd0 when I cannot boot into any system (stock or linux). I tried to create one single ext3 usb stick with 8GB, but it didn't boot either.

Regards,
Dieter
Re: NSA 325 V2 Debian Is Possible!
August 28, 2015 09:53AM
edinger Wrote:
-------------------------------------------------------
> Hi bobafetthotmail, hi bodhi
>
> @bobafetthotmail: it didn't work. I attached log
> on
> [url=http://forum.doozan.com/read.php?2,22432,2351
> 8#msg-23518]your post[/url]

according to your env a primary ext2 or ext3 partition
but there is some other stuff there

please look at the bootcmd_linux_usb commands, there is something wrong,



Edited 1 time(s). Last edit at 08/28/2015 09:58AM by pengu.
Re: NSA 325 V2 Debian Is Possible!
August 28, 2015 10:50AM
Can you tell me what's wrong? This is my usb with ext2 boot and ext4 rootfs which worked under the old mtd0.
I plugged it into usb 1.
The commands are identical to the one from bobafetthotmail except that I used them from u-boot with setenv instead of fw_setenv.
root@ubuntu-dell:/home/dieter# fdisk -l /dev/sde

Platte /dev/sde: 4184 MByte, 4184342528 Byte
129 Köpfe, 62 Sektoren/Spur, 1021 Zylinder, zusammen 8172544 Sektoren
Einheiten = Sektoren von 1 × 512 = 512 Bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Festplattenidentifikation: 0x0004a9a8

   Gerät  boot.     Anfang        Ende     Blöcke   Id  System
/dev/sde1            2048      206847      102400   83  Linux
/dev/sde2          206848     8171519     3982336   83  Linux
root@ubuntu-dell:/home/dieter# mount | grep sde
/dev/sde1 on /media/dieter/b3d3c5f6-2879-4e20-b1fc-d17a2dd8ff54 type ext2 (rw,nosuid,nodev,uhelper=udisks2)
/dev/sde2 on /media/dieter/rootfs type ext4 (rw,nosuid,nodev,uhelper=udisks2)
root@ubuntu-dell:/home/dieter# 
Re: NSA 325 V2 Debian Is Possible!
August 28, 2015 01:02PM
I see no error here, let's look again at your U-Boot env:

you don't need a special bootcmd line for each USB port because they are all recognized.
$(loadaddr) points to???

please use it directly as done for loading uInitrd.

ext2load usb 0:1 0x800000 /uImage
ext2load usb 0:1 0x1100000 /uInitrd
bootm 0x800000 0x1100000




Edited 1 time(s). Last edit at 08/28/2015 01:02PM by pengu.
Re: NSA 325 V2 Debian Is Possible!
August 28, 2015 04:25PM
@edinger,

> @bodhi: how can I restore old mtd0 when I cannot
> boot into any system (stock or linux). I tried to
> create one single ext3 usb stick with 8GB, but it
> didn't boot either.

Let's recap the problem and see if there is a simple fix that get you boot into Debian:

- Create the 3.18.5 rootfs on a single Ext3 partition on USB drive. I think you've done this?

- Boot with serial console and interrupt it,
printenv
and then let it boot all the way
boot

- How far you've got at this point? Please post a serial log for entire session (from u-boot banner to the last thing you see on serial console).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NSA 325 V2 Debian Is Possible!
August 29, 2015 11:18AM
Here is the log. I created a new usb stick with 3.18.5.
Attachments:
open | download - screenlog_single_ext3fs.txt (7.1 KB)
Re: NSA 325 V2 Debian Is Possible!
August 29, 2015 06:36PM
@edinger,

According to the boot log, you have installed uboot.2014.07-tld-4 for NSA325, but did not flash the default u-boot envs in section B. But instead, your current envs are a mixed of stock u-boot envs and the new u-boot default envs (when you did the saveenv, it saves everything in the u-boot envs memory space).

Quote

B. Flashing default u-boot envs image

This is the tarball in section B:

Quote

uboot.2014.07-tld-2.environment.bodhi.tar

This tarball includes 2 files:

uboot.2014.07-tld-2.environment.img (the default envs image to be flashed) 
uboot.2014.07-tld-2.environment (the content of the default envs in text format)


So, to get it booting with the default envs correctly, we have to correct the current u-boot envs that you have saved. The envs are a mess right now, so it is best to restore the set of default envs by using uEnv.txt loading capability.

1. Copy the default envs in text format to the 3.18.5 rootfs on USB. Assuming the USB rootfs is mounted on another Linux box as /media/sdb1:

cp -a uboot.2014.07-tld-2.environment /media/sdb1/boot/uEnv.txt
sync

2. Plug the USB rootfs into the NSA325 and power up, interrupt serial console. At the prompt:

run bootcmd_uenv
setenv arcNumber 4495
setenv machid


3. At this point your current u-boot envs are set to a correct set of u-boot envs to boot the USB rootfs if it is on a single Ext2 or Ext3 partition. So do not save envs. Go ahead and boot

boot

If it does not boot all the way into Debian successfully, please post tthe entire serial console log.

If you've booted into Debian, you can either flash the default envs, using instruction in section B. Or you can reboot, interrupt serial console, and do the uEnv.txt loading steps above again, and then do a saveenv before boot:
saveenv
boot

There are more adjustment needed regarding mtparts, ipaddress, serverip (see instruction in the u-boot installation section B). But they can be adjusted in Debian,

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



Edited 2 time(s). Last edit at 08/29/2015 06:41PM by bodhi.
Re: NSA 325 V2 Debian Is Possible!
August 30, 2015 01:17AM
Hi,

it gets better...but complained about wrong machid, so I changed these values directly in uEnv.txt.
I assume uEnv.txt will be read during boot, so I changed some values:
root@ubuntu-dell:/media/dieter# diff /media/dieter/rootfs/boot/uEnv.txt uboot.2014.07-tld-2.environment
1,2c1,2
< arcNumber=4495
< machid=
---
> arcNumber=2097
> machid=0x831
Now at least it finds kernel and ramdisk, but stucks on booting:
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 3 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found
2865664 bytes read in 651 ms (4.2 MiB/s)
6535284 bytes read in 556 ms (11.2 MiB/s)
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-3.18.5-kirkwood-tld-1
   Created:      2015-02-08   9:02:01 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2865600 Bytes = 2.7 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-3.18.5-kirkwood-tld-1
   Created:      2015-02-19   1:49:36 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    6535220 Bytes = 6.2 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.

Error: unrecognized/unsupported machine ID (r1 = 0x0000118f).

Available machine support:

ID (hex)        NAME
ffffffff        Generic DT based system
ffffffff        Marvell Kirkwood (Flattened Device Tree)

Please check your kernel config and/or bootloader.
Maybe it's related to the fact that I just unpacked the 3.18.5 package to the usb stick as I have no running system on NSA325 to create the correct kernel with your descriptions



Edited 1 time(s). Last edit at 08/30/2015 01:30AM by edinger.
Attachments:
open | download - screenlog.0 (2.9 KB)
Re: NSA 325 V2 Debian Is Possible!
August 30, 2015 03:48AM
edinger,

> Maybe it's related to the fact that I just
> unpacked the 3.18.5 package to the usb stick as I
> have no running system on NSA325 to create the
> correct kernel with your descriptions

Right on! the rootfs can not be used to boot with your current default envs. It nees the DTB appended, as described in the installation instruction.

Quote

4. Create uImage with embbeded DTB (If this is not first time installation, please see Note 2 below).

I'm using the GoFlex Net booting with USB drive as an example here. Please replace its name (kirkwood-goflexnet.dtb) with the box you are installing on (for example, kirkwood-pogo_e02.dtb). Look inside /media/sdb1/boot/dts/ for the correct DTB file name for your box.

cd /media/sdb1/boot
cp -a zImage-3.18.5-kirkwood-tld-1 zImage.fdt
cat dts/kirkwood-goflexnet.dtb >> zImage.fdt
mv uImage uImage.orig
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
sync

You can use any Linux box to create the appended uImage. If mkimage is not installed on that box, then install it:
apt-get install mkimage

and adjust the above instruction (use the kirkwood-nsa325.dtb to append it):
cat dts/kirkwood-nsa325.dtb >> zImage.fdt

Or you can download this uImage I've just created for ziggy on the other thread:
http://forum.doozan.com/read.php?2,23536,23553#msg-23553

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NSA 325 V2 Debian Is Possible!
August 30, 2015 05:21AM
Thanks a lot.
It works now. I wrote your environment-variables again after booting into debian + adjusting mdtpart and hwaddr values and renamed the uEnv.txt file.

What do I have to change now to run a usb stick with 2 partitions (boot and rootfs) - possibly rootfs with ext4?



Edited 1 time(s). Last edit at 08/30/2015 06:08AM by edinger.
Re: NSA 325 V2 Debian Is Possible!
August 30, 2015 03:17PM
edinger,

> What do I have to change now to run a usb stick
> with 2 partitions (boot and rootfs) - possibly
> rootfs with ext4?

See this thread:
http://forum.doozan.com/read.php?3,19093

In summary, if you intend to plug in more than one USB or SATA drives, or having multiple partitions on a drive, you need do both sections A and B.

With the new u-boot, you can use Ext4 for the kernel and rootfs. There is no need to have /boot in a different partition to get around the old u-boot limitation (if that's reason why you want to use a different partition).

-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: