Jump to content

Recommended Posts

Posted

On one machine I forgot to "pin" (apt-mark hold) custom kernel pkgs ... and updated :-/  but no reboot yet.

This leads to these 3 questions:
 
Q1
How to recover ? 
 
Pull from back-up of sd-card image ? What ?
Any hints are greatly appreciated as you can imagine.
 
 
Q2
More generally: which pkgs to pin ?
 
Usually I set linux-image-* and linux-headers-* on hold but this particular update additionally installed newer versions of
linux-dtb-next-sunxi:armhf
linux-firmware-image-next-sunxi:armhf
linux-jessie-root-next-bananapipro:armhf
linux-u-boot-bananapipro-next:armhf
Does installing these newer versions break a custom kernel?
 
 
Q3
How to update w/ custom kernel ?
 
Building newer version with Igors wonderful toolchain ?
But I dont want to re-flash sd-card.
Building on the board ?
 
Posted

Q1

How to recover ? 
 
Pull from back-up of sd-card image ? What ?
Any hints are greatly appreciated as you can imagine.

linux-image installs files in /boot and /lib/modules/$(uname -r)

You can check contents of newly installed kernel with "dpkg -L linux-image-next-sunxi" to compare.

linux-dtb should also match kernel version, it installs files in /boot/dtb

 

Q2

More generally: which pkgs to pin ?
 
Usually I set linux-image-* and linux-headers-* on hold but this particular update additionally installed newer versions of
linux-dtb-next-sunxi:armhf
linux-firmware-image-next-sunxi:armhf
linux-jessie-root-next-bananapipro:armhf
linux-u-boot-bananapipro-next:armhf
Does installing these newer versions break a custom kernel?

If you don't compile custom modules on board, you can remove linux-headers package and forget about it.

If you don't have any devices which use firmware, you can remove linux-firmware package too.

 

board support package (linux-*-root) and u-boot don't depend on kernel version and can be safely updated.

 

So if you want to pin mainline kernel packages, you need to mark linux-image and linux-dtb in any case, linux-headers and linux-firmware if you are using them.

 

Q3

How to update w/ custom kernel ?
 
Building newer version with Igors wonderful toolchain ?
But I dont want to re-flash sd-card.
Building on the board ?

You can build packages with Armbian toolchain, transfer them to your board and install with "dpkg -i *.deb", you don't need to reflash your image in this case.

Building on board itself is possible but is not supported in Armbian build script.

Posted

@minusdelta

 

You can build packages with Armbian toolchain, transfer them to your board and install with "dpkg -i *.deb", you don't need to reflash your image in this case.

Building on board itself is possible but is not supported in Armbian build script.

 

I am doing sftp from my virtual machine to my Lamobo-R1 board

as I need all the *.deb

mput *.deb
mput trusty/*.deb

I store my past builds on the root of the card

gr@bpi:~$ ls /armbian_kernel/
dpsysquery.sh                          kern_4.3.3_5  kern_4.4.2_2  kern_4.5.2_1  kern_4.5.5_2     mod_noreboot.sh~
frandom-dkms_1.1-0centrych4_armhf.deb  kern_4.4.1_2  kern_4.4.4_1  kern_4.5.3_1  kern_4.5.5_3     mod_noreboot.sh.keep
kern_4.3.0_4                           kern_4.4.2_1  kern_4.4.6_1  kern_4.5.5_1  mod_noreboot.sh

dpsysquery.sh to find the related kernel packages for my board

sudo dpkg-query -W "*lamobo*" "*sunxi*"

the other script reinstall frandom-dkms before I reboot the board

sudo dpkg -i frandom-dkms_1.1-0centrych4_armhf.deb

in case I mess with a custom kernel, I have old good packages on the rootfs, so from another computer I can extract the files with "dpkg -x *.deb" and put a working kernel back on the card.

 

note: in the current revision of the tool, I am (mis-)using $SUBREVISON variable to add a name to the deb packages => 5.12-golfromeo

 

SUBREVISON="-golfromeo"
 

gr@bpi:/armbian_kernel$ dpkg-query -W "*lamobo*" "*sunxi*"
linux-dtb-next-sunxi    5.12-golfromeo
linux-firmware-image-next-sunxi 5.12-golfromeo
linux-headers-next-sunxi     5.12-golfromeo
linux-image-next-sunxi  5.12-golfromeo
linux-modules-4.5.5-sunxi
linux-trusty-root-next-lamobo-r1        5.12-golfromeo
linux-u-boot-lamobo-r1-next  5.12-golfromeo

Posted

@zador.*

thank you very much for your answer, very appreciated!

 

Q3

You can build packages with Armbian toolchain, transfer them to your board and install with "dpkg -i *.deb" ...

 

 

I was under this impression, too. I searched my build VM and found ... no .deps.

Do these show up when changing build options to

"KERNEL_ONLY yes" 

 ?

 

Q1

w/ the insights I got from your answer to Q2 it looks like in my case I need to replace the files provided by "linux-image" and "linux-dtb" only, keeping the other updates.

So pulling from my old image contents of "/lib/modules/" and "/boot" and replacing will do the job ?

 

 

@wildcat_paris

Many thanks for describing your workflow! Adopted "dpkg-query -W "*banana*" "*sunxi*" and will look for more postings like this.

 

 

Many thx to both of You!

Posted

I was under this impression, too. I searched my build VM and found ... no .deps.

Do these show up when changing build options to

They should be located in output/debs/

 

You can set

KERNEL_ONLY=yes

or just select appropriate option in dialog window if KERNEL_ONLY=""

 

 

w/ the insights I got from your answer to Q2 it looks like in my case I need to replace the files provided by "linux-image" and "linux-dtb" only, keeping the other updates.

So pulling from my old image contents of "/lib/modules/" and "/boot" and replacing will do the job ?

It would be better to compile, install and pin custom kernel. Replacing files controlled by package manager manually is not a good idea and should be used only as a last resort.

Posted

 

 

They should be located in output/debs/

 

This is empty ATM. Will check my "clean cache" settings and start over.

 

 

 

It would be better to compile, install and pin custom kernel. Replacing files controlled by package manager manually is not a good idea and should be used only as a last resort.

Yes, you are absolutely right. This is much better than my "shoot first, think later" approach.

 

Thanks for appealing to my conscience and your help!

  • Igor unpinned this topic
Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines