[wellylug] USB flash disk

Brenda O'Hagan brenda at wallace.net.nz
Mon Nov 29 09:15:51 NZDT 2004


you'll need to find out where the flash card appears on your scssi..
install a package called " sg3-utils"

then, as root, run 
	sg_scan -i
you shoudl get a response that looks like this
/dev/sg0: scsi0 channel=0 id=0 lun=0 [em]
    eUSB      Secure Digital   [rmb=1 cmdq=0 pqual=0 pdev=0x0]

that tells me my SD card reader is on /dev/sg0
next i need to find out where that maps to, using the command 
	sg_map"
the reponse on my system is
# Note: the devfs pseudo file system is present
/dev/sg0  /dev/sda

so, my flash card is @ /dev/sda

next, make a place on your filesystem to mount this card, i recommend 
something like /mnt/flash
	 mkdir /mnt/flash

some devices use the unpartitioned space in /dev/sda and others will make a 
partition on the drive as /dev/sda1. - so this will change depending on which 
device you formatted the card in last.
then you can either mount it from the commandline everytime you want it , or 
if you only have one card you can add an entry to your /etc/fstab to record 
the settings for mounting your flash card.
the line to add in fstab is

/dev/sda  /mnt/flash   auto   defaults,user,noauto   0 0


or if your card is partitioned:


/dev/sda1   /mnt/flash   auto   defaults,user,noauto   0 0

On Monday 29 November 2004 07:31, Jethro Carr wrote:
> On Mon, 2004-11-29 at 12:01, Steven Mulvay wrote:
> > Hi all, how are you?
> > How do I mount a usb flash disk under Linux? Will I need to obtain a
> > driver for it first? How do I know what each of my usb ports are named
> > as on my system? (eg what should I write for the /dev/ section of the
> > mount command) Unfortunately my ability to solve many problems hinges
> > on whether or not I can successfully mount and write to a flash disk.
> > Thank you very much for your time.
>
> okay,
>
> depending on your distro, the usb ports will probery be something like
> /dev/usb0 or /dev/usb1.
>
> To mount it manually, you can run (as root):
> ---------------------------
> (create the directory to be mounted to (only needed to be done once):
> mkdir -p /mnt/usbdrive)
> (mount the drive):
> mount /dev/usb0 /mnt/usbdrive
> ----------------------
>
> The drive can then be accessed in /mnt/usbdrive.
>
>
> Once you find the working usb device, if you would like to make it so
> that any user can mount the drive, add these lines to the end of
> /etc/fstab:
> ---------
>
> # usb drive
> /dev/usb0  /mnt/usbdrive   auto  noauto,user   0  0
>
> ---------
>
> This will cause the drive to be able to be mounted by any user, via
> command line or gui (gnome/kde). It will auto detect the filesystem on
> the drive, so there is no problem there.
>
>
> --
> -- Jethro
>
> dodocaptain at paradise.net.nz
> jethro.carr at jedolinux.com
>
> http://www.jedolinux.com
> http://homepages.paradise.net.nz/jethroc
> http://homepages.paradise.net.nz/jethroc/cv.html
>
> http://www.wellylug.org.nz

-- 
random quote:
* shortc wants to get in one of knghtbrd's sigs one of these days.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.wellylug.org.nz/pipermail/wellylug/attachments/20041129/3ad95078/attachment.pgp 


More information about the wellylug mailing list