当前位置: 技术问答>linux和unix
成功编译完RH8内核,也可以boot系统,但不能probe到USB设备,why?
来源: 互联网 发布时间:2015-02-04
本文导语: 我刚从www.kernel.org down了个2.4.20的kernel包,成功编译并且可以启动系统(可以正常从X WINDOW登录并使用系统),当在系统boot时发现系统说: can't probe the USB HID device... [Failed] can't probe the USB keyboard device... [Failed...
我刚从www.kernel.org down了个2.4.20的kernel包,成功编译并且可以启动系统(可以正常从X WINDOW登录并使用系统),当在系统boot时发现系统说:
can't probe the USB HID device... [Failed]
can't probe the USB keyboard device... [Failed]
can't probe the USB mouse device... [Failed]
到X window的登录见面发现USB鼠标不能使用,但键盘可以使用,登录进系统后发现声卡也没正常启动,Error message:
Error while initializing the sound driver:
device /dev/dsp can't be opened (No such device)
还有电源管理也不能启动,其他设备没有报错。
这是不是因为在make xconfig时有些功能没有enable啊?请问一般重新编译kernel时有哪些modules/function要enable?
(linux如果通过RedHat 安装时装的kernel启动,一切设备正常运行)
下面是我使用的命令:
1.copy the linux-2.4.20.tar.bz2 to /usr/src directory
#cp linux-2.4.20.tar.bz2 /usr/src
#cd /usr/src
2.remove the symbol link to the previous kernel
#rm -f linux-2.4
3.unzip the .bz2 source code package
#bzip2 -d linux-2.4.20.tar.bz2
#tar -xvf linux-2.4.20.tar
4.link the symbol to the new kernel
#ln -s linux-2.4.20 linux-2.4
5.move into the new kernel folder
#cd /usr/src/linux-2.4
6.
#make mrproper
7.edit Makefile and change EXTRAVERSION = to your own
personal words, e.g.
EXTRAVERSION = -kilvon.001
8.suppose you are in the X window:
#make xconfig !remember to save your configuration into a file, so that you can load it next time.
#make dep
9.
#make bzImage
#make modules
#make modules_install
10.move the new compiled executable files to the /boot
#move /usr/src/linux-2.4/System.map /boot/System.map-2.4.20-kilvon.001
#move /usr/src/linux-2.4/arch/i386/boot/bzImage /boot/vmlinuz-2.4.20-kilvon.001
#rm -f System.map
#rm -f vmlinuz
#ln -s /boot/System.map-2.4.20-kilvon.001 /boot/System.map
#ln -s /boot/vmlinuz-2.4.20-kilvon.001 /boot/vmlinuz
11.Suggest you make a copy of grub.conf (if you use lilo, please backup the /etc/lilo.conf)
#cp /boot/grub/grub.conf /boot/grub/grub.conf.bck
12.
#new-kernel-pkg --install --depmod --mkinitrd 2.4.20-kilvon.001
13.this is the file list in my /boot
[root@localhost boot]# ll
total 8669
-rw-r--r-- 1 root root 5824 9ÔÂ 6 04:53 boot.b
-rw-r--r-- 1 root root 612 9ÔÂ 6 04:53 chain.b
-rw-r--r-- 1 root root 42150 9ÔÂ 5 01:47 config-2.4.18-14
drwxr-xr-x 2 root root 1024 3ÔÂ 5 12:47 grub
-rw-r--r-- 1 root root 130983 3ÔÂ 5 03:49 initrd-2.4.18-14.img
-rw-r--r-- 1 root root 130983 3ÔÂ 4 20:21 initrd-2.4.18-14.standard.img
-rw-r--r-- 1 root root 66483 3ÔÂ 5 11:55 initrd-2.4.20-kilvon.001.img
-rw-r--r-- 1 root root 473 3ÔÂ 5 03:49 kernel.h
drwx------ 2 root root 12288 3ÔÂ 5 03:44 lost+found
-rw-r--r-- 1 root root 23108 9ÔÂ 6 22:05 message
-rw-r--r-- 1 root root 21282 9ÔÂ 6 22:05 message.ja
lrwxrwxrwx 1 root root 21 3ÔÂ 5 03:49 module-info -> module-info-2.4.18-14
-rw-r--r-- 1 root root 15436 9ÔÂ 5 01:47 module-info-2.4.18-14
-rw-r--r-- 1 root root 15436 3ÔÂ 4 20:21 module-info-2.4.18.standard
-rw-r--r-- 1 root root 640 9ÔÂ 6 04:53 os2_d.b
lrwxrwxrwx 1 root root 34 3ÔÂ 5 12:50 System.map -> /boot/System.map-2.4.20-kilvon.001
-rw-r--r-- 1 root root 507814 9ÔÂ 5 01:47 System.map-2.4.18-14
-rw-r--r-- 1 root root 507814 3ÔÂ 4 20:20 System.map-2.4.18-14.standard
-rw-r--r-- 1 root root 579273 3ÔÂ 5 11:25 System.map-2.4.20-kilvon.001
-rwxr-xr-x 1 root root 3236438 9ÔÂ 5 01:47 vmlinux-2.4.18-14
lrwxrwxrwx 1 root root 31 3ÔÂ 5 12:51 vmlinuz -> /boot/vmlinuz-2.4.20-kilvon.001
-rw-r--r-- 1 root root 1125194 9ÔÂ 5 01:47 vmlinuz-2.4.18-14
-rw-r--r-- 1 root root 1125194 3ÔÂ 4 20:19 vmlinuz-2.4.18-14.standard
-rw-r--r-- 1 root root 1270472 3ÔÂ 5 11:26 vmlinuz-2.4.20-kilvon.001
14.this is the grub content:
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,6)
# kernel /vmlinuz-version ro root=/dev/hda8
# initrd /initrd-version.img
#boot=/dev/hda
default=2
timeout=10
splashimage=(hd0,6)/grub/splash.xpm.gz
title Psyche (2.4.20-kilvon.001)
root (hd0,6)
kernel /vmlinuz-2.4.20-kilvon.001 ro root=/dev/hda8
initrd /initrd-2.4.20-kilvon.001.img
title Psyche (2.4.18-14 standard)
root (hd0,6)
kernel /vmlinuz-2.4.18-14.standard ro root=LABEL=/ hdc=ide-scsi
initrd /initrd-2.4.18-14.standard.img
title Windows 2000
rootnoverify (hd0,0)
chainloader +1
can't probe the USB HID device... [Failed]
can't probe the USB keyboard device... [Failed]
can't probe the USB mouse device... [Failed]
到X window的登录见面发现USB鼠标不能使用,但键盘可以使用,登录进系统后发现声卡也没正常启动,Error message:
Error while initializing the sound driver:
device /dev/dsp can't be opened (No such device)
还有电源管理也不能启动,其他设备没有报错。
这是不是因为在make xconfig时有些功能没有enable啊?请问一般重新编译kernel时有哪些modules/function要enable?
(linux如果通过RedHat 安装时装的kernel启动,一切设备正常运行)
下面是我使用的命令:
1.copy the linux-2.4.20.tar.bz2 to /usr/src directory
#cp linux-2.4.20.tar.bz2 /usr/src
#cd /usr/src
2.remove the symbol link to the previous kernel
#rm -f linux-2.4
3.unzip the .bz2 source code package
#bzip2 -d linux-2.4.20.tar.bz2
#tar -xvf linux-2.4.20.tar
4.link the symbol to the new kernel
#ln -s linux-2.4.20 linux-2.4
5.move into the new kernel folder
#cd /usr/src/linux-2.4
6.
#make mrproper
7.edit Makefile and change EXTRAVERSION = to your own
personal words, e.g.
EXTRAVERSION = -kilvon.001
8.suppose you are in the X window:
#make xconfig !remember to save your configuration into a file, so that you can load it next time.
#make dep
9.
#make bzImage
#make modules
#make modules_install
10.move the new compiled executable files to the /boot
#move /usr/src/linux-2.4/System.map /boot/System.map-2.4.20-kilvon.001
#move /usr/src/linux-2.4/arch/i386/boot/bzImage /boot/vmlinuz-2.4.20-kilvon.001
#rm -f System.map
#rm -f vmlinuz
#ln -s /boot/System.map-2.4.20-kilvon.001 /boot/System.map
#ln -s /boot/vmlinuz-2.4.20-kilvon.001 /boot/vmlinuz
11.Suggest you make a copy of grub.conf (if you use lilo, please backup the /etc/lilo.conf)
#cp /boot/grub/grub.conf /boot/grub/grub.conf.bck
12.
#new-kernel-pkg --install --depmod --mkinitrd 2.4.20-kilvon.001
13.this is the file list in my /boot
[root@localhost boot]# ll
total 8669
-rw-r--r-- 1 root root 5824 9ÔÂ 6 04:53 boot.b
-rw-r--r-- 1 root root 612 9ÔÂ 6 04:53 chain.b
-rw-r--r-- 1 root root 42150 9ÔÂ 5 01:47 config-2.4.18-14
drwxr-xr-x 2 root root 1024 3ÔÂ 5 12:47 grub
-rw-r--r-- 1 root root 130983 3ÔÂ 5 03:49 initrd-2.4.18-14.img
-rw-r--r-- 1 root root 130983 3ÔÂ 4 20:21 initrd-2.4.18-14.standard.img
-rw-r--r-- 1 root root 66483 3ÔÂ 5 11:55 initrd-2.4.20-kilvon.001.img
-rw-r--r-- 1 root root 473 3ÔÂ 5 03:49 kernel.h
drwx------ 2 root root 12288 3ÔÂ 5 03:44 lost+found
-rw-r--r-- 1 root root 23108 9ÔÂ 6 22:05 message
-rw-r--r-- 1 root root 21282 9ÔÂ 6 22:05 message.ja
lrwxrwxrwx 1 root root 21 3ÔÂ 5 03:49 module-info -> module-info-2.4.18-14
-rw-r--r-- 1 root root 15436 9ÔÂ 5 01:47 module-info-2.4.18-14
-rw-r--r-- 1 root root 15436 3ÔÂ 4 20:21 module-info-2.4.18.standard
-rw-r--r-- 1 root root 640 9ÔÂ 6 04:53 os2_d.b
lrwxrwxrwx 1 root root 34 3ÔÂ 5 12:50 System.map -> /boot/System.map-2.4.20-kilvon.001
-rw-r--r-- 1 root root 507814 9ÔÂ 5 01:47 System.map-2.4.18-14
-rw-r--r-- 1 root root 507814 3ÔÂ 4 20:20 System.map-2.4.18-14.standard
-rw-r--r-- 1 root root 579273 3ÔÂ 5 11:25 System.map-2.4.20-kilvon.001
-rwxr-xr-x 1 root root 3236438 9ÔÂ 5 01:47 vmlinux-2.4.18-14
lrwxrwxrwx 1 root root 31 3ÔÂ 5 12:51 vmlinuz -> /boot/vmlinuz-2.4.20-kilvon.001
-rw-r--r-- 1 root root 1125194 9ÔÂ 5 01:47 vmlinuz-2.4.18-14
-rw-r--r-- 1 root root 1125194 3ÔÂ 4 20:19 vmlinuz-2.4.18-14.standard
-rw-r--r-- 1 root root 1270472 3ÔÂ 5 11:26 vmlinuz-2.4.20-kilvon.001
14.this is the grub content:
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,6)
# kernel /vmlinuz-version ro root=/dev/hda8
# initrd /initrd-version.img
#boot=/dev/hda
default=2
timeout=10
splashimage=(hd0,6)/grub/splash.xpm.gz
title Psyche (2.4.20-kilvon.001)
root (hd0,6)
kernel /vmlinuz-2.4.20-kilvon.001 ro root=/dev/hda8
initrd /initrd-2.4.20-kilvon.001.img
title Psyche (2.4.18-14 standard)
root (hd0,6)
kernel /vmlinuz-2.4.18-14.standard ro root=LABEL=/ hdc=ide-scsi
initrd /initrd-2.4.18-14.standard.img
title Windows 2000
rootnoverify (hd0,0)
chainloader +1
|
在input core support中把
input core support 设为Y
keyboard support 设为M
mouse support 设为M
在usb support中
usb support 设为Y
preliminary usb device filesystem设为Y
usb human inerface device support 设为M
hid input layer support 设为Y
input core support 设为Y
keyboard support 设为M
mouse support 设为M
在usb support中
usb support 设为Y
preliminary usb device filesystem设为Y
usb human inerface device support 设为M
hid input layer support 设为Y