Welcome! Log In Create A New Profile

Advanced

Help with booting NSA310S - Linux Kernel 5.7.1

Posted by cyraxxx 
Help with booting NSA310S - Linux Kernel 5.7.1
June 17, 2020 02:36AM
Hi,

First of all, thank you bodhi for your hard work for these devices :)

I have an old, unused NSA310S in my gardrobe so I decided to try to install Debian on it. I don't want to use a USB drive for this purpose, so want to install the rootfs on the HDD (plan is to create 3 partitions, ext2 sda1 for kernel, ext4 sda2 for rootfs and swap). Downloaded your last (5.7.1) kernel, put the uimage and a generated netinstaller uinitrd on an USB-drive (which has only one FAT partition) and set the uboot parameters like in this article:
https://www.madadmin.com/zyxel-nsa320s-es-debian-linux-4-resz/

Unfortunately it dont' start the uinitrd as when I try to boot I got this error message:

https://pastebin.com/ArBe6xzv

As I can understand it is an uboot env problem. My uboot env is (original uboot):

https://pastebin.com/hKBRi0Ja

Do you have any idea what to change? :)

Thanks in advance!



Edited 2 time(s). Last edit at 06/17/2020 03:43AM by bodhi.
Re: Help with booting NSA310S - Linux Kernel 5.7.1
June 17, 2020 04:08AM
cyraxxx,

I'm not familiar with that installation.

(You can install my released u-boot, and rootfs Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi.tar.bz2 from stock OS).

So it is best that you show what is in your rootfs (how did you create it?). And,
cd /boot 
ls -lart *

How did you install my released kernel linux-5.7.1-kirkwood-tld-1-bodhi.tar.bz2?

=======

Looking at your envs, which are for stock u-boot, so it does not load uInitrd. It is a little hard to see with the information you posted.

Do you have serial console? if you do, power up, interrupt serial console and

printenv
boot

And post the entire serial console log here (from u-boot banner until the last line on your terminal).

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Help with booting NSA310S - Linux Kernel 5.7.1
June 17, 2020 04:59AM
Thanks for your quick reply.

I created a serial log, you can find it here: https://pastebin.com/ucq23e5a

About the other questions:

I installed a 4.5 kernel with a jessie netinstaller successfully, based on the previous' post's link (madadmin). At that time I created the 3 partitions, but now I want to delete the whole partition table as I want a fresh a restart.

So I created the uimage by your instructions and created a debian buster netinstaller based on madadmin's post.

Unfortunately it doesn't boot up, so maybe other errors will occur.

I tried to follow your instructions, but I wanted to install the whole thing on the HDD :)



Edited 2 time(s). Last edit at 06/17/2020 05:08AM by cyraxxx.
Re: Help with booting NSA310S - Linux Kernel 5.7.1
June 17, 2020 10:56PM
cyraxxx,

> I tried to follow your instructions, but I wanted
> to install the whole thing on the HDD :)

The rootfs instruction is for all types of storage drives: USB, HDD, or SD card.

Quote
https://forum.doozan.com/read.php?2,12096

Updated 25 Aug 2019:

Basic Debian buster Kirkwood rootfs for most Kirwood plugs:

- tarball size: 209M
- install size: 536M
- The init system used in this rootfs is sysvinit . To boot with systemd, see note 2 below.
- Installed packages: nano, avahi, ntp, busybox-syslogd (log to RAM), htop, isc-dhcp-client, dialog, bzip2, nfs server/client, iperf, ethtool, sysvinit-core, sysvinit, sysvinit-utils, u-boot-tools, and mtd-utils.
- see LED controls in /etc/rc.local, and /etc/init.d/halt
- see some useful aliases in /root/.profile
- root password: root

Download at Dropbox:

Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi.tar.bz2

md5:
cd8ad170aa1a9fdc2a0a1c43ab1c0721
sha256:
8ccbbced367b4c2bf3728262e882f8232aff0fecd1c0c767219a0cab49a0b9bf


And remember to check the hash of what you download, as always.

Installation:

Installation can be done on any Linux box, with a fresh USB drive (SD card or HDD would work fine too).

Your stock u-boot envs need to be adjusted to boot with latest Debian rootfs on USB or HDD (whether it is Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi.tar.bz2, or netinstaller rootfs).

So why not create the Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi.tar.bz2 rootfs on HDD? just a suggestion, in case you did not know it is possible.

======

Also you did not answer my question above.

Quote

How did you install my released kernel linux-5.7.1-kirkwood-tld-1-bodhi.tar.bz2?

Did you run dpkg on your HDD rootfs while previous kernel is running, or chroot into it? The answer is quite relevant to the uInitrd that you are using. And how the envs need to be adjusted.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Help with booting NSA310S - Linux Kernel 5.7.1
June 18, 2020 02:26AM
Yes, your assumption was right as I wasn't open-eyed enough and didn't know that it could be installed directly on HDD.

About your kernel installation question: I simply wanted to boot with that without any installation and then run the netinstaller. It was on a USB-drive with a netinstaller uinitrd and thought that this will work like the other guy's own method (his uImage is totally working, but kernel only 4.5, so debian jessie). But now I can see it was a total waste of time as I hacked until it worked with your uimage, then it only booted to emergency mode (?because it was looking for uinitrd in the /boot maybe?)

So decided that I will do a clean install with new uboot. Don't like things which I cannot fully understand (have bad memories about bad flashing :D ), but these are spare devices, so why not.

I tried first the uboot flashing from zyxelOS , of course f***ed it up (mtd0 vs mtd1 problem, so bad memories #2 just created :D ). So found your guide about kwboot restore method, did it, debian 5.2.9 to HDD, uboot flashed and then 5.7.1 upgrade is done now.

I wanted to avoid the uboot flash thats why I started this overcompleted process.

Thank you for your current and previous help for other guys :)

Also, may I ask if this uboot works well with 3TB ext4 drive? Because I have a spare 2TB WD Red, formatted to ext4 (also edited fstab) and couldn't boot of it as it says about some reading error (testing, maybe it gone wrong just now). So installed on a 500GB old WD green but if this system is stable enough, I want to install a bigger HDD (preferably my 2TB, but if it is dead, then 3/4TB) in it and use for backup, secondary NAS.



Edited 2 time(s). Last edit at 06/18/2020 02:39AM by cyraxxx.
Re: Help with booting NSA310S - Linux Kernel 5.7.1
June 18, 2020 04:43PM
cyraxxx,

> I tried first the uboot flashing from zyxelOS , of
> course f***ed it up (mtd0 vs mtd1 problem, so bad
> memories #2 just created :D ).

:) Usually you want to copy/paste the commands during u-boot installation. Don't type them.


> So found your guide
> about kwboot restore method, did it, debian 5.2.9
> to HDD, uboot flashed and then 5.7.1 upgrade is
> done now.

Execllent!

> I wanted to avoid the uboot flash thats why I
> started this overcompleted process.

Yes. That's prudent. You don't want to install a boot loader if not necessary.

> Also, may I ask if this uboot works well with 3TB
> ext4 drive? Because I have a spare 2TB WD Red,
> formatted to ext4 (also edited fstab) and couldn't
> boot of it as it says about some reading error
> (testing, maybe it gone wrong just now). So
> installed on a 500GB old WD green but if this
> system is stable enough, I want to install a
> bigger HDD (preferably my 2TB, but if it is dead,
> then 3/4TB) in it and use for backup, secondary
> NAS.

Yes, this u-boot will boot a GPT and Ext4 HDD. Be sure you finalize the Ext4 file system (set lazy formatting to none). U-boot can not deal with Ext4 file system that is still under lazy formatting in progress. With serial console, it is easy to verify that it is ready to be used as boot drive.

With a 3TB or greater disk, you should wipe it and format it fresh using parted/gparted and create GPT partition(s). Make sure one of them is the rootfs and label it rootfs.

-bodhi
===========================
Forum Wiki
bodhi's corner
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: