Linux - NewbieThis 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!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I was messing with my LMDE13 laptop and somehow lost the automount for an inserted usb stick. Now that I look at the fstab it looks like I won't be able to mount a cd either.
Here is my /etc/fstab file:
bill@bill-ThinkPad-R61 ~ $ cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
# / was on /dev/sda1 during installation
UUID=35da9417-8f3a-4a8d-9012-508e5483ca79 / ext4 errors=remount-ro 0 1
# swap was on /dev/sda5 during installation
UUID=403fff08-7b6b-43bd-a6ab-b581568ef2fe none swap sw 0 0
bill@bill-ThinkPad-R61 ~ $
It looks to me like I need to add a line for usb devices and a line for my CD/DVD drive.
What is the syntax for those lines? the usb is: /dev/sdb
bill@bill-ThinkPad-R61 /dev $ ls -l sd*
brw-rw---- 1 root disk 8, 0 Apr 28 19:04 sda ----sda is my harddrive
brw-rw---- 1 root disk 8, 1 Apr 28 19:04 sda1
brw-rw---- 1 root disk 8, 2 Apr 28 19:04 sda2
brw-rw---- 1 root disk 8, 5 Apr 28 19:04 sda5
brw-rw---- 1 root disk 8, 16 Apr 30 20:57 sdb
brw-rw---- 1 root disk 8, 17 Apr 30 20:57 sdb1
Dear Bill,
you don't say which flavour of Linux you are using.
But, in any case, I wouldn't expect a USB drive to appear under /mnt. Most linux distros would mount USBs and CDs under /media. I'm a noooby myself, so I can't dive into what the problem actually is. The /etc/fstab file is generally used for permanent mounts, anyway.
Also, I prefer the LABEL=<disc_label> method. If you have to reformat a drive, its UUID may well change, but you can always keep the LABEL the same, manually.
I'm using Ubuntu 12.10, and I find Disk Utility under Applications -> Accessories. There, you find the capability to mount and unmount volumes.
In my version of Linux, plugging in a USB device automatically brings up a Nautilus (file explorer) window, which tells me that the device has been detected, and where it has been mounted.
I've never used USB devices as part of my standard system, so that's as far as I can help.
But I would seriously consider using the LABEL= syntax, because if you keep your USB sticks organised, and labelled, you never have any hard work to do.
Best of luck, and do tell us how you get on with this.
Flos
Thank you for your reply. My version of linux is Linux Mint Debian 13 (LMDE 13). Until I broke the fstab (or whatever it was that I broke), a usb drive or cd would show up immediately as a file.
Now not only does a drive not open immediately, but I have not been able to mount the drive using the mount command. I thought that the fstab would have a reference of some sort for usb and cdrom, but I don't see one. So, I thought that the problem was caused by a broken fstab.
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680
Rep:
I don't think your problem will be fstab if you're using LMDE with a desktop environment -- I'm running Debian and I don't have any entries in fstab for my USB or DVD drive[s]* yet they show up in XFCE and are mountable from the places menu.
When you plug in a device do you see anything appear in your file manager?
*not completely true, there was an entry mounting /dev/sda1 as a USB device but I commented it out since /dev/sda is always an internal hard drive and the USB drive is generally /dev/sdi. This hasn't affected USB mounting in any way I just did it for "neatness".
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.