LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 06-04-2008, 09:56 AM   #1
nnjond
Member
 
Registered: Feb 2007
Distribution: Ubuntu 10.04
Posts: 281

Rep: Reputation: 31
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
 
Old 06-04-2008, 10:02 AM   #2
Agrouf
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: LFS
Posts: 1,596

Rep: Reputation: 80
edit your fstab file.
man fstab
 
Old 06-04-2008, 10:46 AM   #3
nnjond
Member
 
Registered: Feb 2007
Distribution: Ubuntu 10.04
Posts: 281

Original Poster
Rep: Reputation: 31
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

Last edited by nnjond; 06-04-2008 at 10:48 AM. Reason: error
 
Old 06-04-2008, 10:53 AM   #4
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
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.
 
Old 06-04-2008, 11:01 AM   #5
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,634

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by nnjond View Post
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?
 
Old 06-04-2008, 11:02 AM   #6
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,634

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
And you might also want to try to put in:

/dev/sdb1, instead of just /sdb1, as you have done...
 
Old 06-04-2008, 11:20 AM   #7
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,502

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

Last edited by yancek; 06-04-2008 at 11:22 AM.
 
Old 06-04-2008, 11:38 AM   #8
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
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

Last edited by knudfl; 06-04-2008 at 11:39 AM.
 
Old 06-04-2008, 01:05 PM   #9
nnjond
Member
 
Registered: Feb 2007
Distribution: Ubuntu 10.04
Posts: 281

Original Poster
Rep: Reputation: 31
Thanks for your help. That prob is solved. but I would like a "Shrtcut" to my dsktp; Is that possible?
 
Old 06-04-2008, 01:21 PM   #10
nnjond
Member
 
Registered: Feb 2007
Distribution: Ubuntu 10.04
Posts: 281

Original Poster
Rep: Reputation: 31
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

Last edited by nnjond; 06-04-2008 at 01:25 PM. Reason: incomplete entry
 
Old 06-04-2008, 02:44 PM   #11
nnjond
Member
 
Registered: Feb 2007
Distribution: Ubuntu 10.04
Posts: 281

Original Poster
Rep: Reputation: 31
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
 
Old 06-04-2008, 02:50 PM   #12
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,634

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by nnjond View Post
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".
 
Old 06-04-2008, 03:28 PM   #13
nnjond
Member
 
Registered: Feb 2007
Distribution: Ubuntu 10.04
Posts: 281

Original Poster
Rep: Reputation: 31
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?
 
Old 06-05-2008, 02:46 AM   #14
nnjond
Member
 
Registered: Feb 2007
Distribution: Ubuntu 10.04
Posts: 281

Original Poster
Rep: Reputation: 31
Prob solved. Many thanks.
 
  


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
mount prob? tanvir118 Linux - Newbie 3 03-28-2008 02:07 AM
Can't mount sdb1 Fixed_it Linux - Newbie 38 04-15-2007 03:27 PM
where are files after mount sdb1? LetMeTryToo Linux - Newbie 3 11-08-2006 03:52 AM
mount: /dev/sdb1 is not a valid block device zaltar Linux - General 8 07-13-2005 02:07 AM
mount: wrong fs type, bad option, bad superblock on /dev/sdb1 pmoreira Linux - Hardware 5 02-26-2004 10:31 AM

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

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

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