LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Data recovery help? (https://www.linuxquestions.org/questions/linux-newbie-8/data-recovery-help-844355/)

Rimbaum 11-15-2010 08:33 AM

Data recovery help?
 
I was trying to set up a partition on my netbook's hard drive, and foolishly forgot to backup my home folder. Now, Ubuntu (10.04, btw) won't boot. It allows me to get into the manual recovery shell, though.

Now, I'm perfectly willing to reformat, but first I'm hoping I can recover the files from my home folder without having to take my netbook to the ridiculously overpriced computer repair centers in my area.

I have an external hard drive, but when it's plugged in during the recovery shell, it won't register as being a valid directory. I know the commands to copy or move a directory, but without my external reading as a valid directory to move my home folder to, I'm kinda stuck.

Is there any other way to recover the contents of my home folder without having to go to a computer repair place? Neither of the ones in my area know much about linux at all, and I really, really don't want to have to pay $80+ to have someone else recover my home folder.

business_kid 11-15-2010 11:39 AM

You have a recovery shell. That means / is mounted read only, and something dire is wrong. What is the error?

Some handy lines for which you need root or sudo.

mount -o rw,remount /
That one should remount your root drive read only. You may not need this - you certainly don't if / is corrupt.

PATH=/bin:/sbin:/usr/sbin:/usr/bin
export $PATH
to save typing /path/to/every/file.

Whatever disk it is complaining about, (It's usually that) can be checked with the disk checkers in /sbin
ls /sbin/*fsck*

modprobe ehci_hcd
modprobe usb_storage
To talk to the external then
fdisk -l
to see your disks and mount accordingly.

avarus 11-15-2010 11:40 AM

Hi,

I'm sure the pundits here on LQ can do a better recovery job than the computer repair place. AFAIK professional recovery is only useful in the event of hardware failure.

I'm not clear on exactly what you were trying to do partition-wise that broke the laptop, so it would be handy to hear more details on exactly what you did. If you know what the original partitioning scheme was you can often restore it, run fsck, and the data will all still be there. Ubuntu by default just makes one big partition plus swap, or did you make a custom setup, or did it come pre-installed?

That aside, I'd never try to recover data from a hosed system by booting that system. You want to boot a live system from an Ubuntu installation disc and use that. If your netbook won't boot from DVD it should be possible to make a bootable recovery USB stick using the standard USB creator tool on Ubuntu. Then working from the recovery environment you should be able to plug in external drives and have them recognised as normal. You will also be able to read the internal hard disk - depending on how hosed your system is you may see your files right away or you may need to run some recovery tools.

Let me know where you get to with booting the recovery DVD/USB and I'll try and send more specific help.

Cheers,

TIM

dannybpng 11-15-2010 06:48 PM

I'm in the middle of something so I can't give details right now. I wonder if your external drive is formatted NTFS. You may need to load the NTFS module (modprobe) before you can mount it. If plug in the drive and do a fdisk -l command it should show you what type of filing system is on your external drive.

Dan

lunardragon 11-15-2010 09:50 PM

Quote:

Originally Posted by Rimbaum (Post 4159426)
I was trying to set up a partition on my netbook's hard drive, and foolishly forgot to backup my home folder. Now, Ubuntu (10.04, btw) won't boot. It allows me to get into the manual recovery shell, though.

Now, I'm perfectly willing to reformat, but first I'm hoping I can recover the files from my home folder without having to take my netbook to the ridiculously overpriced computer repair centers in my area.

I have an external hard drive, but when it's plugged in during the recovery shell, it won't register as being a valid directory. I know the commands to copy or move a directory, but without my external reading as a valid directory to move my home folder to, I'm kinda stuck.

Is there any other way to recover the contents of my home folder without having to go to a computer repair place? Neither of the ones in my area know much about linux at all, and I really, really don't want to have to pay $80+ to have someone else recover my home folder.

Try this: get a usb thumb drive, 8gig should be plenty plug it in and then boot to your live cd and install to the thumb drive.
Save this and use it as a rescue device!
Reboot to your usb thumb drive and plug in your external HD and see if it auto mounts, you should also see the laptop HD as a file system.
Now if all is well you should be able to nav you way to your home folder on the laptop and copy it provided there is no corruption.
If you need to change any permissions to make your drives read it will only affect the thumb drive.
Now disconnect all usb devices and reinstall your distro to your laptop.
The rest should be easy.
I look forward to your feedback.

Rimbaum 11-15-2010 11:39 PM

It would seem that the partition wasn't what caused my problems. I had a catastrophic hard drive failure. I tried to reinstall linux on there, and it will not boot at all without the live USB drive. The disk won't even spin up after the boot screen.

Thanks to everyone for your help. I think the only thing that would have saved any of my data would be if I had taken it in for professional data recovery, which would run me at $120+. Nothing on my hard drive is worth that much money. It just isn't.

avarus 11-16-2010 03:55 AM

Darn, sorry to hear it. That reminds me, I really must get Ubuntu One backups set up myself.

TIM

Linux_Revolution 11-16-2010 08:31 AM

Don't know if you'll look at this again. Does the BIOS see the HDD there? The distros I use for data recovery are Backtrack and Trinity Rescue. Both those have live boot editions and will tell you for sure if it is hardware or partition error.
Or if the HDD is easy to get out, connect it to a different computer via USB.

If it is hardware error: put the HDD into the freezer overnight, and run it as slave in another computer, or from a live distro. I have had this work for me twice. You have about 15-20 mins to get your data off.

deepakpchowdary 11-17-2010 06:09 AM

Backup
 
U can use puppy linux and mount ur drives.
Then migrate to the home partition and store it where ever u like.
That can be installed in USB drive.
Just try this:
google the distro Puppy linux
Install Puppy Linux (200MB max) on ur USB disk.
Boot the PC.
Run pup
home opens for pup.
If u know where the home of Ubuntu is situated, go there and copy to the USB drive or any other external drive.

Goodluck
Deepak


All times are GMT -5. The time now is 11:11 PM.