Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] NTFS mounts on 2.6.38 but not on 2.6.39
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
GoatFounDeR
n00b
n00b


Joined: 18 Jul 2011
Posts: 5
Location: South Africa

PostPosted: Sat Jul 23, 2011 2:44 pm    Post subject: [SOLVED] NTFS mounts on 2.6.38 but not on 2.6.39 Reply with quote

Hi,

I've updated my kernel from 2.6.38-r6 to 2.6.39-r3 (normal gentoo-sources) but it seems I have a problem mounting my ntfs usb drive. Here is some information from my old and new kernels that might help solve this.

kernel 2.6.38-r6
================

$ dmesg | grep sdb
[ 4.311991] sd 4:0:0:0: [sdb] 3907029168 512-byte logical blocks: (2.00 TB/1.81 TiB)
[ 4.312735] sd 4:0:0:0: [sdb] Write Protect is off
[ 4.312786] sd 4:0:0:0: [sdb] Mode Sense: 00 00 00 00
[ 4.312789] sd 4:0:0:0: [sdb] Assuming drive cache: write through
[ 4.314239] sd 4:0:0:0: [sdb] Assuming drive cache: write through
[ 4.321275] sdb: sdb1 sdb2
[ 4.322853] sd 4:0:0:0: [sdb] Assuming drive cache: write through
[ 4.322903] sd 4:0:0:0: [sdb] Attached SCSI disk

rootfs on / type rootfs (rw)
/dev/root on / type xfs (rw,noatime,attr2,noquota)
proc on /proc type proc (rw,relatime)
rc-svcdir on /lib64/rc/init.d type tmpfs (rw,nosuid,nodev,noexec,relatime,size=1024k,mode=755)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)
udev on /dev type tmpfs (rw,nosuid,relatime,size=10240k,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620)
shm on /dev/shm type tmpfs (rw,nosuid,nodev,noexec,relatime)
usbfs on /proc/bus/usb type usbfs (rw,noexec,nosuid,devmode=0664,devgid=85)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
/dev/sdb2 on /media/2TB Drive type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096)

As you can see sdb mounts correctly and is working.

kernel 2.6.39-r3
================

rootfs on / type rootfs (rw)
/dev/root on / type xfs (rw,noatime,attr2,delaylog,noquota)
proc on /proc type proc (rw,relatime)
rc-svcdir on /lib64/rc/init.d type tmpfs (rw,nosuid,nodev,noexec,relatime,size=1024k,mode=755)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
udev on /dev type tmpfs (rw,nosuid,relatime,size=10240k,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620)
shm on /dev/shm type tmpfs (rw,nosuid,nodev,noexec,relatime)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
/dev/sdc1 on /media/PENDRIVE type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096)


[ 4.278939] sd 4:0:0:0: [sdb] 3907029168 512-byte logical blocks: (2.00 TB/1.81 TiB)
[ 4.279686] sd 4:0:0:0: [sdb] Write Protect is off
[ 4.279735] sd 4:0:0:0: [sdb] Mode Sense: 00 00 00 00
[ 4.279738] sd 4:0:0:0: [sdb] Assuming drive cache: write through
[ 4.281185] sd 4:0:0:0: [sdb] Assuming drive cache: write through
[ 4.281686] sdb: sdb1
[ 4.281735] sdb: p1 size 4294967295 extends beyond EOD, enabling native capacity
[ 4.283185] sd 4:0:0:0: [sdb] Assuming drive cache: write through
[ 4.283685] sdb: sdb1
[ 4.283734] sdb: p1 size 4294967295 extends beyond EOD, truncated
[ 4.285560] sd 4:0:0:0: [sdb] Assuming drive cache: write through
[ 4.286112] sd 4:0:0:0: [sdb] Attached SCSI disk

Is there a kernel option that I might have missed?
If there is any information that might be of use, just ask :)

Thanks in advance for the help.


Last edited by GoatFounDeR on Sat Jul 30, 2011 8:13 pm; edited 1 time in total
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7651
Location: Goose Creek SC

PostPosted: Sat Jul 23, 2011 2:55 pm    Post subject: Reply with quote

Code:
grep -i ntfs /usr/src/linux/.config
if you don't see
Quote:
CONFIG_NTFS_FS=y
ntfs support is no longer in your kernel
_________________
Defund the FCC.
Back to top
View user's profile Send private message
GoatFounDeR
n00b
n00b


Joined: 18 Jul 2011
Posts: 5
Location: South Africa

PostPosted: Sat Jul 23, 2011 3:14 pm    Post subject: Reply with quote

Thanks for the quick reply. but it seems I do have ntfs support compiled in to my kernel.

Quote:
CONFIG_NTFS_FS=y
# CONFIG_NTFS_DEBUG is not set
CONFIG_NTFS_RW=y


When I try to mount the drive I get this message.
Quote:

mount: wrong fs type, bad option, bad superblock on /dev/sdb,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so


And here is dmesg:
Quote:
[ 201.765439] NTFS-fs error (device sdb): read_ntfs_boot_sector(): Primary boot sector is invalid.
[ 201.765442] NTFS-fs error (device sdb): read_ntfs_boot_sector(): Mount option errors=recover not used. Aborting without trying to recover.
[ 201.765446] NTFS-fs error (device sdb): ntfs_fill_super(): Not an NTFS volume.
[ 201.771569] XFS (sdb): bad magic number
[ 201.771572] XFS (sdb): SB validate failed
[ 208.072688] NTFS-fs warning (device sdb): is_boot_sector_ntfs(): Invalid boot sector checksum.
[ 208.072693] NTFS-fs error (device sdb): read_ntfs_boot_sector(): Primary boot sector is invalid.
[ 208.072696] NTFS-fs error (device sdb): read_ntfs_boot_sector(): Mount option errors=recover not used. Aborting without trying to recover.
[ 208.072699] NTFS-fs error (device sdb): ntfs_fill_super(): Not an NTFS volume.
[ 212.007088] ===>rt_ioctl_giwscan. 1(1) BSS returned, data->length = 179


other settings in my kernel that might help:
Quote:
CONFIG_FAT_DEFAULT_CODEPAGE=437
CONFIG_NLS_CODEPAGE_437=y

CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
CONFIG_NLS_ISO8859_1=y
Back to top
View user's profile Send private message
Gusar
Advocate
Advocate


Joined: 09 Apr 2005
Posts: 2665
Location: Slovenia

PostPosted: Sat Jul 23, 2011 3:30 pm    Post subject: Reply with quote

Remove ntfs support from the kernel, it has very limited (practically useless) write support. You weren't using it before anyway, you were using ntfs-3g, which is a fuse driver:
Quote:
/dev/sdb2 on /media/2TB Drive type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096)

The problem is here:
Quote:
[ 4.281735] sdb: p1 size 4294967295 extends beyond EOD, enabling native capacity

It seems the kernel doesn't support disks larger than 4GB?? That's just weird.

Anyway, as your disk is 2TB, you need support for that in the kernel, check that you have it: "Support for large (2TB+) block devices and files" (CONFIG_LBDAF)
And make sure there's fuse support too: "FUSE (Filesystem in Userspace) support" (CONFIG_FUSE_FS)
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54821
Location: 56N 3W

PostPosted: Sat Jul 23, 2011 3:31 pm    Post subject: Reply with quote

GoatFounDeR,

Do not use kernel NTFS is you need NTFS write support. Read works, write is limited to changing the content of existing files, provided the file size does not change.
For ntfs support, you need File System in User Space (FUSE) support in the kernel and the ntfs-3g package from portage.

Its safe to have both.

If you want to mount with the kernel ntfs driver, use -t ntfs
To mount with ntfs-3g, its -t ntfs3g
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54821
Location: 56N 3W

PostPosted: Sat Jul 23, 2011 3:37 pm    Post subject: Reply with quote

Gusar,

Well caught!

I suspect thats because /dev/sdb is a part of a fake raid0 set. This gets you a partition table on one drive that describes the entire raid0 space.
If the raid set is two drives, the last sector in the partition table will be for two drives worth of data and is indeed past the end of the drive.
Its actually nothing to worry about as you can't mount such a single drive anyway. You bring up the raid set and access the /dev/mapper/... and all is well with the world.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
GoatFounDeR
n00b
n00b


Joined: 18 Jul 2011
Posts: 5
Location: South Africa

PostPosted: Sat Jul 23, 2011 8:26 pm    Post subject: Reply with quote

Thanks for the help NeddySeagoon and Gusar. I've removed ntfs support from the kernel and emerge ntfs3g. Also fuse is now enabled. There seems to be a small problem. I cant find the CONFIG_LBDAF option. I've read online it depends on CONFIG_64BIT and I have that set to true. This is what I see in my menuconfig
Code:
--- Enable the block layer
             [*]   Block layer SG support v4
             [ ]   Block layer data integrity support
                   IO Schedulers  --->


Also doing a grep for CONFIG_LBDAF returns nothing. Might lbdaf depend on something I have not selected?
PS: sorry for the late reply, had to go out with my sister before she returns home tomorrow.
Back to top
View user's profile Send private message
Gusar
Advocate
Advocate


Joined: 09 Apr 2005
Posts: 2665
Location: Slovenia

PostPosted: Sat Jul 23, 2011 9:06 pm    Post subject: Reply with quote

Actually, it depends on !64BIT. I think a 64bit kernel has LBDAF by default. So from this perspective you should be set.

PS. Man, I think I'll soon be considered stone-age, still living in a 32bit world :)
Back to top
View user's profile Send private message
GoatFounDeR
n00b
n00b


Joined: 18 Jul 2011
Posts: 5
Location: South Africa

PostPosted: Sat Jul 23, 2011 9:41 pm    Post subject: Reply with quote

I've decided to use my old kernel and relax and see what I can find tomorrow. So far it seems I might have turned of some obscure setting or something and broke support for my drive. I will post here if I find something useful.

hehe, full 64bit is still to scary for me, but multi-lib seems nice and stable so far :)
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7651
Location: Goose Creek SC

PostPosted: Sat Jul 23, 2011 10:03 pm    Post subject: Reply with quote

perhaps run "chkdsk <windows name for the partition perhaps, C:> /f " from installed windows (will probably require a windows reboot) or from the install cd to normalize the partition ?
_________________
Defund the FCC.
Back to top
View user's profile Send private message
GoatFounDeR
n00b
n00b


Joined: 18 Jul 2011
Posts: 5
Location: South Africa

PostPosted: Sat Jul 30, 2011 8:13 pm    Post subject: Solved Reply with quote

I've finally came around to play with the kernel again. And found what I did wrong. I accidentally turned of my partition support for windows drives. Which caused the kernel to read the partition table incorrectly and gave the error:
Quote:
[ 4.281735] sdb: p1 size 4294967295 extends beyond EOD, enabling native capacity


So for other people that might have this problem in the future turn on these kernel features and it might help you too.
Code:
File systems  --->
    Partition Types  --->
        I think msdos one is not really needed
        [*]   PC BIOS (MSDOS partition tables) support
        [*]   Windows Logical Disk Manager (Dynamic Disk) support


Thanks to Gusar, NeddySeagoon and DONAHUE for taking time to help and point this noob in the right direction.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum