Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 03-30-2011, 11:30 PM   #1
LQ Newbie
Registered: Jan 2011
Location: Alabama
Posts: 25

Rep: Reputation: 0
Add flash drive to fstab file

I have Debian 5 XFCE currently installed on my old desktop. I cant open my flash drive, it doesnt pop up on the desktop, nor is it in the file manager. I read that you can add it to the fstab list but I dont know how to do it.

My flash drive shows up as sda1 in lsusb.

I would really appreciate it if you guys could help me get my flash drives working, thats how I install packages.

Old 03-31-2011, 12:04 AM   #2
LQ Addict
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
If it shows up in lsusb, it probably also is in the file manager, but you may be looking in the wrong place.

Plug the stick in, then open a terminal and run: less /etc/mtab. The stick should should show as /dev/sda1 and its mount point. Mine looks like this: /dev/sdc1 /media/disk-1 ext3 rw,nosuid,nodev,data=ordered 0 0

So, in my file manager, the place to look is /media/disk-1.

Try it. see what happens.
Old 03-31-2011, 05:19 PM   #3
LQ Newbie
Registered: Jan 2011
Location: Alabama
Posts: 25

Original Poster
Rep: Reputation: 0
When I type in less /etc/mtab it gives me:
/dev/hda1 / ext3 rw,errors=remount-ro 0 0
which is my main hd. It has some other stuff, but nothing to do with flash drives or that sort.

Is there an easier way than fstab?

EDIT: oh, and when I look in the media folder, it has folders cdrom, cdrom0, floppy, floppy0, and test.
EDIT 2: does the same thing with cd-rom drive

Last edited by Gam3r21; 03-31-2011 at 05:28 PM.
Old 03-31-2011, 05:55 PM   #4
LQ Veteran
Registered: Jul 2006
Location: London
Distribution: CentOS, Xubuntu
Posts: 5,108

Rep: Reputation: 1706Reputation: 1706Reputation: 1706Reputation: 1706Reputation: 1706Reputation: 1706Reputation: 1706Reputation: 1706Reputation: 1706Reputation: 1706Reputation: 1706
Try running the command mount before and after inserting the flash memory, and see what's added.

I made the directory /media/usb and added this line to /etc/fstab
/dev/sdb1 /media/usb ext2 noauto,noatime,users 0 0
Obviously your device is different and your filing system won't be ext2 unless you reformated.
Old 03-31-2011, 06:45 PM   #5
Larry Webb
LQ Veteran
Registered: Jul 2006
Location: Crystal Beach, Texas
Distribution: Suse for mail +
Posts: 5,100
Blog Entries: 7

Rep: Reputation: 229Reputation: 229Reputation: 229
Plug in your flash drive

From terminal as root

mkdir /mnt/usbmedia

mount /dev/sda1 /mnt/usbmedia

Now you can see your files by typing

ls /mnt/usbmedia

or by opening your file manager.

Now when you reboot you will loose this and you will have to make an entry in fstab. As mentioned above post in order to help with fstab need to know file system but with what was given you can figure it out we hope.

Last edited by Larry Webb; 03-31-2011 at 06:47 PM.
Old 03-31-2011, 06:49 PM   #6
LQ Newbie
Registered: Jan 2011
Location: Alabama
Posts: 25

Original Poster
Rep: Reputation: 0
I understand what your saying david.
When I'm in the media folder and I right click and try to create a new folder it wont let me. I can't select it.

I'm sorry for being a Linux noob, but I just want to get this working.
Old 03-31-2011, 07:09 PM   #7
LQ Newbie
Registered: Jan 2011
Location: Alabama
Posts: 25

Original Poster
Rep: Reputation: 0
When I try to save the changes to fstab it says "Can't open file to write". Yet I have it opened.

I think its time for a distro switch. Debain was my first linux experience and it was horrible, I have tried Debian 6 XFCE and LXDE, and Debian 5 XFCE. They all have problems with my system!!!

Are there any other distros that will run WELL on my specs (second one in the sig)?
Old 03-31-2011, 07:28 PM   #8
Registered: Nov 2005
Distribution: CentOS 5, Fedora 23
Posts: 216

Rep: Reputation: 29
You have to open fstab as root if you want to make changes
Old 03-31-2011, 08:27 PM   #9
LQ Guru
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Debian, Mageia, and whatever VMs I happen to be playing with
Posts: 14,179
Blog Entries: 24

Rep: Reputation: 3836Reputation: 3836Reputation: 3836Reputation: 3836Reputation: 3836Reputation: 3836Reputation: 3836Reputation: 3836Reputation: 3836Reputation: 3836Reputation: 3836
Here's my own blow-by-blow of adding my podplayer to /etc/fstab in Slackware Linux 10.2.
Old 04-01-2011, 12:51 AM   #10
LQ Newbie
Registered: Mar 2011
Distribution: Debian
Posts: 3

Rep: Reputation: 0
run these commands in terminal (replace mousepad with your favorite editor)
sudo mkdir -p /media/usb0
sudo mousepad /etc/fstab
append following line
/dev/sda1       /media/usb0     auto    rw,user,noauto  0       0
save document and exit.
then run this command
mount /dev/sda1
and you drive should be mounted at /media/usb0
Old 04-01-2011, 01:03 AM   #11
Registered: Apr 2009
Distribution: debian gnu/linux
Posts: 798

Rep: Reputation: Disabled
Debian xfce4:
click on the menu
click on settings
click on file manager -> advanced -> enable "volume management"
If that doesn't help, after clicking on settings:
click on "Removable media and devices"
click on "automount removable devices when hot-plugged"

I am not sure if that is valid for all xfce-versions of Debian. I am using Sid.
I would say it is valid, but am not sure.

You might want to have a look here:
Old 04-01-2011, 02:10 AM   #12
LQ Addict
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
You should write udev rules for the device, because it might not always be /dev/sda (for example). Then, you could use a name like /dev/flash in your fstab (and /dev/flash would be a symbolic link to the correct device, whether it's /dev/sda or something else). Have a look at this for an idea about what udev is about. The commands have changed a bit now (i.e. that document is somewhat out of date), but the concepts will be the same.

Last edited by Nylex; 04-01-2011 at 02:11 AM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to mount network ntfs drive on linux server and add it on FSTAB rahilmaknojia Linux - Newbie 9 01-28-2011 02:24 AM
flash drive mount file issue j-osh Ubuntu 2 04-21-2010 10:44 PM
USB Flash Drive, write protect, and flash file system questions storkus Linux - Hardware 4 12-01-2008 05:32 AM
What's package daemon that add to /etc/fstab when you add USB sticks frenchn00b Linux - General 3 01-20-2008 09:30 PM
LXer: EDGE Tech Corp Announces Portable Flash Drive With Muscle - the New 8GB DiskGO!(TM) Now Available; Swap and Go With This Secure Thumb-Sized Flash Drive LXer Syndicated Linux News 0 12-14-2005 03:16 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:20 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration