在linux下使用优盘出错
我想在内核中加入模块,结果cd /lib/modules/2.4.x-x/kernel/drivers
insmod ./scsi/scsi/scsi_mod.o
insmod ./scsi/sd_mod.o
insmod ./scsi/ide_scsi.o
显示:insmod: ide_scsi.o: No such file or directory
insmod ./usb/usbcore.o
insmod ./usb/usb_uhci.o
显示:insmod: usb_uhci.o: No such file or directory
insmod ./usb/usb_ohci.o
显示:insmod: usb_ohci.o: No such file or directory
然后我用mount -t vfat /dev/sdax /mnt/flash_memory
显示mount: /dev/sdax is not a valid block device
那我该怎么使用优盘? fdisk -l看看有没有优盘的信息,(一般都是/dev/sda)有的话
mkdir /mnt/usb
mount -t vfat /dev/sda /mnt/usb
那个/dev/sdax的x一般在移动硬盘中会有,一般移动硬盘才会分区嘛。
Re: 在linux下使用优盘出错
我想在内核中加入模块,结果cd /lib/modules/2.4.x-x/kernel/drivers
insmod ./scsi/scsi/scsi_mod.o
insmod ./scsi/sd_mod.o
insmod ./scsi/ide_scsi.o
显示:insmod: ide_scsi.o: No such file or directory
insmod ./usb/usbcore.o
insmod ./usb/usb_uhci.o
显示:insmod: usb_uhci.o: No such file or directory
insmod ./usb/usb_ohci.o
显示:insmod: usb_ohci.o: No such file or directory
然后我用mount -t vfat /dev/sdax /mnt/flash_memory
显示mount: /dev/sdax is not a valid block device
那我该怎么使用优盘?
I am not sure whether you mean USB mass storage. If it is ,following information may be helpful:
It seems that you didn't compile the USB driver in your kernel. Here is my compilation options (2.4.21):
M---usb support
Y----Preliminary USB device filesystem (not necessary)
M----UHCI (you may want EHCI if you have USB 2.0)
M----Mass storage support (This allow you to mount a flash memory)
Recompile you kernel and make sure that after you insert your USB storage, the usb-storage module are loaded. Then
su as root
"sfdisk -l /dev/sda" or "sfdisk -l /dev/sdb" until you get a correct size information.
Then use "mount -t auto /dev/sda1" to mount it. Please make sure you are using sda1 because usb storage also has partitions. If it is a brand new one, you may need to make fs first. 怎样在内核中编译usb驱动? 怎样在内核中编译usb驱动?
In fact, I have told you to enable the correct compilation option. And you can follow general kernel build process:
"make dep;make clean;make bzImage;make modules;make modules_install"
Then install your new kernel to /boot and update your lilo config.
You do better refer to a detailed kernel build manual.
页:
[1]