当前位置: 技术问答>linux和unix
2.6内核编译之后.......
来源: 互联网 发布时间:2015-06-15
本文导语: 各位大哥大姐,小弟刚编译了2.6.2的内核,在编辑了grub.conf之后,重启机器,系统正常引导,直到出现如下信息,系统就不动了,以下乃是小弟所能看到的最后一屏信息:(编号乃是小弟所加) 1. Serio: i8042 KBD port ...
各位大哥大姐,小弟刚编译了2.6.2的内核,在编辑了grub.conf之后,重启机器,系统正常引导,直到出现如下信息,系统就不动了,以下乃是小弟所能看到的最后一屏信息:(编号乃是小弟所加)
1. Serio: i8042 KBD port at Ox60,Ox64 irq 1
2. input: AT Translated Set 2 keyboard on isa0060/serio0
3. NET: Registered protocol family 2
4. IP: routing cache hash table of 128 buckets, 4kbytes
5. TCP: Hash tables configured (established 8192 bind 2340)
6. NET: Registered protocol family 1
7. NET: Registered protocol family 17
8. NET: Registered protocol family 8
9. NET: Registered protocol family 20
10. ACPI: (supports S0 S1 S4 S5)
11. RAMDISK: Compressed image found at block 0
12. VFS: Mounted root (ext2 filesystem).
13. Mounted devfs on /dev
14. Creating block devices
15. Creating root device
16. Mounting root filesystem
17. mount: error 19 mounting ext3
18. pivotroot: pivot_root(/sysroot, /sysroot/initrd)failed: 2
19. umount /initrd/proc failed: 2
20. Mounted devfs on /dev
21. Freeing unused kernel memory: 196K freed
22. Kernel panic: No init found. Try passing init= option to kernel.
根据信息显示,应该是第17行开始出错,18、19行都有错,可我就是不明白错在哪儿,error19是个啥子错,应如何做才能使系统正常用2.6.2内核引导,正常启动,麻烦各位大哥大姐多多提点。小弟在此谢过。
另外,以下是我的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 (hd1,0)
# kernel /boot/vmlinuz-version ro root=/dev/hdb1
# initrd /boot/initrd-version.img
#boot=/dev/hda
default=2
timeout=10
splashimage=(hd1,0)/boot/grub/splash.xpm.gz
title Red Hat Linux 9 (2.6.2)
root (hd1,0)
kernel /boot/vmlinuz-2.6.2 ro root=LABEL=/
initrd /boot/initrd-2.6.2.img
title Red Hat Linux 9 (2.4.20-8)
root (hd1,0)
kernel /boot/vmlinuz-2.4.20-8 ro root=LABEL=/
initrd /boot/initrd-2.4.20-8.img
title WindowsXP Home Edition
rootnoverify (hd0,0)
chainloader +1
1. Serio: i8042 KBD port at Ox60,Ox64 irq 1
2. input: AT Translated Set 2 keyboard on isa0060/serio0
3. NET: Registered protocol family 2
4. IP: routing cache hash table of 128 buckets, 4kbytes
5. TCP: Hash tables configured (established 8192 bind 2340)
6. NET: Registered protocol family 1
7. NET: Registered protocol family 17
8. NET: Registered protocol family 8
9. NET: Registered protocol family 20
10. ACPI: (supports S0 S1 S4 S5)
11. RAMDISK: Compressed image found at block 0
12. VFS: Mounted root (ext2 filesystem).
13. Mounted devfs on /dev
14. Creating block devices
15. Creating root device
16. Mounting root filesystem
17. mount: error 19 mounting ext3
18. pivotroot: pivot_root(/sysroot, /sysroot/initrd)failed: 2
19. umount /initrd/proc failed: 2
20. Mounted devfs on /dev
21. Freeing unused kernel memory: 196K freed
22. Kernel panic: No init found. Try passing init= option to kernel.
根据信息显示,应该是第17行开始出错,18、19行都有错,可我就是不明白错在哪儿,error19是个啥子错,应如何做才能使系统正常用2.6.2内核引导,正常启动,麻烦各位大哥大姐多多提点。小弟在此谢过。
另外,以下是我的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 (hd1,0)
# kernel /boot/vmlinuz-version ro root=/dev/hdb1
# initrd /boot/initrd-version.img
#boot=/dev/hda
default=2
timeout=10
splashimage=(hd1,0)/boot/grub/splash.xpm.gz
title Red Hat Linux 9 (2.6.2)
root (hd1,0)
kernel /boot/vmlinuz-2.6.2 ro root=LABEL=/
initrd /boot/initrd-2.6.2.img
title Red Hat Linux 9 (2.4.20-8)
root (hd1,0)
kernel /boot/vmlinuz-2.4.20-8 ro root=LABEL=/
initrd /boot/initrd-2.4.20-8.img
title WindowsXP Home Edition
rootnoverify (hd0,0)
chainloader +1
|
This is very important. Make sure you're .config has the following in it
CONFIG_EXT3_FS=y You'll run into the following error if you leave this =m
instead of =y:
pivotroot: pivot_root(/sysroot,/sysroot/initrd) failed
This is because Redhat 9.0 and 8.0 user the ext3 filesystem for /boot ...
CONFIG_EXT3_FS=y You'll run into the following error if you leave this =m
instead of =y:
pivotroot: pivot_root(/sysroot,/sysroot/initrd) failed
This is because Redhat 9.0 and 8.0 user the ext3 filesystem for /boot ...
|
这个问题,把ext3文件系统编译进内核里也不行么!!
如下手工修改grub.conf
title Red Hat Linux 9 (2.6.2)
root (hd1,0)
kernel /boot/vmlinuz-2.6.2 ro root=/dev/你的boot安装分区
initrd /boot/initrd-2.6.2.img
initrd 在2.6.x可以不要。
root=/dev/hd[0-9] 要按照grub的语法。不是Linux的语法--hd[a-z]
如下手工修改grub.conf
title Red Hat Linux 9 (2.6.2)
root (hd1,0)
kernel /boot/vmlinuz-2.6.2 ro root=/dev/你的boot安装分区
initrd /boot/initrd-2.6.2.img
initrd 在2.6.x可以不要。
root=/dev/hd[0-9] 要按照grub的语法。不是Linux的语法--hd[a-z]
|
我看到前面有人说过几次了,这个问题早该解决了。
在make config这一步把 文件系统 中的ext3类型的文件系统 选中,就行了,我自己在电脑上编译2.6.4也是出现这种问题,就是这么解决的。另外,你最好把那些dos,fat,ntfs等文件系统也编进内核(在make config这一步选中),还有把对scsi硬盘的支持 也编译进去,否则不能使用优盘。
在make config这一步把 文件系统 中的ext3类型的文件系统 选中,就行了,我自己在电脑上编译2.6.4也是出现这种问题,就是这么解决的。另外,你最好把那些dos,fat,ntfs等文件系统也编进内核(在make config这一步选中),还有把对scsi硬盘的支持 也编译进去,否则不能使用优盘。