Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 13242

Summary: Emerging grub does not tell user to copy *stage* files if upgrading
Product: Gentoo Linux Reporter: Mark Lodato <itsr0y>
Component: Current packagesAssignee: Donny Davies (RETIRED) <woodchip>
Status: RESOLVED FIXED    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Mark Lodato 2003-01-04 10:07:16 UTC
When you emerge a new version of grub, it checks to see if you have already 
installed a previous version.  If you have, it doesn't copy the *stage* files to 
prevent an error from occurring.  It _should_ tell the user that if they are 
upgrading to a new version to copy those files over manually, but it doesn't.  
You may see a thread on the forums about this here:


http://forums.gentoo.org/viewtopic.php?t=28522


This code should warn the user, but evidently it doesn't:


----------


pkg_postinst() { 


Comment 1 Mark Lodato 2003-01-04 10:07:16 UTC
When you emerge a new version of grub, it checks to see if you have already 
installed a previous version.  If you have, it doesn't copy the *stage* files to 
prevent an error from occurring.  It _should_ tell the user that if they are 
upgrading to a new version to copy those files over manually, but it doesn't.  
You may see a thread on the forums about this here:


http://forums.gentoo.org/viewtopic.php?t=28522


This code should warn the user, but evidently it doesn't:


----------


pkg_postinst() { 


    [ "$ROOT" != "/" ] && return 0 


    if [ ! -e /boot/grub/stage1 ] 


    then 


        #if the boot loader files aren't in place, copy them over. 


        cd /usr/share/grub/i386-pc 


        cp stage1 stage2 *stage1_5 /boot/grub 


    else 


        einfo '*** A new GRUB has been installed. If you need to reinstall GRUB 
to a' 


        einfo '*** boot record on your drive, please remember to' 


        einfo '*** "cp /usr/share/grub/i386-pc/*stage* /boot/grub" first.' 


        einfo "*** If you're using XFS, unmount and remount /boot as well." 


        einfo "*** Note that menu.lst now is called grub.conf." 


    fi 


} 


----------
Comment 2 Donny Davies (RETIRED) gentoo-dev 2003-01-18 05:27:21 UTC
ok fixed in grub-0.93.20030118.ebuild

marked ~ for now but will trickle into stable eventually ...