Click to See Complete Forum and Search --> : What did I do incorrectly with /etc/fstab??
Floog
08-22-2001, 11:37 AM
I cannot mount my floppy drive or my cdrom.
I can't figure out what I have done incorrectly with /etc/fstab. Here's a copy of the file:
/dev/hda1 swap swap defaults 0 0
/dev/hda2 / reiserfs defaults 1 1
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
/dev/fd0 /mnt/floppy vfat noauto,exec,nouser,rw 0 0
/dev/hdb /mnt/cdrom iso9660 noauto,exec,nouser,ro 0 0
I have tried "mount /dev/fd0" and "mount /mnt/floppy" but no-go. Same thing for the cdrom-- "mount /dev/hdb" and "mount /mnt/cdrom".
I have also tried to simple "mount" command and then cd /mnt/floppy or /mnt/cdrom.
I am using Slackware 8.0. So far, I really like this distro.; however, my persistant newbie-ness prevents me from getting past the simple stuff and on to linux greatness. Thank you for your time and patience.
Mike
ds801
08-22-2001, 12:21 PM
The entry "nouser" means that only root can mount the drives.
Also, AFAIK, you still have to use the full mount command, even for drives that are listed in /etc/fstab. So, to mount the floppy you'd type:
mount /dev/fd0 /mnt/floppy [enter]
Try that as root and see if you can mount the drive.
mcmanus69
08-22-2001, 12:47 PM
try this: <mnt device> <mnt point> <file system> noauto,user,exec 0 0
noauto means it's not loaded automatically at boot-up.
user means users can mount/unmount
exec means you can execute programs from that device
user MUST come before exec. You can't give a user the ability to execute if you haven't specified whether or not users can even mount it. =)
And to clarify, you do hafta specify the mount point, but byou don't need to specify the device if you have fstab setup properly. I know this is true in Mandrake and SuSE, but since I haven't gotten Slack to work on my other system, I won't say this is true for all distros (although I'm thinking it is).
just "mount /mnt/cdrom" should work or "mount /mnt/floppy"
cperry42975
08-22-2001, 01:01 PM
User this for Slack 8 and it will work fine
/dev/fd0 /mnt/floppy vfat defaults 0 0
/dev/cdrom /cdrom iso9660 ro 0 0
unless you made a directory to mount cdrom under /mnt
cperry42975
08-22-2001, 01:03 PM
one more thing, dont forget to hit enter after you type the last line or Slack will persistently tell you "no final newline in fstab" every time you mount
cperry42975
08-22-2001, 01:08 PM
Oh yeah let me clarify 1 moe thing, By default if you dont create another directory for the floppy you will need to use just
/mnt for mount point rather than /mnt/floppy
Choozo
08-22-2001, 01:49 PM
Originally posted by cperry42975:
<STRONG>one more thing, dont forget to hit enter after you type the last line or Slack will persistently tell you "no final newline in fstab" every time you mount</STRONG>
That must be if you are using emacs when editing?
As far as I know, vi/vim adds a newline by default when you save the file.
You can verify this by editing a testfile in 'vi': add just one line/word without hitting enter after the last word in the testdoc, and save it. Then do a Octal Dump 'od' of the file like this:
$ od -cb testfile
which will return:
0000000 o n e l i n e \n
157 156 145 040 154 151 156 145 012
0000011
Notice the \n (character #012) at the end here.
Cheers :)
cperry42975
08-22-2001, 02:13 PM
That must be if you are using emacs when editing?
As far as I know, vi/vim adds a newline by default when you save the file.
I tested that and you are correct if I use vim it does insert the final newline.
But I cant help it, I like joe and Im not ashamed to admit it!
Floog
08-22-2001, 03:00 PM
Woohoo! Thanks for all your responses. I'm checking in while at work so I must be brief, but big thanks for your time and thought.
I will give these suggestions a try and see if I can make it work. It sounds like I'm very close, just a few fine points to clean up.
Best regards.
Mike