LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 09-10-2006, 07:26 AM   #1
Babe963
Member
 
Registered: Aug 2006
Distribution: Debian unstable/testing
Posts: 34

Rep: Reputation: 15
Installed new harddisk but can't mount it?


Hi..

I managed to install my used 120GB maxtor drive. It has 2 partitions .. a 60Gb in NTFS and a 60 GB in FAT32 .. I am trying to mount the FAT32 partition but evertime I run mount it's asking to specifiy the file type??

Any help.. Ideas??

Here is my /etc/fstab

[HTML]# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/sdb1 / ext3 defaults,errors=remount-ro 0 1
/dev/sdb5 none swap sw 0 0
/dev/hdb /media/cdrom0 iso9660 ro,user,noauto 0 0
/dev/hdc /media/cdrom1 iso9660 ro,user,noauto 0 0
/dev/sdc1 /mnt/pretec auto noauto,user 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto 0 0
/dev/sdd1 /mnt/card auto rw,noauto,user 0 0
/dev/hdc2 /mnt/backups auto rw,noauto,user 0 0
[/HTML]

Here is what I get

[HTML]home:/home/devil# mount /dev/hdc2 /mnt/backups
mount: you must specify the filesystem type
[/HTML]
 
Old 09-10-2006, 07:48 AM   #2
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
How do you know that this hard drive has these partitions? Use fdisk -l to see what Linux can detect.
Code:
$ /sbin/fdisk -l

Disk /dev/hda: 81.9 GB, 81964302336 bytes
16 heads, 63 sectors/track, 158816 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1       18725     9437368+  83  Linux
/dev/hda2           18726       20806     1048824   82  Linux swap / Solaris
/dev/hda3           20807      158816    69557040   83  Linux
 
Old 09-10-2006, 09:11 AM   #3
uselpa
Senior Member
 
Registered: Oct 2004
Location: Luxemburg
Distribution: Slackware, OS X
Posts: 1,507

Rep: Reputation: 47
If you want to mount the partition as a normal user, you need to specify the file type in /etc/fstab. Your command would work as user root, though. So change
Code:
/dev/hdc2        /mnt/backups   auto    rw,noauto,user  0       0
to
Code:
/dev/hdc2        /mnt/backups   vfat    rw,noauto,user  0       0

Last edited by uselpa; 09-10-2006 at 09:54 AM.
 
Old 09-10-2006, 09:40 AM   #4
Babe963
Member
 
Registered: Aug 2006
Distribution: Debian unstable/testing
Posts: 34

Original Poster
Rep: Reputation: 15
Hi,,,

fdisk -l showed this:

[HTML] Device Boot Start End Blocks Id System
/dev/hdc1 * 1 7473 60026841 7 HPFS/NTFS
/dev/hdc2 7474 14946 60026872+ f W95 Ext'd (LBA)
/dev/hdc5 7474 14946 60026841 b W95 FAT32
[/HTML]

So I was wrong the drive is hdc5 not hdc2 !! Ooops..

Now it's working fine and cool ..

Any idea how can I have it to automount from boot ...!!

Thanx
 
Old 09-10-2006, 02:53 PM   #5
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
Hi again Babe963,

I would enter the following line in your /etc/fstab file to have the partition mounted during system startup.
Code:
/dev/hdc5        /mnt/backups   vfat    auto,rw   0    0
The options part of the line is open to debate. I would put "noexec,nosuid" in that part of the line as well as the "auto,rw". The "noexec" option means that program images on that disk will not run/execute. I think of this option being most helpful in terms of possibly preventing a JPEG virus from executing, though I don't know if "noexec" will actually prevent this sort of thing. The "nosuid" option means that programs that have the "suid" bit set will not assume the id of the owner of the program. This is helpful because you never know how a bit for FAT32 could be interpreted by the Linux file system driver. It's just safer to say "nosuid". So I think that I would recommend this line for /etc/fstab.
Code:
/dev/hdc5    /mnt/backups  vfat   auto,rw,noexec,nosuid   0  0
If your normal user account(s) cannot access the files due to file permissions then you could add "gid=100" to the options section of the /etc/fstab line. Note that the man page for the mount command shows that gid is a valid option for FAT file systems but is not listed as an option for FAT32 (vfat) file systems. All the same I would put it in and see what happens. The "gid=100" option would tell the Linux kernel to "see" the files on that partition as being owned by the Linux user group 100, which is "users".

Last edited by stress_junkie; 09-10-2006 at 03:09 PM.
 
Old 09-12-2006, 03:32 PM   #6
Babe963
Member
 
Registered: Aug 2006
Distribution: Debian unstable/testing
Posts: 34

Original Poster
Rep: Reputation: 15
Adding the /dev/hdc5 to /etc/fstab worked nicely thanx ...
But I changed the mounting to the following

/dev/hdc5 /media/fat vfat rw,defaults,umask=0000 0 0


Works like a charm with this ...
 
  


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
why the Fedora4 cannot be installed to SATA harddisk? wee Linux - Newbie 3 12-09-2005 01:22 AM
the second harddisk is not mount csstudy Linux - General 2 10-08-2005 02:27 AM
Harddisk Mount by itself !..... novkhan Linux - Security 3 09-24-2005 09:45 PM
how to mount a new harddisk kjsubbu Solaris / OpenSolaris 5 11-04-2004 09:45 PM
How to mount second harddisk??? novkhan Linux - Newbie 2 01-26-2004 07:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 11:27 PM.

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