LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1011|回复: 3

UDEV的一些问题[为什么我的U盘的是uba1?,怎样控制自动加载选项?]

[复制链接]
发表于 2005-6-18 01:11:31 | 显示全部楼层 |阅读模式
如题,今天尝试udev,但是出现了一个怪现象:

  1. #tail /var/log/messages
  2. Jun 18 00:47:25 soros kernel: usb 3-2: new full speed USB device using uhci_hcd and address 5
  3. Jun 18 00:47:25 soros kernel: uba: device 5 capacity nsec 128000 bsize 512
  4. Jun 18 00:47:25 soros kernel: uba: device 5 capacity nsec 128000 bsize 512
  5. Jun 18 00:47:25 soros kernel:  /dev/ub/a: p1
  6. Jun 18 00:47:26 soros fstab-sync[11896]: added mount point /media/JACKIE for /dev/uba1
复制代码


  1. #fdisk /dev/uba1 -l

  2. Disk /dev/uba1: 65 MB, 65486848 bytes
  3. 255 heads, 63 sectors/track, 7 cylinders
  4. Units = cylinders of 16065 * 512 = 8225280 bytes

  5. This doesn't look like a partition table
  6. Probably you selected the wrong device.

  7.      Device Boot      Start         End      Blocks   Id  System
  8. /dev/uba1p1   ?       48437      119493   570754815+  72  Unknown
  9. Partition 1 has different physical/logical beginnings (non-Linux?):
  10.      phys=(357, 116, 40) logical=(48436, 183, 40)
  11. Partition 1 has different physical/logical endings:
  12.      phys=(357, 32, 45) logical=(119492, 104, 7)
  13. Partition 1 does not end on cylinder boundary.
  14. /dev/uba1p2   ?       10501      131013   968014120   65  Novell Netware 386
  15. Partition 2 has different physical/logical beginnings (non-Linux?):
  16.      phys=(288, 115, 43) logical=(10500, 111, 30)
  17. Partition 2 has different physical/logical endings:
  18.      phys=(367, 114, 50) logical=(131012, 158, 28)
  19. Partition 2 does not end on cylinder boundary.
  20. /dev/uba1p3   ?      116395      236907   968014096   79  Unknown
  21. Partition 3 has different physical/logical beginnings (non-Linux?):
  22.      phys=(366, 32, 33) logical=(116394, 188, 12)
  23. Partition 3 has different physical/logical endings:
  24.      phys=(357, 32, 43) logical=(236906, 234, 25)
  25. Partition 3 does not end on cylinder boundary.
  26. /dev/uba1p4   ?      179626      179629       27749+   d  Unknown
  27. Partition 4 has different physical/logical beginnings (non-Linux?):
  28.      phys=(372, 97, 50) logical=(179625, 87, 47)
  29. Partition 4 has different physical/logical endings:
  30.      phys=(0, 10, 0) logical=(179628, 203, 42)
  31. Partition 4 does not end on cylinder boundary.

  32. Partition table entries are not in disk order
复制代码


系统在配置文件/etc/fstab的后面自动加了一行:

  1. /dev/uba1               /media/JACKIE           vfat    user,exec,noauto,utf8,noatime,sync,managed 0 0
复制代码

执行:

  1. #mount /media/JACKIE
  2. mount: wrong fs type, bad option, bad superblock on /dev/uba1,
  3.        missing codepage or other error
  4.        In some cases useful info is found in syslog - try
  5.        dmesg | tail  or so
复制代码

得自己手动改/etc/fstab才行。
我没有把sd_mod编成模块,而是直接编进内核。这有关系吗?
谢谢先了!
发表于 2005-6-18 12:32:26 | 显示全部楼层
因为你的内核把这个编译进去了.
Device Drivers  ---> Block devices  ---><M> Low Performance USB Block driver   
建议你不要使用,因为使用了这个后有些 U 盘的读写速度可能会不正常.
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-6-18 13:09:06 | 显示全部楼层
是这个问题。重新编译了内核就正常了。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-6-18 21:32:44 | 显示全部楼层
另外一个问题:
系统在/etc/fstab的后面自动加了这么一行:

  1. /dev/uba1               /media/JACKIE           vfat    user,exec,noauto,utf8,noatime,sync,managed 0 0
复制代码

请问怎样自己控制系统自动加载的选项呢?比如说我想使系统在侦测到我有n个U盘或者其他USB设备插入时,系统能把诸如
  1. rw,users,gid=6,umask=007 ,iocharset=cp936,auto
复制代码

之类的语句加到/etc/fstab文件呢?又如如何控制挂载点呢?如何把加载点设置为/mnt/usb_devie-<其他能区分各个USB设备的信息,如厂商、serial No.等>呢?
能给些思路或者文档吗?谢谢了。
回复 支持 反对

使用道具 举报

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

本版积分规则

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