OL7 UEK image boot and kernel modules related issues

120 views
Skip to first unread message

NK

unread,
Oct 15, 2020, 6:52:03 PM10/15/20
to kiwi
Hi ,

I have two issues with OEL 7 UEK R5 image

1)
I have  created  the Image for Oracle Linux7  UEK R5(Kernel Version - 4.14.35-2025.401.4.el7uek.x86_64) .  but when ever I create an image VM from this image it by default boot with Oracle Linux 7 regular kernel (i.e 3.10.0-1160.2.1.el7.x86_64) but If I again reboot this VM then it will boot with UEK R5 image. 

even default boot kernel is  UEK kernel 
# grubby --default-kernel
/boot/vmlinuz-4.14.35-2025.401.4.el7uek.x86_64

So, why image boot  with OEL 7 normal kernel(3.10.xx) first time ? , is there any way to make UEK as default from first boot it self? 

2) 
Secondly issue is kernel module for scsi driver is available under different kernel version

# ls /usr/lib/modules/3.10.0-1127.19.1.el7.x86_64/extra/scsi_ep_front
scsi_ep_front.ko

Ideally , I would like to have all the modules under UEK R5 modules directory  i.e.
/usr/lib/modules/4.14.35-2025.401.4.el7uek.x86_64/extra

as a result modules are not being loaded with UEK R5 kernel.

* my config.xml is as below...

**Kiwi NG version 9.17.16
--------------------------------------------------------
      <rpm-check-signatures>false</rpm-check-signatures>
        <type image="vmx"  format="qcow2" primary="true" filesystem="ext4" kernelcmdline="console=ttyS0,115200n8 console=tty0"  bootloader="grub2" devicepersistency="by-label">
           <size unit="G">6</size>
        </type>
</preferences>

<!-- Packages -->
   <packages type="bootstrap">
    <package name="filesystem"/>
    <package name="basesystem"/>
    <package name="grub2-mkconfig"/>
    <package name="yum-plugin-priorities"/>
    <package name="grub2-efi-modules" arch="x86_64"/>
    <package name="grub2-efi" arch="x86_64"/>
    <package name="shim-x64" arch="x86_64"/>
    </packages>

    <!-- Packages -->
  <packages type='image'>
<!-- REQUIRED FOR BUILD-->
    <package name="plymouth" bootinclude="true"/>
    <package name="plymouth-theme-charge" bootinclude="true"/>
    <package name="grub2"/>
    <package name="grub2-tools"/>
    <package name="grub2-tools-minimal"/>
    <package name="filesystem"/>
    <package name="basesystem"/>
    <package name="setup"/>
    <package name="yum-plugin-versionlock"/>
<!-- OEL only -->
    <namedCollection name="Minimal Install"/>
    <package name="yum-plugin-priorities" bootinclude="true"/>
    <package name="yum-utils"/>
    <package name='vim-enhanced'/>
    <package name='iproute'/>
    <package name='kmod-scsi_ep_front' bootinclude='true'/>

    <package name='kernel-uek'/>
    <package name='kernel-uek-tools'/>
<!--DKMS pkg and dependencies -->
    <package name='epel-release'/>
    <package name='dkms'/>
    <package name='oracle-epel-release-el7'/>
    <package name='oraclelinux-release-el7'/>
    <package name='sudo'/>

... <other packages>

  </packages>
</image>
-------------------------------------------------------------------------
Thanks in advance!

Regards,
Niks

David Cassany

unread,
Oct 16, 2020, 4:57:39 AM10/16/20
to kiwi-...@googlegroups.com
Hi,

On 10/16/20 12:52 AM, NK wrote:
> Hi ,
>
> I have two issues with OEL 7 UEK R5 image
>
> 1)
> I have created the Image for Oracle Linux7 UEK R5(Kernel Version
> - 4.14.35-2025.401.4.el7uek.x86_64) . but when ever I create an image
> VM from this image it by default boot with Oracle Linux 7 regular kernel
> (i.e 3.10.0-1160.2.1.el7.x86_64) but If I again reboot this VM then it
> will boot with UEK R5 image.
>
> even default boot kernel is UEK kernel
> # grubby --default-kernel
> /boot/vmlinuz-4.14.35-2025.401.4.el7uek.x86_64
Looks like in your image you are including two different kernels and
KIWI just configures grub2 to use one of those. The criteria is simple,
KIWI picks the first match. So if you definitely want to use certain
specific kernel try to limit the installation to include only the kernel
binaries you want.

If you are explicitly only requiring the desired kernel in the XML
description then you should investigate which package is pulling the
older kernel and try to figure out which options you have to avoid such
a dependency.

> So, why image boot with OEL 7 normal kernel(3.10.xx) first time ? , is
> there any way to make UEK as default from first boot it self?
I have no clue why the default kernel changes after reboot. If I had to
guess I'd say that probably there was the installation or upgrade of
packages between to the two boots that caused a grub2 reconfiguration
and grub2-mkconfig just changed to a different default. But is just a
mere blind guess. I am also not familiar with Oracle Linux specifics in
this area, if any.

>
> 2)
> Secondly issue is kernel module for scsi driver is available under
> different kernel version
>
> # ls /usr/lib/modules/*/3.10.0-1127.19.1.el7.x86_64/*/extra/scsi_ep_front
> scsi_ep_front.ko
>
> Ideally , I would like to have all the modules under UEK R5 modules
> directory i.e.
> /usr/lib/modules/4.14.35-2025.401.4.el7uek.x86_64/extra
>
> as a result modules are not being loaded with UEK R5 kernel.
This has nothing to do with KIWI, kiwi does not manage kernel modules in
any way. KIWI just installs packages. I don't know the details about how
Oracle Linux provides the scsi drivers, but I can tell that in
openSUSE's world this driver is part of the default Kernel package. On
my host I can check it by:

```
$ rpm -qf /lib/modules/5.3.18-lp152.44-default/kernel/drivers/scsi
kernel-default-5.3.18-lp152.44.1.x86_64
```

So the package that provides the driver is the kernel-default. Probably
the kernel you aim to use does not have the scsi drivers in it?

So in short I'd try to investigate how to refine the packages list to
make sure only the desired kernel you want gets installed. Note that you
can also uninstall/delete packages with `<packages type="delete">` or
`<packages type="uninstall">` sections. Those sections are applied after
the config.sh is executed. Uninstall type will run a clean
deinstallation of the packages and any orphan dependency. Delete type
will delete the listed packages regardless the dependencies (thus it is
likely to break dependencies).

I hope all this helps.

Regards,
David
Reply all
Reply to author
Forward
0 new messages