LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1051|回复: 7

x86_64-6.3-r2160.iso中关于GRUB-0.97configure的问题【已经解决】

[复制链接]
发表于 2010-4-16 18:00:06 | 显示全部楼层 |阅读模式
使用的LIVECD是lfslivecd-x86_64-6.3-r2160.iso  手册是里面自带的Linux From Scratch Version SVN-x86_64-20070807

软件包里没有grub,自己安装gurb。
以下是编译grub0.97时候遇到的问题

root:/sources/grub-0.97# ./configure --prefix=/usr
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking whether to enable maintainer-specific portions of Makefiles... no
checking for gcc... gcc
checking for gcc... (cached) gcc
checking for C compiler default output file name... configure: error: C compiler cannot create executables
See `config.log' for more details.


config.log中的截取内容如下:


configure:1434: checking for a BSD-compatible install
configure:1489: result: /usr/bin/install -c
configure:1500: checking whether build environment is sane
configure:1543: result: yes
configure:1608: checking for gawk
configure:1624: found /usr/bin/gawk
configure:1634: result: gawk
configure:1644: checking whether make sets $(MAKE)
configure:1664: result: yes
configure:1839: checking build system type
configure:1857: result: x86_64-unknown-linux-gnu
configure:1865: checking host system type
configure:1879: result: x86_64-unknown-linux-gnu
configure:1903: checking whether to enable maintainer-specific portions of Makefiles
configure:1912: result: no
configure:2028: checking for gcc
configure:2044: found /usr/bin/gcc
configure:2054: result: gcc
configure:2112: checking for gcc
configure:2138: result: gcc
configure:2382: checking for C compiler version
configure:2385: gcc --version </dev/null >&5
gcc (GCC) 4.1.2
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:2388: $? = 0
configure:2390: gcc -v </dev/null >&5
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-4.1.2/configure --prefix=/usr --libexecdir=/usr/lib --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-languages=c,c++ --disable-multilib
Thread model: posix
gcc version 4.1.2
configure:2393: $? = 0
configure:2395: gcc -V </dev/null >&5
gcc: '-V' option must have argument
configure:2398: $? = 1
configure:2421: checking for C compiler default output file name
configure:2424: gcc -m32    conftest.c  >&5
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-unknown-linux-gnu/4.1.2/./libgcc.a when searching for -lgcc
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-unknown-linux-gnu/4.1.2/./libgcc.a when searching for -lgcc
/usr/bin/ld: cannot find -lgcc
collect2: ld returned 1 exit status


请问这个问题如何解决?


我因为不会解决这个问题 才用的grub1.98,倒是能编译安装过去,后期grub-install的时候也过去了
不知道哪里没弄好,重启后进入GRUB>


---------------------------------------------------------------------------------------------------------------------

我自己根据其他手册下载了grub1.98 然后在VIM编译以后编译了grub,然后编译内核了。可是到设置grub的时候,提示找不到grub这个命令。我看了下,boot下没有grub的东西,/usr下有不少,求教这个怎么解决?

另外不是说grub也能引导64位Linux吗?是我这个地方安装的方法不对吗?求教高人给提供个能引导启动的办法

谢谢!!拜谢!

--------------------------------------------------------------------------------------------------

grub2的用法也看了,按照另一个手册中的做法
使用
grub-install --grub-setup=/bin/true /dev/hda
grub-mkconfig -o /boot/grub/grub.cfg
grub-setup  /dev/hda
三条命令
重启后倒是只能进入
grub>
之后用了各种命令,也不行。
求高人指点这里应该怎么做


--------------------------------------------------------------------------------------------------------------

那么多人在线,怎么没人帮忙解答下呢。


-----
 楼主| 发表于 2010-4-19 10:02:32 | 显示全部楼层
没人给回复呀?


Linux From Scratch Version SVN-x86_64-20070807
手册中好像没有GRUB的编译安装

但后便boot时说前面已经安装,这是什么意思?要自己安装吗?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2010-4-19 11:14:30 | 显示全部楼层
这个问题困扰两天了,有没有大牛出来帮忙一下啊?
试了各种版本各个方法,都不行,也没找到类似的帖子
回复 支持 反对

使用道具 举报

发表于 2010-4-19 11:17:12 | 显示全部楼层
Grub1.98属于grub2, 命令和GRUB不同.
可以去网上搜索一下Grub2的用法
回复 支持 反对

使用道具 举报

 楼主| 发表于 2010-4-19 12:41:32 | 显示全部楼层
恩,找到了。正在实验呢

Linux From Scratch Version SVN-x86_64-20070807

这个手册中好像是有问题吧?
明明没有GRUB,他后来启动的时候却说 先前已经安装了grub
回复 支持 反对

使用道具 举报

 楼主| 发表于 2010-4-19 15:32:06 | 显示全部楼层
grub2的用法也看了,按照另一个手册中的做法
使用
grub-install --grub-setup=/bin/true /dev/hda
grub-mkconfig -o /boot/grub/grub.cfg
grub-setup /dev/hda
三条命令
重启后倒是只能进入
grub>
之后用了各种命令,也不行。
求高人指点这里应该怎么做
回复 支持 反对

使用道具 举报

发表于 2010-4-19 22:30:23 | 显示全部楼层
安装只要一个命令就够了吧
  1. grub-install /dev/hda
复制代码
运行命令时是提示没有?还是其它的?

配置我一般都是手动的,所以。。。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2010-4-20 10:31:50 | 显示全部楼层
Post by digwtx;2084141
安装只要一个命令就够了吧

  1. grub-install /dev/hda
复制代码

运行命令时是提示没有?还是其它的?

配置我一般都是手动的,所以。。。



运行命令时提示 没有错误报告,应该是安装没问题。


SVN-20100412手册中接下来后面运行
grub-mkconfig -o /boot/grub/grub.cfg
创建了配置文件。看了下里面内容,好像没啥问题,其实也没看懂多少,就看到了root (hd0,2)之类的吗,符合我的磁盘。

我想也应该是我的手动配置没做好,因为不懂嘛,找了一些资料来做,还是不成功。

x86_64本身的手册中居然没有grub的编译安装,让我很郁闷,所以做到后面借用了SVN-20100412中的章节。

求教手动配置详情
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表