Getting data from a dead WinXP laptop HDD ?

  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13503
  • Loc: Florida

Post 3+ Months Ago

Long story short my laptop died, but I believe the HDD is still good.

I've found a few adapters to plug the 2.5" drive into the 3.5" IDE cable, some even come with mounting brackets.

What I'm wondering now, is what will happen if I take this HDD which has been running Windows XP Home, & simply plug it into my PC which is running Ubuntu Fiesty ?

If I can contunue using the drive in the PC by formatting it or somthing after retrieving the data, awesome, but My primary concern is being able to grab a bunch of files.
Types of files range from photos, to DTD files, to Operas' bookmarks, to the data directory of an old MySQL install.
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • Dangles
  • Proficient
  • Proficient
  • Dangles
  • Posts: 299
  • Loc: Brooklyn Transplanted into NJ

Post 3+ Months Ago

Couldn't you use one of these to make it into a portable drive to connect through a USB port?

http://www.newegg.com/Product/ProductLi ... op+Sellers

Dangles

Edit -

Here is the link to 2.5" drives
http://www.newegg.com/Product/ProductLi ... op+Sellers
  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13503
  • Loc: Florida

Post 3+ Months Ago

That's plan-B.

I still want to know what would happen if I pluged the drive into my Ubuntu box though.
  • spork
  • Brewmaster
  • Silver Member
  • User avatar
  • Posts: 6252
  • Loc: Seattle, WA

Post 3+ Months Ago

I was able to mount NTFS partitions on my Fedora 6 box with no problems. I'm not sure what kind of NTFS support Ubuntu comes with, but it seems to me that you should be able to hook it up and simply transfer everything over.
  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13503
  • Loc: Florida

Post 3+ Months Ago

God I hate the thought of having to ask at the Ubuntu forums, everyone that seems like they know anything over there has a "leave me alone !" type of aura about them. :hmm:

The fact that you mounted with Fedora is encouraging spork, I guess the worst that could happen is Ubuntu tells me it can't read the disk, in which case I should be able to plug it into the new PC I get down the road & read it like normal. (yes I plan to replace the dead Win lappy with a Win PC since it's what I know, somewhat)

I know "a USB adapter is only like $10 !111", but comparison-wise it seems like a better deal to go the IDE route & have a story to tell.
  • AnarchY SI
  • Web Master
  • Web Master
  • User avatar
  • Posts: 2521
  • Loc: /usr/src/MI

Post 3+ Months Ago

when you plug in the hdd w/winblows on it :] ubuntu should just recognize you've added more storage space and have a shortcut to the drive on the desktop.
you should be able to read data off the drive, and if you want to write data to the drive you can do that through a series of menus (Applications -> System Tools -> NTFS Configuration Tool)
if this option isn't available, open up the Synaptic Package Manager (System -> Administration -> ... OR alt+F2, gksu synaptic) and search for ntfs which should bring up "ntfsprogs" (or you could just search for that ^_^)
install that and you should be good to go. with this program, it'll give you the option to make your ntfs partitions writable. if it can't do it, it'll tell you why :]
  • spork
  • Brewmaster
  • Silver Member
  • User avatar
  • Posts: 6252
  • Loc: Seattle, WA

Post 3+ Months Ago

joebert wrote:
I guess the worst that could happen is Ubuntu tells me it can't read the disk, in which case I should be able to plug it into the new PC I get down the road & read it like normal

I agree. I really don't think you're going to encounter any data loss just by attaching it and letting Ubuntu try to find it. It's worth a try in my opinion, otherwise....

zomg a USB adapter is only like $15!1!cos(0)!
  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13503
  • Loc: Florida

Post 3+ Months Ago

That's as good of an answer as I could have hoped for Anarchy, thanks again ! :D

In case anyone wants to see a little bit on what a dead Compaq laptops insides look like, I took some photos after I tore it appart.
  • AnarchY SI
  • Web Master
  • Web Master
  • User avatar
  • Posts: 2521
  • Loc: /usr/src/MI

Post 3+ Months Ago

no problem :]
  • kc0tma
  • o|||||||o
  • Web Master
  • User avatar
  • Posts: 3318
  • Loc: Trout Creek, MT

Post 3+ Months Ago

Dangles wrote:
Couldn't you use one of these to make it into a portable drive to connect through a USB port?


This is one of the handiest things I have ever had hands down. I guarantee that if you go this route, you will use that thing over and over again.

It appears that NTFS mounting is a pretty much standard feature on most of the newest distributions, so that shouldn't give you too many headaches.
  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13503
  • Loc: Florida

Post 3+ Months Ago

I got the adapter a couple days ago, I was amazed to find out there's no resisters or anything on the adapters PCB, I probably could have cut an IDE cable & made one myself, but I suppose the part's probably worth the $2 USD.

Here's what I did.

I hooked the drive up to the secondary IDE cable using the adapter, giving me,
  1. /dev/hda - Primary HDD
  2. /dev/hdb - Primary CDROM
  3. /dev/hdc - Laptop HDD


I'm having a problem mounting the newly installed HDD & I'm not sure what the problem is.

Code: [ Select ]
me@mybox:~/Desktop$ sudo fdisk -l | grep NTFS
/dev/hdc1  *      1    77505  39062488+  7 HPFS/NTFS

me@mybox:~/Desktop$ sudo mkdir /media/windows

me@mybox:~/Desktop$ sudo cp /etc/fstab /etc/fstab.bak

me@mybox:~/Desktop$ gksu gedit /etc/fstab


##################
Added the following line in /etc/fstab
/dev/hdc1   /media/windows   ntfs-3g   defaults,locale=en_US.utf8  0  0
##################


me@mybox:~/Desktop$ sudo mount -a

Failed to access '/dev/hdc1': No such file or directory

me@mybox:~/Desktop$
  1. me@mybox:~/Desktop$ sudo fdisk -l | grep NTFS
  2. /dev/hdc1  *      1    77505  39062488+  7 HPFS/NTFS
  3. me@mybox:~/Desktop$ sudo mkdir /media/windows
  4. me@mybox:~/Desktop$ sudo cp /etc/fstab /etc/fstab.bak
  5. me@mybox:~/Desktop$ gksu gedit /etc/fstab
  6. ##################
  7. Added the following line in /etc/fstab
  8. /dev/hdc1   /media/windows   ntfs-3g   defaults,locale=en_US.utf8  0  0
  9. ##################
  10. me@mybox:~/Desktop$ sudo mount -a
  11. Failed to access '/dev/hdc1': No such file or directory
  12. me@mybox:~/Desktop$


I installed "testdisk" & it says the backup & primary boot sectors match, as well as the MFT mirror.
It also goes on about the number of heads being 16 when it might actually need to be 240.
  • AnarchY SI
  • Web Master
  • Web Master
  • User avatar
  • Posts: 2521
  • Loc: /usr/src/MI

Post 3+ Months Ago

all of my NTFS partitions are listed in my fstab file by their uuid, so give that a try & hopefully it'll work for you too? this is an odd way of doing it, but its been a problem in other deb based distro's.. so to do this:
have the drive connected and get booted to the desktop,
open a terminal & enter:
Code: [ Select ]
ls /dev/disk/by-uuid -alh | grep hdc1

that should print out some line similar to the following..
Quote:
lrwxrwxrwx 1 root root 10 2007-09-16 17:58 944df7d7-b097-4e8a-a499-66ed512698f0 -> ../../hda5

now, open up your /etc/fstab file (after making a backup of a good copy, which it appears as though you've already done) so that it's writable and before where you had /dev/hdc , replace this 'part' with UUID= and whatever id was output previously, so for me itd be: UUID=944df7d7-b097-4e8a-a499-66ed512698f0

save the file, exit, try mount -a again
:]
  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13503
  • Loc: Florida

Post 3+ Months Ago

I get no output by-uuid for hdc1. :scratchhead:

Code: [ Select ]
me@mybox:~$ ls /dev/disk/by-uuid -alh | grep hdc1
me@mybox:~$ ls /dev/disk/by-uuid -alh | grep hdc
me@mybox:~$ ls /dev/disk/by-uuid -alh
total 0
drwxr-xr-x 2 root root 80 2007-09-16 20:00 .
drwxr-xr-x 5 root root 100 2007-09-16 20:00 ..
lrwxrwxrwx 1 root root 10 2007-09-16 20:00 6ccc171e-becf-4f8b-8d81-c3cdefe9a906 -> ../../hda1
lrwxrwxrwx 1 root root 10 2007-09-16 20:00 d0403c3a-47d0-4591-a1a6-9303f8522501 -> ../../hda5
me@mybox:~$ ls /dev

### ...

fuse    ptycf ptyr9 ptyw3 ram7   tty8  ttye8 ttyse ttyx8
hda    ptyd0 ptyra ptyw4 ram8   tty9  ttye9 ttysf ttyx9
hda1    ptyd1 ptyrb ptyw5 ram9   ttya0 ttyea ttyt0 ttyxa
hda2    ptyd2 ptyrc ptyw6 random  ttya1 ttyeb ttyt1 ttyxb
hda5    ptyd3 ptyrd ptyw7 rtc    ttya2 ttyec ttyt2 ttyxc
hdb    ptyd4 ptyre ptyw8 shm    ttya3 ttyed ttyt3 ttyxd
hdc    ptyd5 ptyrf ptyw9 snapshot ttya4 ttyee ttyt4 ttyxe
hpet    ptyd6 ptys0 ptywa sndstat  ttya5 ttyef ttyt5 ttyxf

### ...

me@mybox:~$ sudo fdisk -l
Password:

Disk /dev/hda: 6448 MB, 6448619520 bytes
255 heads, 63 sectors/track, 784 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

  Device Boot   Start     End   Blocks  Id System
/dev/hda1  *      1     743   5968116  83 Linux
/dev/hda2       744     784   329332+  5 Extended
/dev/hda5       744     784   329301  82 Linux swap / Solaris

Disk /dev/hdc: 40.0 GB, 40007761920 bytes
16 heads, 63 sectors/track, 77520 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes

  Device Boot   Start     End   Blocks  Id System
/dev/hdc1  *      1    77505  39062488+  7 HPFS/NTFS
me@mybox:~$
  1. me@mybox:~$ ls /dev/disk/by-uuid -alh | grep hdc1
  2. me@mybox:~$ ls /dev/disk/by-uuid -alh | grep hdc
  3. me@mybox:~$ ls /dev/disk/by-uuid -alh
  4. total 0
  5. drwxr-xr-x 2 root root 80 2007-09-16 20:00 .
  6. drwxr-xr-x 5 root root 100 2007-09-16 20:00 ..
  7. lrwxrwxrwx 1 root root 10 2007-09-16 20:00 6ccc171e-becf-4f8b-8d81-c3cdefe9a906 -> ../../hda1
  8. lrwxrwxrwx 1 root root 10 2007-09-16 20:00 d0403c3a-47d0-4591-a1a6-9303f8522501 -> ../../hda5
  9. me@mybox:~$ ls /dev
  10. ### ...
  11. fuse    ptycf ptyr9 ptyw3 ram7   tty8  ttye8 ttyse ttyx8
  12. hda    ptyd0 ptyra ptyw4 ram8   tty9  ttye9 ttysf ttyx9
  13. hda1    ptyd1 ptyrb ptyw5 ram9   ttya0 ttyea ttyt0 ttyxa
  14. hda2    ptyd2 ptyrc ptyw6 random  ttya1 ttyeb ttyt1 ttyxb
  15. hda5    ptyd3 ptyrd ptyw7 rtc    ttya2 ttyec ttyt2 ttyxc
  16. hdb    ptyd4 ptyre ptyw8 shm    ttya3 ttyed ttyt3 ttyxd
  17. hdc    ptyd5 ptyrf ptyw9 snapshot ttya4 ttyee ttyt4 ttyxe
  18. hpet    ptyd6 ptys0 ptywa sndstat  ttya5 ttyef ttyt5 ttyxf
  19. ### ...
  20. me@mybox:~$ sudo fdisk -l
  21. Password:
  22. Disk /dev/hda: 6448 MB, 6448619520 bytes
  23. 255 heads, 63 sectors/track, 784 cylinders
  24. Units = cylinders of 16065 * 512 = 8225280 bytes
  25.   Device Boot   Start     End   Blocks  Id System
  26. /dev/hda1  *      1     743   5968116  83 Linux
  27. /dev/hda2       744     784   329332+  5 Extended
  28. /dev/hda5       744     784   329301  82 Linux swap / Solaris
  29. Disk /dev/hdc: 40.0 GB, 40007761920 bytes
  30. 16 heads, 63 sectors/track, 77520 cylinders
  31. Units = cylinders of 1008 * 512 = 516096 bytes
  32.   Device Boot   Start     End   Blocks  Id System
  33. /dev/hdc1  *      1    77505  39062488+  7 HPFS/NTFS
  34. me@mybox:~$
  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13503
  • Loc: Florida

Post 3+ Months Ago

Code: [ Select ]
me@mybox:/etc$ ntfsls /dev/hdc

Error opening partition device : Permission denied

Failed to startup volume : Permission denied

Couldn't mount device '/dev/hdc' : Permission denied

me@mybox:/etc$ ntfsls /dev/hdc1

The device /dev/hdc1 doesn't exist

me@mybox:/etc$ ntfsls -f /dev/hdc

Error opening partition device : Permission denied

Failed to startup volume : Permission denied

Couldn't mount device '/dev/hdc' : Permission denied
  1. me@mybox:/etc$ ntfsls /dev/hdc
  2. Error opening partition device : Permission denied
  3. Failed to startup volume : Permission denied
  4. Couldn't mount device '/dev/hdc' : Permission denied
  5. me@mybox:/etc$ ntfsls /dev/hdc1
  6. The device /dev/hdc1 doesn't exist
  7. me@mybox:/etc$ ntfsls -f /dev/hdc
  8. Error opening partition device : Permission denied
  9. Failed to startup volume : Permission denied
  10. Couldn't mount device '/dev/hdc' : Permission denied


Could it be somthing with security preventing me from reading my drive ?

I know every password that could possibly be needed for anything on this drive, where would I put them in ? :scratchhead:
  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13503
  • Loc: Florida

Post 3+ Months Ago

Good news, I just imported my Opera bookmarks from the Ubuntu box to this laptop. :D

I used gparted to take a look at the drive, the drive was listed but there was a warning icon next to the partition information & when I looked at the info it said the partition hdc1 did not exist.
Upon looking at the hardware information with gparted I found out the number of heads needed to be 255 instead of the 16 it was set at, or the 240 suggested by testdisk.

I used testdisk again, I changed the number of heads from 16 to 255, then quit the application making sure not to touch anything else, then rebooted the system for the changes to take effect.

Once I rebooted the partition was visible & there was a new "37Gib Volume" option listed in Places next to the CRROM & Filesystem, however it was unaccessible.

I tried to mount the volume using the following command.
Code: [ Select ]
me@mybox:~$ sudo mount -t ntfs-3g /dev/hdc1 /media/windows


I got this, which made sense considering the last time the laptop was used I had to pull the battery out after the display driver crashed & left me with a blank screen.
Quote:
Did not find any restart pages in $LogFile and it was not empty.
Failed to mount '/dev/hdc1': Operation not supported
Mount is denied because NTFS logfile is unclean. Choose one action:
Boot Windows and shutdown it cleanly, or if you have a removable
device then click the 'Safely Remove Hardware' icon in the Windows
taskbar notification area before disconnecting it.
Or
Run ntfsfix version 1.13.1 on Linux unless you have Vista.
Or
Mount the NTFS volume with the 'ro' option in read-only mode.


So I did this
Code: [ Select ]
me@mybox:~$ mount --help
Usage: mount -V         : print version
    mount -h         : print this help
    mount          : list mounted filesystems
    mount -l         : idem, including volume labels
So far the informational part. Next the mounting.
The command is `mount [-t fstype] something somewhere'.
Details found in /etc/fstab may be omitted.
    mount -a [-t|-O] ...   : mount all stuff from /etc/fstab
    mount device       : mount device at the known place
    mount directory     : mount known device here
    mount -t type dev dir  : ordinary mount command
Note that one does not really mount a device, one mounts
a filesystem (of the given type) found on the device.
One can also mount an already visible directory tree elsewhere:
    mount --bind olddir newdir
or move a subtree:
    mount --move olddir newdir
A device can be given by name, say /dev/hda1 or /dev/cdrom,
or by label, using -L label or by uuid, using -U uuid .
Other options: [-nfFrsvw] [-o options] [-p passwdfd].
For many more details, say man 8 mount .


me@mybox:~$ sudo mount -t ntfs-3g -o ro /dev/hdc1 /media/windows
  1. me@mybox:~$ mount --help
  2. Usage: mount -V         : print version
  3.     mount -h         : print this help
  4.     mount          : list mounted filesystems
  5.     mount -l         : idem, including volume labels
  6. So far the informational part. Next the mounting.
  7. The command is `mount [-t fstype] something somewhere'.
  8. Details found in /etc/fstab may be omitted.
  9.     mount -a [-t|-O] ...   : mount all stuff from /etc/fstab
  10.     mount device       : mount device at the known place
  11.     mount directory     : mount known device here
  12.     mount -t type dev dir  : ordinary mount command
  13. Note that one does not really mount a device, one mounts
  14. a filesystem (of the given type) found on the device.
  15. One can also mount an already visible directory tree elsewhere:
  16.     mount --bind olddir newdir
  17. or move a subtree:
  18.     mount --move olddir newdir
  19. A device can be given by name, say /dev/hda1 or /dev/cdrom,
  20. or by label, using -L label or by uuid, using -U uuid .
  21. Other options: [-nfFrsvw] [-o options] [-p passwdfd].
  22. For many more details, say man 8 mount .
  23. me@mybox:~$ sudo mount -t ntfs-3g -o ro /dev/hdc1 /media/windows


After that I was able to do an ls/dir on the partition, saw what I was looking for, & grabbed my browser bookmarks for Opera via FTP from there. :D
  • AnarchY SI
  • Web Master
  • Web Master
  • User avatar
  • Posts: 2521
  • Loc: /usr/src/MI

Post 3+ Months Ago

as per your ntfsls question, i can't check it for sure atm but i'd figure you'd need to add a sudo before running the command as it appears to be trying to mount the drive and you can't do that without the proper permissions :]

did you try running the ntfsfix program? do you need to write to the hard drive? once you get all the data you want off the drive, theres also a -o force (i believe) option that you could try to see if it'll let you write to the drive. altho i'd try fixing it before taking any drastic measures >.<
  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13503
  • Loc: Florida

Post 3+ Months Ago

A missing sudo makes sense, don't think I tried it that way either.

ntfsfix was on my list on things to try, but when gprated showed me the heads needed to be 255 instead of the 240 that was suggested by testdisk I just kinda ran with it.

I don't plan on making the NTFS writable, after another day or so of making sure I've grabbed everything I need off the disk & reading about *nix filesystems, i'm going to wipe the drive & increase the storage on that box from about 6GB to 46GB.
  • AnarchY SI
  • Web Master
  • Web Master
  • User avatar
  • Posts: 2521
  • Loc: /usr/src/MI

Post 3+ Months Ago

sounds like a great idea to me 8-)

ext3 ftw, lol
  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13503
  • Loc: Florida

Post 3+ Months Ago

I've grabbed almost all the data I needed from the NTFS partition, I missed a few configuration files for small things like FTP interface settings that I didn't think I'd need.

I repartitioned the HDD into multiple ext3 partitions & reconfigured Apache & MySQL to have their own dedicated partitions for data/webpages on the drive.
As I type this I figure a 6-7 GiB partition at the end of the drive to mirror the primary drive is probably a good idea since the primary drive is years older than the laptop drive & is getting kinda loud these days.

I almost crapped myself after I figured out all I had to do to restore the MySQL data from the laptop to the new box was chown the new MySQL data partition from mysql:mysql to me:me long enough to FTP the databases' folders into that data partition then recursively chown that directory back to mysql:mysql & finally chown a couple files to root:root.
  • AnarchY SI
  • Web Master
  • Web Master
  • User avatar
  • Posts: 2521
  • Loc: /usr/src/MI

Post 3+ Months Ago

wow, thats awesome. congrats :]

Post Information

  • Total Posts in this topic: 20 posts
  • Users browsing this forum: No registered users and 28 guests
  • 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 post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.