Bug 36558 - /boot/kernel.h not correct
/boot/kernel.h not correct
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: initscripts (Show other bugs)
6.2
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-04-18 17:02 EDT by patrick.dowler
Modified: 2014-03-16 22:20 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-04-18 17:02:44 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 patrick.dowler 2001-04-18 17:02:40 EDT
initscripts-5.00-1
kernel-enterprise-2.2.19-6.2.1

rc.sysinit does not correctly create /boot/kernel.h to give a
consistent version number (as reported with uname -r). This 
breaks compilations (vmware modules, eg). The previous enterprise
kernel happened to work because it also had "smp" in the version
reported by uname -r.

Fix: add definition for __BOOT_KERNEL_ENTERPRISE to kernel.h
like this:

# Generate a header that defines the boot kernel.
if uname -r | grep -q smp ; then
  ENTERPRISE="0"
  SMP="1"
  UP="0"
elif uname -r | grep -q enterprise ; then
  ENTERPRISE="1"
  SMP="0"
  UP="0"
else
  ENTERPRISE="0"
  SMP="0"
  UP="1"
fi
OLDENTERPRISE=`grep "#define __BOOT_KERNEL_ENTERPRISE" /boot/kernel.h 
2>/dev/null | awk '{ print $3 }'`
OLDSMP=`grep "#define __BOOT_KERNEL_SMP" /boot/kernel.h 2>/dev/null | awk 
'{ print $3 }'`
OLDUP=`grep "#define __BOOT_KERNEL_UP" /boot/kernel.h 2>/dev/null | awk 
'{ print $3 }'`
if [ "$ENTERPRISE" != "$OLDENTERPRISE" -o "$SMP" != "$OLDSMP" -o "$UP" != 
"$OLDUP" ]; then
 cat > /boot/kernel.h << EOF
/* This file is automatically generated at boot time. */
#ifndef __BOOT_KERNEL_H_
#define __BOOT_KERNEL_H_
 
#ifndef __BOOT_KERNEL_ENTERPRISE
#define __BOOT_KERNEL_ENTERPRISE $ENTERPRISE
#endif
 
#ifndef __BOOT_KERNEL_SMP
#define __BOOT_KERNEL_SMP $SMP
#endif
 
#ifndef __BOOT_KERNEL_UP
#define __BOOT_KERNEL_UP $UP
#endif
Comment 1 Bill Nottingham 2001-04-18 17:04:12 EDT
This is fixed in the 7.1 initscripts.
Comment 2 patrick.dowler 2001-04-18 18:03:19 EDT
Is it plausible to use the 7.1 initscripts with RedHat6.2? I didn't
think so. I was just reacting to the fact that kernel-2.2.1906.2.1enterprise
requires a mod to rc.sysinit and initscripts was not one of the required
packages to update. It is currently not possible for some people to
migrate to 7.x due to other software constraints. I can fix this
myself (have, in fact), but it means that now I have to be extra-careful
about package upgrades on effected machines. 

Is a new initscripts package for 6.2 possible? likely?
Comment 3 Bill Nottingham 2001-04-18 18:10:25 EDT
Probably not likely at this point.
Comment 4 Bill Nottingham 2001-05-07 09:53:05 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.