Bug 85424

Summary: grubby can leave grub.conf empty if /boot is full (system unbootable)
Product: [Retired] Red Hat Linux Reporter: Jon Burgess <jburgess777>
Component: mkinitrdAssignee: Peter Jones <pjones>
Status: CLOSED NEXTRELEASE QA Contact: David Lawrence <dkl>
Severity: high Docs Contact:
Priority: medium    
Version: 7.3   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-08-04 20:37:42 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jon Burgess 2003-03-02 00:43:28 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2) Gecko/20021203

Description of problem:
If the /boot partition runs out of space while installing a new kernel then
grubby moves the grub.conf file to grub.conf~ and creates a zero sized grub.conf
file. 

When the system is rebooted Grub just drops into the command line.

I'm no grub expert, so I had to use a bootdisk to sort it out.



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

How reproducible:
Always (it has happened to me twice - both times when /boot became full)

Steps to Reproduce:
I noticed this while doing kernel development. grubby was being invoked from the
installkernel script during the kernel "make install".

0. Install lots of kernels so /boot is nearly full 
1. Compile new kernel
2. Install with kernel "make install", no errors reported
3. Reboot machine
4. Grub drops into the commandline, no boot menu - help!


Expected Results:  grubby should do something intelligent when it runs out of
space while creating the ne grub.conf, perhaps by creating it as grub.conf.new &
then only renaming the file once it is happy that it has written all of it.

Alternatively grub could look for "grub.conf~" if grub.conf is empty.

Additional info:

I do not know whether RPM would prevent this from happening through a normal
kernel install, perhaps it checks for the necessary disk space

Comment 1 Jeremy Katz 2003-03-20 17:46:50 UTC
Reassigning

Comment 2 Jeremy Katz 2003-05-16 21:01:30 UTC
Fixed for 3.5.51 

Comment 3 Bill Nottingham 2006-08-04 20:37:42 UTC
Red Hat Linux and Red Hat Powertools are currently no longer supported by Red
Hat, Inc. In an effort to clean up bugzilla, we are closing all bugs in MODIFIED
state for these products.

However, we do want to make sure that nothing important slips through the
cracks. If, in fact, these issues are not resolved in a current Fedora Core
Release (such as Fedora Core 5), please open a new issues stating so. Thanks.