LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
楼主: goldeagle

kernel 2.6.0 编译方法(给新手)

[复制链接]
发表于 2003-12-23 03:24:42 | 显示全部楼层
升级完成后重启后选2.6.0进入到登陆的时候,无法启动图形界面,而且字符一闪一闪的。重启,选2.4.20-8进入,启动到一半不动了。再重启,选2.4.20的安全模式进入,按要求输入密码后,显示输入要修复的文件什么的。
这是怎么搞的?
怎么解决?
请帮帮忙。
 楼主| 发表于 2003-12-23 07:59:47 | 显示全部楼层
最初由 danyja 发表
升级完成后重启后选2.6.0进入到登陆的时候,无法启动图形界面,而且字符一闪一闪的。重启,选2.4.20-8进入,启动到一半不动了。再重启,选2.4.20的安全模式进入,按要求输入密码后,显示输入要修复的文件什么的。
这是怎么搞的?
怎么解决?
请帮帮忙。

提示信息是什么?贴上来大家看看
发表于 2003-12-23 18:46:04 | 显示全部楼层
最初由 goldeagle 发表
提示信息是什么?贴上来大家看看

          Welcome to Red Flag   Linux
Mounting proc filesystem:                          [OK]
Configuring Kernel parameters:                     [OK]
Setting clock (localtime):Tue Dec 23 18:16:35 CST 2003 [OK]
Loading default keymap(us):                        [OK]
Setting hostname localhost:                        [OK]
Your system appears to have shut down uncleanly
Press Y within 1 seconds to force file system integrity check...
Checking root filesystem
WARNING:coulden't open /etc/fstab:Input/output error
fsck.ext2/:
The superblock could not be read or does notdescribe a correct ext2 filesystem.If the device

is valid and it really contains an ext2 filesystem(and not swap or ufs or somthing

else),then the superblock is corrupt,and you might try running e2fsck with an alternate

superblock:
e2fsck -b 8193 <device>
:Is a directory while trying to open /
                                                    [FAILED]
***An error occurred during the file system check.
***Dropping you to a shell;the system will reboot
***when you leave the shell.
Give root password for maintenance
(or type Control-D to continue):
输入密码后:
(Repair filesystem) 1 #
不知道怎么弄了。
发表于 2003-12-23 19:23:32 | 显示全部楼层
我的是在FEDORA上编译2.6内核的,一切正常,就是起动进入新内核后,没有声音,没有USB盘。请问如何将声卡支持和USB 支持加入内核。
我在make menuconfig时已经加上了声卡和USB 支持。
 楼主| 发表于 2003-12-23 21:05:53 | 显示全部楼层
danyja
这个好像是说你硬盘上的区块出现错误,需要运行磁盘检查程序
你可以用光盘引导(软盘也行),然后使用e2fsck指令
如果还是有问题,你确认硬盘一切OK,FSTAB也OK的话,查看一下
/etc/init.d/checkroot 这个里面,有的时候也会因为文件系统版本不对出现问题,一般来说修改 fsck 的属性能够解决。

cnzxy,如果内核里面已经加了USB,你可以用 /dev/sda 来 mount USB 硬盘。有的系统可能需要 /proc/bus/usb 来 mount。
如果你是编译成模块,需要用 modprobe 来加载。
USB 方面在硬件版有不少帖子,找来看看。声卡的问题我不是很好判断,你也可以去硬件版找找答案。
发表于 2003-12-23 21:29:54 | 显示全部楼层
最初由 goldeagle 发表
danyja
这个好像是说你硬盘上的区块出现错误,需要运行磁盘检查程序
你可以用光盘引导(软盘也行),然后使用e2fsck指令
如果还是有问题,你确认硬盘一切OK,FSTAB也OK的话,查看一下
/etc/init.d/checkroot 这个里面,有的时候也会因为文件系统版本不对出现问题,一般来说修改 fsck 的属性能够解决。

谢谢老大
:thank :thank :thank
考试完了再看看了.
发表于 2003-12-23 21:52:44 | 显示全部楼层
我前面都正常,但到了Make这一步就不行了:
[root@server linux-2.6.0]# make
  HOSTCC  scripts/modpost.o
  HOSTLD  scripts/modpost
make[1]: `arch/i386/kernel/asm-offsets.s' is up to date.
  CHK     include/linux/compile.h
dnsdomainname: 主机名搜索失败
Kernel: arch/i386/boot/bzImage is ready
  Building modules, stage 2.
  MODPOST
[root@server linux-2.6.0]# make install
make[1]: `arch/i386/kernel/asm-offsets.s' is up to date.
  CHK     include/linux/compile.h
dnsdomainname: 主机名搜索失败
Kernel: arch/i386/boot/bzImage is ready
sh /usr/src/linux-2.6.0/arch/i386/boot/install.sh 2.6.0 arch/i386/boot/bzImage System.map ""
/lib/modules/2.6.0 is not a directory.
mkinitrd failed
make[1]: *** [install] Error 1
make: *** [install] Error 2
大家给个建议,到底是怎么一回事啊?
发表于 2003-12-23 22:44:43 | 显示全部楼层
执行第二步
make menuconfig出错 如下:

HOSTCC  scripts/fixdep
/bin/sh: line 1: gcc: command not found
make[1]: *** [scripts/fixdep] Error 127
make: *** [scripts/fixdep] Error 2

是不是我少安装了什么文件?
 楼主| 发表于 2003-12-24 08:31:22 | 显示全部楼层
最初由 CasBoy 发表
我前面都正常,但到了Make这一步就不行了:
[root@server linux-2.6.0]# make
  HOSTCC  scripts/modpost.o
  HOSTLD  scripts/modpost
make[1]: `arch/i386/kernel/asm-offsets.s' is up to date.
  CHK     include/linux/compile.h
dnsdomainname: 主机名搜索失败
Kernel: arch/i386/boot/bzImage is ready
  Building modules, stage 2.
  MODPOST
[root@server linux-2.6.0]# make install
make[1]: `arch/i386/kernel/asm-offsets.s' is up to date.
  CHK     include/linux/compile.h
dnsdomainname: 主机名搜索失败
Kernel: arch/i386/boot/bzImage is ready
sh /usr/src/linux-2.6.0/arch/i386/boot/install.sh 2.6.0 arch/i386/boot/bzImage System.map ""
/lib/modules/2.6.0 is not a directory.
mkinitrd failed
make[1]: *** [install] Error 1
make: *** [install] Error 2
大家给个建议,到底是怎么一回事啊?


看你的提示信息,新内核的编译应该是成功了,只是无法从默认路径安装。
你可以手工拷贝过去。提示的错误信息只是 domainname 的问题而已,一般不影响编译。
看你的提示信息,应该执行:
cp arch/i386/boot/bzImage /boot/vmlinuz-2.6.0

cp System.map /boot/System.map-2.6.0
具体路径你可以自己找找。

另外,你可能打开了内存镜像的支持,所以 mkinitrd 可能失败了
你只要重新执行 mkinitrd 指令就可以了,如果提示有错误,可能需要忽略模块,你加上相关参数就OK啦。
 楼主| 发表于 2003-12-24 08:34:01 | 显示全部楼层
最初由 caiheng 发表
执行第二步
make menuconfig出错 如下:

HOSTCC  scripts/fixdep
/bin/sh: line 1: gcc: command not found
make[1]: *** [scripts/fixdep] Error 127
make: *** [scripts/fixdep] Error 2

是不是我少安装了什么文件?


呵呵,如果提示 gcc 命令没找到,可能少装的是很重要的文件啊。
比如使用 redhat 这样的发行版,在安装的时候很可能忽略开发工具,那就不会安装 gcc。

如果不是这个问题,那么看看你的权限够不够。或者使用 sudo 或 su 指令来获得执行的权限。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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