Neuer Kernel wird nicht gebootet (ARM)

Welches Modul/Treiber für welche Hardware, Kernel compilieren...
Antworten
ForumAdmin
Beiträge: 8
Registriert: 07.01.2017 16:29:52

Neuer Kernel wird nicht gebootet (ARM)

Beitrag von ForumAdmin » 07.01.2017 16:39:41

Hallo zusammen,

habe meine Buffalo Linkstation (ARM-SOC mit 400 MHz CPU / 128 MB RAM) neu aufgesetzt und ein aktuelles Debian aufgespielt.

Code: Alles auswählen

Linux dasgeraet 3.16.0-4-orion5x #1 Debian 3.16.36-1+deb8u2 (2016-10-19) armv5tel GNU/Linux
Zusätzlich habe ich mir noch den aktuellen Backport Kernel ( 4.8 ) inklusive der richtigen linux-base geholt.

So siehts bei mir folglich in /boot aus:

Code: Alles auswählen

-rw-r--r-- 1 root root 1218304 Oct 19 12:38 System.map-3.16.0-4-orion5x
-rw-r--r-- 1 root root 1737669 Dec 16 19:36 System.map-4.8.0-0.bpo.2-marvell
-rw-r--r-- 1 root root  128787 Oct 19 12:38 config-3.16.0-4-orion5x
-rw-r--r-- 1 root root  156262 Dec 16 19:36 config-4.8.0-0.bpo.2-marvell
-rw-r--r-- 1 root root 3187457 Jan  6 18:49 initrd.buffalo
lrwxrwxrwx 1 root root      32 Jan  6 19:47 initrd.img -> initrd.img-4.8.0-0.bpo.2-marvell
-rw-r--r-- 1 root root 3187393 Jan  6 18:49 initrd.img-3.16.0-4-orion5x
-rw-r--r-- 1 root root 3361886 Jan  6 20:34 initrd.img-4.8.0-0.bpo.2-marvell
lrwxrwxrwx 1 root root      27 Jan  6 19:47 initrd.img.old -> initrd.img-3.16.0-4-orion5x
drwx------ 2 root root   12288 Jan  6 17:04 lost+found
-rw-r--r-- 1 root root 1560856 Jan  6 18:49 uImage.buffalo
lrwxrwxrwx 1 root root      29 Jan  6 19:47 vmlinuz -> vmlinuz-4.8.0-0.bpo.2-marvell
-rw-r--r-- 1 root root 1560784 Oct 19 12:38 vmlinuz-3.16.0-4-orion5x
-rw-r--r-- 1 root root 2028768 Dec 16 19:35 vmlinuz-4.8.0-0.bpo.2-marvell
lrwxrwxrwx 1 root root      24 Jan  6 19:47 vmlinuz.old -> vmlinuz-3.16.0-4-orion5x
Nach einen Neustart hab ich jedoch immer noch folgenden output unter uname -a

Code: Alles auswählen

Linux dasgeraet 3.16.0-4-orion5x #1 Debian 3.16.36-1+deb8u2 (2016-10-19) armv5tel GNU/Linux
Hat mir jemand einen Ansatz zum debuggen? Gibt es eine Möglichkeit zu erkennen (log?) ob er versucht hat den neuen kernel zu booten oder warum/ob er initrd.img.old zum starten verwendet hat?

Kenne den Kernelwechsel nur unter x86igern und da läuft das immer geschmeidiger/automatisiert ab!

Viele Grüße
euer ForumAdmin

PS.: Grub haben wir nicht! Wir booten mit uboot!
Zuletzt geändert von ForumAdmin am 07.01.2017 22:23:35, insgesamt 3-mal geändert.

ForumAdmin
Beiträge: 8
Registriert: 07.01.2017 16:29:52

Re: Neuer Kernel wird nicht gebootet (ARM)

Beitrag von ForumAdmin » 07.01.2017 16:46:01

Warum mir der neue Kernel wichtig ist liegt an der (hoffentlich) deutlich verbesserten Hardware-Crypto-Unterstützung ab Kernel v.4.2:

crypto: add a new driver for Marvell's CESA: https://lwn.net/Articles/648043/

Und staatsmännisch wie dasgeraet(c)(r)(tm) einmal ist, ist dieses natürlich mit dm-crypt/LUKS verschlüsselt!

Benutzeravatar
schorsch_76
Beiträge: 2535
Registriert: 06.11.2007 16:00:42
Lizenz eigener Beiträge: MIT Lizenz

Re: Neuer Kernel wird nicht gebootet (ARM)

Beitrag von schorsch_76 » 07.01.2017 20:39:51

Schau dir unter dem alten Kernel die /proc/cmdline an. Der neue Kernel wird auch diese cmdline benötigen.

Vermutlich fehlt ein nötiges Modul im Kernel. Unter arm ist das booten immer sehr von der Platform abhängig. Da hat fast jeder SOC sein eigenes Süppchen :?

Es kann auch sein, das der alte SOC ein proprietäres Modul nutzt zum booten.

Nutzt der alte Kernel Devicetrees? Falls nein, hast du die nötigen Device trees? (Devicetrees beschreiben die Hardware unter Arm sein 3.8 oder 3.12). Früher hatte jeder SOC sein eigenes hartcodiertes "Modul" bzw Function im Startup das seine Hardware beschreibt.

Linus Torvalds ist ja nicht zurückhaltend wenn ihm was richtig stinkt:
https://lkml.org/lkml/2011/3/17/492
(I'm replying to the omap pull request, because that's the one I did
last, but I don't know who to "blame". I don't care. It really doesn't
matter. I realize thar ARM vendors do crazy shit and haven't figured
out this whole "platform" thing yet, but you guys need to push back on
the people sending you crap).
Was ihm auch noch stinkt .... ;)
https://www.reddit.com/r/linusrants/

owl102

Re: Neuer Kernel wird nicht gebootet (ARM)

Beitrag von owl102 » 07.01.2017 22:45:10

Noch eine Idee ins Blaue: Der Kernel muß nicht nur nach /boot, sondern auch ins Flash und da ist er noch nicht. (Zumindest ist das bei meinem Qnap so, welches aus dem Flash bootet und nicht von HD. Zum Kopieren des Kernels ins Flash gibt es dort den Befehl "flash-kernel", beim Kernel-Update via apt-get wird das automatisch mitgemacht.)
Zuletzt geändert von owl102 am 07.01.2017 22:48:14, insgesamt 1-mal geändert.

ForumAdmin
Beiträge: 8
Registriert: 07.01.2017 16:29:52

Re: Neuer Kernel wird nicht gebootet (ARM)

Beitrag von ForumAdmin » 07.01.2017 22:46:54

ForumAdmin hat geschrieben:So siehts bei mir folglich in /boot aus:

Code: Alles auswählen

-rw-r--r-- 1 root root 1218304 Oct 19 12:38 System.map-3.16.0-4-orion5x
-rw-r--r-- 1 root root 1737669 Dec 16 19:36 System.map-4.8.0-0.bpo.2-marvell
-rw-r--r-- 1 root root  128787 Oct 19 12:38 config-3.16.0-4-orion5x
-rw-r--r-- 1 root root  156262 Dec 16 19:36 config-4.8.0-0.bpo.2-marvell
-rw-r--r-- 1 root root 3187457 Jan  6 18:49 initrd.buffalo
lrwxrwxrwx 1 root root      32 Jan  6 19:47 initrd.img -> initrd.img-4.8.0-0.bpo.2-marvell
-rw-r--r-- 1 root root 3187393 Jan  6 18:49 initrd.img-3.16.0-4-orion5x
-rw-r--r-- 1 root root 3361886 Jan  6 20:34 initrd.img-4.8.0-0.bpo.2-marvell
lrwxrwxrwx 1 root root      27 Jan  6 19:47 initrd.img.old -> initrd.img-3.16.0-4-orion5x
drwx------ 2 root root   12288 Jan  6 17:04 lost+found
-rw-r--r-- 1 root root 1560856 Jan  6 18:49 uImage.buffalo
lrwxrwxrwx 1 root root      29 Jan  6 19:47 vmlinuz -> vmlinuz-4.8.0-0.bpo.2-marvell
-rw-r--r-- 1 root root 1560784 Oct 19 12:38 vmlinuz-3.16.0-4-orion5x
-rw-r--r-- 1 root root 2028768 Dec 16 19:35 vmlinuz-4.8.0-0.bpo.2-marvell
lrwxrwxrwx 1 root root      24 Jan  6 19:47 vmlinuz.old -> vmlinuz-3.16.0-4-orion5x
Die wichtigen Daten hier sind wohl (nur) initrd.buffalo und uImage.buffalo welches dasgeraet zu beginn anzieht.

Haben gerade die beiden Dateien durch die 4.8er Versionen ersetzt. Beim versuch die Kiste zu starten werde ich mit lautem piepsen darauf aufmerksam gemacht das debian nicht starten kann.

So leicht ist es wohl nicht...

ForumAdmin
Beiträge: 8
Registriert: 07.01.2017 16:29:52

Re: Neuer Kernel wird nicht gebootet (ARM)

Beitrag von ForumAdmin » 07.01.2017 22:49:37

owl102 hat geschrieben:Noch eine Idee ins Blaue: Der Kernel muß nicht nur nach /boot, sondern auch ins Flash und da ist er noch nicht. (Zumindest ist das bei meinem Qnap so, welches aus dem Flash bootet und nicht von HD.)
Soweit ich informiert bin hat die Buffalo Linkstation Pro keinen Flash. Die /boot Partition (sda1) ist auch auf der Stock-firmware vorhanden.

owl102

Re: Neuer Kernel wird nicht gebootet (ARM)

Beitrag von owl102 » 07.01.2017 23:13:33

ForumAdmin hat geschrieben:Soweit ich informiert bin hat die Buffalo Linkstation Pro keinen Flash.
Ich habe gerade mal etwas recherchiert. Debianflash-kernel scheint trotzdem die Lösung für dein Problem zu sein:
README from flash-kernel hat geschrieben: flash-kernel
------------

flash-kernel is a script which will put the kernel and initramfs in
the boot location of embedded devices that don't load the kernel and
initramfs directly from /boot. flash-kernel supports devices that
boot from flash memory (hence the name) as well as some devices that
require a special boot image on the disk
.

Supported systems
- - - - - - - - -

The following systems are supported:

...
- Buffalo Linkstation Live
- Buffalo Linkstation Live, version 3 (LS-CHL)
- Buffalo Linkstation Live with BitTorrent (LS-CHLv2)
- Buffalo Linkstation Mini
- Buffalo Linkstation Pro
- Buffalo Linkstation Pro (LS-XHL)
- Buffalo/Revogear Kurobox Pro
...
Die /boot Partition (sda1) ist auch auf der Stock-firmware vorhanden.
Mein Qnap hat auch /boot, das hat also wenig zu sagen.

ForumAdmin
Beiträge: 8
Registriert: 07.01.2017 16:29:52

Re: Neuer Kernel wird nicht gebootet (ARM)

Beitrag von ForumAdmin » 15.01.2017 09:32:50

owl102 hat geschrieben:
ForumAdmin hat geschrieben:Soweit ich informiert bin hat die Buffalo Linkstation Pro keinen Flash.
Ich habe gerade mal etwas recherchiert. Debianflash-kernel scheint trotzdem die Lösung für dein Problem zu sein:
README from flash-kernel hat geschrieben: flash-kernel
------------

flash-kernel is a script which will put the kernel and initramfs in
the boot location of embedded devices that don't load the kernel and
initramfs directly from /boot. flash-kernel supports devices that
boot from flash memory (hence the name) as well as some devices that
require a special boot image on the disk
.

Supported systems
- - - - - - - - -

The following systems are supported:

...
- Buffalo Linkstation Live
- Buffalo Linkstation Live, version 3 (LS-CHL)
- Buffalo Linkstation Live with BitTorrent (LS-CHLv2)
- Buffalo Linkstation Mini
- Buffalo Linkstation Pro
- Buffalo Linkstation Pro (LS-XHL)
- Buffalo/Revogear Kurobox Pro
...
Die /boot Partition (sda1) ist auch auf der Stock-firmware vorhanden.
Mein Qnap hat auch /boot, das hat also wenig zu sagen.
Das sieht doch sehr vielversprechend aus! So muss das wohl auch der debian-installer gemacht haben und bootbare images zu erstellen!

Vielen Dank schon mal! Ich berichte!

Eure
ForumAdmin

ForumAdmin
Beiträge: 8
Registriert: 07.01.2017 16:29:52

Re: Neuer Kernel wird nicht gebootet (ARM)

Beitrag von ForumAdmin » 15.01.2017 09:36:31

Bei der Installation wird leider schon mein neuer kernel gefressen...

Code: Alles auswählen

ForumAdmin@dasgeraet:~$ sudo apt install flash-kernel
[sudo] password for ForumAdmin: *********************************************
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following package was automatically installed and is no longer required:
  libuuid-perl
Use 'apt-get autoremove' to remove it.
The following packages will be REMOVED:
  linux-image-4.8.0-0.bpo.2-marvell
The following NEW packages will be installed:
  flash-kernel
0 upgraded, 1 newly installed, 1 to remove and 0 not upgraded.
Need to get 34,8 kB of archives.
After this operation, 87,1 MB disk space will be freed.
Do you want to continue? [Y/n] 
...

ForumAdmin
Beiträge: 8
Registriert: 07.01.2017 16:29:52

Re: Neuer Kernel wird nicht gebootet (ARM)

Beitrag von ForumAdmin » 15.01.2017 09:37:47

Hö?

Code: Alles auswählen

ForumAdmin@dasgeraet:~$ flash-kernel --help
flash-kernel: installing version 3.16.0-4-orion5x
Generating kernel u-boot image... done.
Taking backup of uImage.buffalo.
Installing new uImage.buffalo.
Generating initramfs u-boot image... done.
Taking backup of initrd.buffalo.
Installing new initrd.buffalo.
:?: :?: :?:

Code: Alles auswählen

ForumAdmin@dasgeraet:~$ apt install linux-image-4.8.0-0.bpo.2-marvell
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  devio liblzo2-2 libuuid-perl mtd-utils
Use 'apt-get autoremove' to remove them.
Suggested packages:
  linux-doc-4.8 debian-kernel-handbook
The following packages will be REMOVED:
  flash-kernel
The following NEW packages will be installed:
  linux-image-4.8.0-0.bpo.2-marvell
0 upgraded, 1 newly installed, 1 to remove and 54 not upgraded.
Need to get 0 B/21,2 MB of archives.
After this operation, 87,1 MB of additional disk space will be used.
Do you want to continue? [Y/n] 
:facepalm:

OK... und hier der Schlüssel zum Erfolg:

Code: Alles auswählen

ForumAdmin@dasgeraet:~$ apt-cache policy flash-kernel
flash-kernel:
  Installed: 3.35+deb8u3
  Candidate: 3.35+deb8u3
  Version table:
     3.70~bpo8+1 0
        100 http://ftp.de.debian.org/debian/ jessie-backports/main armel Packages
 *** 3.35+deb8u3 0
        500 http://ftp.de.debian.org/debian/ jessie/main armel Packages
        100 /var/lib/dpkg/status
Es brauch die aktuelle flash-kernel versio aus dem backport rep

install via: apt-get -t jessie-backports install flash-kernel

Nun können beide packages co-exisitieren. Beim installieren vom backport-kernel wird auch automatisch das flash-kernel script ausgeführt -> PROFID! :THX:

ForumAdmin
Beiträge: 8
Registriert: 07.01.2017 16:29:52

Re: Neuer Kernel wird nicht gebootet (ARM)

Beitrag von ForumAdmin » 15.01.2017 10:23:33

Zu früh gefreut.

Das Gerät bootet zwar aber startet nach einiger Zeit (bevor ein connect via ssh möglich ist) neu.

Ideen für's debuggen? :hail:

Antworten