Build aditional modules for vyos, linux-source package

Hi,
regarding to this article: Build VyOS — VyOS 1.4.x (sagitta) documentation - I’m looking for linux-source package.
In the following location, there is no linux-source deb package:
http://dev.packages.vyos.net/repositories/current/pool/main/l/linux-4.19.134-amd64-vyos/

Is there any other location?
Is the vyos kernel modules building procedure still valid?
I’m using ver 1.3

Another question: Is is possible to install packages from Debian repository?

Thanks in advance for any hints.

-silencer

Hi @silencer,
We no longer keep a fork of the kernel source, since we no longer need to patch it as heavily as we once had to.
You can find the kernel package build scripts at vyos-build/packages/linux-kernel at current · vyos/vyos-build · GitHub

1 Like

Hi @dmbaturin
Thanks for the explanation!
I’ve successfully build linux-image package. Now I got following issue when I tried to install it:

dpkg -i linux-image-4.19.134-amd64-vyos_4.19.134-1_amd64.deb
(Reading database … 77268 files and directories currently installed.)
Preparing to unpack linux-image-4.19.134-amd64-vyos_4.19.134-1_amd64.deb …
Unpacking linux-image-4.19.134-amd64-vyos (4.19.134-1) over (4.19.134-1) …
Setting up linux-image-4.19.134-amd64-vyos (4.19.134-1) …
update-initramfs: Generating /boot/initrd.img-4.19.134-amd64-vyos
live-boot: core filesystems devices utils udev wget blockdev.
/usr/sbin/grub-probe: error: failed to get canonical path of `overlay’.
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 1
dpkg: error processing package linux-image-4.19.134-amd64-vyos (–install):
installed linux-image-4.19.134-amd64-vyos package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
linux-image-4.19.134-amd64-vyos

It looks like there is a problem with /usr/sbin/grub-probe which not recognized overlay filesystem.
What is the “feng shui” with kernel deb package installation?
Is there any wiki describing this procedure?

I appreciate your help!

Any ideas, how to install linux-image package?

Hello @silencer, you can check is kernel added to /boot

 sudo ls -la /boot/

and try to update initramfs manually

sudo /usr/sbin/update-initramfs -u

Tell me if this works for you, in another case I will try to reproduce it locally

Hi Dmitry,
thanks a lot for the suggestion.
Looks like that start update-initramfs manually works well:
update-initramfs -u -k all
update-initramfs: Generating /boot/initrd.img-4.19.134-amd64-vyos
live-boot: core filesystems devices utils udev wget blockdev.
update-initramfs: Generating /boot/initrd.img-4.19.134-amd64-vyos-mlnx
live-boot: core filesystems devices utils udev wget blockdev.

-rw------- 1 root root 26684596 Aug 26 08:54 initrd.img-4.19.134-amd64-vyos
-rw------- 1 root root 26675415 Aug 26 08:55 initrd.img-4.19.134-amd64-vyos-mlnx

Unfortunately, dpkg left unconfigured packages, so there is a little mess in OS:

apt-get -f install
Reading package lists… Done
Building dependency tree
Reading state information… Done
0 upgraded, 0 newly installed, 0 to remove and 34 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up linux-image-4.19.134-amd64-vyos-mlnx (4.19.134-1) …
update-initramfs: Generating /boot/initrd.img-4.19.134-amd64-vyos-mlnx
live-boot: core filesystems devices utils udev wget blockdev.
/usr/sbin/grub-probe: error: failed to get canonical path of overlay'. run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 1 dpkg: error processing package linux-image-4.19.134-amd64-vyos-mlnx (--configure): installed linux-image-4.19.134-amd64-vyos-mlnx package post-installation script subprocess returned error exit status 1 Setting up linux-image-4.19.134-amd64-vyos (4.19.134-1) ... update-initramfs: Generating /boot/initrd.img-4.19.134-amd64-vyos live-boot: core filesystems devices utils udev wget blockdev. /usr/sbin/grub-probe: error: failed to get canonical path of overlay’.
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 1
dpkg: error processing package linux-image-4.19.134-amd64-vyos (–configure):
installed linux-image-4.19.134-amd64-vyos package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
linux-image-4.19.134-amd64-vyos-mlnx
linux-image-4.19.134-amd64-vyos
localepurge: Disk space freed in /usr/share/locale: 0 KiB
localepurge: Disk space freed in /usr/share/man: 0 KiB

Total disk space freed by localepurge: 0 KiB

E: Sub-process /usr/bin/dpkg returned an error code (1)

What I did wrong?
I appreciate your help.

Hello @silencer, I think you need to try to build kernel like this does vyos-build

Hi Dmitry,
that’s exactly what I did, and the kernel was built without any issues.
The problem is with installation of linux image deb package, because of read only filesystem.

I appreciate your help.

Hi @silencer, can you confirm that you have and trying to install on the installed image.
Provide, please an output of the command show version

Hi Dmitry,
thanks for your reply.

show version

Version: VyOS 1.3-rolling-202007290118
Release Train: equuleus

Built by: autobuild@vyos.net
Built on: Wed 29 Jul 2020 01:18 UTC
Build UUID: bc4d05f6-9bc8-4792-9f00-e3b13fa66e0c
Build Commit ID: 09eedb0dccf687

Architecture: x86_64
Boot via: installed image
System type: KVM guest

Hardware vendor: QEMU
Hardware model: Standard PC (i440FX + PIIX, 1996)
Hardware S/N: Unknown
Hardware UUID: Unknown

Copyright: VyOS maintainers and contributors

I appreciate your help.

Hello @silencer, try this hack

sudo mv /etc/kernel/postrm.d/zz-update-grub /etc/kernel/postrm.d/zz-update-grub.back

And try to install again

sudo dpkg -i linux-image-4.19.134-amd64-vyos_4.19.134-1_amd64.deb

Hi Dmitry,
I apologize for long time without respond. I was out of office due to illness.
I moved zz-update-grub, but there is still the same issue:

update-initramfs: Generating /boot/initrd.img-4.19.134-amd64-vyos
live-boot: core filesystems devices utils udev wget blockdev.
/usr/sbin/grub-probe: error: failed to get canonical path of `overlay’.
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 1
dpkg: error processing package linux-image-4.19.134-amd64-vyos (–install):
installed linux-image-4.19.134-amd64-vyos package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
linux-image-4.19.134-amd64-vyos

Hello @silencer, do you have a chance to provide access to this device, I hope this device not in production.

Sure, no problem.
How can I send you more details about access?

You can send credentials via forum direct messages.