Bug 36480 - rc.sysinit creates defective /boot/kernel.h
Summary: rc.sysinit creates defective /boot/kernel.h
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: initscripts
Version: 7.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: David Lawrence
URL:
Whiteboard:
: 39239 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-04-18 13:51 UTC by josip
Modified: 2014-03-17 02:20 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2001-04-21 02:52:52 UTC
Embargoed:


Attachments (Terms of Use)

Description josip 2001-04-18 13:51:42 UTC
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 16:41:17 UTC
This is fixed in 7.1.

Comment 2 Charles R. Anderson 2001-04-20 23:30:40 UTC
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-21 02:52:48 UTC
"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 20:05:52 UTC
It's resolved in 7.1. 7.1 is the current release.

Comment 5 Charles R. Anderson 2001-04-21 20:44:35 UTC
In that case, can 7.1 initscripts /sbin/mkkerneldoth be fixed as I mentioned
above?  Thanks.


Comment 6 Bill Nottingham 2001-04-22 05:46:54 UTC
Sure, will be in 5.84-1.

Comment 7 Bill Nottingham 2001-05-07 13:53:47 UTC
*** 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.