Erroring when building 1.3.1

Hey All,
I am trying to build VyOS LTS 1.3.1 from the zip file on github, but am getting the below error message. This happens on a raw debian Buster build, or the container pulled from dockerhub. The latest rolling release builds without issue.

I can’t seem to find much on the issue through Google, but from the surrounding commands, it appears to be from 17-gen_initramfs.chroot. The -k option is specified, so the command should in theory run without issue. Does anyone have any suggestions on what to look at for this?

Processing triggers for systemd (241-7~deb10u8) ...
I: Create initramfs if it does not exist.
Extra argument '5.4.191-amd64-vyos'


Usage: update-initramfs {-c|-d|-u} [-k version] [-v] [-b directory]

Options:
 -k version     Specify kernel version or 'all'
 -c             Create a new initramfs
 -u             Update an existing initramfs
 -d             Remove an existing initramfs
 -b directory   Set alternate boot directory
 -v             Be verbose

See update-initramfs(8) for further details.

E: config/hooks/live/17-gen_initramfs.chroot failed (exit non-zero). You should check for errors.
1 Like

Hi Antleo,

Have you tried the method of building your VyOS image described in our documentation?
https://docs.vyos.io/en/equuleus/contributing/build-vyos.html#

Hey Nikolay,

Yes, I tried both using the native build method, and the dockerhub method. The only step I did differently was instead of git clone -b equuleus --single-branch https://github.com/vyos/vyos-build I did wget https://github.com/vyos/vyos-build/archive/refs/tags/1.3.1.zip unzipped it and ran everything from within that file (instead of the cloned repo)

1 Like

I had the same when I tried to build 1.3.2 LTS
I installed a fresh Debian 10 iso (english default settings) and did these commands after installing docker:

git clone -b 1.3.2 --single-branch https://github.com/vyos/vyos-build
docker run --rm -it --privileged -v $(pwd):/vyos -w /vyos vyos/vyos-build:equuleus bash
cd vyos-build
./configure --architecture amd64 --build-by "my@mail.net" --build-type "release" --version "LTS 1.3.2"
sudo make iso

And then i also got:

P: Executing hook config/hooks/live/17-gen_initramfs.chroot...
I: Create initramfs if it does not exist.
Extra argument '5.4.227-amd64-vyos'


Usage: update-initramfs {-c|-d|-u} [-k version] [-v] [-b directory]

Options:
 -k version     Specify kernel version or 'all'
 -c             Create a new initramfs
 -u             Update an existing initramfs
 -d             Remove an existing initramfs
 -b directory   Set alternate boot directory
 -v             Be verbose

See update-initramfs(8) for further details.

E: config/hooks/live/17-gen_initramfs.chroot failed (exit non-zero). You should check for errors.
E: An unexpected failure occurred, exiting...

The reason was that there was two kernel images:
5.4.227 and 5.4.210.

I searched on the net and found this patch to only use the most recent kernel one:
https://phabricator.vyos.net/T2077
https://phabricator.vyos.net/file/download/i3dye477dbrwa6yflmus/PHID-FILE-7udn53deigm2n3ml63u7/docker_build_kernel_fix.patch

It compiled an then I got vyos-LTS 1.3.2 with kernel 5.4.227-amd64-vyos.
BUT: this kernel may not the intended one for this LTS release.
Maybe its the reason it shows me this failed message in red when booting:

[  OK  ] Started ACPI event daemon.
[  OK  ] Started Atop process accounting daemon.
[FAILED] Failed to start Restore /e…re the ppp link was shut down.
See 'systemctl status pppd-dns.service' for details.
[  OK  ] Started OpenBSD Secure Shell session cleanup.
[  OK  ] Started Deferred execution scheduler.

Then i modified the two patched files (data/live-build-config/hooks/live/19-kernel_symlinks.chroot and data/live-build-config/hooks/live/17-gen_initramfs.chroot) to use the oldest (instead of newest) kernel (replaced “tail -1” with “head -1”).

But that generated iso does not start at all

cat: can't open '/sys/block/*/removable': No such file or directory
cat: can't open '/sys/block/*/removable': No such file or directory
[and x times repeated]
BusyBox v1.30.1 (Debian 1:1.30.1-4) built-in shell (ash)
Enter 'help' for a list of built-in commands.

(initramfs)
(initramfs) Unable to find a medium containing a live file system

Then i’ve seen that the first image still shows me two kernels at boot:

                        GNU GRUB  version 2.06-3~deb10u3

 +----------------------------------------------------------------------------+
 | VyOS LTS linux-5.4.227-amd64-vyos (KVM console)                            |
 | VyOS LTS linux-5.4.227-amd64-vyos (Serial console)                         |
 | VyOS LTS linux-5.4.227-amd64-vyos (USB console)                            |
 | VyOS LTS linux-5.4.210-amd64-vyos (KVM console)                            |
 |*VyOS LTS linux-5.4.210-amd64-vyos (Serial console)                         |
 | VyOS LTS linux-5.4.210-amd64-vyos (USB console)                            |
 | Lost password change LTS (KVM console)                                     |
 | Lost password change LTS (Serial console)                                  |
 | Lost password change LTS (USB console)                                     |
 |                                                                            |
 |                                                                            |
 |                                                                            |
 +----------------------------------------------------------------------------+

      Use the ^ and v keys to select which entry is highlighted.
      Press enter to boot the selected OS, `e' to edit the commands
      before booting or `c' for a command-line.

So i wanted to boot linux-5.4.210-amd64-vyos…
Also not possible:

error: file `/boot/LTS/initrd.img-5.4.210-amd64-vyos' not found.

Press any key to continue...

I think it is a bug.
A stable LTS release (1.3.2 in this case) should always and every time be possible to build with the intended kernel version (Changelog says 5.4.208?).

Hi,

I’m also having the exact same issue. I’ve tried this myself on Debian 10 and 11 fresh installs with the same errors you’re seeing.

Anyone got an answer / solution to this?

I managed to fix this by changing the Kernel Version (after running the ./configure command) to 5.2.229.

Here’s my full how-to:

grab equueleus (1.3x) branch from github (into v1.3.2 folder)

git clone -b equuleus --single-branch https://github.com/vyos/vyos-build v1.3.2

go into new folder

cd v1.3.2

checkout the 1.3.2 tag

git checkout tags/1.3.2

run git log to verify we are on commit 7ce8651

which, is 1.3.2 as per Tags · vyos/vyos-build · GitHub

build the build environment from source (tag it as ‘v1.3.2’ version)

docker build -t vyos/vyos-build:v1.3.2 docker

enter bash on the newly built image to proceed

make sure you are in v1.3.2 directory (you should be)

docker run --rm -it \
    -v "$(pwd)":/vyos \
    -v "$HOME/.gitconfig":/etc/gitconfig \
    -v "$HOME/.bash_aliases":/home/vyos_bld/.bash_aliases \
    -v "$HOME/.bashrc":/home/vyos_bld/.bashrc \
    -w /vyos --privileged --sysctl net.ipv6.conf.lo.disable_ipv6=0 \
    -e GOSU_UID=$(id -u) -e GOSU_GID=$(id -g) \
    vyos/vyos-build:v1.3.2 bash

now we need to build the correct (v1.3.2) vyos-1x package

cd packages

grab equueleus branch vyos-1x

git clone -b equuleus https://github.com/vyos/vyos-1x
cd vyos-1x/

checkout the 1.3.2 tag (commit #b967813)

git checkout tags/1.3.2

run git log to verify we are on commit b967813

which, is 1.3.2 as per Tags · vyos/vyos-build · GitHub

>> commit b9678136eac767ece3d5a5e53f9f2b9c47c7477a (HEAD, tag: 1.3.2)

build the .deb packages

dpkg-buildpackage -uc -us -tc -b

if process is successful, the required *.deb

packages will be in the packages folder

let’s verify

cd ..
ls *.deb

> vyos-1x_1.3dev0-3882-gbdd77b05_amd64.deb
> vyos-1x-smoketest_1.3dev0-3882-gbdd77b05_all.deb
> vyos-1x-dbgsym_1.3dev0-3882-gbdd77b05_amd64.deb
> vyos-1x-vmware_1.3dev0-3882-gbdd77b05_amd64.deb

go back into our vyos folder for the next step

cd ..

run the configuration command

I like version to be based on the commit

But you could call it LTE 1.3.2 or whatever

./configure --architecture amd64 --build-by "CloudPropeller.com" --build-type "release" --version "equuleus-7ce8651"

### THE KEY NOW IS TO SET KERNEL to 5.4.229 ###
### 5.4.210 does not want to build properly ###

nano build/build-config.json

change

"kernel_version": "5.4.210",

to

"kernel_version": "5.4.229"

save the file w/ CTRL+X (y, ENTER)

BUILD YOUR ISO

sudo make iso

once it is done, your ISO’s can be found in the build directory

ls build/*.iso

you’ll have the following you can grab and use

they are exactly the same, so you can pick either

> build/live-image-amd64.hybrid.iso
> build/vyos-equuleus-7ce8651-amd64.iso
1 Like

Why not use the latest 1.3 version with all bug fixes a new features?

V, would grabbing the latest from 1.3 branch (as per documentation) still be considered LTS? Is everything in the GitHub - vyos/vyos-build at equuleus LTS, even the most recent commits?

I thought only 1.4 was the rolling release, but 1.3 (stable) should be installed as 1.3 GA , 1.3.1 and now 1.3.2 (being the latest LTS) …

Thanks.

You build the latest stable release from the Equuleus branch with all bug fixes and new features.

1 Like

Good to know :slight_smile: Thank you.

You should make out of the tree module deb files as well. Or it will force to install another version of kernel