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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
01-05-2010, 04:08 AM
|
#1
|
Member
Registered: Dec 2008
Location: Bulgaria
Distribution: Debian / Slackware / Ubuntu
Posts: 230
Rep:
|
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
|
|
|
01-05-2010, 04:28 AM
|
#2
|
Member
Registered: Dec 2008
Location: Bulgaria
Distribution: Debian / Slackware / Ubuntu
Posts: 230
Original Poster
Rep:
|
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.
|
|
|
01-05-2010, 04:46 AM
|
#3
|
Senior Member
Registered: Jul 2008
Location: /dev/null
Posts: 1,173
Rep:
|
Are you talking about /dev/sda5 ? It is a fat partition. Hence vfat. To make it writable use rw,user
|
|
|
01-05-2010, 05:01 AM
|
#4
|
Member
Registered: Dec 2008
Location: Bulgaria
Distribution: Debian / Slackware / Ubuntu
Posts: 230
Original Poster
Rep:
|
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?
|
|
|
01-05-2010, 05:08 AM
|
#5
|
Member
Registered: Dec 2008
Location: Bulgaria
Distribution: Debian / Slackware / Ubuntu
Posts: 230
Original Poster
Rep:
|
ls -la result:
Code:
d????????? ? ? ? ? ? freeagent
|
|
|
01-05-2010, 05:39 AM
|
#6
|
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733
|
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?
|
|
|
01-05-2010, 05:51 AM
|
#7
|
Member
Registered: Dec 2008
Location: Bulgaria
Distribution: Debian / Slackware / Ubuntu
Posts: 230
Original Poster
Rep:
|
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.
|
|
|
01-07-2010, 10:31 AM
|
#8
|
Member
Registered: Dec 2008
Location: Bulgaria
Distribution: Debian / Slackware / Ubuntu
Posts: 230
Original Poster
Rep:
|
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?
|
|
|
01-07-2010, 11:40 AM
|
#9
|
Member
Registered: Dec 2008
Location: Bulgaria
Distribution: Debian / Slackware / Ubuntu
Posts: 230
Original Poster
Rep:
|
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.
|
|
|
01-08-2010, 04:30 PM
|
#10
|
Member
Registered: Dec 2008
Location: Bulgaria
Distribution: Debian / Slackware / Ubuntu
Posts: 230
Original Poster
Rep:
|
up
any help or suggestion?
|
|
|
01-08-2010, 05:38 PM
|
#11
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,286
|
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.
|
|
|
01-08-2010, 06:06 PM
|
#12
|
Senior Member
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979
Rep:
|
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
|
|
|
01-10-2010, 09:50 AM
|
#13
|
Member
Registered: Dec 2008
Location: Bulgaria
Distribution: Debian / Slackware / Ubuntu
Posts: 230
Original Poster
Rep:
|
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.
|
|
|
01-10-2010, 05:15 PM
|
#14
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,286
|
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)
|
|
|
All times are GMT -5. The time now is 11:43 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|