View Issue Details

IDProjectCategoryView StatusLast Update
0016445CentOS-8anacondapublic2020-03-05 00:27
ReporterHix 
PrioritynormalSeveritycrashReproducibilityalways
Status newResolutionopen 
Product Version 
Target VersionFixed in Version 
Summary0016445: "DNF error: Error in POSTTRANS scriptlet in rpm package kernel-core" installing VM on KVM
DescriptionHello,

I think I can reproduce this behaviour with Centos 8, DVD1:

https://bugzilla.redhat.com/show_bug.cgi?id=1745346

variables used with virt-install:

virt-install --name centos8 --ram 4096 --disk path=/dev/zvol/zssd/vm/centos8-disk0,cache=none,bus=virtio --vcpus 1 --os-type linux --os-variant rhel7 --network network=private,model=virtio --graphics vnc --location=/var/lib/libvirt/images/CentOS-8-x86_64-1905-dvd1.iso
TagsNo tags attached.

Activities

Hix

Hix

2019-09-27 09:43

reporter   ~0035251

screenshot

Capture.PNG (71,372 bytes)
Capture.PNG (71,372 bytes)
toracat

toracat

2019-09-29 00:27

manager   ~0035264

The referenced RHBZ now has a comment that says: the workaround is to add a harmless (useless) extra arg to virt-install, like “--extra-args ro”

Can you try it and see if that works?
Hix

Hix

2019-10-01 19:02

reporter   ~0035287

Hello. Great.. I've tried those extra args to the virt-install and it went through! perfect, thanks.

virt-install command with parameters for the reference:

virt-install --name centos8 --ram 4096 --disk path=/dev/zvol/zssd/vm/centos8-disk0,cache=none,bus=virtio --vcpus 1 --os-type linux --os-variant rhel7 --network network=private,model=virtio --location=/var/lib/libvirt/images/CentOS-8-x86_64-1905-dvd1.iso --graphics vnc --extra-args ro
erwinvanlonden

erwinvanlonden

2020-02-19 06:34

reporter   ~0036315

I have the same issue on an upgrade from 7.7 to 8. What i found was that the files in the rpm targeted to be copied to the /boot directory are not extracted:

[root@centosd51b ~]# rpm -ql kernel-core-4.18.0-147.5.1.el8_1.x86_64.rpm | head -10
/boot/.vmlinuz-4.18.0-147.5.1.el8_1.x86_64.hmac
/boot/System.map-4.18.0-147.5.1.el8_1.x86_64
/boot/config-4.18.0-147.5.1.el8_1.x86_64
/boot/initramfs-4.18.0-147.5.1.el8_1.x86_64.img
/boot/symvers-4.18.0-147.5.1.el8_1.x86_64.gz <<<<<<<<<<<<<<<
/boot/vmlinuz-4.18.0-147.5.1.el8_1.x86_64


When verifying with rpm2cpio you see that these are not listed.

[root@centosd51b ~]# rpm2cpio kernel-core-4.18.0-147.5.1.el8_1.x86_64.rpm | cpio -id | head -10
cpio: ./etc/ld.so.conf.d/kernel-4.18.0-147.5.1.el8_1.x86_64.conf not created: newer or same age version exists
cpio: ./lib/modules/4.18.0-147.5.1.el8_1.x86_64/.vmlinuz.hmac not created: newer or same age version exists
cpio: ./lib/modules/4.18.0-147.5.1.el8_1.x86_64/System.map not created: newer or same age version exists
cpio: ./lib/modules/4.18.0-147.5.1.el8_1.x86_64/bls.conf not created: newer or same age version exists
cpio: ./lib/modules/4.18.0-147.5.1.el8_1.x86_64/build not created: newer or same age version exists
cpio: ./lib/modules/4.18.0-147.5.1.el8_1.x86_64/config not created: newer or same age version exists
etc ect....

The extract failure can be verified by manually reinstalling the kernel-core package

[root@centosd51b ~]# rpm --reinstall ./kernel-core-4.18.0-147.5.1.el8_1.x86_64.rpm
Symvers dump file /boot/symvers-4.18.0-147.5.1.el8_1.x86_64.gz not found <<<<<<<<<<<<<<<<<<<
warning: %posttrans(kernel-core-4.18.0-147.5.1.el8_1.x86_64) scriptlet failed, exit status 1

When manually extracting the symvers archive with rpm2cpio I end up with a zero-byte file:

I don't know if the rpm was incorrectly build or not:

[root@centosd51b ~]# rpm2cpio kernel-core-4.18.0-147.5.1.el8_1.x86_64.rpm | cpio -iv --to-stdout /boot/symvers-4.18.0-147.5.1.el8_1.x86_64.gz > symvers-4.18.0-147.5.1.el8_1.x86_64.gz
54346 blocks
[root@centosd51b ~]# ll symvers-4.18.0-147.5.1.el8_1.x86_64.gz
-rw-r--r-- 1 root root 0 Feb 19 17:32 symvers-4.18.0-147.5.1.el8_1.x86_64.gz
[root@centosd51b ~]#


If anyone has any ideas that would be great as I cannot boot into Centos 8 at the moment and I'm worried that the box needs to be reimaged. As I'm 2000 miles away from it that might take a while. :-(

thanks for your feedback.
ustrin

ustrin

2020-02-25 16:01

reporter   ~0036380

I'm trying to debug the same issue. The symvers file is actually in the RPM, it's just in /lib/modules/4.18.0-147.5.1.el8_1.x86_64/symvers.gz. I'm not sure what's supposed to copy it to /boot, though.
erwinvanlonden

erwinvanlonden

2020-02-26 05:40

reporter   ~0036383

The RPM process should just unpack the files into the respective directory as shown in the package. So there should be a symvers.gz in the /boot directory. The "post-script" in the rmp should just take care of the housekeeping that is associated with these files. (Running depmod etc...)

What I find strange is that the files that should be extracted from the rpm simply doesn't seem to happen. If I create a bogus symvers.gz in the /boot directory I can see the rpm process moving further but obviously still failing later in the install process.

The package maintainer should be able to diagnose this.
erwinvanlonden

erwinvanlonden

2020-03-05 00:27

reporter   ~0036461

It looks like the issue is resolved and a fixed package has been published. If you do a dnf update it should progress further now. At least it did in my setup.

Cheers
Erwin

Issue History

Date Modified Username Field Change
2019-09-24 08:05 Hix New Issue
2019-09-27 09:43 Hix File Added: Capture.PNG
2019-09-27 09:43 Hix Note Added: 0035251
2019-09-29 00:27 toracat Note Added: 0035264
2019-10-01 19:02 Hix Note Added: 0035287
2020-02-19 06:34 erwinvanlonden Note Added: 0036315
2020-02-25 16:01 ustrin Note Added: 0036380
2020-02-26 05:40 erwinvanlonden Note Added: 0036383
2020-03-05 00:27 erwinvanlonden Note Added: 0036461