Bug 36480 - rc.sysinit creates defective /boot/kernel.h
rc.sysinit creates defective /boot/kernel.h
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: initscripts (Show other bugs)
7.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
David Lawrence
:
: 39239 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-04-18 09:51 EDT by josip
Modified: 2014-03-16 22:20 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-04-20 22:52:52 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description josip 2001-04-18 09:51:42 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.77 [en] (X11; U; Linux 2.2.19-7.0.1custom i686)


After building a custom kernel version 2.2.19-7.0.1custom and rebooting,
the /boot/kernel.h file is misconfigured by /etc/rc.d/rc.sysinit.  The
problem is that rc.sysinit chechks the RPM database and accepts only
rpm-installed Red Hat kernel packages.  This should be changed because many
users build their own custom kernels.  Here is a copy of the botched
/boot/kernel.h file:

/* This file is automatically generated at boot time. */
#ifndef __BOOT_KERNEL_H_
#define __BOOT_KERNEL_H_

/* Kernel type package kernel-2.2.19-7.0.1custom is not installed */

#ifndef __MODULE_KERNEL_package kernel-2.2.19-7.0.1custom is not installed
#define __MODULE_KERNEL_package kernel-2.2.19-7.0.1custom is not installed
1
#endif

#ifndef __BOOT_KERNEL_ENTERPRISE
#define __BOOT_KERNEL_ENTERPRISE 0
#endif

#ifndef __BOOT_KERNEL_SMP
#define __BOOT_KERNEL_SMP 0
#endif

#ifndef __BOOT_KERNEL_UP
#define __BOOT_KERNEL_UP 1
#endif

#endif


Reproducible: Always
Steps to Reproduce:
1. Build a custom kernel version 2.2.19-7.0.1custom
2. Install kernel and reboot
3. Check /boot/kernel.h file
Comment 1 Bill Nottingham 2001-04-18 12:41:17 EDT
This is fixed in 7.1.
Comment 2 Charles R. Anderson 2001-04-20 19:30:40 EDT
Additionally, even if you make a customized kernel RPM, if the release has an
's' or 'e' in it, this /etc/rc.d/rc.sysinit (and /sbin/mkkerneldoth in RH 7.1)
line causes a bad /boot/kernel.h to be generated:

KERNEL_TYPE=`uname -r | sed 's_^[^se]*\(\|smp\|enterprise\)$_-\1_;s_^-$__'`

For example, this works:

>echo "2.2.19-7.0.1smp" | sed 's_^[^se]*\(\|smp\|enterprise\)$_-\1_;s_^-$__'
-smp

but this doesn't:

>echo "2.2.19-7.0.1specialsmp" | sed \
's_^[^se]*\(\|smp\|enterprise\)$_-\1_;s_^-$__'
2.2.19-7.0.1specialsmp

A fix for this is:

KERNEL_TYPE=`uname -r | sed 's_^.*\(smp\|enterprise\)$_-\1_;t;s_.*__;'`

Comment 3 josip 2001-04-20 22:52:48 EDT
"This is fixed in 7.1" means that it is NOT fixed in 7.0 -- therefore, I would 
not call this bug "resolved".  BTW, this bug was introduced in 7.0 (our 6.2 
machines seem to be unaffected).

Although 7.1 is only days from the initial shipment, many of us will continue 
using 7.0 for months (e.g. because some specialized drivers are not yet 
converted to kernel 2.4).  Sure, we can fix rc.sysinit ourselves, but it would 
be better if corrected initscripts were available as 7.0 errata.
Comment 4 Bill Nottingham 2001-04-21 16:05:52 EDT
It's resolved in 7.1. 7.1 is the current release.
Comment 5 Charles R. Anderson 2001-04-21 16:44:35 EDT
In that case, can 7.1 initscripts /sbin/mkkerneldoth be fixed as I mentioned
above?  Thanks.
Comment 6 Bill Nottingham 2001-04-22 01:46:54 EDT
Sure, will be in 5.84-1.
Comment 7 Bill Nottingham 2001-05-07 09:53:47 EDT
*** Bug 39239 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.