LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 01-05-2010, 04:08 AM   #1
konzo
Member
 
Registered: Dec 2008
Location: Bulgaria
Distribution: Debian / Slackware / Ubuntu
Posts: 230

Rep: Reputation: 33
NTFS drive recognized as vfat


I have NTFS partition which is recognized as vfat in /etc/fstab. Here is
my /etc/fstab:

Code:
/dev/sda3        swap             swap        defaults         0   0
/dev/sda4        /                ext3        defaults         1   1
/dev/sda1        /c               ntfs-3g     umask=000        1   0
/dev/sda5        /d               vfat        defaults         1   0
/dev/sdb5        /freeagent       ntfs-3g     umask=777        1   0
/dev/sdc1        /flashcard       vfat        defaults         1   0
#/dev/cdrom      /mnt/cdrom       auto        noauto,owner,ro  0   0
/dev/fd0         /mnt/floppy      auto        noauto,owner     0   0
devpts           /dev/pts         devpts      gid=5,mode=620   0   0
proc             /proc            proc        defaults         0   0
tmpfs            /dev/shm         tmpfs       defaults         0   0
If I try to change "defaults" with "umask=777" will it work? I want to make this partition writable. Why it is vfat, but no ntfs-3g as other NTFS partitions?

fdisk -l give this:

Code:
Disk /dev/sda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x8e758e75

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        3133    25165791    7  HPFS/NTFS
/dev/sda2            3134       11782    69473092+   f  W95 Ext'd (LBA)
/dev/sda3           11783       12031     2000092+  82  Linux swap
/dev/sda4           12032       14593    20579265   83  Linux
/dev/sda5            3134       11782    69473061    b  W95 FAT32

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
64 heads, 32 sectors/track, 953869 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Disk identifier: 0x1a786a8a

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb2   *           2      953869   976760832    f  W95 Ext'd (LBA)
/dev/sdb5               2      953869   976760816    7  HPFS/NTFS
 
Old 01-05-2010, 04:28 AM   #2
konzo
Member
 
Registered: Dec 2008
Location: Bulgaria
Distribution: Debian / Slackware / Ubuntu
Posts: 230

Original Poster
Rep: Reputation: 33
I edit fstab. The new one is:
Code:
/dev/sda3        swap             swap        defaults         0   0
/dev/sda4        /                ext3        defaults         1   1
/dev/sda1        /c               ntfs-3g     umask=000        1   0
/dev/sda5        /d               vfat        rw,user          1   0
/dev/sdb5        /freeagent       ntfs-3g     rw,user          1   0
#/dev/sdc1       /flashcard       vfat        defaults         1   0
#/dev/cdrom      /mnt/cdrom       auto        noauto,owner,ro  0   0
/dev/fd0         /mnt/floppy      auto        noauto,owner     0   0
#devpts          /dev/pts         devpts      gid=5,mode=620   0   0
proc             /proc            proc        defaults         0   0
tmpfs            /dev/shm         tmpfs       defaults         0   0
It gives no errors, but only sda1 is read-writeble. Can't browse sda5 and sdb5.

Last edited by konzo; 01-05-2010 at 04:58 AM.
 
Old 01-05-2010, 04:46 AM   #3
~sHyLoCk~
Senior Member
 
Registered: Jul 2008
Location: /dev/null
Posts: 1,173
Blog Entries: 12

Rep: Reputation: 129Reputation: 129
Are you talking about /dev/sda5 ? It is a fat partition. Hence vfat. To make it writable use rw,user
 
Old 01-05-2010, 05:01 AM   #4
konzo
Member
 
Registered: Dec 2008
Location: Bulgaria
Distribution: Debian / Slackware / Ubuntu
Posts: 230

Original Poster
Rep: Reputation: 33
Yes its about /dev/sda5, but /dev/sdb5 is also not browseble. I am sure that sda5 is ntfs, but in fstab is vfat. Can be any error in fstab?
 
Old 01-05-2010, 05:08 AM   #5
konzo
Member
 
Registered: Dec 2008
Location: Bulgaria
Distribution: Debian / Slackware / Ubuntu
Posts: 230

Original Poster
Rep: Reputation: 33
ls -la result:

Code:
d?????????   ? ?    ?        ?                ? freeagent
 
Old 01-05-2010, 05:39 AM   #6
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670
Examine the filesystems with "sudo file -s". It's best not to make assumptions. The fdisk -l listing will list what the partition is identifies as (a byte in the partition table) but not how the filesystem was formatted.

How did the fstab entry for /dev/sda5 get created?
 
Old 01-05-2010, 05:51 AM   #7
konzo
Member
 
Registered: Dec 2008
Location: Bulgaria
Distribution: Debian / Slackware / Ubuntu
Posts: 230

Original Poster
Rep: Reputation: 33
This is the output of file -s command:

file /dev/sda5 -s
Code:
/dev/sda5: x86 boot sector, code offset 0x52, OEM-ID "NTFS    ", sectors/cluster 8, reserved sectors 0, Media descriptor 0xf8, heads 255, hidden sectors 63, dos < 4.0 BootSector (0x80)
I did not understand what type my partition is.

The /dev/sda5 was created automatically when installing linux. I edit only from defaults to rw,user.
 
Old 01-07-2010, 10:31 AM   #8
konzo
Member
 
Registered: Dec 2008
Location: Bulgaria
Distribution: Debian / Slackware / Ubuntu
Posts: 230

Original Poster
Rep: Reputation: 33
Maybe I didn't describe my problem correct. Before I was not able to browse my external drive and my "d" partition. After restarting external drive is readable, I can browse it and write to it.

Problem is that I can't view my "d:" partition. I don't change anything from last time. Can anyone help?
 
Old 01-07-2010, 11:40 AM   #9
konzo
Member
 
Registered: Dec 2008
Location: Bulgaria
Distribution: Debian / Slackware / Ubuntu
Posts: 230

Original Poster
Rep: Reputation: 33
When type dmesg | tail get that on screen:

Code:
sdc: p1 size 7853056 limited to end of disk
sd 6:0:0:0: [sdc] Attached SCSI removable disk
sd 6:0:0:0: Attached scsi generic sg3 type 0
usb-storage: device scan complete
FAT: bogus number of reserved sectors
VFS: Can't find a valid FAT filesystem on dev sda5.
FAT: bogus number of reserved sectors
VFS: Can't find a valid FAT filesystem on dev sda5.
FAT: bogus number of reserved sectors
VFS: Can't find a valid FAT filesystem on dev sda5.
I found on google that b in ID mean that my fat32 is without LBA.

Hope that will help someone to help me back

Edit: I cant run fsck /dev/sda5 or fsck /dev/sda2
theese errors appear:
Code:
sck /dev/sda5
fsck 1.41.8 (11-July-2009)
fsck: fsck.vfat: not found
fsck: Error 2 while executing fsck.vfat for /dev/sda5
Code:
fsck /dev/sda2
fsck 1.41.8 (11-July-2009)
e2fsck 1.41.8 (11-July-2009)
/sbin/e2fsck: Attempt to read block from filesystem resulted in short read while trying to open /dev/sda2
Could this be a zero-length partition?

Last edited by konzo; 01-07-2010 at 11:45 AM.
 
Old 01-08-2010, 04:30 PM   #10
konzo
Member
 
Registered: Dec 2008
Location: Bulgaria
Distribution: Debian / Slackware / Ubuntu
Posts: 230

Original Poster
Rep: Reputation: 33
up

any help or suggestion?
 
Old 01-08-2010, 05:38 PM   #11
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,839

Rep: Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822
Looks like it actually is NTFS - try this
Code:
sudo umount /d
sudo mount -t ntfs-3g -o rw,user /d
If that works, update fstab.
 
Old 01-08-2010, 06:06 PM   #12
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850
Hello together,

I'd suggest to use fdisk and look which ID the partition has. I once had the issue that a partition was not properly recognized as ext3 but vfat. In this case I had formatted a formerly fat partition with ext3 but did not change the ID in the partitiontable.

Markus
 
Old 01-10-2010, 09:50 AM   #13
konzo
Member
 
Registered: Dec 2008
Location: Bulgaria
Distribution: Debian / Slackware / Ubuntu
Posts: 230

Original Poster
Rep: Reputation: 33
Thanks sygOO. I don't know why but when I mount it as root it is ok. In fstab I change vfat with ntfs but with no success. Anyway I will mount as root whan use it.
 
Old 01-10-2010, 05:15 PM   #14
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,839

Rep: Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822
Try changing the partition id - from fdisk it's
Code:
sudo fdisk /dev/sda
m  <- gets a command list; just interest
t  <- change type
5  <- partition number
7  <- hex code for NTFS
w  <- update the partition table
q  <- quit
(don't enter the comments, just the responses to the prompts)
 
  


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
vfat not recognized in Debian? shuuhen Debian 6 10-02-2005 11:46 PM
Retrieving msdos, vfat and ntfs labels katmandu Linux - Software 5 10-05-2004 12:29 PM
what do I have? (FAT, VFAT, FAT32, NTFS) shengchieh Linux - Newbie 3 08-16-2004 05:52 PM
Converting ntfs to vfat aneeshm Linux - Software 10 06-23-2004 01:08 PM
Can't write to vfat and ntfs partitions linuxfond Linux - Newbie 7 11-12-2003 05:54 PM


All times are GMT -5. The time now is 10:14 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration