Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I dropped my laptop. The hard drive is now dead - we think; but more may be wrong with the laptop and that's what we are assuming. It is responding, but with long delays and issues. With this in mind, I am assuming the worst and endeavouring to back up my Ubuntu 12.04 and Windows 7 partitions. This is not without difficulties, however.

I have eventually gotten the laptop to boot into a USB linux live version of lubuntu 12.04. This is what I post to you from! The problem is I need to create a backup of my two hard disks, as best as I can, from lubuntu, without having to restart (so no clonezilla etc!) as my laptop may not respond again after this (it allowing me to boot into lubuntu is after many, many failed attempts.

I have tried to, from the Disks utility, make an image of my harddrives. This fails, and has an error message saying my hard disk had bad sectors. I have tried to open gparted - it stalls and hangs on "Searching /dev/sda partitions.

How can I proceed from here to back up my files/hard disks?

I intend to shrink on of the partitions next and install a fresh copy of lubuntu onto the newly freed up partition to see if I can then mount, and access any of the information. Is this a good way to proceed?

What advice/recommendations/possibilities can people offer me here? I want to do my best before trying anything that requires a restart :)

share|improve this question

2 Answers 2

You can try dd. dd can make an exact clone of an (unmounted) disk, this will include all blank space so the output destination must be at least as large as the input. just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

dd if=/dev/sdx of=/dev/sdy

Replace x, and y with your drive id. Make sure that you do that booting form the LiveCD.

Source:dd Manpage

share|improve this answer

For Ubuntu

tar cvzpf backUp.tar.gz --exclude=dev/sdax/proc --exclude=dev/sdax/lost+found --exclude=dev/sda5/sys /dev/sdax

Replace x with your disk partition number e.g. /dev/sda5

Use sudo fdisk -l to select proper partition.

  1. This command will backUp everything into tar archive.
  2. Here we're backing up whole thing hence "/"
  3. Exclude files/folder you feel isn't important for you.
  4. Make backUp.tar.gz at any safe location(it's obvious, but still)

When you restore

tar xvpfz backup.tar.gz -C /

Reference: http://ubuntuforums.org/showthread.php?t=35087

You can use these flags in tar: --ignore-failed-read for not exiting with nonzero on unreadable files.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.