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