Page MenuHomeVyOS Platform

ISO build from crux branch is failing
Closed, ResolvedPublicBUG

Description

ISO build from crux branch is failing with Error

Extra argument '4.19.84-amd64-vyos'
Usage: /usr/sbin/update-initramfs.orig.initramfs-tools [OPTION]...
Options:
-k version Specify kernel version or 'all'
-c Create a new initramfs
-u Update an existing initramfs
-d Remove an existing initramfs
-t Take over a custom initramfs with this one
-b directory Set alternate boot directory
-v Be verbose
-h This message
E: config/hooks/live/17-gen_initramfs.chroot failed (exit non-zero). You should check for errors.
P: Begin unmounting filesystems...

Details

Difficulty level
Normal (likely a few hours)
Version
1.2.x
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Perfectly compatible

Event Timeline

In debugging, It's found that chroot for ISO build had two kernel images in the boot directory

vmlinuz-4.19.4-amd64-vyos
vmlinuz-4.19.84-amd64-vyos

And due to that script update-initramfs.orig.initramfs-tools was taking two kernel version arguments and failing with an error.

After adding changes It threw another error in the execution of 19-kernel_symlinks.chroot, which was also failing due to two kernel images;

Updated two scripts, to use a recent Linux image from boot directory.

Patch:

Firstly, we need to determine why there are two kernel images.

It seems that in the process of ISO creation, kernel deb packages are installed in the chroot directory.

Build logs installing kernel deb packages

Selecting previously unselected package linux-image-4.19.4-amd64-vyos.
Preparing to unpack .../linux-image-4.19.4-amd64-vyos_4.19.4-1+vyos1+current1_amd64.deb ...
Done.
Unpacking linux-image-4.19.4-amd64-vyos (4.19.4-1+vyos1+current1) ...
Selecting previously unselected package netbase.

cache dir also contains two deb packages

./build/cache/packages.chroot/linux-image-4.19.4-amd64-vyos_4.19.4-1+vyos1+current1_amd64.deb
./build/cache/packages.chroot/linux-image-4.19.84-amd64-vyos_4.19.84-1_amd64.deb

I think this needs to be fixed from VyOS crux package repos, Because after applying this patch, ISO was created with two kernel images, And after ISO installation VyOS was showing boot entries for kernel versions 4.19.4 and 4.19.84.

Boot entry for 4.19.4 was not working because It was missing initrd image for it.

Boot Menu Screenshot:

This is a result of a missing package vyos-intel-ixgbe_5.6.3-0_amd64.deb in http://dev.packages.vyos.net/repositories/crux/ --- when missing, the build will use an outdated package, leading to incorrect dependencies on the kernel version. On the other hand, if the correct intel module is built as a local package, there is only one resident linux-image, and update-initramfs succeeds as usual. The build/upload mechanism for the intel modules will be fixed soon, and the issue resolved.

jestabro changed the task status from Open to In progress.Feb 29 2020, 1:53 AM
jestabro triaged this task as High priority.

One explanation could be that during the lstvdeployment ae of ixgbe something crashed leading to the missing module. I just started a rebuild of the crux kernel, lets see - module should reappear

c-po added a project: VyOS 1.2 Crux.

Problem is local to crux only

All works as expected; thanks.

Still facing the issue of two initrd images for building iso using latest latest crux branch. Using this kernel rebuilding steps https://wiki.vyos.net/wiki/Rebuild_VyOS_kernel_Step#VyOS_1.2.x

vyos@vyos:/boot$ ls
config-4.19.106-amd64-vyos initrd.img System.map-4.19.106-amd64-vyos vmlinuz-4.19.106-amd64-vyos
config-4.4.113-amd64-vyos initrd.img-4.19.106-amd64-vyos System.map-4.4.113-amd64-vyos vmlinuz-4.4.113-amd64-vyos
grub initrd.img-4.4.113-amd64-vyos vmlinuz