QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 475|回复: 4

在linux下使用优盘出错

[复制链接]
发表于 2003-10-1 10:33:32 | 显示全部楼层 |阅读模式
我想在内核中加入模块,结果
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
那我该怎么使用优盘?
发表于 2003-10-1 17:49:47 | 显示全部楼层
fdisk -l看看有没有优盘的信息,(一般都是/dev/sda)有的话
mkdir /mnt/usb
mount -t vfat /dev/sda /mnt/usb
那个/dev/sdax的x一般在移动硬盘中会有,一般移动硬盘才会分区嘛。
回复

使用道具 举报

发表于 2003-10-2 10:23:44 | 显示全部楼层

Re: 在linux下使用优盘出错

[quote:b5f81d9e0b="icoming"]我想在内核中加入模块,结果
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
那我该怎么使用优盘?[/quote]
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.
回复

使用道具 举报

 楼主| 发表于 2003-10-4 16:31:00 | 显示全部楼层
怎样在内核中编译usb驱动?
回复

使用道具 举报

发表于 2003-10-5 03:55:40 | 显示全部楼层
[quote:1199c9dedb="icoming"]怎样在内核中编译usb驱动?[/quote]
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.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-10-1 03:31 , Processed in 0.039095 second(s), 16 queries .

© 2021 Powered by Discuz! X3.5.

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