New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail to build Qubes OS R4.0 iso from scratch - fc28 template failed to build #4011

Closed
yurikanestorm opened this Issue Jun 16, 2018 · 4 comments

Comments

Projects
None yet
3 participants
@yurikanestorm

Qubes OS version:

R4.0

Affected component(s):

qubes-builder
commit: mm_4e03c122


Steps to reproduce the behavior:

git clone git://github.com/QubesOS/qubes-builder.git qubes-builder
cd qubes-builder
make get-sources
make qubes
make qubes-vm
make template

or

start the script ./qubes-builder/setup.
select to build only template for Qubes OS 4.0
make install-deps
make get-sources
make qubes-vm
make template

Expected behavior:

The template fc28 is sucessfully built.

Actual behavior:

The build fails with the following error:

"

Complete!

Last metadata expiration check: 0:00:00 ago on Fri Jun 15 19:19:55 2018.
Dependencies resolved.

Package Arch Version Repository Size

Installing:
kernel x86_64 4.16.15-300.fc28 updates 94 k
Installing dependencies:
kernel-modules x86_64 4.16.15-300.fc28 updates 27 M

Transaction Summary

Install 2 Packages

Total download size: 27 M
Installed size: 27 M
DNF will only download packages for the transaction.
Downloading Packages:
(1/2): kernel-4.16.15-300.fc28.x86_64.rpm 481 kB/s | 94 kB 00:00
(2/2): kernel-modules-4.16.15-300.fc28.x86_64.r 1.2 MB/s | 27 MB 00:22

Total 1.2 MB/s | 27 MB 00:22
Complete!
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'dnf clean packages'.
a83eb19237e14baffa2a3652ffc3d1b884f31918526284e09c7b31c1c34e09b8 mnt/var/cache/dnf/updates-8bd9ef368505a5fd/packages/kernel-4.16.15-300.fc28.x86_64.rpm
43bcdfd69b279a5c44788949e82aea71e60f0a70f00c76f0680ef82fa5366f45 mnt/var/cache/dnf/updates-8bd9ef368505a5fd/packages/kernel-modules-4.16.15-300.fc28.x86_64.rpm
Last metadata expiration check: 0:00:24 ago on Fri Jun 15 19:19:55 2018.
Dependencies resolved.

Package Arch Version Repository Size

Installing:
kernel x86_64 4.16.15-300.fc28 updates 94 k
Installing dependencies:
kernel-modules x86_64 4.16.15-300.fc28 updates 27 M

Transaction Summary

Install 2 Packages

Total size: 27 M
Installed size: 27 M
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : kernel-modules-4.16.15-300.fc28.x86_64 1/2
Running scriptlet: kernel-modules-4.16.15-300.fc28.x86_64 1/2
Installing : kernel-4.16.15-300.fc28.x86_64 2/2
Running scriptlet: kernel-4.16.15-300.fc28.x86_64 2/2
Verifying : kernel-4.16.15-300.fc28.x86_64 1/2
Verifying : kernel-modules-4.16.15-300.fc28.x86_64 2/2connect: No such file or directory

Notifying dom0 about installed applications
Failed connect to local daemon
Traceback (most recent call last):
File "/usr/bin/qvm-features-request", line 81, in
sys.exit(main())
File "/usr/bin/qvm-features-request", line 70, in main
qdb = qubesdb.QubesDB()
qubesdb.Error: (2, 'No such file or directory')
Traceback (most recent call last):
File "/usr/bin/qvm-features-request", line 81, in
sys.exit(main())
File "/usr/bin/qvm-features-request", line 70, in main
qdb = qubesdb.QubesDB()
qubesdb.Error: (2, 'No such file or directory')
Traceback (most recent call last):
File "/usr/bin/qvm-features-request", line 81, in
sys.exit(main())
File "/usr/bin/qvm-features-request", line 70, in main
qdb = qubesdb.QubesDB()
qubesdb.Error: (2, 'No such file or directory')
Traceback (most recent call last):
File "/usr/bin/qvm-features-request", line 81, in
sys.exit(main())
File "/usr/bin/qvm-features-request", line 70, in main
qdb = qubesdb.QubesDB()
qubesdb.Error: (2, 'No such file or directory')

Installed:
kernel.x86_64 4.16.15-300.fc28 kernel-modules.x86_64 4.16.15-300.fc28

Complete!
Last metadata expiration check: 0:00:00 ago on Fri Jun 15 19:20:27 2018.
No match for argument: kernel-devel-4.16.14-300.fc28.x86_64
Error: Unable to find a match
make[1]: *** [Makefile:59: rootimg-build] Error 1

"

General notes:

It seems that the error is related to a mismatch between the kernel packages versions downloaded and built and the one expected by the Makefile.
The packages downloaded and built are:

  • kernel.x86_64 4.16.15-300.fc28
  • kernel-modules.x86_64 4.16.15-300.fc28

The package expected by the Makefile is

  • kernel-devel-4.16.14-300.fc28.x86_64

Any idea to solve this issue?


Related issues:

@yurikanestorm

This comment has been minimized.

Show comment
Hide comment

The log file for fc28:

template-fc28.log

@yurikanestorm yurikanestorm changed the title from Fail to build Qubes OS R4.0 iso from scratch - fc28 failed to build to Fail to build Qubes OS R4.0 iso from scratch - fc28 template failed to build Jun 16, 2018

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Jun 16, 2018

Member

The code responsible for this is:
https://github.com/QubesOS/qubes-builder-rpm/blob/097b6d7bd6911773da7b176d2129aa656d45ff31/template_scripts/04_install_qubes.sh#L59-L61

    for kver in $(ls ${INSTALLDIR}/lib/modules); do
        yumInstall kernel-devel-${kver} || RETCODE=1
    done

Do you see kernel-modules-4.16.14-300.fc28.x86_64 installed earlier in the log? If not, try removing qubes-src/linux-template-builder/prepared_images/fc28.img (a cached version from previous build).

Member

marmarek commented Jun 16, 2018

The code responsible for this is:
https://github.com/QubesOS/qubes-builder-rpm/blob/097b6d7bd6911773da7b176d2129aa656d45ff31/template_scripts/04_install_qubes.sh#L59-L61

    for kver in $(ls ${INSTALLDIR}/lib/modules); do
        yumInstall kernel-devel-${kver} || RETCODE=1
    done

Do you see kernel-modules-4.16.14-300.fc28.x86_64 installed earlier in the log? If not, try removing qubes-src/linux-template-builder/prepared_images/fc28.img (a cached version from previous build).

@yurikanestorm

This comment has been minimized.

Show comment
Hide comment
@yurikanestorm

yurikanestorm Jun 16, 2018

I removed qubes-src/linux-template-builder/prepared_images/fc28.img and do make template, it solves this problem but I get the following error:

"
Kernel preparation unnecessary for this kernel. Skipping...

Building module:
cleaning build area...
make -j16 KERNELRELEASE=4.16.15-300.fc28.x86_64 -C /lib/modules/4.16.15-300.fc28.x86_64/build M=/var/lib/dkms/u2mfn/4.0.19/build...
cleaning build area...

DKMS: build completed.

u2mfn.ko.xz:
Running module version sanity check.

  • Original module
    • No original module exists within this kernel
  • Installation
    • Installing to /lib/modules/4.16.15-300.fc28.x86_64/extra/
      Adding any weak-modules

depmod....
Running in chroot, ignoring request: restart

DKMS: install completed.
dracut: No '/dev/log' or 'logger' included for syslog logging
grub2-install: error: /usr/lib/grub/x86_64-efi/modinfo.sh doesn't exist. Please specify --target or --directory.
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.16.15-300.fc28.x86_64
Found initrd image: /boot/initramfs-4.16.15-300.fc28.x86_64.img
done
make[1]: *** [Makefile:59: rootimg-build] Error 1
"

it seems to be related to a missing script modinfo.sh for grub.

The fc28 build log:
template-fc28.log

I removed qubes-src/linux-template-builder/prepared_images/fc28.img and do make template, it solves this problem but I get the following error:

"
Kernel preparation unnecessary for this kernel. Skipping...

Building module:
cleaning build area...
make -j16 KERNELRELEASE=4.16.15-300.fc28.x86_64 -C /lib/modules/4.16.15-300.fc28.x86_64/build M=/var/lib/dkms/u2mfn/4.0.19/build...
cleaning build area...

DKMS: build completed.

u2mfn.ko.xz:
Running module version sanity check.

  • Original module
    • No original module exists within this kernel
  • Installation
    • Installing to /lib/modules/4.16.15-300.fc28.x86_64/extra/
      Adding any weak-modules

depmod....
Running in chroot, ignoring request: restart

DKMS: install completed.
dracut: No '/dev/log' or 'logger' included for syslog logging
grub2-install: error: /usr/lib/grub/x86_64-efi/modinfo.sh doesn't exist. Please specify --target or --directory.
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.16.15-300.fc28.x86_64
Found initrd image: /boot/initramfs-4.16.15-300.fc28.x86_64.img
done
make[1]: *** [Makefile:59: rootimg-build] Error 1
"

it seems to be related to a missing script modinfo.sh for grub.

The fc28 build log:
template-fc28.log

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Jun 24, 2018

Member

Try with the builder-rpm change I've just pushed.

Member

marmarek commented Jun 24, 2018

Try with the builder-rpm change I've just pushed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment