Bug 990680

Summary: when tboot is installed it automatically takes over as kernel of choice
Product: Red Hat Enterprise Linux 6 Reporter: Dave Sullivan <dsulliva>
Component: tbootAssignee: Tony Camuso <tcamuso>
Status: CLOSED WONTFIX QA Contact: Release Test Team <release-test-team-automation>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.4CC: vincent
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-09-18 13:54:20 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1002711    

Description Dave Sullivan 2013-07-31 18:12:13 UTC
Description of problem:

when tboot is installed it automatically takes over as kernel of choice

Version-Release number of selected component (if applicable):

6.4

How reproducible:

You can install tboot from kickstart

%packages
@Base
+tboot 

or install from using --optional

%packages
@Base --optional

After a fresh install including optional for @base, tboot is enabled by default.
~~~
# sed -n '/%packages/,/%end/p' /root/anaconda-ks.cfg 
%packages
@Base --optional
@Core
-NetworkManager

%end

# rpm -q tboot
tboot-1.7.0-4.el6.x86_64

# grep -v ^# /boot/grub/grub.conf 
default=0
timeout=5
serial --unit=0 --speed=115200
terminal --timeout=5 serial console
title Red Hat Enterprise Linux (2.6.32-358.el6.x86_64)
	root (hd0,0)
	kernel /tboot.gz logging=vga,serial,memory
	module /vmlinuz-2.6.32-358.el6.x86_64 ro root=/dev/mapper/vg00-root intel_iommu=on rd_NO_LUKS  KEYBOARDTYPE=pc KEYTABLE=us rd_LVM_LV=vg00/swap LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 rd_LVM_LV=vg00/root crashkernel=auto crashkernel=auto console=ttyS0,115200 rd_NO_DM
	module /initramfs-2.6.32-358.el6.x86_64.img
~~~

Actual results:

So we get forced into a tboot boot.

Expected results:

tboot shouldn't be the default if it installed, it's ok to set up grub with a tboot kernel but it should default to the normal line

Additional info:

As this is only kernel, grubby won't let you remove it
~~~
# grubby --remove-kernel=/boot/tboot.gz 
grubby fatal error: unable to find a suitable template
grubby: doing this would leave no kernel entries. Not writing out new config.
~~~


So add kernel with grubby then remove tboot kernel (missing root(hd0,0) line but works in my test).  May be best to test the new kernel line with reboot before removing (as recovery with both options still in grub.conf is easier).
~~~
# ARGS=$(grep "^[[:space:]]*module /vmlinuz-$(uname -r)" /boot/grub/grub.conf | sed -e 's/^.*x86_64 //' | head -n 1)

# grubby --add-kernel=/boot/vmlinuz-$(uname -r) --args="${ARGS}" --initrd=/boot/initramfs-$(uname -r).img --make-default --title "Red Hat Enterprise Linux without tboot ($(uname -r))"

# grep -v ^# /boot/grub/grub.conf 
default=0
timeout=5
serial --unit=0 --speed=115200
terminal --timeout=5 serial console
title Red Hat Enterprise Linux without tboot (2.6.32-358.el6.x86_64
	kernel /vmlinuz-2.6.32-358.el6.x86_64 ro root=/dev/mapper/vg00-root intel_iommu=on rd_NO_LUKS KEYBOARDTYPE=pc KEYTABLE=us rd_LVM_LV=vg00/swap LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 rd_LVM_LV=vg00/root crashkernel=auto crashkernel=auto console=ttyS0,115200 rd_NO_DM
	initrd /initramfs-2.6.32-358.el6.x86_64.img
title Red Hat Enterprise Linux (2.6.32-358.el6.x86_64)
	root (hd0,0)
	kernel /tboot.gz logging=vga,serial,memory
	module /vmlinuz-2.6.32-358.el6.x86_64 ro root=/dev/mapper/vg00-root intel_iommu=on rd_NO_LUKS  KEYBOARDTYPE=pc KEYTABLE=us rd_LVM_LV=vg00/swap LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 rd_LVM_LV=vg00/root crashkernel=auto crashkernel=auto console=ttyS0,115200 rd_NO_DM
	module /initramfs-2.6.32-358.el6.x86_64.img




# grubby --remove-kernel=/boot/tboot.gz

# grep -v ^# /boot/grub/grub.conf 
default=0
timeout=5
serial --unit=0 --speed=115200
terminal --timeout=5 serial console
title Red Hat Enterprise Linux without tboot (2.6.32-358.el6.x86_64
	kernel /vmlinuz-2.6.32-358.el6.x86_64 ro root=/dev/mapper/vg00-root intel_iommu=on rd_NO_LUKS KEYBOARDTYPE=pc KEYTABLE=us rd_LVM_LV=vg00/swap LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 rd_LVM_LV=vg00/root crashkernel=auto crashkernel=auto console=ttyS0,115200 rd_NO_DM
	initrd /initramfs-2.6.32-358.el6.x86_64.img
~~~


Now can remove tboot, as not in use by grub.
~~~
# yum -y erase tboot
~~~

Comment 4 RHEL Program Management 2013-10-14 02:53:56 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 6 Vincent S. Cojot 2014-01-13 22:15:07 UTC
Hello,
What if I'd like to keep 'tboot' installed but keep my default kernel?
I had tboot installed and somehow (investigation going on) the /etc/sysconfig/kernel got modified to point to tboot.

Since tboot drops some arguments from the kernel grub.conf, upon the next errata kernel update the system rebooted and lost its network (it was missing biosdevname=0, amongst others).

I don't mind keeping the 'tboot' rpm but I don't want it to take actions or make itself the default without my agreement. :)

Vincent

Comment 8 Chris Williams 2015-09-18 13:54:20 UTC
This Bugzilla has been reviewed by Red Hat and is not planned on being addressed in Red Hat Enterprise Linux 6 and therefore will be closed. If this bug is critical to production systems, please contact your Red Hat support representative and provide sufficient business justification.