LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices

Reply
 
Search this Thread
Old 09-14-2012, 07:16 AM   #1
CollieJim
Member
 
Registered: Mar 2005
Distribution: Gentoo, Kubuntu
Posts: 434

Rep: Reputation: 19
mount fails for user but works for root


I have my periodicals library on an SD card formatted as ext2. It has a single partition labeled LIBRARY. If I try to mount it as user, I get
Code:
370 19:37:19 ~ $ mount /mnt/Library/
mount: wrong fs type, bad option, bad superblock on /dev/sdc1,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so
However, if I 'mount <device> <mount-point>' as root, it works.
/etc/fstab contains:
Code:
LABEL=LIBRARY            /mnt/Library ext2   user,auto,exec,dev,suid,rw,umask=000    0 0
Code:
503 19:45:42 / # e2label /dev/sdc1
LIBRARY
dmesg | tail yields:
Code:
[19583.208998] sd 7:0:0:0: Attached scsi generic sg2 type 0
[19583.870056] sd 7:0:0:0: [sdc] 7744512 512-byte logical blocks: (3.96 GB/3.69 GiB)
[19583.870926] sd 7:0:0:0: [sdc] Write Protect is off
[19583.870939] sd 7:0:0:0: [sdc] Mode Sense: 03 00 00 00
[19583.872452] sd 7:0:0:0: [sdc] No Caching mode page present
[19583.872459] sd 7:0:0:0: [sdc] Assuming drive cache: write through
[19583.877301] sd 7:0:0:0: [sdc] No Caching mode page present
[19583.877309] sd 7:0:0:0: [sdc] Assuming drive cache: write through
[19583.913224]  sdc: sdc1
[19583.917782] sd 7:0:0:0: [sdc] No Caching mode page present
[19583.917790] sd 7:0:0:0: [sdc] Assuming drive cache: write through
[19583.917798] sd 7:0:0:0: [sdc] Attached SCSI removable disk
[19600.586332] FAT-fs (sdc1): bogus number of reserved sectors
[19600.586341] FAT-fs (sdc1): Can't find a valid FAT filesystem
[19771.145126] FAT-fs (sdc1): bogus number of reserved sectors
[19771.145135] FAT-fs (sdc1): Can't find a valid FAT filesystem
[19970.484559] EXT2-fs (sdc1): warning: mounting unchecked fs, running e2fsck is recommended
On successful mount, /etc/mtab has:
Code:
/dev/sdc1 /mnt/Library ext2 rw 0 0
When /etc/fstab and the card are consistent, why is the system trying to mount it as FAT-fs?????

Puzzled
Jim
 
Old 09-14-2012, 07:28 AM   #2
414N
Member
 
Registered: Sep 2011
Location: Italy
Distribution: Slackware
Posts: 609

Rep: Reputation: 180Reputation: 180
Quote:
Originally Posted by CollieJim View Post
Code:
[
[19600.586332] FAT-fs (sdc1): bogus number of reserved sectors
[19600.586341] FAT-fs (sdc1): Can't find a valid FAT filesystem
[19771.145126] FAT-fs (sdc1): bogus number of reserved sectors
[19771.145135] FAT-fs (sdc1): Can't find a valid FAT filesystem
[19970.484559] EXT2-fs (sdc1): warning: mounting unchecked fs, running e2fsck is recommended
Guess what I would do prior to mounting it...
 
Old 09-14-2012, 08:11 AM   #3
CollieJim
Member
 
Registered: Mar 2005
Distribution: Gentoo, Kubuntu
Posts: 434

Original Poster
Rep: Reputation: 19
No change.
Code:
504 21:06:09 / # e2fsck /dev/sdc1
e2fsck 1.42 (29-Nov-2011)
LIBRARY was not cleanly unmounted, check forced.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
LIBRARY: 1650/241920 files (1.1% non-contiguous), 506484/967040 blocks
505 21:06:37 / #
The mount still fails.
 
Old 09-14-2012, 08:17 AM   #4
414N
Member
 
Registered: Sep 2011
Location: Italy
Distribution: Slackware
Posts: 609

Rep: Reputation: 180Reputation: 180
Code:
fdisk -l /dev/sdc
?
 
Old 09-14-2012, 08:25 AM   #5
CollieJim
Member
 
Registered: Mar 2005
Distribution: Gentoo, Kubuntu
Posts: 434

Original Poster
Rep: Reputation: 19
Bingo!
Code:
505 21:06:37 / # fdisk -l /dev/sdc

Disk /dev/sdc: 3965 MB, 3965190144 bytes
19 heads, 48 sectors/track, 8491 cylinders, total 7744512 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xbf9bbf9b

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1   *        8192     7744511     3868160    b  W95 FAT32
506 21:21:04 / #
Next question: When I formatted the partition as ext2, why was "W95 FAT32" not changed?
Original question: Why does mount work for root but not user?

Last edited by CollieJim; 09-14-2012 at 08:27 AM.
 
Old 09-14-2012, 08:34 AM   #6
414N
Member
 
Registered: Sep 2011
Location: Italy
Distribution: Slackware
Posts: 609

Rep: Reputation: 180Reputation: 180
Next answer: because Linux doesn't care about the type of partition reported in fdisk; instead, it looks at the partitions themselves to look their type. Some other OS (I think it starts with a W ) only look at that. You can fix that using fdisk on /dev/sdc (change a partition system id).
Original answer: I don't know... BTW, the umask option in your fstab file is useless with an ext2 mount (it's used on vfat and ntfs mounts).

Last edited by 414N; 09-14-2012 at 08:35 AM.
 
  


Reply


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
RPM search as user fails and works with root user kais1 Linux - Newbie 7 09-02-2012 06:22 PM
mysql connect remote as root works, user fails sir-lancealot Linux - Server 2 02-29-2012 09:50 AM
LDAP Authentication Fails for Non-Root, but works for root ludwig Linux - Server 2 08-16-2008 05:53 PM
help please: mount -t smbfs -a fails as normal user, as root, doesn't mount anything thevic Linux - Networking 11 04-09-2007 03:09 AM
patched mount source. works but i must be root to mount !!!??? qwijibow Linux - Software 2 01-29-2004 06:59 AM


All times are GMT -5. The time now is 07:09 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration