LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 05-01-2007, 11:49 PM   #1
gawdin
LQ Newbie
 
Registered: Mar 2007
Location: Ohio, United States of America
Distribution: Suse Linux Enterprise 10 server and desktop; Suse Linux 10
Posts: 23

Rep: Reputation: 15
mounting issues


I have two computers running SUSE Linux 10 (one is 10.1 the other is enterprise desktop 10)

SL 10.1= external devices appear on Gnome desktop but wont mount with the error /dev/sda1 found in /etc/fstab and wont let me view contents

SLED 10=doesn't see the device at all

any ideas how to fix this?
thanks for any help
 
Old 05-02-2007, 12:05 AM   #2
Sting2001
LQ Newbie
 
Registered: Jul 2005
Location: Oakland the War Zone
Distribution: Debian/SuSE/DeadHat
Posts: 6

Rep: Reputation: 0
Mounting storage

Hi

You need to be root or authorized group user to change /etc/fstab or to mount a volume. Make sure "user" option is in the /dev/sda1. If this is flash storage as I suspect have a look at the dmesg output after you plug in the flash drive. The automounting of flash memory is imperfect at best and you may need to unmount the storage from the command line to avoid corruption and data loss. Otherwise read the man page for mount and resubmit to [opensuse] list.

Have fun,

Stephen
 
Old 05-02-2007, 09:31 PM   #3
gawdin
LQ Newbie
 
Registered: Mar 2007
Location: Ohio, United States of America
Distribution: Suse Linux Enterprise 10 server and desktop; Suse Linux 10
Posts: 23

Original Poster
Rep: Reputation: 15
how do I add a make it so I can edit fstab? or how do I get it so that my flash memory auto mounts? I don't know anything really about linux yet and I would be thankful for any help.
 
Old 05-02-2007, 09:38 PM   #4
jludwig
Member
 
Registered: Feb 2004
Distribution: FC6
Posts: 32

Rep: Reputation: 15
I don't use flash memory, but, with the new udev?? setup when you edit fstab you need to make it immutable so it is not overwritten the next time you reboot.

From the command line, as root;
[root@localhost ~]# chattr +i /etc/fstab
 
Old 05-02-2007, 09:55 PM   #5
gawdin
LQ Newbie
 
Registered: Mar 2007
Location: Ohio, United States of America
Distribution: Suse Linux Enterprise 10 server and desktop; Suse Linux 10
Posts: 23

Original Poster
Rep: Reputation: 15
um that made no sense, I am sorry.

what I want I think is to know how to edit fstab to automount but I need root privs to do so and I don't know how to give my user prof the access to edit it
 
Old 05-02-2007, 10:23 PM   #6
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
You could use the "halmount" program as a normal user to try to mount the device.

I don't remember if SuSE 10.0 is much different. On SuSE 10.2, if the drive has an entry in /etc/fstab, then udev should honor it. You do want to write your /etc/fstab entry so that you can mount the drive even if you are assigned a different device the next time you plug it in.

You could use the UUID number in the /etc/fstab entry. To find that out, I would recommend using the "udevinfo" program. I will use an external drive on my machine to walk you though the process with a real example:
Code:
udevinfo -q env -n /dev/sdb2
ID_SERIAL=0090a99200000270:1:1
ID_BUS=ieee1394
ID_PATH=pci-0000:02:00.0-ieee1394-0x0090a99200000270:1:1
ID_FS_USAGE=filesystem
ID_FS_TYPE=ext3
ID_FS_VERSION=1.0
ID_FS_UUID=3da4cc2e-80bd-4c03-94e8-fe25e4b64178
ID_FS_LABEL=
ID_FS_LABEL_SAFE=
Now add an entry in /etc/fstab using the UUID instead of the device:
Code:
UUID=3da4cc2e-80bd-4c03-94e8-fe25e4b64178       /media/lbigdisk         ext3    acl,user_xattr,noauto,user      0 0
Note the "noauto" and "user" option. This fstab entry would allow you to enter "mount /media/lbigdisk" to mount the drive even without using UDEV. The "noauto" entry prevents the drive from being mounted with "mount -a" which happens when you boot. This would cause a problem if the device wasn't plugged in when you booted.
The "user" entry allows the user to mount the drive without needing to su to root. Now if I plugged the drive into a different port, and it was assigned /dev/sdc2 instead, there wouldn't be a problem.

HAL uses helper programs, including a KDE or Gnome service to bring up a requester if you plug in the drive when running in your Window Manager session, but I don't use gnome so I can't help with that part. (note: Other distro's use hotplug instead)

For memory cards and pendrives with fat32 filesystems, you might consider using using the "mlabel" program to label the device. I have an SD card that I labeled "Podcasts". When I plug it in, it automounts under /media/PODCASTS without having an entry in /etc/fstab. The mlabel program is supplied by the mtools program.
I needed to add this entry before the device was assigned a DOS device letter:
Code:
# added for sandisk
drive e: file="/dev/sdc1"
Code:
udevinfo -q env -n /dev/sdc1
ID_VENDOR=Generic
ID_MODEL=STORAGE_DEVICE
ID_REVISION=9312
ID_SERIAL=Generic_STORAGE_DEVICE_0302258591
ID_TYPE=disk
ID_BUS=usb
ID_PATH=pci-0000:00:02.2-usb-0:2:1.0-scsi-0:0:0:0
ID_FS_USAGE=filesystem
ID_FS_TYPE=vfat
ID_FS_VERSION=FAT32
ID_FS_UUID=4581-59D0
ID_FS_LABEL=PODCASTS
ID_FS_LABEL_SAFE=PODCASTS
Using "udevmonitor" as I plugged in the card, I found out which device it used (/dev/sdc1) and then used that in the mtools.conf entry. Then I was able to run mlabel to label my card.
When I had used kde to change the name of a different card, I had a typo and accidental return, and had given it a dumb name of "-" and I was stuck with it. But I found that that name wasn't the label anyway.

Last edited by jschiwal; 05-02-2007 at 10:27 PM.
 
Old 05-03-2007, 12:11 AM   #7
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
Just an FYI. I thought I would add a vfat /media/.hal-mtab entry:
Code:
/dev/sdc1       1000    0       vfat    nosuid,nodev,uid=1000,noatime,utf8,shortname=lower      /media/PODCASTS

Maybe some of the options would be useful.

Last edited by jschiwal; 05-03-2007 at 12:12 AM.
 
Old 05-03-2007, 09:08 PM   #8
gawdin
LQ Newbie
 
Registered: Mar 2007
Location: Ohio, United States of America
Distribution: Suse Linux Enterprise 10 server and desktop; Suse Linux 10
Posts: 23

Original Poster
Rep: Reputation: 15
I really am sorry but I don't think one of us is understanding the other. I can not modify fstab I am looking how to specifically get it so I can modify it.

-Edit: ok I have root privs now but still won't let me edit the fstab to add/modify the mounts

it may help if I gave you this informationthis is my current fstab file

Code:
/dev/hda2     /                     reiserfs     acl,user_xattr     1 1
/dev/hda3     /home                 reiserfs     acl,user_xattr     1 2
/dev/hda1     swap                  swap         defaults           0 0
proc          /proc                 proc         defaults           0 0
sysfs         /sys                  sysfs        noauto             0 0
debugfs       /sys/kernel/debug     debugfs      noauto             0 0
usbfs         /proc/bus/usb         usbfs        noauto             0 0
devpts        /dev/pts              devpts       mode=0620,gid=5    0 0

Last edited by gawdin; 05-03-2007 at 09:47 PM.
 
Old 05-03-2007, 09:46 PM   #9
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
Quote:
Originally Posted by jludwig
I don't use flash memory, but, with the new udev?? setup when you edit fstab you need to make it immutable so it is not overwritten the next time you reboot.

From the command line, as root;
[root@localhost ~]# chattr +i /etc/fstab
SuSE doesn't dynamically change the /etc/fstab file.
 
Old 05-03-2007, 09:49 PM   #10
gawdin
LQ Newbie
 
Registered: Mar 2007
Location: Ohio, United States of America
Distribution: Suse Linux Enterprise 10 server and desktop; Suse Linux 10
Posts: 23

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by jschiwal
SuSE doesn't dynamically change the /etc/fstab file.
so...... if I can't change the fstab then how do I make it accept the flash media?
 
Old 05-03-2007, 09:57 PM   #11
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
Quote:
Originally Posted by gawdin
I really am sorry but I don't think one of us is understanding the other. I can not modify fstab I am looking how to specifically get it so I can modify it.

-Edit: ok I have root privs now but still won't let me edit the fstab to add/modify the mounts

it may help if I gave you this informationthis is my current fstab file

Code:
/dev/hda2     /                     reiserfs     acl,user_xattr     1 1
/dev/hda3     /home                 reiserfs     acl,user_xattr     1 2
/dev/hda1     swap                  swap         defaults           0 0
proc          /proc                 proc         defaults           0 0
sysfs         /sys                  sysfs        noauto             0 0
debugfs       /sys/kernel/debug     debugfs      noauto             0 0
usbfs         /proc/bus/usb         usbfs        noauto             0 0
devpts        /dev/pts              devpts       mode=0620,gid=5    0 0
If you have root access, what is the problem with editing? You can use any editor to edit it.
sudo vim /etc/fstab
or
kdesu kate /etc/fstab

The fstab file has a man page you can reference.
If you used the command:
chattr +i /etc/fstab
to protect the file, you need to clear the immutable bit to be able to edit it as root:
chattr -i /etc/fstab
 
Old 05-03-2007, 10:44 PM   #12
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
Quote:
Originally Posted by gawdin
so...... if I can't change the fstab then how do I make it accept the flash media?
You can manually edit the fstab entry. I was saying that udev/hal doesn't automatically make changes to it behind your back.
You need to be root to edit it, but it is a simple text file, so any text editor will do. I usually use vim:
sudo vim /etc/fstab.
If you want to use a graphical editor, you could use kate:
kdesu kate /etc/fstab
 
  


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
New to linux, so so lost, auto mounting issues, permissions issues slowhand22 Linux - Newbie 2 02-10-2005 09:41 AM
mounting issues varunbihani Linux - Software 3 06-20-2004 03:43 PM
Mounting Issues lookformeb Linux - Newbie 8 11-13-2003 09:15 AM
Mounting Issues MasterKin8T Linux - Software 3 09-06-2003 10:07 PM
cd mounting issues fractal_chaos Linux - Newbie 25 09-03-2003 06:32 PM


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

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