Gentoo Forums
Gentoo Forums
Quick Search: in
Grub wont compile.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
nmcsween
Guru
Guru


Joined: 12 Nov 2003
Posts: 381

PostPosted: Sun Apr 25, 2004 5:28 am    Post subject: Grub wont compile. Reply with quote

I've installed gentoo many times but this is just plain weird, Every time I emerge grub I get a src compile error more specificly it says !! making netboot stuff. But when I do a USE="static" emerge grub it works fine. Now my question is what does the static flag do? Also I'm running gcc 3.4 since it's stable. All different cflags don't make a difference
Back to top
View user's profile Send private message
ataphoya
Tux's lil' helper
Tux's lil' helper


Joined: 11 Mar 2004
Posts: 102
Location: Toronto, Canada

PostPosted: Sun Apr 25, 2004 6:03 am    Post subject: Reply with quote

AFAIK it just makes things to get compiled statically, not dynamically. I'm not sure what exactly it compiles statically though.
Back to top
View user's profile Send private message
deadaim
Guru
Guru


Joined: 27 Oct 2003
Posts: 467
Location: Florida

PostPosted: Sun Apr 25, 2004 6:45 pm    Post subject: Reply with quote

Try doing:

Code:
emerge -k grub


There really is no point in compiling grub yourself.
Back to top
View user's profile Send private message
stif
n00b
n00b


Joined: 25 Apr 2004
Posts: 1

PostPosted: Sun Apr 25, 2004 8:43 pm    Post subject: Reply with quote

hi everyone!

i do have a problem with compiling grub to.
i have done a step by step installation as described in the Installation Guide. So i get to the point of compiling grub without any problems.
But "emerge grub" terminates with the message:
Code:

  Merging sys-boot/grub-0.94-r1 to /
cat: /proc/mounts: no such file or directory
cat: /proc/mounts: no such file or directory

*
*Cannot automatically mount your /boot partition.
*Your boot partition has to be mounted rw before the installation
*can continue. grub need to install important files there.
*

!!! ERROR: sys-boot/grub-0.94-r1 failed
!!! Function mount-boot_mount_boot_partition Line 53, Exitcode 0
!!! Please mount your /boot partition manually!

!!FAILED preinst: 1


the boot partition is mounted and i have read/write access to it.
i think problem lies in the /proc directory is emty
But as far as i know this directory and its subdirectories are automatically created by the system.
So i have no idea what to do to solve this problem.
Has someone any suggestion?

regards, stif
Back to top
View user's profile Send private message
cyrillic
Watchman
Watchman


Joined: 19 Feb 2003
Posts: 7301
Location: Groton, Massachusetts USA

PostPosted: Sun Apr 25, 2004 9:43 pm    Post subject: Reply with quote

stif wrote:
i think problem lies in the /proc directory is emty

During installation, you need to mount /proc so it is available inside the chroot.
Code:
# mount -t proc none /mnt/gentoo/proc
Back to top
View user's profile Send private message
t_2199
Tux's lil' helper
Tux's lil' helper


Joined: 20 Mar 2004
Posts: 146

PostPosted: Sun Apr 25, 2004 10:36 pm    Post subject: Re: Grub wont compile. Reply with quote

Ultraoctane.com wrote:
I've installed gentoo many times but this is just plain weird, Every time I emerge grub I get a src compile error more specificly it says !! making netboot stuff. But when I do a USE="static" emerge grub it works fine. Now my question is what does the static flag do? Also I'm running gcc 3.4 since it's stable. All different cflags don't make a difference


Grub won´t compile with GCC 3.4 thats your problem... Just use gcc 3.3 gcc 3.4 may be stable but some progs still need some adjustments
Back to top
View user's profile Send private message
SkyPanther
n00b
n00b


Joined: 10 May 2003
Posts: 35

PostPosted: Tue Apr 27, 2004 3:32 pm    Post subject: Reply with quote

You have to comment these lines out in grub-0.94-r1.ebuild, to get it to compile in GCC 3.4

as far as i can tell this is for Netbooting.. ie, diskless PC's, which most people dont use anyway.

Code:

CFLAGS="" \
        econf \
               --datadir=/usr/lib/grub \
               --exec-prefix=/ \
               --disable-auto-linux-mem-opt \
               --enable-diskless \
               --enable-{3c{5{03,07,09,29,95},90x},cs89x0,davicom,depca,eepro{,100}} \
               --enable-{epic100,exos205,ni5210,lance,ne2100,ni{50,65}10,natsemi} \
               --enable-{ne,ns8390,wd,otulip,rtl8139,sis900,sk-g16,smc9000,tiara} \
               --enable-{tulip,via-rhine,w89c840} || die

        emake w89c840_o_CFLAGS="-O" || die "making netboot stuff"

        mv stage2/{nbgrub,pxegrub} ${S}
        mv stage2/stage2 stage2/stage2.netboot

        make clean || die


Make it look like this

Code:


#CFLAGS="" \
        #econf \
        #       --datadir=/usr/lib/grub \
        #       --exec-prefix=/ \
        #       --disable-auto-linux-mem-opt \
        #       --enable-diskless \
        #       --enable-{3c{5{03,07,09,29,95},90x},cs89x0,davicom,depca,eepro{,100}} \
        #       --enable-{epic100,exos205,ni5210,lance,ne2100,ni{50,65}10,natsemi} \
        #       --enable-{ne,ns8390,wd,otulip,rtl8139,sis900,sk-g16,smc9000,tiara} \
        #       --enable-{tulip,via-rhine,w89c840} || die

        #emake w89c840_o_CFLAGS="-O" || die "making netboot stuff"

        #mv stage2/{nbgrub,pxegrub} ${S}
        #mv stage2/stage2 stage2/stage2.netboot

        #make clean || die
Back to top
View user's profile Send private message
thorne
Apprentice
Apprentice


Joined: 19 Sep 2002
Posts: 177

PostPosted: Tue May 11, 2004 9:25 pm    Post subject: Reply with quote

Hi, the solution for me was to unmount boot. When you emerge grub, the script automatically mounts boot. Perhaps there is an error in the script where it checks to see if /boot is already mounted?
_________________
Stupid bug, you go squish now!
-Homer Simpson

Registered linux user #287718
Back to top
View user's profile Send private message
jbirch
n00b
n00b


Joined: 14 May 2004
Posts: 2

PostPosted: Sat May 15, 2004 1:42 am    Post subject: Reply with quote

I had the same problem as "stif" the work around posted in the above post from "thorne" worked. I was following install procedures by the letter but emerge --usepkg grub (or lilo) would not complete with the same message quoted by stif. Did the "umount /boot" then running the emerge worked in both cases for the problem.

Thanks thorne. Saved me evening #3 of beating head on monitor. (Night #1 was no NIC detection, Night #2 no grub, night #3 early yet but progressing....) :roll:

Regards,
jbirch

"
stif wrote:

"emerge grub" terminates with the message:
Code:

  Merging sys-boot/grub-0.94-r1 to /
cat: /proc/mounts: no such file or directory
cat: /proc/mounts: no such file or directory

*
*Cannot automatically mount your /boot partition.
*Your boot partition has to be mounted rw before the installation
*can continue. grub need to install important files there.
*

!!! ERROR: sys-boot/grub-0.94-r1 failed
!!! Function mount-boot_mount_boot_partition Line 53, Exitcode 0
!!! Please mount your /boot partition manually!

!!FAILED preinst: 1
Back to top
View user's profile Send private message
thorne
Apprentice
Apprentice


Joined: 19 Sep 2002
Posts: 177

PostPosted: Sat May 15, 2004 4:05 pm    Post subject: Reply with quote

jbirch wrote:
the work around posted in the above post from "thorne" worked.


No Problem, glad I could help someone out! :D
Sometimes the simplest solution is the best solution. 8O
_________________
Stupid bug, you go squish now!
-Homer Simpson

Registered linux user #287718
Back to top
View user's profile Send private message
newtonian
Guru
Guru


Joined: 19 Jan 2005
Posts: 415
Location: Hokkaido Japan

PostPosted: Mon May 05, 2008 11:53 am    Post subject: same problem in 2008 with hardened sources Reply with quote

I'm getting the same error. I've unmounted boot and tried but it didn't seem to help. I don't want to comment out the diskless code because I'm trying to get a diskless setup working. Any ideas?

Cheers,

Code:

mv -f .deps/libdrivers_a-main.Tpo .deps/libdrivers_a-main.Po
make[2]: Leaving directory `/var/tmp/portage/sys-boot/grub-0.97-r4/work/grub-0.97/netboot'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/sys-boot/grub-0.97-r4/work/grub-0.97'
make: *** [all] Error 2
 *
 * ERROR: sys-boot/grub-0.97-r4 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 2907:  Called die
 * The specific snippet of code:
 *           emake w89c840_o_CFLAGS="-O" || die "making netboot stuff";
 *  The die message:
 *   making netboot stuff
 *
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/sys-boot/grub-0.97-r4/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-boot/grub-0.97-r4/temp/environment'.
 *

 * Messages for package sys-boot/grub-0.97-r4:

 *
 * ERROR: sys-boot/grub-0.97-r4 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 2907:  Called die
 * The specific snippet of code:
 *           emake w89c840_o_CFLAGS="-O" || die "making netboot stuff";
 *  The die message:
 *   making netboot stuff
 *
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/sys-boot/grub-0.97-r4/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-boot/grub-0.97-r4/temp/environment'.
 *
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum