LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-01-2016, 07:00 PM   #1
MacP
LQ Newbie
 
Registered: Jun 2009
Location: United Kingdom
Distribution: Ubuntu 16.04LTS
Posts: 14

Rep: Reputation: 0
How can I access data on an NTFS drive


What is the best and easiest way to access data on an NTFS file-system drive in Ubuntu 16.04LTS?
 
Old 05-01-2016, 07:36 PM   #2
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
Quote:
Originally Posted by MacP View Post
What is the best and easiest way to access data on an NTFS file-system drive in Ubuntu 16.04LTS?
Install ntfs-3g, plug in drive, mount it (you can use the command line or you should be able to use the file manager)
If ntfs-3g isn't already installed, you can do so with:
Code:
sudo apt-get install ntfs-3g
 
Old 05-01-2016, 09:24 PM   #3
MacP
LQ Newbie
 
Registered: Jun 2009
Location: United Kingdom
Distribution: Ubuntu 16.04LTS
Posts: 14

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by suicidaleggroll View Post
Install ntfs-3g, plug in drive, mount it (you can use the command line or you should be able to use the file manager)
If ntfs-3g isn't already installed, you can do so with:
Code:
sudo apt-get install ntfs-3g
No success, it tells me ntfs-3g is already installed, then try to mount it and it shows an error splash screen.

Just to inform you that this drive is a 1TB internal hard disk on my desktop.
 
Old 05-01-2016, 09:42 PM   #4
pingu_penguin
Member
 
Registered: Aug 2004
Location: pune
Distribution: Slackware
Posts: 350

Rep: Reputation: 60
Easier way is probably to go to system-tools -> system-preferences -> Disks (if you have classic gnome desktop)
or just type Disks in dash search bar if you use unity.

and then try mounting your ntfs partitions via gui.

hope that helps.
 
Old 05-01-2016, 09:52 PM   #5
MacP
LQ Newbie
 
Registered: Jun 2009
Location: United Kingdom
Distribution: Ubuntu 16.04LTS
Posts: 14

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by pingu_penguin View Post
Easier way is probably to go to system-tools -> system-preferences -> Disks (if you have classic gnome desktop)
or just type Disks in dash search bar if you use unity.

and then try mounting your ntfs partitions via gui.

hope that helps.
I still get the splash screen saying "error mounting file system"

Code:
Error mounting /dev/sdb1 at /media/danny/DAN'S DATA: Command-line `mount -t "ntfs" -o "uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000" "/dev/sdb1" "/media/danny/DAN'S DATA"' exited with non-zero exit status 14: The disk contains an unclean file system (0, 0).
Metadata kept in Windows cache, refused to mount.
Failed to mount '/dev/sdb1': Operation not permitted
The NTFS partition is in an unsafe state. Please resume and shutdown
Windows fully (no hibernation or fast restarting), or mount the volume
read-only with the 'ro' mount option.
 (udisks-error-quark, 0

Last edited by MacP; 05-01-2016 at 10:00 PM.
 
Old 05-02-2016, 04:09 AM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,727

Rep: Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919
Windows 10's default shutdown actually hibernates the system. If you want to mount the drive in Ubuntu disable fast start up mode.
 
Old 05-02-2016, 07:07 AM   #7
pingu_penguin
Member
 
Registered: Aug 2004
Location: pune
Distribution: Slackware
Posts: 350

Rep: Reputation: 60
it clearly states : "The NTFS partition is in an unsafe state. Please resume and shutdown"

probably an unclean shutdown/reboot , or maybe a hard reboot was done after hibernation, due to which the filesystem is in unclean state.

boot up into windows , let the filesystem get checked automatically if necessary , and then do a clean reboot into ubuntu.

hope that helps.
 
Old 05-02-2016, 07:43 AM   #8
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,528

Rep: Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495
The 'unsafe state' mentioned in that message means hibernated and no Linux system I am aware of will mount a hibernated partition so you need to do a full shutdown without hibernation and turn off anything related to fast boot.
 
Old 05-02-2016, 11:12 AM   #9
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Quote:
Originally Posted by yancek View Post
...no Linux system I am aware of will mount a hibernated partition ...
Check out the top answer here:

http://askubuntu.com/questions/14590...to-hibernation

The trick is to mount the NTFS partition using ntfs-3g's remove_hiberfile option.
 
1 members found this post helpful.
Old 05-02-2016, 12:33 PM   #10
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,727

Rep: Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919
As a warning to the OP (That is you MacP) just in case please do not use the answer in the previous thread. You could lose unsaved data.
 
Old 05-02-2016, 02:51 PM   #11
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
There is also a command:

mount.ntfs-3g
 
Old 05-02-2016, 08:58 PM   #12
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,993

Rep: Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628
You are warned to avoid trying to access a hibernated ntfs drive.

It may be possible to use the old ntfs read only access. There is no real need to use ntfs-3g if you simply want to read from ntfs. ntfs-3g is for writing to them.
 
Old 05-03-2016, 02:33 AM   #13
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Quote:
Originally Posted by jefro View Post
You are warned to avoid trying to access a hibernated ntfs drive.
It's good to be able to approach these things from the vantage point of knowledge.

Rather than just providing a vague "warning", what are the potential disadvantages of accessing a hibernated NTFS drive (in two situations, read-only and read-write)?
 
Old 05-03-2016, 03:11 PM   #14
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,993

Rep: Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628
OK good point. The other posted replies and links did offer warnings and the links described solutions in the pages. I just repeated the warning that the most secure way would be to shut down the windows machine properly instead of hibernate. It is also possible that the OP was never intending to hibernate and some other condition exists leaving the drive in this condition. Not to mention that the wrong partition is trying to be accessed.

My point was that they may be able to simply read access the data. I have never tried this situation and not sure I can unless I install a VM. What I suggested is that linux has had ntfs read built in for a very long time. It may be possible to use the old ntfs mount to read the hibernated drive. Since the OP wanted to get data off, I can't determine if they just want to read the data or change the data on ntfs. Ntfs-3g will let you change data for good or bad.
 
1 members found this post helpful.
  


Reply



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
Save the data on a failing NTFS partitioned external drive... Is it possible? jynxd Linux - General 5 09-17-2013 10:44 PM
Access data on NTFS disk (Raid 5) jakster66 Linux - Hardware 2 03-14-2010 10:28 AM
Data lost while building new filesystem on NTFS drive Dipanjan Das Linux - Newbie 2 05-25-2009 10:59 PM
Recovering data from repartitioned ntfs drive booyabazooka Linux - Software 2 09-20-2004 10:37 PM
Editing data on an NTFS drive? from FreeBSD? Devboy *BSD 9 08-23-2004 06:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:37 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
Open Source Consulting | Domain Registration