个人工具

“UbuntuHelp:UsbFlashDrives”的版本间的差异

来自Ubuntu中文

跳转至: 导航, 搜索
(New page: {{From|https://help.ubuntu.com/community/UsbFlashDrives}} {{Languages|php5}} This page explains how to use USB flash drives - USB sticks and other USB storage devices - with Ubuntu. == In...)
 
第34行: 第34行:
 
<pre><nowiki>
 
<pre><nowiki>
 
dmesg
 
dmesg
</nowiki></code>
+
</nowiki></pre>
 
Check the latest message, they should be related to your problem.
 
Check the latest message, they should be related to your problem.
  
第42行: 第42行:
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo rmmod ehci_hcd
 
sudo rmmod ehci_hcd
</nowiki></code>
+
</nowiki></pre>
 
before pluging your device.
 
before pluging your device.
  
第51行: 第51行:
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo sh -c "echo 120 > /sys/block/sda/queue/max_sectors_kb"
 
sudo sh -c "echo 120 > /sys/block/sda/queue/max_sectors_kb"
</nowiki></code>
+
</nowiki></pre>
  
 
Try values of 120, 64 and 32.
 
Try values of 120, 64 and 32.
第63行: 第63行:
 
             US_SC_DEVICE, US_PR_DEVICE, NULL,
 
             US_SC_DEVICE, US_PR_DEVICE, NULL,
 
             US_FL_IGNORE_RESIDUE),
 
             US_FL_IGNORE_RESIDUE),
</nowiki></code>
+
</nowiki></pre>
  
 
The vendor and device ID's can be obtained from the output of "lsusb". The entry would be placed in drivers/usb/storage/unusual_devs.h. If you cannot compile your own kernel, please file a bug report, and we'll attempt to compile a test module for you.
 
The vendor and device ID's can be obtained from the output of "lsusb". The entry would be placed in drivers/usb/storage/unusual_devs.h. If you cannot compile your own kernel, please file a bug report, and we'll attempt to compile a test module for you.
第75行: 第75行:
 
[17183798.908000]    fat_get_cluster: invalid cluster chain (i_pos 0)
 
[17183798.908000]    fat_get_cluster: invalid cluster chain (i_pos 0)
 
[17183798.908000]    File system has been set read-only
 
[17183798.908000]    File system has been set read-only
</nowiki></code>
+
</nowiki></pre>
  
 
This might be the sign of an unclean device.
 
This might be the sign of an unclean device.

2007年5月13日 (日) 12:46的版本

This page explains how to use USB flash drives - USB sticks and other USB storage devices - with Ubuntu.

Introduction

USB storage devices have the enormous advantage that for the most part they use a standard set of protocols. Thus, instead of needing individual drivers, as does much computer hardware, a standard driver permits access to the devices, making them very portable and able to easily work on many platforms.

Use

Mounting your USB drive

Generally all you need to do to use your storage device is to plug it into a USB port. The device should be automatically recognised and appear on your GNOME desktop.

Open Questions (perhaps someone can answer this?): How does the GNOME desktop mount the USB device? Is hotplug involved? Can the user influence the mount point? what services do this? Where are their config files?

Unmounting/Ejecting your USB drive

This is an important thing to do. When you have finished using your storage device, you must right click on it's icon and select eject before unplugging it. This ensures that any files being written to the device are permanently saved and informs any programs that may be using files on the device.

More

Troubleshooting

As always, there is exceptions to the rules, and you might encounter some problems to mount your USB device. We present here some common problems you could encounter (if you know others, please share them here. Thanks)

General tip

When you encounter problems with an USB device, the first thing to do is to check the latest debug information from the kernel just after you plug your device and/or just after you encounter a problem. To do that, open a terminal and type :

dmesg

Check the latest message, they should be related to your problem.

USB 2 Issues

If you encounter problems using your USB device with USB 2 (i.e. 'high speed' mode), you can revert to the 'full speed' mode (slower) by unloading ehci_hcd. To do that, type in a terminal :

sudo rmmod ehci_hcd

before pluging your device.

Buffer I/O Errors

If you see errors related to Buffer I/O when attaching a USB Storage device, there are two ways to work around it. First, try using varying max_sectors settings, as such:

sudo sh -c "echo 120 > /sys/block/sda/queue/max_sectors_kb"

Try values of 120, 64 and 32.

If this does not resolve the issue, then you may need an unusual_dev entry for your device. It would look something like this:

UNUSUAL_DEV(0x03eb , 0x2002, 0x0100, 0x9999,
            "Generic",
            "MusicDrive",
            US_SC_DEVICE, US_PR_DEVICE, NULL,
            US_FL_IGNORE_RESIDUE),

The vendor and device ID's can be obtained from the output of "lsusb". The entry would be placed in drivers/usb/storage/unusual_devs.h. If you cannot compile your own kernel, please file a bug report, and we'll attempt to compile a test module for you.

Device become suddenly read only

If your device change suddenly to read only mode, and you see that kind of error:

[17183798.908000] FAT: Filesystem panic (dev sda1)
[17183798.908000]     fat_get_cluster: invalid cluster chain (i_pos 0)
[17183798.908000]     File system has been set read-only

This might be the sign of an unclean device. You should check your device. Try TestingStorageMedia to do so.



CategoryHardware