15 12
发新话题
打印

硬盘安装gentoo过程中的一个问题

硬盘安装gentoo过程中的一个问题

我是在rh9下利用硬盘安装,swap共享,另挂一个硬盘给gentoo,整个分区都给/,按照硬盘安装的方法,挂载/mnt/gentoo /dev/hdc1,解压stage.....,emerge rsync.一路ok.当配置完/etc/fstab后,执行到安装内核源件时,我选择了安装sourecs版本,于是#emerge -k sys-kernel/gentoo-sources(我一直想不通这里的gentoo-sources的内核版是多少呢,唉不管啦,照做).接着#emerge genkernel也ok,再执行genkernel --menuconfig all时报错.如下
* Gentoo Linux Genkernel; Version 3.0.2c
grep: /usr/src/linux/Makefile: 没有那个文件或目录
grep: /usr/src/linux/Makefile: 没有那个文件或目录
grep: /usr/src/linux/Makefile: 没有那个文件或目录
grep: /usr/src/linux/Makefile: 没有那个文件或目录
* Compiling Linux Kernel .. for x86...

egrep: /proc/mounts: 没有那个文件或目录
Error, do this: mount -t proc none /proc
* ERROR: Error: No kernel .config specified, or file not found!

* -- Grepping log... --

* Gentoo Linux Genkernel; Version 3.0.2c
* Compiling Linux Kernel .. for x86...
* ERROR: Error: No kernel .config specified, or file not found!

* -- End log... --

* Please consult /var/log/genkernel.log for more information and any
* errors that were reported above.

* Report any genkernel bugs to bugs.gentoo.org and
* assign your bug to genkernel@gentoo.org. Please include
* as much information as you can in your bug report; attaching
* /var/log/genkernel.log so that your issue can be dealt with effectively.
*
* Please do *not* report compilation failures as genkernel bugs!
我于是手动挂载mount -t proc none /proc,再执行还是没用.于是我跳过这一步,按照接下来的步骤一一做下去,直到最后安装好了grub,配置grub.conf时,我才郁闷的我的内核版本到底填多少呢,最后保存退出.启动不了.其实我想我的内核根本就没有编译成功,在/mnt/gentoo/boot/下根本没看到内核文件呀.可我又不知道什么,还请各位大侠指点迷津!哦,偶在配置fstab的文件时出了点小错误,就是把/proc这行写错啦,不过我发现后又回头来改正啦.不知道这会不会是影响编译不成功的原因.我现在的fstab内容是:
/dev/hdc1               /               reiserfs        defaults         0 0
/dev/hda3               none            swap            sw               0 0
proc                   /proc            proc            defaults         0 0
失败!      

TOP

一定要先mount -t proc none /proc后chroot到新的gentoo环境下才能编内核的      

TOP

重新编内核      
愿吐尽心头烈火 焚却宇宙之索莫

TOP

你的内核没编过吧?
#emerge gentoo-dev-sources
#cd /usr/src/linux
#make menuconfig
#make
#make modules
#make modules_install
然后手动拷贝内核到/boot里,接着在grub.conf里加入gentoo的启动项。      
没有签名

TOP

再来一次.gentoo,我依然爱你如故.哈哈~~~~~      

TOP

不用完全重来,重新chroot进去编译内核吧      
没有签名

TOP

风兄,我现在进入到RH下,先挂载上
#mount /dev/hdc1 /mnt/gentoo
#mount -t proc none /proc
#chroot /mnt/gentoo /bin/bash
我就直接转入到
#emerge gentoo-dev-sources(是不是得#usr/sbin/dnv-update,.......emerge rsync从头再来一篇呀)
报错如下:
Calculating dependencies ...done!

!!! Error: the virtual/modutils package conflicts with another package.
!!!        both can't be installed on the same system together.
!!!        Please use 'emerge --pretend' to determine blockers.
并且我发现我的/usr/src下没有linux目录.如何解决呀,得从头来嘛?:confused:      

TOP

RH下:
#mount /dev/hdc1 /mnt/gentoo
#mount -o bind /dev /mnt/gentoo/dev
#mount -o bind /proc /mnt/gentoo/dev
#chroot /mnt/gentoo /bin/bash
这样就进入gentoo环境了,
#env-update
#source /etc/profile
rsync不用了
安装dev的内核:
#emerge gentoo-dev-sources
(其它内核可以看/usr/portage/sys-kernel)
完了后就有/usr/src/linux了,再进入linxu目录编译内核
#cd /usr/src/linux
编译内核不用说了吧      
没有签名

TOP

#emerge -p gentoo-dev-sources      
愿吐尽心头烈火 焚却宇宙之索莫

TOP

[root@atoll root]# mount -o bind /dev /mnt/gentoo/dev
[root@atoll root]# mount -o bind /proc /mnt/gentoo/dev
[root@atoll root]# chroot /mnt/gentoo /bin/bash
bash-2.05b# env-update
[] bash: line 1: /dev/null: 没有那个文件或目录
/sbin/depscan.sh: line 1: /dev/null: 没有那个文件或目录
/sbin/depscan.sh: line 1: /dev/null: 没有那个文件或目录
* Caching service dependencies...
/sbin/depscan.sh: line 23: /dev/null: 没有那个文件或目录
*  Could not create needed directory '/var/lib/init.d/softscripts'!
/sbin/depscan.sh: line 23: /dev/null: 没有那个文件或目录
*  Could not create needed directory '/var/lib/init.d/snapshot'!
/sbin/depscan.sh: line 23: /dev/null: 没有那个文件或目录
*  Could not create needed directory '/var/lib/init.d/options'!
/sbin/depscan.sh: line 23: /dev/null: 没有那个文件或目录
*  Could not create needed directory '/var/lib/init.d/started'!
/var/lib/init.d/depcache: line 1: /dev/null: 没有那个文件或目录
7G  [ ok ]nit.d/depcache: line 1: /dev/null: 没有那个文件或目录
bash-2.05b# source /etc/profile
bash: /dev/null: 没有那个文件或目录
bash: /dev/null: 没有那个文件或目录
tseteen大侠的#emerge -p gentoo-dev-sources可以执行,但接下来还是无法继续.真是怪怪的      

TOP

 15 12
发新话题