LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 04-30-2013, 08:32 PM   #1
billstowell
LQ Newbie
 
Registered: Dec 2006
Posts: 3

Rep: Reputation: 0
broke fstab somehow


Any help with this problem would be appreciated.

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



the cd is: /dev/cdrom

bill@bill-ThinkPad-R61 /dev $ ls -l cd*

lrwxrwxrwx 1 root root 3 Apr 28 19:04 cdrom -> sr0
lrwxrwxrwx 1 root root 3 Apr 28 19:04 cdrw -> sr0

bill@bill-ThinkPad-R61 /dev $

Did I somehow erase part of my fstab? and if I did, how can I fix it?

thanks

Bill Stowell
 
Old 04-30-2013, 09:17 PM   #2
flos
Member
 
Registered: Feb 2009
Location: Shropshire, UK
Distribution: Mint
Posts: 30

Rep: Reputation: 2
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
 
Old 05-01-2013, 08:18 AM   #3
billstowell
LQ Newbie
 
Registered: Dec 2006
Posts: 3

Original Poster
Rep: Reputation: 0
re broke fstab somehow

Hi Fios,

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.

Any thoughts are appreciated

Bill
 
Old 05-01-2013, 09:30 AM   #4
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
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".
 
  


Reply



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
Oops...I broke fstab on Centos 5.3 jedispy Fedora 6 11-12-2009 12:30 AM
Suse won't boot after fstab changes - fstab not editable baking-a-77 Linux - Newbie 10 06-02-2007 10:51 AM
fstab problem: mount: can't find dvd in /etc/fstab or /etc/mtab Nikon01 Slackware 5 11-17-2006 06:15 AM
(version 5.1 chapter 08 fstab) vs (man fstab) rgiggs Linux From Scratch 2 06-03-2004 05:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:39 PM.

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