zxf73468 发表于 2004-12-19 22:18:06

编译内核 求教!!!!!!!!

我要用ADSL上网,需要个pppoe.o。但是编译不成。错误如下:
# make modules
......
make: *** Error 1
make: Leaving directory `/usr/src/linux-2.4.20-8/drivers/net'
make: *** Error 2
make: Leaving directory `/usr/src/linux-2.4.20-8/drivers'
make: *** Error 2
#
# make modules_install
......
cp: stat‘dummy.o’失败: 没有那个文件或目录
cp: stat‘ppp_deflate.o’失败: 没有那个文件或目录
cp: stat‘ppp_generic.o’失败: 没有那个文件或目录
cp: stat‘pppoe.o’失败: 没有那个文件或目录
cp: stat‘pppox.o’失败: 没有那个文件或目录
cp: stat‘slhc.o’失败: 没有那个文件或目录
make: *** Error 1
make: Leaving directory `/usr/src/linux-2.4.20-8/drivers/net'
make: *** Error 2
make: Leaving directory `/usr/src/linux-2.4.20-8/drivers'
make: *** Error 2
#
以下是我编译时的部分选项:

Code maturity level options

[*] Prompt for development and/or incomplete code/drivers

Loadable module support

[*] Enable loadable module support

[*] Set version information on all module symbols

[*] Kernel module loader

Networking options

<*> Packet socket

<*> Unix domain sockets

[*] TCP/IP networking

[*] Asynchronous Transfer Mode (ATM)

[*] Classical IP over ATM

RFC1483/2684 Bridged protocols

Network Device Support

<M > PPP (point-to-point protocol) support

<M> PPP Deflate compression

<M> PPP over Ethernet (EXPERIMENTAL)

USB support

<*> Support for USB

[*] Preliminary USB device filesystem

<M> UHCI

<M> OHCI

Processor type and features

[ ] Symmetric multi-processing support
求教高手。我该怎么办。

对了我是red hat linux 9

FlyinDance 发表于 2004-12-20 01:18:08

楼上的哥哥,请把你省略的贴出来好吗?
最重要的被你省了…… :mrgreen:

zxf73468 发表于 2004-12-20 09:57:44

呵呵,不好意思我是菜鸟,一会就帖来.

zxf73468 发表于 2004-12-20 14:01:18

多谢大哥,编译通过了.新问题是如何让grub使用新内核呢?我的是2.4内核.

fox_eagle2003 发表于 2004-12-20 14:16:33

看看/boot目录下有几个vmlinuz*,initrd*.*文件,可以说说吗? :-D

zxf73468 发表于 2004-12-20 14:18:01

我执行了#make install
多了个启动选项:2.4.20-8custom
可是还是停到了:
......
VFS:Cannot open root device "LABEL=/" or 00:00
Pleace append a correct "root=" boot option
Kernel panic : VFS :Unable to mount root fs on 00:00

zxf73468 发表于 2004-12-20 14:19:15

这就去看

fox_eagle2003 发表于 2004-12-20 14:36:31

/boot/grub/grub.conf
这文件可以贴出来吗?

zxf73468 发表于 2004-12-20 15:13:26

/boot里有:vmlinuz-2.4.20-8
                vmlinuz-2.4.20-8custom
                initrd-2.4.20-8.img
                initrd-2.4.20-8custom.img
有人说把root=LABEL=/去掉,可是也不行啊
原grub.conf文件
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:You do not have a /boot partition.This means that
#          all kernel and initrd paths are relative to /, eg.
#          root (hd0,1)
#          kernel /boot/vmlinuz-version ro root=/dev/hda2
#          initrd /boot/initrd-version.img
#boot=/dev/hda
default=1
timeout=10
splashimage=(hd0,1)/boot/grub/splash.xpm.gz
title Red Hat Linux (2.4.20-8custom)
        root (hd0,1)
        kernel /boot/vmlinuz-2.4.20-8custom ro root=LABEL=/
        initrd /boot/initrd-2.4.20-8custom.img
title Red Hat Linux (2.4.20-8)
        root (hd0,1)
        kernel /boot/vmlinuz-2.4.20-8 ro root=LABEL=/
        initrd /boot/initrd-2.4.20-8.img
title DOS
        rootnoverify (hd0,0)
        chainloader +1
现在的grub.conf文件
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:You do not have a /boot partition.This means that
#          all kernel and initrd paths are relative to /, eg.
#          root (hd0,1)
#          kernel /boot/vmlinuz-version ro root=/dev/hda2
#          initrd /boot/initrd-version.img
#boot=/dev/hda
default=1
timeout=10
splashimage=(hd0,1)/boot/grub/splash.xpm.gz
title Red Hat Linux (2.4.20-8custom)
        root (hd0,1)
        kernel /boot/vmlinuz-2.4.20-8custom
        initrd /boot/initrd-2.4.20-8custom.img
title Red Hat Linux (2.4.20-8)
        root (hd0,1)
        kernel /boot/vmlinuz-2.4.20-8
                initrd /boot/initrd-2.4.20-8.img
title DOS
        rootnoverify (hd0,0)
        chainloader +1
结果还是出错
......
mount: error 6 mounting ext3
pivotroot: pivot_root /sysroot,/sysroot/initrd/ failed:2
umount /initrd /proc failed:2
Freeing unused kernel memeorg:132K freed
kernel panic:NO init found, Trg passing init=option to kernel.

yanlv 发表于 2004-12-21 17:51:06

在原来的grub.conf上把root=LABLE=/改成root=/dev/hda2试试
页: [1]
查看完整版本: 编译内核 求教!!!!!!!!