Bug 51625 - rc.sysinit insists on modifying the /boot file system every time
rc.sysinit insists on modifying the /boot file system every time
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: initscripts (Show other bugs)
7.0
All Linux
medium Severity high
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-08-13 05:33 EDT by Landon Curt Noll
Modified: 2014-03-16 22:22 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-08-13 05:33:08 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 Landon Curt Noll 2001-08-13 05:33:04 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.77 [en] (X11; U; Linux 2.2.19-7.0.8 i686)

Description of problem:
The rc.sysinit attempts to modify /boot/kernel.h each time it is run.  This
makes is annoying when one wants to mount /boot as a read-only file system.
Where /boot is a read-write filesystem of part of /, it causes a needless
rewrite of any import file.  If the system were to crash during ...

NOTE: This is a similar bug to 39290.  That bug deal with
the /boot/System.map and this bug deals with the
/boot/kernel.h file.

How reproducible:
Always

Steps to Reproduce:
1.build a system where /boot in on a separate file system
2.after the system is brought up and installed, change fstab
so that /boot is mounted read-only
3.reboot
	

Actual Results:  fails cat into /boot/kernel.h

Expected Results:  notices that /boot/kernel.h is up to date and does
not touch /boot/kernel.h.

Additional info:

Try:

*** rc.sysinit.init	Fri Aug 18 14:33:17 2000
--- rc.sysinit	Fri Jul 20 12:37:14 2001
***************
*** 598,604 ****
    -enterprise) ENTERPRISE="1";;
    *) UP="1";;
    esac
!   cat > /boot/kernel.h << EOF
  /* This file is automatically generated at boot time. */
  #ifndef __BOOT_KERNEL_H_
  #define __BOOT_KERNEL_H_
--- 598,605 ----
    -enterprise) ENTERPRISE="1";;
    *) UP="1";;
    esac
!   rm -f /tmp/kernel.h
!   cat > /tmp/kernel.h << EOF
  /* This file is automatically generated at boot time. */
  #ifndef __BOOT_KERNEL_H_
  #define __BOOT_KERNEL_H_
***************
*** 623,633 ****
  
  #endif
  EOF
  fi
  
  # Adjust symlinks as necessary in /boot to keep system services from
  # spewing messages about mismatched System maps and so on.
! if [ -L /boot/System.map -a -r /boot/System.map-`uname -r` ] ; then
  	ln -s -f System.map-`uname -r` /boot/System.map
  fi
  if [ ! -e /boot/System.map -a -r /boot/System.map-`uname -r` ] ; then
--- 624,640 ----
  
  #endif
  EOF
+     if cmp -s /tmp/kernel.h /boot/kernel.h; then
+ 	mv /tmp/kernel.h /boot/kernel.h
+     else
+ 	rm -f /tmp/kernel.h
+     fi
  fi
  
  # Adjust symlinks as necessary in /boot to keep system services from
  # spewing messages about mismatched System maps and so on.
! if [ -L /boot/System.map -a -r /boot/System.map-`uname -r` -a \
!      ! /boot/System.map -ef /boot/System.map-`uname -r` ] ; then
  	ln -s -f System.map-`uname -r` /boot/System.map
  fi
  if [ ! -e /boot/System.map -a -r /boot/System.map-`uname -r` ] ; then


NOTE: The above patch includes for bug 39290 as well.
Comment 1 Bill Nottingham 2001-08-13 09:36:11 EDT
This has since been fixed in the current initscripts.

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