LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Mount sdb1 prob (https://www.linuxquestions.org/questions/linux-newbie-8/mount-sdb1-prob-646973/)

nnjond 06-04-2008 09:56 AM

Mount sdb1 prob
 
Hi, can you help me? I've been left dangling on the edge of a solution I think.

su
(type root password)
mkdir /mnt/drive
chown username /mnt/drive
chmod 755 /mnt/drive
mount -t vfat /dev/sdb1 /mnt/drive

gives me temp access to a data drive. I would like this to be perminent, with a link or shrtcut on my dsktp.

Thanks

Agrouf 06-04-2008 10:02 AM

edit your fstab file.
man fstab

nnjond 06-04-2008 10:46 AM

Thanks for your interest.

/mnt/sdb1 remains empty in my gui after my added line (in bold):

/dev/disk/by-id/scsi-SATA_ST3160812A_5LS130D9-part3 / ext3 acl,user_xattr 1 1
/dev/disk/by-id/scsi-SATA_ST3160812A_5LS130D9-part5 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
/sdb1 /mntsdb1


I see an error

Nylex 06-04-2008 10:53 AM

You need to add info to the other columns as well - filesystem, mount options and whatever the other two columns are (I can't remember, see man fstab).

Is you drive an external device? If so, you can't always be sure that the kernel will call it sdb and so you should probably write a udev rule to give it a persistent name and use that instead.

TB0ne 06-04-2008 11:01 AM

Quote:

Originally Posted by nnjond (Post 3174603)
Thanks for your interest.

/mnt/sdb1 remains empty in my gui after my added line (in bold):

/dev/disk/by-id/scsi-SATA_ST3160812A_5LS130D9-part3 / ext3 acl,user_xattr 1 1
/dev/disk/by-id/scsi-SATA_ST3160812A_5LS130D9-part5 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
/sdb1 /mntsdb1


I see an error

And the error is what???? No one can help you if you don't say what the error is. And did you look at the MAN page for fstab?

TB0ne 06-04-2008 11:02 AM

And you might also want to try to put in:

/dev/sdb1, instead of just /sdb1, as you have done...

yancek 06-04-2008 11:20 AM

In additions to the "/dev/sdb1 you will need /mnt/sdb1 not mntsdb1. You also need your filesystem type and other entries so do as suggested and check man fstab. Reading over your first post, if the directory you created in the /mnt directory is called "drive", you will need to make your entry:
/dev/sdb1 /mnt/drive.

knudfl 06-04-2008 11:38 AM

suggest: # mkdir /mnt/sdb1
and fstab:
/dev/sdb1 /mnt/sdb1 vfat noauto,user 0 0
and hit enter by end of this line, else the error is 'no newline'

Rgds

nnjond 06-04-2008 01:05 PM

Thanks for your help. That prob is solved. but I would like a "Shrtcut" to my dsktp; Is that possible?

nnjond 06-04-2008 01:21 PM

I spoke to soon. having re-booted I see I've lost sight of my data in /mnt/fat32

I fear I will get back to you

nnjond 06-04-2008 02:44 PM

Phew! This last line gives me permenent access to sdb1, but I do not have write permision. Can anyone see what I should change?

Thanks again.


/disk/by-id/scsi-SATA_ST3160812A_5LS130D9-part3 / ext3 acl,user_xattr 1 1
/dev/disk/by-id/scsi-SATA_ST3160812A_5LS130D9-part5 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
/dev/sdb1 /mnt/sdb1 vfat user 0 0

TB0ne 06-04-2008 02:50 PM

Quote:

Originally Posted by nnjond (Post 3174833)
Phew! This last line gives me permenent access to sdb1, but I do not have write permision. Can anyone see what I should change?

Thanks again.

Nothing in fstab. Check the permissions on /mnt/sdb1, by doing "ls -l /mnt/sdb1". Change it according to who you want to have access to it. If you want everyone and every group (dangerous, IMHO), do a "chmod 777 /mnt/sdb1".

nnjond 06-04-2008 03:28 PM

linux-wjsi:~ # chmod 777 /mnt/sdb1
linux-wjsi:~ # ls -l /mnt/sdb1
total 800
drwxr-xr-x 4 root root 16384 Jun 2 20:34 .Trash-1000
-rwxr-xr-x 1 root root 48834 Jun 2 20:33 7408752.stm.html
drwxr-xr-x 2 root root 16384 Jun 2 20:33 7408752.stm_files
-rwxr-xr-x 1 root root 92497 Jun 2 20:33 Recall old threads.php.html
drwxr-xr-x 2 root root 16384 Jun 2 20:33 Recall old threads.php_files
-rwxr-xr-x 1 root root 25512 Jun 2 20:33 Vodaphone.html
drwxr-xr-x 2 root root 16384 Jun 2 20:33 Vodaphone_files
-rwxr-xr-x 1 root root 119608 Jun 2 20:33 bookmarks 1.html
-rwxr-xr-x 1 root root 263631 Jun 2 20:33 bookmarks.html
-rwxr-xr-x 1 root root 18363 Jun 2 20:33 gpl
-rwxr-xr-x 1 root root 50662 Jun 2 08:42 heron053008a.jpg
-rwxr-xr-x 1 root root 6436 Jun 2 20:33 readme
-rwxr-xr-x 1 root root 24246 Jun 2 20:33 statistics.htm
drwxr-xr-x 2 root root 16384 Jun 2 20:33 statistics_files
linux-wjsi:~ #

Still cannot write to sdb1?

nnjond 06-05-2008 02:46 AM

Prob solved. Many thanks.


All times are GMT -5. The time now is 05:48 AM.