Solved

Mounting NTFS hard drive with Ubuntu

Posted on 2009-07-14
20
1,861 Views
Last Modified: 2013-11-15
First off, I have never used Linux before and need answers explained where I can understand them..lol... I have a windows pc and the hard drive failed on me.. I took the hard drive out and mounted it on another box that has windows on it.. (so i have two drives, one is good with windows on it and the other is the bad drive).. I downloaded the Ubuntu boot cd and booted to Ubuntu and when I try to mount the drive I get an error Unable to mount drive.. Again, I dont know anything about Linux and need someone that can explain what I need to do to mount this drive so that I can understand. I need to get some info off of drive.. I read some possible fixes online but dont understand any of it.. Thanks..
0
Comment
Question by:hlh_admin
  • 6
  • 5
  • 3
  • +3
20 Comments
 
LVL 29

Accepted Solution

by:
fosiul01 earned 500 total points
ID: 24852742
Ok have a look to this one

http://www.sajithmr.com/mount-ntfs-file-system-in-ubuntu-debian/
to mount ntfs you need to install few packages

sudo apt-get install ntfs-3g

after installing those then try to mount

0
 
LVL 7

Expert Comment

by:gsnshankar
ID: 24852761


You have to use Terminal window to type commands in Ubuntu. To find how and where the terminal will be... Click the following link..

http://www.psychocats.net/ubuntu/terminal

Then to get steps to mount NTFS volume click the link

http://ubuntuguide.org/wiki/Dapper#Windows

Hope this helps. Try and ask if any doubts arise...
0
 

Author Comment

by:hlh_admin
ID: 24852776
So do i need to be on the internet to download these packages? and is this some type of command your have there.. Like I said I have never used Linux.. I am using Ubuntu 9.04 Desktop Version if this matters..
0
 
LVL 29

Expert Comment

by:fosiul01
ID: 24852796
i prefer redhat,

but if you put ubuntu CD in their then if you type this
apt-get install ntfs-3g


it should install from the CD , if cd has this software

normaly i install from Internet  
0
 

Author Comment

by:hlh_admin
ID: 24852804
Does it matter that i have two drives.. Do I have to specify which drive im mounting or when I type these commands it just knows? Sorry guys im a huge newb to linux... and have never tried to recover HD before.. I am new to the IT field you could say and am still learning so I appreciate all your patience..
0
 
LVL 29

Expert Comment

by:fosiul01
ID: 24852849
you need hardrisk number
when you will run
fdisk -l
it will show you the harddisk name like this

Device Boot Start End Blocks Id System
/dev/sda1 * 1 2550 20480008+ 7 HPFS/NTFS
/dev/sda2 2550 7493 39707451+ f W95 Extd (LBA)
/dev/sda3 7494 9729 17960670 83 Linux
/dev/sda5 2550 7394 38911288+ b W95 FAT32
/dev/sda6 7395 7493 795186 82 Linux swap / Solaris



you need to tell which hardisk to mount

example, if its /dev/sda6

then you will have to tell that

have a look this one aswell
http://www.arsgeek.com/2006/09/25/ubuntu-tricks-how-to-mount-your-windows-partition-and-make-it-readwritable/
0
 

Author Comment

by:hlh_admin
ID: 24852977
i will try these steps and post back.. Thanks..
0
 
LVL 8

Expert Comment

by:JT92677
ID: 24855252
It seems that your issue is a need to get data from a failing (or partially failing) hard disk.  Why go to UBUNTU to do this?

If you put the drive in your computer as a second drive (with the one that works) Windows will boot on the first disk with an active partition  (the one that works).

Once it boots, you can inspect the other drive from windows.

I think you're concerned about some sort of conflict, but if the failing drive is the 2nd drive in your computer, it will be fine, and won't boot if the primary disk is booting.

I like Ubuntu, it has it's place, but going down that path to get data from a hard disk is like buying an aircraft and learning to fly it so you can see what's in your back yard.

Just view the drive from your working windows installation.

If you don't want to install the drive inside the computer, get one of these cute devices from compgeeks

http://www.geeks.com/details.asp?invtid=2020-OTB&cat=HDD

It has a power supply for the drive, can handle IDE and SATA drives, and ends up allowing access through a USB port on your working computer, and can be hot-inserted once your main machine is up and running.

0
 
LVL 1

Expert Comment

by:apochimongitus
ID: 24855776
JT92677, I reckon linux is great for recovering failed/failing hard disks that are no longer accessible through windows.

To the OP: However, I would say that if you can see the drive in windows, you can probably backup the data from there. Linux has some great tools for doing bit level copying if the NTFS file structure is broken (and for that matter if NTFS is broken on the failing disk, then being able to mount ntfs partitions in linux isn't going to be much use). What I would suggest is to try a live boot cd like knoppix (most recent distros have ntfs3g already installed) and try to get a backup image of the disk using dd. Then you can mount the image file you get from the dodgy disk in a program like GetDataBack for NTFS (costs $ though) and go from there.
0
Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

 
LVL 8

Expert Comment

by:JT92677
ID: 24855879
to apochimongitus - There are windows utilities that can get data from failed drives as well. hlh-admin (the questioner) lacks familiarity with Ubuntu, so I assume it would be more involved trying to work with Ubuntu, or any linux distribution, than to take a more familiar approach.

I've used Steve Gibson's spinrite program to recover data that is weak, and produces high levels of error correction, and also have used some programs that recover data based on one of the two allocation tables, when the directory has been screwed up.

I'm not sure it can be said that Linux has the corner on hard disk utilities or file recovery programs. I've seen 'em in Windows and DOS as well.

My suggestion was based on the idea that going through all the effort of mounting a volume in Ubuntu, seemed a bit like overkill, especially for someone who was not sure about how to mount a volume in Ubuntu.

Sometimes the simplest way is also the most effective.
0
 
LVL 1

Expert Comment

by:apochimongitus
ID: 24856199
JT... Sometimes I can get a bit carried away with things... If you're going to fork out for GetDataBack for NTFS you may as well use the built in imaging software that it has anyway...

And you're right, linux doesn't have the market cornered when it comes to data recovery... but the tools with linux are typically free and they are what I used initially when cutting my 'data retrieval' teeth.

We are kinda assuming, of course, that the OP is actually talking about 'for real' data recovery as opposed to just copying the data from an old disused hdd.

Apochimongitus.
0
 
LVL 1

Expert Comment

by:apochimongitus
ID: 24856244
hlh-admin: I just re-read the original post and noticed you say the HDD failed. If that is so, is it visible in the BIOS, and if it is visible in BIOS, when you go to the disk manager mmc are you able to see the disk in there? If your 'system' can tell that the drive is there, then there is a good chance you will be able to recover the data from any operating system. I would also recommend a program called Get Data Back for NTFS it is a very competent automated data recovery solution. You have to pay for the software but that will be a heap less than what you'd pay for a pro to do it. It is always a good idea to take an image of the drive initially before you start any work on it and work from the image rather than the suspect disk.

Hope this helps.

Apochimongitus.
0
 
LVL 8

Expert Comment

by:JT92677
ID: 24856272
Apochimongitus -- I actually used GetDataBack -- I like their approach. They let you diagnose the hard disk, show you all the stuff you'll recover, and then ask for money so you can actually get the data.  This is better than paying first, and finding out that the drive is so utterly hosed that it's useless to pursue (like a head failure, or motor problem, the worst is that high-speed grinder sound <<grin>>)

As they say about their program "The software can even recover your data when the drive is no longer recognized by the operating system or when all directory information is lost." -- It comes down to reconciling how valuable the data is, and how much one's time is worth. For the inquisitive, I think the current price of GetDataBack is about $80 in round numbers. For me, it was worthwhile when I needed to use it. I got the NTFS version, and it worked very well. This was a couple of years ago, no doubt the latest version(s) are even bettter.

0
 

Expert Comment

by:aschuete
ID: 24870285
If it is the error I'm thinking of this should work.  Let us know what


# Create passwords for your account and root account
passwd
sudo passwd root
# Mount a NTFS partition - replace sda#/sdb# with the appropriate device (sda1, sdb1, hda1, etc..).
# You can find which device you need with the command
sudo fdisk -l
sudo mkdir /mount/oldos
sudo mkdir /mount/goodos
sudo mount -r -t ntfs-3g /dev/sda# /mount/oldos -o force
# If it says ntfs-3g does not exist install it with the command below then repeat
sudo apt-get install ntfs-3g
sudo mount -w -t ntfs-3g /dev/sdb# /mount/goodos -o -force
# Open up the directories with root permission so there are no isssues
sudo nautilus /mount/oldos
sudo nautilus /mount/goodos
0
 

Author Comment

by:hlh_admin
ID: 24895965
aschuete:

ok this is the error im getting when i go through this..
"ntfs_attr_pread_i: ntfs_pread failed: Input/output/error
Failed to calculate free mft records: Input/output/error
NTFS is either inconsistent, or there is a hardware fault, or its a
SoftRAID/ FakeRAID hardware. In the first case run chkdsk /f on Windows
then reboot into Windows twice. The usage of the /f parameter is very important!
If the device is a SoftRAID/FakeRAID then first activate it and mount a different device under the /dev/mapper/ directory, (e.g. /dev/mapper/nvidia_eahaabcc1). Please see the 'dmraid' documentation for more details.."

I have done everything correct i believe.. The drive shows in Ubuntu / Computer but it wont let me access it..
0
 

Author Comment

by:hlh_admin
ID: 24896411
Windows does not see drive.. I am trying to use GetDataBack and there is no drive besides the main hd that i see..
0
 
LVL 1

Expert Comment

by:apochimongitus
ID: 24899324
if linux can see the drive but not mount it, this is not a problem. Open up a root console and type:
"dd if=/dev/sda (or whatever the hard drive is being recognised as) of=/media/sda1/<some good backup directory>/harddisk.img conv=noerror,sync bs=512k" or something to that effect. Even if you cannot mount the drive, dd will do a bit level copy of the drive and make an identical (ie. errors corruptions and all) copy. The noerrror and sync switches allow you to continue reading the drive after a bad sector and the sync switch will put all 1's in place of the unreadable data. This may take some time... I have personally had a drive that took over 3 weeks to get an image of only 10GB... luckily the drive didn't die in the process (although it was starting to) and thankfully i was able to recover that person's photos that they hadn't backed up.

Once you have an image of the drive, you can use get data back on the image (rather than the faulty drive) and it will 'hopefully' be able to recover some data for you.

Apochimongitus.
0
 

Author Comment

by:hlh_admin
ID: 24899506
apochimongitus:

I am linux newb so can you tell me what to type... i see what you have up there but you broke up your command and I dont know whats part of the command and whats not... Also i am backing up everything to a external harddrive if this matters..
0
 
LVL 1

Expert Comment

by:apochimongitus
ID: 24899966
if stands for input file. Linux sees everything as file or byte stream. so you need to specifiy your failed disk in this section, this could be /dev/sda, /dev/sdb it depends on the order that linux sees disks.

of stands for output file. this is the location that you want to store the image... if linux sees your external drive as /media/sdb2/output/file.here (or something then you specify the path that you want to save it to)

so the final string might look something like:

dd if=/dev/sda of=/media/sdb2/backup/harddisk.img conv=noerror,sync bs=512

make sure there is plenty of space on your external disk as the final image will be as large as the failed disk (ie so if the failed disk is 50GB the final image will be 50GB).

Hope this helps.

Apochimongitus.
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Windows 10 Blue Screen of Death Minidump analysis request 3 37
Lifters 4 39
hp deskjet 1055 8 33
New Hard Drive for Laptop 3 21
Storage devices are generally used to save the data or sometime transfer the data from one computer system to another system. However, sometimes user accidentally erased their important data from the Storage devices. Users have to know how data reco…
In the modern office, employees tend to move around the workplace a lot more freely. Conferences, collaborative groups, flexible seating and working from home require a new level of mobility. Technology has not only changed the behavior and the expe…
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now