Find the answer to your Linux question:
Results 1 to 9 of 9
Hello I need to access some data on an usb flash drive. So, I understand, that after plugging the pendrive in, I have to edit my fstab file. Here is ...
  1. #1
    Just Joined!
    Join Date
    Dec 2005
    Posts
    25

    usb pendrive sarge 3.1

    Hello I need to access some data on an usb flash drive.

    So, I understand, that after plugging the pendrive in, I have to edit my fstab file.
    Here is mine:

    # /etc/fstab: static file system information.
    #
    # <file system> <mount point> <type> <options> <dump> <pass>
    proc /proc proc defaults 0 0
    /dev/sda1 / reiserfs notail 0 1
    /dev/sda2 /home reiserfs defaults 0 2
    /dev/sda3 none swap sw 0 0
    /dev/hda /media/cdrom0 iso9660 ro,user,noauto 0 0
    /dev/hdb /media/cdrom1 iso9660 ro,user,noauto 0 0
    /dev/fd0 /media/floppy0 auto rw,user,noauto 0 0


    I'm not really sure what should be here.

    /dev/something /media/usb auto rw,user,noauto 0 0?

    What should I put in place of "something"?
    Than what do I do? I know I have to make a directory (/media/usb). What then?
    Thank you very much for your help

  2. #2
    Linux Engineer Nerderello's Avatar
    Join Date
    Apr 2003
    Location
    North East England
    Posts
    1,190
    try mounting it by hand:

    1) mkdir /media/USB_DISK
    2) mount /dev/sda1 /media/USB_DISK
    3) make a cup of tea or coffee

    have fun

    Nerderello

    Use Suse 10.1 and occasionally play with Kubuntu
    Also have Windows 98SE and BeOS

  3. #3
    Just Joined!
    Join Date
    Dec 2005
    Posts
    25
    Ok, but first I have to add a line in /etc/fstab?
    What device it should be?
    sda1 is my / directory on my sata hard drive.
    Thanks

  4. #4
    Linux Engineer Nerderello's Avatar
    Join Date
    Apr 2003
    Location
    North East England
    Posts
    1,190
    no. You only need to have stuff in fstab if you want the system to remember mounts thriugh re-boots.

    Try the steps I've given (make a mount point (only need to do once) and the mount the usb device).

    The reason I can't give you the line for fstab, is that I don't have one myself. The mounting is done on my two distro automagically.

    Nerderello

    Use Suse 10.1 and occasionally play with Kubuntu
    Also have Windows 98SE and BeOS

  5. #5
    Linux Guru Vergil83's Avatar
    Join Date
    Mar 2004
    Posts
    2,408
    Quote Originally Posted by gabriel_007
    Ok, but first I have to add a line in /etc/fstab?
    What device it should be?
    sda1 is my / directory on my sata hard drive.
    Thanks
    if the sata device is mounted, then it should be /dev/sda2
    Brilliant Mediocrity - Making Failure Look Good

  6. #6
    Just Joined! brother_mick's Avatar
    Join Date
    Jun 2005
    Location
    United Kingdom
    Posts
    65
    Quote Originally Posted by Vergil83
    if the sata device is mounted, then it should be /dev/sda2

    But looking at gabriel`s fstab shows that sda2 is the /home partition. Maybe mounting it as /dev/sda4 would do the trick ?

  7. #7
    Linux Guru Vergil83's Avatar
    Join Date
    Mar 2004
    Posts
    2,408

    Red face

    Quote Originally Posted by brother_mick
    But looking at gabriel`s fstab shows that sda2 is the /home partition. Maybe mounting it as /dev/sda4 would do the trick ?
    oops you are correct.... I should have looked harder at his fstab
    Brilliant Mediocrity - Making Failure Look Good

  8. #8
    Linux User
    Join Date
    Apr 2005
    Location
    Ohio
    Posts
    326
    tail -f /var/log/messages

    plug in the USB pen drive

    Watch for device name to appear on screen.

    itg-debian:/boot/grub# tail -f /var/log/messages
    Jan 20 16:46:04 localhost -- MARK --
    Jan 20 17:03:55 localhost kernel: usb 2-2: new full speed USB device using address 4
    Jan 20 17:03:56 localhost kernel: usb 2-2: new full speed USB device using address 5
    Jan 20 17:03:56 localhost kernel: scsi1 : SCSI emulation for USB Mass Storage devices
    Jan 20 17:03:56 localhost kernel: Vendor: SanDisk Model: Cruzer Titanium Rev: 2000
    Jan 20 17:03:56 localhost kernel: Type: Direct-Access ANSI SCSI revision: 02
    Jan 20 17:03:56 localhost kernel: SCSI device sda: 1014784 512-byte hdwr sectors (520 MB)
    Jan 20 17:03:56 localhost kernel: sda: assuming Write Enabled
    Jan 20 17:03:56 localhost kernel: /dev/scsi/host1/bus0/target0/lun0: p1
    Jan 20 17:03:56 localhost kernel: Attached scsi removable disk sda at scsi1, channel 0, id 0, lun 0
    Jan 20 17:03:56 localhost scsi.agent[387]: sd_mod: loaded sucessfully (for disk)
    Jan 20 17:03:57 localhost usb.agent[378]: usb-storage: already loaded
    so in my case I would add an entry in fstab for /dev/sda /mount/usbdrive
    far...out

  9. #9
    Linux Engineer Zelmo's Avatar
    Join Date
    Jan 2006
    Location
    Riverton, UT, USA
    Posts
    1,001
    Rather, it would probably be /dev/sdb1.
    Any references to /dev/sda* have to do with the first SCSI device, so /dev/sda4 is the fourth partition on the first SCSI or SATA drive. If there's another SCSI or SATA drive present, then it will be /dev/sdb (with partitions /dev/sdb1 and upward), and the USB pen drive will show up as /dev/sdc1 (as it does on my system).
    Otherwise, it'll show up as /dev/sdb1. You can access it by issuing the command
    Code:
    mount -t vfat /dev/sdb1 /media/USB_DISK
    (or whatever empty directory you want to use as a mount point)
    and then browsing to the mount point in your favorite file manager.

    You don't need the fstab entry unless you want to make it easier to mount, but if you're using KDE I recommend adding the appropriate line to fstab and putting the KwikDisk applet on your panel. Then when you plug in the USB drive, you can just pick it from the KwikDisk list to mount/unmount it.
    Gnome has a similar disk mounting applet for the panel, but it uses a separate icon for each disk, so it's not as pretty.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •