Overclock.net banner
1 - 20 of 24 Posts

· Registered
Joined
·
1,392 Posts
Discussion Starter · #1 ·
Hi OCN! I'm running Debian Squeeze and I think I configured automounting NTFS drives wrong in my /etc/fstab file.

This is the output of sudo fdisk -l:

Code:
Code:
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x2ba0a728

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1       60802   488384512    7  HPFS/NTFS

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x2ba0a75b

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1       12158    97656250   83  Linux
/dev/sdb2           13055       60802   383526912    7  HPFS/NTFS
/dev/sdb3           12158       13055     7199745    5  Extended
/dev/sdb5           12158       13055     7199744   82  Linux swap / Solaris

Partition table entries are not in disk order

Disk /dev/sdc: 251.0 GB, 251000193024 bytes
135 heads, 14 sectors/track, 259383 cylinders
Units = cylinders of 1890 * 512 = 967680 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xb3c4b3c4

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1   *           1      259382   245115983    7  HPFS/NTFS
and this is my /etc/fstab file:

Code:
Code:
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
# / was on /dev/sdc1 during installation
UUID=6adf2f9e-41f9-451d-94b5-aacc9defffe8 /               ext4    errors=remount-ro 0       1
# swap was on /dev/sdc5 during installation
UUID=0f8f69ed-5502-406f-9476-06a8bca0b853 none            swap    sw              0       0
/dev/scd0       /media/cdrom0   udf,iso9660 user,noauto     0       0

/dev/sdc1/media/Windowsntfs-3gdefaults00
/dev/sdb2/media/Storagentfs-3gdefaults00
/dev/sda1/media/Backupntfs-3gdefaults00
but when I restart it doesn't work and when I sudo mount -a this is what I get:

Code:
Code:
ntfs-3g: Failed to access volume '/dev/sdc1': No such file or directory

ntfs-3g 2010.3.6 integrated FUSE 27 - Third Generation NTFS Driver
Configuration type 1, XATTRS are on, POSIX ACLS are off

Copyright (C) 2005-2007 Yura Pakhuchiy
Copyright (C) 2006-2009 Szabolcs Szakacsits
Copyright (C) 2007-2010 Jean-Pierre Andre
Copyright (C) 2009 Erik Larsson

Usage:    ntfs-3g [-o option[,...]] <device|image_file> <mount_point>

Options:  ro (read-only mount), remove_hiberfile, uid=, gid=,
          umask=, fmask=, dmask=, streams_interface=.
          Please see the details in the manual (type: man ntfs-3g).

Example: ntfs-3g /dev/sda1 /mnt/windows

Ntfs-3g news, support and information:  http://ntfs-3g.org
ntfs-3g-mount: failed to access mountpoint /media/Storage: No such file or directory
ntfs-3g-mount: failed to access mountpoint /media/Backup: No such file or directory
Thanks in advance OCN!

edit: and this is what I get when I try to manually mount a drive:
 

· Premium Member
Joined
·
14,563 Posts
The mount points have to actually exist first.

Code:
Code:
mkdir /mnt/whatever
 

· Registered
Joined
·
2,895 Posts
My first thought was you weren't doing it as root, but you mentioned you used sudo to mount.

Edit: derp, yes make sure the mount points exist first. If they do, see below.

I have a few suggestions. Boot into windows and do a chkdsk /r and see if that solves it.
If it doesn't you can try to mount by disk UUID.
Last resort, is forcing the mount, but like I said, I wouldn't do that to start off.

Code:
Code:
sudo mount -t ntfs-3g /dev/sdb1 /media/external -o force
or change your fstab to force

Code:
Code:
/dev/sda1 /media/backups ntfs-3g defaults,force 0 0
 

· Registered
Joined
·
1,356 Posts
did you try doing an "auto" on your file system type? believe fstab supports that function
couldnt hurt to try right? lol
 
  • Rep+
Reactions: Randallrocks

· Premium Member
Joined
·
14,563 Posts
Quote:


Originally Posted by Randallrocks
View Post

Created the directories... still doesn't work. Now, however, I can manually mount the drives by entering the root password.

What doesn't work? What error message do you get?
 

· Registered
Joined
·
1,392 Posts
Discussion Starter · #10 ·
Alright... adding force to Storage and Backup made them automount at boot.

However, I get: ntfs-3g: Failed to access volume '/dev/sdc1': No such file or directory

for the Windows drive.

edit: may be worth noting that the Windows drive also doesn't show up in Nautilus.
 

· Premium Member
Joined
·
4,580 Posts
Quote:


Originally Posted by Randallrocks
View Post

Alright... adding force to Storage and Backup made them automount at boot.

However, I get: ntfs-3g: Failed to access volume '/dev/sdc1': No such file or directory

for the Windows drive.

eek! don't do a force! you could damage the data on the drive!

run a chkdsk on the drive from windows (or get the ntfs tools and run it from linux.)

try this command:

sudo blkid

and setup fstab to use UUID instead of direct paths. you already have examples of UUID in your fstab, just make it look like that
 

· Registered
Joined
·
1,356 Posts
hm... does /dev/sdc1 exist after you boot up? can just do an ls /dev/sdc1 because if it doesnt, there might actually be a driver problem, the drive could be dead, or a bios problem

might be able to get around a stupid problem by using UUID to reference the drive, but if the drive itself has a problem then your kinda SOL until you fix it
 

· Registered
Joined
·
2,895 Posts
Quote:


Originally Posted by transhour
View Post

eek! don't do a force! you could damage the data on the drive!

run a chkdsk on the drive from windows (or get the ntfs tools and run it from linux.)

try this command:

sudo blkid

and setup fstab to use UUID instead of direct paths. you already have examples of UUID in your fstab, just make it look like that


Also agree here. Force was the last resort, UUID may get around an issue, but if there is corruption on the disk, a force may compound it.

I'm confused because sdc is showing up in your fdisk.

Quote:


Originally Posted by Randallrocks
View Post

Heh, I just tried to boot into Windows... says BOOTMGR is broken. Guess something went wrong when I setup GRUB.

Alright, thanks everyone! <333 +rep to all

Did you make grub install on the MBR, or to the install partition? If you install to the MBR it should get rid of the windows boot manager.
 

· Registered
Joined
·
1,392 Posts
Discussion Starter · #15 ·
Quote:


Originally Posted by esocid
View Post

Also agree here. Force was the last resort, UUID may get around an issue, but if there is corruption on the disk, a force may compound it.

I'm confused because sdc is showing up in your fdisk.

Did you make grub install on the MBR, or to the install partition? If you install to the MBR it should get rid of the windows boot manager.

Yeah, I installed it to MBR because it wouldn't let me install to the install partition.
 

· Premium Member
Joined
·
4,580 Posts
Quote:


Originally Posted by Randallrocks
View Post

Hi OCN! I'm running Debian Squeeze and I think I configured automounting NTFS drives wrong in my /etc/fstab file.

This is the output of sudo fdisk -l:

Code:
Code:
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x2ba0a728

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1       60802   488384512    7  HPFS/NTFS

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x2ba0a75b

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1       12158    97656250   83  Linux
/dev/sdb2           13055       60802   383526912    7  HPFS/NTFS
/dev/sdb3           12158       13055     7199745    5  Extended
/dev/sdb5           12158       13055     7199744   82  Linux swap / Solaris

Partition table entries are not in disk order

Disk /dev/sdc: 251.0 GB, 251000193024 bytes
135 heads, 14 sectors/track, 259383 cylinders
Units = cylinders of 1890 * 512 = 967680 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xb3c4b3c4

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1   *           1      259382   245115983    7  HPFS/NTFS
and this is my /etc/fstab file:

Code:
Code:
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
# / was on /dev/sdc1 during installation
UUID=6adf2f9e-41f9-451d-94b5-aacc9defffe8 /               ext4    errors=remount-ro 0       1
# swap was on /dev/sdc5 during installation
UUID=0f8f69ed-5502-406f-9476-06a8bca0b853 none            swap    sw              0       0
/dev/scd0       /media/cdrom0   udf,iso9660 user,noauto     0       0

/dev/sdc1    /media/Windows    ntfs-3g    defaults    0    0
/dev/sdb2    /media/Storage    ntfs-3g    defaults    0    0
/dev/sda1    /media/Backup    ntfs-3g    defaults    0    0
but when I restart it doesn't work and when I sudo mount -a this is what I get:

Code:
Code:
ntfs-3g: Failed to access volume '/dev/sdc1': No such file or directory

ntfs-3g 2010.3.6 integrated FUSE 27 - Third Generation NTFS Driver
        Configuration type 1, XATTRS are on, POSIX ACLS are off

Copyright (C) 2005-2007 Yura Pakhuchiy
Copyright (C) 2006-2009 Szabolcs Szakacsits
Copyright (C) 2007-2010 Jean-Pierre Andre
Copyright (C) 2009 Erik Larsson

Usage:    ntfs-3g [-o option[,...]] <device|image_file> <mount_point>

Options:  ro (read-only mount), remove_hiberfile, uid=, gid=,
          umask=, fmask=, dmask=, streams_interface=.
          Please see the details in the manual (type: man ntfs-3g).

Example: ntfs-3g /dev/sda1 /mnt/windows

Ntfs-3g news, support and information:  http://ntfs-3g.org
ntfs-3g-mount: failed to access mountpoint /media/Storage: No such file or directory
ntfs-3g-mount: failed to access mountpoint /media/Backup: No such file or directory
Thanks in advance OCN!

edit: and this is what I get when I try to manually mount a drive:

actually the problem appears to how you have your "drives" organized.

at installation the drive you installed linux to was /dev/sdc, but in fdisk it is listed as /dev/sdb.

your windows partition/MBR is prolly still there, but since grub is probably looking for it at hd(0,1) (or whatever), it is finding maybe your other backdrive (since its marked as a boot drive as well according to fdisk.)

put it simply, your drive arrangement is an absolute mess


looks like you changed the boot order, or the port order recently in bios, which screwed everything up?
 

· Registered
Joined
·
1,392 Posts
Discussion Starter · #17 ·
Quote:


Originally Posted by transhour
View Post

actually the problem appears to how you have your "drives" organized.

at installation the drive you installed linux to was /dev/sdc, but in fdisk it is listed as /dev/sdb.

your windows partition/MBR is prolly still there, but since grub is probably looking for it at hd(0,1) (or whatever), it is finding maybe your other backdrive (since its marked as a boot drive as well according to fdisk.)

put it simply, your drive arrangement is an absolute mess


looks like you changed the boot order, or the port order recently in bios, which screwed everything up?

yes... I screwed it up and then rearranged it accordingly.

this is what it looks like now:

Code:
Code:
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
# / was on /dev/sdc1 during installation
UUID=6adf2f9e-41f9-451d-94b5-aacc9defffe8 /               ext4    errors=remount-ro 0       1
# swap was on /dev/sdc5 during installation
UUID=0f8f69ed-5502-406f-9476-06a8bca0b853 none            swap    sw              0       0
/dev/scd0       /media/cdrom0   udf,iso9660 user,noauto     0       0

UUID=271783B81594A153/media/Storagentfs-3gdefaults00
UUID=FCEE9E43EE9DF65C/media/Backupntfs-3gdefaults00
/dev/sdc1/media/Windowsntfs-3gdefaults00
 

· Registered
Joined
·
2,895 Posts
Quote:


Originally Posted by Randallrocks
View Post

yes... I screwed it up and then rearranged it accordingly.

this is what it looks like now:

Code:
Code:
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
# / was on /dev/sdc1 during installation
UUID=6adf2f9e-41f9-451d-94b5-aacc9defffe8 /               ext4    errors=remount-ro 0       1
# swap was on /dev/sdc5 during installation
UUID=0f8f69ed-5502-406f-9476-06a8bca0b853 none            swap    sw              0       0
/dev/scd0       /media/cdrom0   udf,iso9660 user,noauto     0       0

UUID=271783B81594A153/media/Storagentfs-3gdefaults00
UUID=FCEE9E43EE9DF65C/media/Backupntfs-3gdefaults00
/dev/sdc1/media/Windowsntfs-3gdefaults00
Easy enough to fix. In grub, if there is an entry for windows, make sure it says (hd2,0)

If it isn't there, add one.

title Windows
rootnoverify (hd2,0)
makeactive
chainloader +1

I have a pain in the ass partition layout, and sometimes mine get relabled for no reason at all. If hd2,0 doesn't work (which is sdc1), you have 2 other options, so try them out. hd0,0 and hd1,1

You can do this from the boot menu, if you highlight the windows entry and press e. If you don't have the entry, you'll have to edit your grub.conf from inside Debian.
 

· Registered
Joined
·
1,392 Posts
Discussion Starter · #20 ·
Quote:
Originally Posted by esocid;13125455
Easy enough to fix. In grub, if there is an entry for windows, make sure it says (hd2,0)

If it isn't there, add one.

title Windows
rootnoverify (hd2,0)
makeactive
chainloader +1

I have a pain in the ass partition layout, and sometimes mine get relabled for no reason at all. If hd2,0 doesn't work (which is sdc1), you have 2 other options, so try them out. hd0,0 and hd1,1

You can do this from the boot menu, if you highlight the windows entry and press e. If you don't have the entry, you'll have to edit your grub.conf from inside Debian.
I copy pasted that to the end of my /boot/grub/menu.lst file in a superuser gedit. Still the same error.
 
1 - 20 of 24 Posts
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top