icoming 发表于 2003-10-1 10:33:32

在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
那我该怎么使用优盘?

Bluedata 发表于 2003-10-1 17:49:47

fdisk -l看看有没有优盘的信息,(一般都是/dev/sda)有的话
mkdir /mnt/usb
mount -t vfat /dev/sda /mnt/usb
那个/dev/sdax的x一般在移动硬盘中会有,一般移动硬盘才会分区嘛。

ritou 发表于 2003-10-2 10:23:44

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.

icoming 发表于 2003-10-4 16:31:00

怎样在内核中编译usb驱动?

ritou 发表于 2003-10-5 03:55:40

怎样在内核中编译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]
查看完整版本: 在linux下使用优盘出错