Overclock.net › Forums › Software, Programming and Coding › Operating Systems › Linux, Unix › Automounting NTFS drives
New Posts  All Forums:Forum Nav:

Automounting NTFS drives

post #1 of 24
Thread Starter 
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:
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:
# /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:
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:
post #2 of 24
The mount points have to actually exist first.

Code:
mkdir /mnt/whatever
Underground
(14 items)
 
  
CPUMotherboardGraphicsRAM
Core i7 920 C0 ASUS P6T6 WS Revolution GTX 460 TR3X6G1600C8D 
Hard DriveOptical DriveCoolingOS
WD1001FALS SAMSUNG SH-S223F 22X DVD MULTI Corsair H50 Fedora 16 KDE x86_64 
MonitorKeyboardPowerCase
HP w19b Microsoft Comfort Curve Corsair CX600 Thermaltake Armor VA8003BWS 
MouseMouse Pad
Razer DeathAdder Black 
  hide details  
Reply
Underground
(14 items)
 
  
CPUMotherboardGraphicsRAM
Core i7 920 C0 ASUS P6T6 WS Revolution GTX 460 TR3X6G1600C8D 
Hard DriveOptical DriveCoolingOS
WD1001FALS SAMSUNG SH-S223F 22X DVD MULTI Corsair H50 Fedora 16 KDE x86_64 
MonitorKeyboardPowerCase
HP w19b Microsoft Comfort Curve Corsair CX600 Thermaltake Armor VA8003BWS 
MouseMouse Pad
Razer DeathAdder Black 
  hide details  
Reply
post #3 of 24
sudo mkdir /media/Backup
sudo mkdir /media/Storage

try that.
Bazinga Punk
(12 items)
 
ooh shiny!
(6 items)
 
 
CPUMotherboardGraphicsRAM
Intel Xeon 3440 AsRock P55 extreme Evga 8800 GT 512 MB Gskill Ripjaws 
Hard DriveCoolingOSMonitor
Western Digital Blue Antec Khuler 620 Ubuntu 11.10 Asus vw264H 
KeyboardPowerCaseMouse
GIGABYTE KM7600 CORSAIR TX 650 Cooler Master 590 GIGABYTE GM-M6800 
CPUMotherboardGraphicsRAM
Intel Core I5 6500 Gigabyte z170xp-SLI Nvidia 970gtx Corsair 16gb ddr4 2666mhz  
Hard DriveOS
250gb Samsung Evo 850 Windows 10 & Ubuntu 15.10 
  hide details  
Reply
Bazinga Punk
(12 items)
 
ooh shiny!
(6 items)
 
 
CPUMotherboardGraphicsRAM
Intel Xeon 3440 AsRock P55 extreme Evga 8800 GT 512 MB Gskill Ripjaws 
Hard DriveCoolingOSMonitor
Western Digital Blue Antec Khuler 620 Ubuntu 11.10 Asus vw264H 
KeyboardPowerCaseMouse
GIGABYTE KM7600 CORSAIR TX 650 Cooler Master 590 GIGABYTE GM-M6800 
CPUMotherboardGraphicsRAM
Intel Core I5 6500 Gigabyte z170xp-SLI Nvidia 970gtx Corsair 16gb ddr4 2666mhz  
Hard DriveOS
250gb Samsung Evo 850 Windows 10 & Ubuntu 15.10 
  hide details  
Reply
post #4 of 24
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:
sudo mount -t ntfs-3g /dev/sdb1 /media/external -o force
or change your fstab to force
Code:
/dev/sda1 /media/backups ntfs-3g defaults,force 0 0
Deimos
(13 items)
 
Pluto
(18 items)
 
 
CPUMotherboardGraphicsRAM
AMD 1090T Biostar TA890FXE Nvidia GTX 470 Corsair Vengence 
Hard DriveHard DriveHard DriveHard Drive
Samsung 830 MZ-7PC128D/AM Western Digital Black Western Digital Green Western Digital Blue 
CoolingOSOSMonitor
Dtek v2 Water Windows 7 Pro Fedora 16 LG4250 42" LCD TV 
KeyboardPowerCaseMouse
Microsoft Ergo Silverstone ST-1000P Cooler Master Cosmos 1000 Logitech G500 
Mouse PadAudio
X-Trac Ripper Asus D1 
  hide details  
Reply
Deimos
(13 items)
 
Pluto
(18 items)
 
 
CPUMotherboardGraphicsRAM
AMD 1090T Biostar TA890FXE Nvidia GTX 470 Corsair Vengence 
Hard DriveHard DriveHard DriveHard Drive
Samsung 830 MZ-7PC128D/AM Western Digital Black Western Digital Green Western Digital Blue 
CoolingOSOSMonitor
Dtek v2 Water Windows 7 Pro Fedora 16 LG4250 42" LCD TV 
KeyboardPowerCaseMouse
Microsoft Ergo Silverstone ST-1000P Cooler Master Cosmos 1000 Logitech G500 
Mouse PadAudio
X-Trac Ripper Asus D1 
  hide details  
Reply
post #5 of 24
Thread Starter 
Created the directories... still doesn't work. Now, however, I can manually mount the drives by entering the root password.
post #6 of 24
See if you can turn on automounting.

Edit /apps/nautilus/preferences/media_automount
to say true.
Deimos
(13 items)
 
Pluto
(18 items)
 
 
CPUMotherboardGraphicsRAM
AMD 1090T Biostar TA890FXE Nvidia GTX 470 Corsair Vengence 
Hard DriveHard DriveHard DriveHard Drive
Samsung 830 MZ-7PC128D/AM Western Digital Black Western Digital Green Western Digital Blue 
CoolingOSOSMonitor
Dtek v2 Water Windows 7 Pro Fedora 16 LG4250 42" LCD TV 
KeyboardPowerCaseMouse
Microsoft Ergo Silverstone ST-1000P Cooler Master Cosmos 1000 Logitech G500 
Mouse PadAudio
X-Trac Ripper Asus D1 
  hide details  
Reply
Deimos
(13 items)
 
Pluto
(18 items)
 
 
CPUMotherboardGraphicsRAM
AMD 1090T Biostar TA890FXE Nvidia GTX 470 Corsair Vengence 
Hard DriveHard DriveHard DriveHard Drive
Samsung 830 MZ-7PC128D/AM Western Digital Black Western Digital Green Western Digital Blue 
CoolingOSOSMonitor
Dtek v2 Water Windows 7 Pro Fedora 16 LG4250 42" LCD TV 
KeyboardPowerCaseMouse
Microsoft Ergo Silverstone ST-1000P Cooler Master Cosmos 1000 Logitech G500 
Mouse PadAudio
X-Trac Ripper Asus D1 
  hide details  
Reply
post #7 of 24
did you try doing an "auto" on your file system type? believe fstab supports that function couldnt hurt to try right? lol
Kinda meh now...
(13 items)
 
  
CPUMotherboardGraphicsRAM
PhII 940 BE asus M4N82 Deluxe 2x 8800gts(g92) 2x 1g ocz ddr2 1066 
Hard DriveOptical DriveOSMonitor
/dev/sd[abc] /dev/sr0 WinXP/Linux 22in acer 
PowerCaseMouseMouse Pad
950w rosewill timebomb Antec 900 (2small) Voodoo Deathadder (RED!) X-Trac Pads Ripper XL 
  hide details  
Reply
Kinda meh now...
(13 items)
 
  
CPUMotherboardGraphicsRAM
PhII 940 BE asus M4N82 Deluxe 2x 8800gts(g92) 2x 1g ocz ddr2 1066 
Hard DriveOptical DriveOSMonitor
/dev/sd[abc] /dev/sr0 WinXP/Linux 22in acer 
PowerCaseMouseMouse Pad
950w rosewill timebomb Antec 900 (2small) Voodoo Deathadder (RED!) X-Trac Pads Ripper XL 
  hide details  
Reply
post #8 of 24
what about adding the user option to fstab?
Rena
(13 items)
 
  
CPUMotherboardGraphicsRAM
AMD Phenom II x6 1055T Asus M4A88TD-M/USB3 XFX 8800gt 512mb 2x2GB 1333MHz 
Hard DriveOptical DriveOSMonitor
250gb WD + 1tb WD + 2tb WD LG GSA-H55L Aptosid amd64 Samsung Syncmaster 216BW 
KeyboardPowerMouse
Genius Thermaltake TR2 W0379RU 500W Generic Microsoft Mouse 
  hide details  
Reply
Rena
(13 items)
 
  
CPUMotherboardGraphicsRAM
AMD Phenom II x6 1055T Asus M4A88TD-M/USB3 XFX 8800gt 512mb 2x2GB 1333MHz 
Hard DriveOptical DriveOSMonitor
250gb WD + 1tb WD + 2tb WD LG GSA-H55L Aptosid amd64 Samsung Syncmaster 216BW 
KeyboardPowerMouse
Genius Thermaltake TR2 W0379RU 500W Generic Microsoft Mouse 
  hide details  
Reply
post #9 of 24
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?
Underground
(14 items)
 
  
CPUMotherboardGraphicsRAM
Core i7 920 C0 ASUS P6T6 WS Revolution GTX 460 TR3X6G1600C8D 
Hard DriveOptical DriveCoolingOS
WD1001FALS SAMSUNG SH-S223F 22X DVD MULTI Corsair H50 Fedora 16 KDE x86_64 
MonitorKeyboardPowerCase
HP w19b Microsoft Comfort Curve Corsair CX600 Thermaltake Armor VA8003BWS 
MouseMouse Pad
Razer DeathAdder Black 
  hide details  
Reply
Underground
(14 items)
 
  
CPUMotherboardGraphicsRAM
Core i7 920 C0 ASUS P6T6 WS Revolution GTX 460 TR3X6G1600C8D 
Hard DriveOptical DriveCoolingOS
WD1001FALS SAMSUNG SH-S223F 22X DVD MULTI Corsair H50 Fedora 16 KDE x86_64 
MonitorKeyboardPowerCase
HP w19b Microsoft Comfort Curve Corsair CX600 Thermaltake Armor VA8003BWS 
MouseMouse Pad
Razer DeathAdder Black 
  hide details  
Reply
post #10 of 24
Thread Starter 
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.
Edited by Randallrocks - 4/14/11 at 11:16am
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Linux, Unix
Overclock.net › Forums › Software, Programming and Coding › Operating Systems › Linux, Unix › Automounting NTFS drives