Welcome! Log In Create A New Profile

Advanced

Linux Kernel 5.13.6 Kirkwood package and Debian rootfs

Posted by bodhi 
Re: Linux Kernel 3.15.3 Kirkwood package and rootfs (Non Flattened Device Tree)
August 08, 2014 09:46AM
Using a USB hub, I'm looking to setup my pogoplug as a real NAS with software raid. For this I would need support for more filesystems.

My plan is to set something up like this
- use usb hub to attach 1 usb stick and mutliple spinning drives
- use the flash usb stick as initial rootfs using squashfs (protects against corruption/destruction/manipulation)
- mount the spinning drives over the initial root with aufs
- have raid protection on the spinning drives by using btrfs

Is it possible we could get squashfs, aufs, and btrfs support in the kernel? I don't know if Uboot can support these filesystems? I'd be a very willing guinea-pig for testing on my pogoplug mobile.
Re: Linux Kernel 3.15.3 Kirkwood package and rootfs (Non Flattened Device Tree)
August 08, 2014 12:52PM
U-boot can't use squashfs, I think. I know it can't use aufs, and there might be VERY preliminary work for btrfs.
Re: Linux Kernel 3.15.3 Kirkwood package and rootfs (Non Flattened Device Tree)
August 08, 2014 02:45PM
Ah yeah, I see you're right. I found this list of supported file systems.
http://en.wikipedia.org/wiki/Das_U-Boot#Supported_file_systems

Cramfs is similar to Squashfs, but genuinely worse in many ways. At the very least, it should be possible to use Ext4 for the initial rootfs, then let the kernel handle other filesystems after it is loaded. Thanks for the info WarheadsSE.
Re: Linux Kernel 3.15.3 Kirkwood package and rootfs (Non Flattened Device Tree)
August 08, 2014 03:51PM
CasperJim,

Quote

> At the very least, it should be
> possible to use Ext4 for the initial rootfs, then
> let the kernel handle other filesystems after it
> is loaded

You could also use 2 partitions, Ext2/3/4 for boot files, and the other for rootfs with files system that you choose as long as the kernel supports it.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Linux Kernel 3.15.3 Kirkwood package and rootfs (Non Flattened Device Tree)
August 08, 2014 04:32PM
Eike Wrote:
-------------------------------------------------------
> Is there any chance to get this problem for the
> NSA325 solved?

Since kernel 3.16 was released, I'll try that to see any diffrent in size. The real solution is that stock U-Boot should be replaced with modern version so we don't have to worry about any limitation.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Linux Kernel 3.15.3 Kirkwood package and rootfs (Non Flattened Device Tree)
August 08, 2014 05:21PM
Yep, you're right again Bodhi. Is the kernel source available somewhere? I tried looking around, but maybe I'm too foolish to figure it out. In addition to extra file system support, I think I might like other modules as well, so I may have to build them myself.
Re: Linux Kernel 3.15.3 Kirkwood package and rootfs (Non Flattened Device Tree)
August 08, 2014 06:56PM
CasperJim,

It's in the tarball link in the first post. You can get the source from mainline kernel source tree and apply the patch to it.

linux-image-3.15.3-kirkwood-tld-1_1.0_armel.deb 
linux-headers-3.15.3-kirkwood-tld-1_1.0_armel.deb 
config-3.15.3-tld-1 
linux-3.15.3-tld-1.patch

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Linux Kernel 3.15.3 Kirkwood package and rootfs (Non Flattened Device Tree)
August 08, 2014 10:34PM
Quote

bodhi Wrote:
-------------------------------------------------------
> Eike Wrote:
> --------------------------------------------------
> -----
> > Is there any chance to get this problem for the
> > NSA325 solved?
>
> Since kernel 3.16 was released, I'll try that to
> see any diffrent in size. The real solution is
> that stock U-Boot should be replaced with modern
> version so we don't have to worry about any
> limitation.

I'm close to solving this problem for the nsa3xx running stock U-Boot. It seems the build has some hickups, which did not cause running problem, but did increase the vmlinuz size unecessarily.

-bodhi
===========================
Forum Wiki
bodhi's corner



Edited 1 time(s). Last edit at 08/08/2014 10:34PM by bodhi.
Re: Linux Kernel 3.15.3 Kirkwood package and rootfs (Non Flattened Device Tree)
August 09, 2014 08:30PM
> It's in the tarball link in the first post. You can get the source from mainline kernel source tree and apply the patch to it.

If they were in separate files I would have probably spotted it immediately, haha. Thank you for pointing that out.

After downloading, and getting it all setup, I saw that squashfs and btrfs were already compiled as modules. I just needed 'modprobe btrfs' and 'modprobe squashfs'. I think I read that the kernel was built by DavyGravy. Thank you kernel builder for saving me time. Awesome.
Re: Linux Kernel 3.15.3 Kirkwood package and rootfs (Non Flattened Device Tree)
August 09, 2014 09:06PM
CasperJim Wrote:
-------------------------------------------------------
> > It's in the tarball link in the first post. You
> can get the source from mainline kernel source
> tree and apply the patch to it.
>
> If they were in separate files I would have
> probably spotted it immediately, haha. Thank you
> for pointing that out.
>
> After downloading, and getting it all setup, I saw
> that squashfs and btrfs were already compiled as
> modules. I just needed 'modprobe btrfs' and
> 'modprobe squashfs'. I think I read that the
> kernel was built by DavyGravy. Thank you kernel
> builder for saving me time. Awesome.

Davygravy's was a different kernel. I think it was 3.3.x. You should read the 1st post of this thread again :)

-bodhi
===========================
Forum Wiki
bodhi's corner



Edited 1 time(s). Last edit at 08/10/2014 02:58AM by bodhi.
Re: Linux Kernel 3.15.3 Kirkwood package and rootfs (Non Flattened Device Tree)
August 10, 2014 02:57AM
FYI,

The problem with booting kernel 3.15.x on Zyxel NSA3xx stock U-Boot has been fixed. The reason: kernel-package was broken! at some point during the build it could not figure out the path of where to put initrd modules. As the result of this, all modules were included in the kernel image redundantly, hence the size increase. This does not cause any problem running, except for the NSA3xx's stock U-Boot limitation (it can't handle large uImage).

So stay tuned, I will release kernel 3.16.0-kirkwood soon.

-bodhi
===========================
Forum Wiki
bodhi's corner
Hi bodhi,
thanks a lot, I really appreciate your work!
I'll give it a try asap the new kernel is online.
Re: Linux Kernel 3.16 Kirkwood package and rootfs (Non Flattened Device Tree)
August 10, 2014 08:03PM
Kernel 3.16.0-kirkwood-tld-1 package was uploaded. Please see 1st post for download link.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Linux Kernel 3.16 Kirkwood package and rootfs (Non Flattened Device Tree)
August 11, 2014 02:52PM
There doesn't seem to be a initrd.img-3.16.0-kirkwood-tld-1 in the 3.16 package.

-JT
Re: Linux Kernel 3.16 Kirkwood package and rootfs (Non Flattened Device Tree)
August 11, 2014 04:09PM
renojim,

Regarding initrd.img-3.16.0-kirkwood-tld-1 in the 3.16. Install the kernel, and dpkg will create it automatically.

And I see that you post in another thread about squeeze/wheezy. So after you've installed the kernel, to upgrade your rootfs: change your apt sources list to point to wheezy and do upgrade. And you can use a source that is close to your location instead of http://ftp.us.debian.org/debian.

First:
cat /etc/apt/sources.list

deb http://ftp.us.debian.org/debian wheezy main
deb http://security.debian.org/ wheezy/updates main contrib non-free
Then upgrade:
apt-get update
apt-get upgrade

-bodhi
===========================
Forum Wiki
bodhi's corner



Edited 1 time(s). Last edit at 08/11/2014 04:18PM by bodhi.
Re: Linux Kernel 3.16 Kirkwood package and rootfs (Non Flattened Device Tree)
August 11, 2014 09:47PM
Ok, I have to apologize. I'm not sure what happened the first time I tried to install 3.16 (I thought I followed the same steps as when I installed 3.15), but after I upgraded to Wheezy the upgrade to 3.16 went smoothly. Now it's on to finishing installing everything and learning me some Debian!

bodhi, thanks for all you do!

-JT
Re: Linux Kernel 3.16 Kirkwood package and rootfs (Non Flattened Device Tree)
August 12, 2014 03:00AM
Bodhi, thanks for the Kernel 3.16.0-kirkwood-tld-1 package, now booting and hwclock works fine.

But there is still another nasty problem: the watchdog is constantly resetting my nsa325 after I switched from USB boot to Sata internal HD boot.

This happened on kernel 3.15, and on kernel 3.16 it is unfortunately the same.

I cannot believe it ! I am not going to buy a bunch of 3TB disks to solve this problem by using a HD drive which is "compatible" with the watchdog.

I am sure, the deactivation of the watchdog happens just too late in the bootprocess.

This watchdog issue drives me crazy !

Please help! I attached a kernellog.txt to this post.
Attachments:
open | download - kernellog.txt (19.1 KB)
Re: Linux Kernel 3.16 Kirkwood package and rootfs (Non Flattened Device Tree)
August 12, 2014 03:32AM
Quote
ptosch
[ 15.033802] sd 0:0:0:0: Attached scsi generic sg0 type 0
….
[ 15.512530] EXT4-fs (sda2): INFO: recovery required on readonly filesystem
[ 15.519558] EXT4-fs (sda2): write access will be enabled during recovery
[ 15.559925] EXT4-fs (sda2): recovery complete
[ 15.564567] EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: (null)
….
[ 19.318375] random: nonblocking pool is initialized
….
[ 21.029660] EXT3-fs (sda3): warning: maximal mount count reached, running e2fsck is recommended
[ 21.038449] kjournald starting. Commit interval 5 seconds
[ 21.047293] EXT3-fs (sda3): using internal journal
[ 21.052118] EXT3-fs (sda3): recovery complete
[ 21.056522] EXT3-fs (sda3): mounted filesystem with ordered data mode

Hi Peter,

Perhaps the time it took to do file systems recovery on these 2 HDD paritions has added to the booting delay. It does not seem much, but perhaps a few second delay has just put it over the edge. Also, I wonder if you have "usb start" in your booting sequence? it migh have added even more to the delay (USB is quite slow coming up).

I would try:

1. boot with USB drive, fsck these HDD partitions in Debian, shutdown, remove the USB drive, and cold start. If this does not get it boot faster, I would fsck them outside the box.
2. reduce the U-Boot env bootdelay to something like 3 seconds, if it was greater (just for the possiblity of this might count in the watchdog timer). This is unlikely a factor, though.

Yeah, this watchdog is really nasty! I think the soonner we can replace stock U-Boot with our own build, the better.

-bodhi
===========================
Forum Wiki
bodhi's corner



Edited 1 time(s). Last edit at 08/12/2014 03:56AM by bodhi.
Re: Linux Kernel 3.16 Kirkwood package and rootfs (Non Flattened Device Tree)
August 12, 2014 09:22AM
Up to no avail !

The corrupted FS - guess where it does come from: the watchdog resets the nsa35 just right after the sda2 has been mounted!

Anyway:
I set bootdelay to 1 .
I fsck'ed sda2.

I cold rebooted, watchdog strikes again !

At which line in the kernellog.txt can we see that the watchdog is beeing disabled ?

Is it this line ?:
[ 18.189428] nsa3xx-hwmon nsa3xx-hwmon: initialized

Cheers,
Peter
Attachments:
open | download - kernellog.txt (20 KB)
Re: Linux Kernel 3.16 Kirkwood package and rootfs (Non Flattened Device Tree)
August 12, 2014 01:04PM
I'm using an old flaky usb flash drive for rootfs. I've noticed that if the filesystem has errors and needs to run fsck, then it just hangs indefinitely (perhaps waiting for input to confirm filesystem fixes?). I have to take the drive out, connect it to my laptop, run fsck, then reinsert it and poweron the pogo.

I'm using Ext4 on the usb drive. I was just curious if this is a known problem of some type, or if there was a solution. I haven't changed /etc/fstab, so /dev/root still mounts with "0 1" as the final parameters (which I believe is correctly supposed to auto fsck).

PS.
Bohdi, please also see this thread if you haven't already.

CORRECTION:
I did change /etc/fstab from ext3 to ext4 for /dev/rootfs. Problem persists. Here's the full line.
/dev/root      /               ext4    noatime,errors=remount-ro 0 1



Edited 1 time(s). Last edit at 08/12/2014 02:28PM by CasperJim.
Re: Linux Kernel 3.16 Kirkwood package and rootfs (Non Flattened Device Tree)
August 12, 2014 03:42PM
@CasperJim,

It's a normal behavior. It got kicked out to the shell because the rootfs couldn't be mounted without correcting errors that are serious and need user interactions. OTOH, if the only thing needs to be done is recovering journal (as occurred during power outage) then it should recover OK and continue booting.

And I don't think fstab is really important here. You could have specified Ext2 in fstab, and it would still work OK if your drive is Ext3/Ext4 (I did not even change it in my rootfs).

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Linux Kernel 3.16 Kirkwood package and rootfs (Non Flattened Device Tree)
August 12, 2014 04:18PM
ptosch,

Let's move this booting problem to the NSA325 thread.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Linux Kernel 3.16 Kirkwood package and rootfs (Non Flattened Device Tree)
August 12, 2014 05:28PM
Bodhi, thanks for the heads up on fsck. I found out how to resolve the issue of system hanging.

Edit the file /etc/defaults/rcS

Change this line:
FSCKFIX=no
To this:
FSCKFIX=yes

source: http://askubuntu.com/questions/151025/how-can-i-make-fsck-run-non-interactively-at-boot-time
Re: Linux Kernel 3.16 Kirkwood package and rootfs (Non Flattened Device Tree)
August 13, 2014 01:25AM
CasperJim,

> Change this line:
>
> FSCKFIX=no
>
> To this:
>
> FSCKFIX=yes
>

Nice! I knew something missing on a couple of my boxes that behave differently from the others during bootup regarding fs check, but could't remember what it was. Turned out it is this :) Thanks.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Linux Kernel 3.16 Kirkwood package and rootfs (Non Flattened Device Tree)
August 16, 2014 10:27PM
bodhi Wrote:
-------------------------------------------------------
> Kernel 3.16.0-kirkwood-tld-1 package was uploaded.
> Please see 1st post for download link.

Hi bodhi,

Any upgrade advice for someone running POGO E02 units with older versions of your code?

In my case:
pogo1 -->> 3.12.0-kirkwood-tld-5
pogo2 -->> 3.13.1-kirkwood-tld-2

Perhaps I should step through the "in between" releases 1 version at a time until I get to your latest version?

My primary reason for upgrading is to keep these machines relatively current with your releases so that I can benefit from bug fixes and optimizations that might exist/appear in newer kernel versions.

So far I have not encountered any bugs that prevent me from using your code to run POGOplugs that monitor UPS systems via USB cables. I still keep the stock POGO code in NVRAM so these can revert to that known working base, if necessary.

Thank you for all you do.

Edit: I followed bodhi's advice. I did my backups first. Then I read and re-read the directions for upgrading which can generally be found in the first post in this thread. I checked carefully after the end of the "dpkg -i" step and the "mkImage" step to ensure the files looked right. After a reboot I checked to see the correct kernel version come up. Then I did the usual "apt-get update && apt-get dist-upgrade" for any updates. Once the "apt-get" step was complete, only then did I use "apt-get purge..." to remove the previous version. Then I removed the backup files. I finished the process with 1 last reboot, just to make sure everything was operating properly...and it was.



Edited 1 time(s). Last edit at 08/18/2014 03:32AM by notmine.
Re: Linux Kernel 3.16 Kirkwood package and rootfs (Non Flattened Device Tree)
August 16, 2014 11:28PM
Hi notmine,

There is no need to step through, you can go directly to the latest kernel version 3.16 from those. After that, do apt-get update and apt-get upgrade to get the latest packages in wheezy.

But always back up your rootfs first before doing these upgrades!

-bodhi
===========================
Forum Wiki
bodhi's corner
Zyxel 325v2 with 3.16.0-kirkwood-tld-1, 3.14.0 rootfs

Thanks for your awesome job already, i really loved the progress and work!

1. Iam currently eager trying to get my Zyxel suspending, but pm-tools do not work, since /sys/power is missing completely. Is there no suspend /hibernate support in the kernel right now?

2. The hardware "off/suspend" button does not work at all. Is this a now issue / not supported yet?

Is this the right way to give feedback or did i missuse those comments? Thank you!
Re: Linux Kernel 3.16 Kirkwood package and rootfs (Non Flattened Device Tree)
August 24, 2014 06:42PM
Hi Eugen,

Quote

Is this the right way to give feedback or did i missuse those comments? Thank you!

Yes I think it is appropriate to post in this thread is for missing features in kernel. But if it is something we already know that is implemented in the NSA325 and it does not work then creating a new thread or post in the NSA325 thread is better.

Quote

Is there no suspend /hibernate support in the kernel right now?

The CONFIG_PM has not been added to the kernel, since it is really not that useful for other extremely low power usage and silent Kirkwood plugs. However, I think now that we are have larger and noisier boxes such as the NSA320 and 325, I will add that to the next release (3.16.0-kirkwood-tld-2).

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Linux Kernel 3.16 Kirkwood package and rootfs (Non Flattened Device Tree)
August 27, 2014 04:34AM
FYI,

Please watch for your Samba file transfering in the new kernel 3.16.x to see if any problem. Arch people have been seeing Samba issues with kernel 3.16:

http://archlinuxarm.org/forum/viewtopic.php?f=9&t=7692

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Linux Kernel 3.16 Kirkwood package and rootfs (Non Flattened Device Tree)
August 27, 2014 04:29PM
Thanks for the heads-up. Looks like one more reason I'm glad I dumped Arch as I haven't seen any problems with Samba, but I guess now I'll have to do some more testing.

-JT
Sorry, you can't reply to this topic. It has been closed.