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

Bug 639606

Summary: sys-boot/grub-0.97-r18 stable request
Product: Gentoo Linux Reporter: David Flogeras <dflogeras2>
Component: StabilizationAssignee: Ian Stakenvicius (RETIRED) <axs>
Status: RESOLVED FIXED    
Severity: normal CC: ap, base-system, chris, hydrapolic, lucianposton, luke, pacho, phmagic, redneb, scott, spiderx
Priority: Normal Keywords: STABLEREQ
Version: unspecifiedFlags: stable-bot: sanity-check+
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
=sys-boot/grub-0.97-r18
Runtime testing required: ---
Bug Depends on: 608460    
Bug Blocks:    

Description David Flogeras 2017-12-03 11:41:13 UTC
Needed to build grub:0 with new gcc-6 and default PIE on 17 profiles.

Reproducible: Always
Comment 1 Alexander Bezrukov 2017-12-03 13:07:50 UTC
While -r17 compiles with gcc-6.4.0 with new PIE profiles, the result is unusable, see https://bugs.gentoo.org/608460#c4

 * Copying files from /lib/grub and /usr/share/grub to //boot/grub
cp: error writing '//boot/grub/stage2': No space left on device
cp: error writing '//boot/grub/stage2_eltorito': No space left on device
cp: error writing '//boot/grub/vstafs_stage1_5': No space left on device
cp: error writing '//boot/grub/xfs_stage1_5': No space left on device
cp: error writing '//boot/grub/stage2': No space left on device
cp: error writing '//boot/grub/stage2_eltorito': No space left on device
cp: error writing '//boot/grub/xfs_stage1_5': No space left on device

# ls -lh /lib/grub/i386-pc/stage*
-rw-r--r-- 1 root root 129M Dec  3 16:02 /lib/grub/i386-pc/stage1
-rw-r--r-- 1 root root 129M Dec  3 16:02 /lib/grub/i386-pc/stage2
-rw-r--r-- 1 root root 129M Dec  3 16:02 /lib/grub/i386-pc/stage2_eltorito
Comment 2 Thomas Deutschmann (RETIRED) gentoo-dev 2017-12-03 14:40:29 UTC
(In reply to Alexander Bezrukov from comment #1)
> While -r17 compiles with gcc-6.4.0 with new PIE profiles, the result is
> unusable, see https://bugs.gentoo.org/608460#c4
> 
>  * Copying files from /lib/grub and /usr/share/grub to //boot/grub
> cp: error writing '//boot/grub/stage2': No space left on device
> cp: error writing '//boot/grub/stage2_eltorito': No space left on device
> cp: error writing '//boot/grub/vstafs_stage1_5': No space left on device
> cp: error writing '//boot/grub/xfs_stage1_5': No space left on device
> cp: error writing '//boot/grub/stage2': No space left on device
> cp: error writing '//boot/grub/stage2_eltorito': No space left on device
> cp: error writing '//boot/grub/xfs_stage1_5': No space left on device
Not sure, but this indicates that your /boot partition is full. Not a problem with the patch/code,
Comment 3 Alexander Bezrukov 2017-12-03 15:21:17 UTC
(In reply to Thomas Deutschmann from comment #2)
> (In reply to Alexander Bezrukov from comment #1)
> > While -r17 compiles with gcc-6.4.0 with new PIE profiles, the result is
> > unusable, see https://bugs.gentoo.org/608460#c4
> > 
> >  * Copying files from /lib/grub and /usr/share/grub to //boot/grub
> > cp: error writing '//boot/grub/stage2': No space left on device
> > cp: error writing '//boot/grub/stage2_eltorito': No space left on device
> > cp: error writing '//boot/grub/vstafs_stage1_5': No space left on device
> > cp: error writing '//boot/grub/xfs_stage1_5': No space left on device
> > cp: error writing '//boot/grub/stage2': No space left on device
> > cp: error writing '//boot/grub/stage2_eltorito': No space left on device
> > cp: error writing '//boot/grub/xfs_stage1_5': No space left on device
> Not sure, but this indicates that your /boot partition is full. Not a
> problem with the patch/code,

Surely, it is full because of enormous file sizes resulting from compilation. And I see this be a problem, because 129MB file cannot fit into 512-byte sector (stage 1), regardless of my /boot partition size. The files installed are sparse (when the underlying filesystem supports sparse files, which is not always the case) but I am not sure this was the intent of the ebuild to create sparse files of this size. And regardless of sparseness, stage1 cannot be embedded.
Comment 4 Scott McClung 2017-12-03 18:28:47 UTC
I have the exact same problem, and I have been running grub-0.97-r17 since April 20th of this year.  I don't even remember what problem I had that caused me to unmask it, but now it results in:

 -rw-r--r-- 1 root root 134481169 Dec  3 13:13 stage1
 -rw-r--r-- 1 root root 134606985 Dec  3 13:13 stage2
 -rw-r--r-- 1 root root 134608009 Dec  3 13:13 stage2_eltorito

Prior builds were fine with gcc 5.x.

Files that are much larger than what I used to have.

During the build, I get the following also:

 * Your boot partition was detected as being mounted at /boot.
 * Files will be installed there for grub to function correctly.
 * Copying files from /lib/grub and /usr/share/grub to //boot/grub
/var/tmp/portage/sys-boot/grub-0.97-r17/temp/environment: line 3806: 27844 Done                    egrep -v '^[[:space:]]*(#|$|default|fallback|initrd|password|splashimage|timeout|title)' "${grub_config}"
     27845 Segmentation fault      | /sbin/grub --batch --device-map="${dir}"/device.map > /dev/null
 * Grub has been installed to //boot successfully.

Does this need a new bug?
Comment 5 Lucian Poston 2017-12-04 05:04:57 UTC
(In reply to Scott McClung from comment #4)
> Does this need a new bug?

https://bugs.gentoo.org/608460
Comment 6 David Flogeras 2017-12-08 21:58:26 UTC
When I reported this, I hadn't yet found out (as others have said in the comments) that grub:0 is broken with gcc:6.  I was (un)lucky enough that the files fit on my /boot and thought all was well until I rebooted.

I might be better to just suggest that we "if-it-aint-broke" people who were holding on to grub:0 just finally migrate to grub:2.  I've done so on most of my machines, and it was fairly painless.  It would also reduce developer strain.  Just my 0.02
Comment 7 Thomas Deutschmann (RETIRED) gentoo-dev 2017-12-14 13:00:51 UTC
Let's wait a few days to see if =sys-boot/grub-0.97-r18 works everywhere. Stabilization can start next week (2017-12-18).
Comment 8 Pacho Ramos gentoo-dev 2017-12-26 12:49:32 UTC
any updates on this? Thanks
Comment 9 Mikle Kolyada (RETIRED) archtester Gentoo Infrastructure gentoo-dev Security 2018-01-08 01:01:12 UTC
go ahead
Comment 10 Tobias Klausmann (RETIRED) gentoo-dev 2018-01-15 19:05:32 UTC
Stable on amd64.
Comment 11 Thomas Deutschmann (RETIRED) gentoo-dev 2018-02-01 20:38:21 UTC
x86 stable, closing