Difference between revisions of "USB storage devices (Italiano)"

From ArchWiki
Jump to: navigation, search
(Mounting USB memory)
(Scaricare un Kernel che supporti l'usb storage)
Line 12: Line 12:
 
==Scaricare un Kernel che supporti l'usb storage==
 
==Scaricare un Kernel che supporti l'usb storage==
  
If you do not use a custom-made kernel, you are ready to go, for all Arch Linux stock kernels are properly configured. If you do use a custom-made kernel, ensure it is compiled with SCSI-Support, SCSI-Disk-Support and usb_storage. If you use the latest [[udev]], you may just plug your device in and the system will automatically load all necessary kernel modules. Older releases of udev would need [[HotPlug|hotplug]] installed too. Otherwise, you can do the same thing manually:
+
Se non utilizzate un kernel realizzato ad-hox da voi stessti, avete già tutto l'occorrente poichè i kernel standard di Arch Linux sono già correttamente configurati. Se invece utilizzate un vostro kernel, assicuratevi che sia stato compilato con il supporto SCSI, SCSI-Disk-Support e usb_storage. Se usate l'ultima versione di [[udev]], sarà necessario solamente collegare la periferica alla porta USB, e il sistema caricherà automaticamente tutti i moduli del kernel necessari. Le versioni più vecchie di udev potrebbero necessitare anche dell'installazione di [[HotPlug|hotplug]]o in alternativa, potreste caricare manualmente il modulo:
 
+
 
<pre>
 
<pre>
 
# modprobe usb-storage
 
# modprobe usb-storage
# modprobe sd_mod      (only for non SCSI kernels)
+
# modprobe sd_mod      (solo per kernel non-SCSI)
 
</pre>
 
</pre>
  

Revision as of 12:53, 11 August 2008

Tango-preferences-desktop-locale.pngThis article or section needs to be translated.Tango-preferences-desktop-locale.png

Notes: please use the first argument of the template to provide more detailed indications. (Discuss in Talk:USB storage devices (Italiano)#)
Template:I18n links start

Template:I18n entry Template:I18n entry Template:I18n entry Template:I18n links end

Questo documento mostra come utilizzare le memory stick USB con Linux. In ogni caso, funziona anche per altre periferiche, come le macchine digitali che agiscono come se fossero periferiche di archiviazione USB

Scaricare un Kernel che supporti l'usb storage

Se non utilizzate un kernel realizzato ad-hox da voi stessti, avete già tutto l'occorrente poichè i kernel standard di Arch Linux sono già correttamente configurati. Se invece utilizzate un vostro kernel, assicuratevi che sia stato compilato con il supporto SCSI, SCSI-Disk-Support e usb_storage. Se usate l'ultima versione di udev, sarà necessario solamente collegare la periferica alla porta USB, e il sistema caricherà automaticamente tutti i moduli del kernel necessari. Le versioni più vecchie di udev potrebbero necessitare anche dell'installazione di hotplugo in alternativa, potreste caricare manualmente il modulo:

# modprobe usb-storage
# modprobe sd_mod      (solo per kernel non-SCSI)

Mounting USB memory

After inserting the stick you can mount the device as root with

# mount -t vfat /dev/sda1 /mnt/usbstick

Note: /dev/sda1 is variable. If your hard drive is assigned to /dev/sda1, you'll probably use /dev/sdb1 instead. To find out for sure where your USB device is, search dmesg for /dev/sd*. Use lsusb to verify that your USB device is indeed recognized by the system, if there is an error.

The -t flag specifies the filesystem type. If the device is formatted as fat32 then use the vfat parameter. By default an sdx device is assumed to be formated as fat32, so this option may be omitted.

Note: the directory you mount the stick into must exist before you issue the mount command.

If you use KDE or GNOME, they should show you the inserted device right on your desktop so you don't need to mount it manually.

Note: If you get an error message "Error org.freedesktop.DBus.Error.AccessDenied.", try adding your user account to the 'storage' group.

Repartitioning the USB memory

Sometimes the stick is separated in up to four partitions, and Linux can't read anything. To fix this you have to repartition the stick with fdisk. Make sure that there are no files left on the stick (if you used it before in Windows, Mac OS or anywhere else). Type:

# modprobe usb_storage
# fdisk /dev/sda

Delete all available partitions (d and partition number), create a new partition with n (I would suggest you use a single partition), press q to write everything and quit.

Create a filesystem on the stick:

# mkfs.vfat /dev/sda1

If you do not have mkfs.vfat on your system then use pacman to install dosfstools:

# pacman -Sy dosfstools

Now you can mount or unmount it as mentioned above.

Mounting the USB stick as normal user

If you want non-root users to be able to mount a USB memory stick, add the following line to your /etc/fstab file:

/dev/sda1 /mnt/usbstick vfat noauto,user 0 0