Getting data from linux partition on SATA drive from Windows or Linux

1

1

My laptop became unbootable today. Something popped when I plugged the power supply in and it wouldn't boot. Anyway, I took it to a hardware specialist shop to get them to open up the laptop and fetch the data on my harddrive. Since its a SATA drive it's as simple as using some USB thing that allows the drive to be treated as an external harddrive. Then they can go in and recover the files.

However, the repair shop doesn't support Linux officially, but they are going to try recover the linux partition anyway. They can see the Windows partition when the drive is plugged in via USB and all my files are there. But they can't 'see' my linux partition. I'm guessing its because their Windows machine doesn't recognise the filesystem?

I'm not clued up on this technology they're using to treat the harddrive as a USB external. Anyway if by tomorrow they have nothing new to tell me do you have any ideas of how I can view the linux partition and copy my files over to my new laptop. I can buy one of these USB things for connecting the SATA to a PC via USB. I am currently installing Ubuntu on the new laptop that I bought. Maybe from Ubuntu I'll be able to view that partition?

I am asking in advance because time is of the essence, and if anyone knows the solution to the problem/has done this before it would be extremely helpful.

k29

Posted 2013-09-13T21:28:45.510

Reputation: 113

1The linux partition is probably Ext3/Ext4. So if you connect the hardrive to linux computer, you'll be able to see the partition. – Linuxios – 2013-09-13T21:31:51.367

It should be. I voted for this to be migrated to Super User. The guys there should be able to give you a more concrete answer. – Linuxios – 2013-09-13T21:34:05.203

Great. Prior to now I wasn't aware of Super User for hardware related questions. (Still new here) – None – 2013-09-13T21:36:57.340

It's OK. Good luck getting your data back. – Linuxios – 2013-09-13T21:37:54.623

Answers

0

Windows only recognises a limited number of filesystems such as NTFS, various FAT version, CD9660 and UDF. By default it does not recognise any other filesystem.

Your linux partition is probably formatted with ext2/ext3/3ext4/btrf or ZFS.
Note the lack of all of these in the above list.

That leaves you with these options:

  1. Install the matching driver on the windows computer. E.g. the ext2 fs driver for windows.
  2. Connect the USB case with your disk to a OS which natively understands it. (As Ernie already wrote, connecting it to a linux installation should just work).
  3. Connect the disk (without using the USB case) to a desktop running linux. Simply connect the SATA disk to a SATA channel and boot a linux live CD.
  4. Backup the raw data on the disk and parse it later. There are various tools for this. Your typical windows shop might have Norton Ghost or Acronis Trueimage. As long as they make a full disk backup you will always be able to recover your data at a later stage.
  5. Just ask them for your HDD. Unless it is the broken part the laptop can be repaired without a HDD. If they need to test it then any other drive will do.

Hennes

Posted 2013-09-13T21:28:45.510

Reputation: 60 739

Thanks for the explanation and for providing multiple options. If my 'home' folder was set to be encrypted when I initially installed ubuntu(an option on the installation screen) will that cause a problem in recovering my files? – k29 – 2013-09-13T22:31:00.393

Yes. It should provide a problem. YOu will have to mount the partition with /home on it on computer which does knows both how to decrypt it and you will have to supply the password. That limits easy recovery. Just installing the driver as per 1) will not do. My suggestion: ask for your disk back. Let them repair the laptop. Reinsert the disk later when you have your repaired laptop again. – Hennes – 2013-09-13T22:37:21.647

My timeframe does not allow for the laptop to be repaired unfortunately. Due to the circumstances I will need to find a way to decrypt it I guess. – k29 – 2013-09-13T22:41:49.453

In that case: get another computer (either laptop or desktop). Connect the laptops SATA drive internally. Boot and recover the data. (Also, backups. backups. backups. But regular backups can wait until after you solved your current crisis.) – Hennes – 2013-09-13T22:47:11.260

That will work? You can just replace one hard-drive with another and the computer will just boot and run properly? Not sure what you mean by iternally.. – k29 – 2013-09-13T22:53:55.333

Yes, this will usually work. You might need to change some drivers but that is usually limited to graphics drivers or wireless drivers. The exception to this rule is windows which does not detect which hardware you have at each boot, but which optimizes things by remembering which hardware you had, thus booting faster (and being prone to more problems if you swap disks). And with internally I means with no need for an external harddisk case (e.g. the USB case you referred to previously)> – Hennes – 2013-09-14T06:57:02.410

0

What does recovery mean in this case? Just reading and archiving the files?

I'm surprised they're even trying to read the data, and not just cloning the drive. If the drive is failing, they shouldn't be messing around trying to read it, and step 1 should be to clone the drive and work from the clone.

As for reading the files off of it, your original theory is correct. Windows can't read the filesystem as it doesn't know anything about ext3, ext4, reiserFS, etc. It's also likely more than one partition.

In any case, you'll probably need to attach it to a Linux computer that has the right filesystem. df -T on most linux systems should list the filesystem. Assuming you've got one of the standard filesystems on there, it should just be as simple as mounting it and copying the data off. Whether a USB-SATA adapter will work on the Linux system will depend on the adapter . . .

ernie

Posted 2013-09-13T21:28:45.510

Reputation: 5 938

I dont think there's any problem with the drive itself. When I plug in any power supply to the laptop the light on the power supply goes off and the laptop doesn't receive any power. As soon as you pull the PS cable out of the laptop the PS's light goes back on. The laptop won't boot because I can't give it power (and the battery is so old it will barely last 5 minutes on battery power).

Yes in this case that is what I mean my recovery.

What worries me is that on the initial 12.04 installation on my old laptop I may have selected "encrypt home folder. Will this complicate things? – k29 – 2013-09-13T22:26:54.690

1

I don't have any experience with the encryption, but a quick google search suggests as long as the encryption passphrase still exists on the disk, you should be able to recover

– ernie – 2013-09-13T22:47:26.787