LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-30-2014, 02:23 AM   #1
skeledrew
LQ Newbie
 
Registered: Jun 2014
Distribution: Zorin OS
Posts: 3

Rep: Reputation: Disabled
How can I recover a lost partition using Kubuntu Live USB?


Hi all. Ths is going to be a fairly long first post.

I have been using Linux (Zorin OS 7) as my main system for about 4 months now (I've experimented a bit with other Ubuntu flavors in years past). I have been planning to upgrade to Kubuntu 14.04 for a while now, and decided to do so now after successfully creating a working Live USB. My 1TB HDD is divided into 3 roughly equal partitions with the first 2 being EXT4 and having / and /home respectively, and the 3rd is a FAT32 partition with /windows. I had been thinking about how I would divide the first partition further to make swap and a multiboot system upon upgrading.

The problems began when I started the install process expecting to get the option to modify the partition table as I usually did with Ubuntu. Instead, Kubuntu just made my drive into one big partition and started installing without much warning. Took me a couple seconds to stop it and by then it was too late: it had already overwritten the MBR, etc. The main problem is that I didn't backup my data since I was expecting to modify only the first partition where the OS was installed. Now I need to recover the partition table and hopefully the files under /home on the second partition. At this time it's just showing several new partitions, the biggest being swap (over 900GB). I'm pretty sure there is no way it could've destroyed all the data that fast though.

Right now I'm running the system from the Kubuntu Live USB. I did some searching and found that 'parted rescue' should be able to do a lost partition recovery. However, the command returns immediately without results for the most part. Only once I saw the progress indicator counting up, and it still finished sooner than I think it should for a HDD of this size and again returned nothing. I can't get to install gparted or testdisk or any of the other recovery recommendations because I can't get the wifi to work at this time. I had a similar wifi issue when I installed Zorin OS, but I've forgotten how I fixed it.

BTW, the system is an ASUS X550CA-DB71 laptop (2x2GHz i7, 8GB RAM, 1TB HDD), and the wireless card is a "Qualcomm Atheros AR9485 Wireless Network Adapter" as taken from 'lspci'. Thanks in advance for any help.
 
Old 06-30-2014, 08:43 AM   #2
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 6,990

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Quote:
Kubuntu just made my drive into one big partition and started installing without much warning.
I haven't tried Kubuntu 14.04 so I don't know if the installer is the same as earlier versions. To do what you wanted you would have had to select the 'Manual' option. Is that what you did? In the versions of Kubuntu I used, I could access the KDE Partition Manager from the installation medium by clicking on the KMenu, over to Applications, Systems then Partition Manager. You should also have been able to do this from the Installation Type window.

Are you able to mount the /home partition from the Kubuntu installation medium to see if your files are visible?
 
Old 06-30-2014, 10:40 AM   #3
cepheus11
Member
 
Registered: Nov 2010
Location: Germany
Distribution: Gentoo
Posts: 273

Rep: Reputation: 86
Grab a live cd/dvd, boot it, run testdisk on the harddrive. SysRescueCD or Knoppix should include testdisk.

http://sysresccd.org/
http://knopper.net/

testdisk can read the headers of known filesystems, and guess the partition start from them. The first partition will likely be lost, but if you killed the Kubuntu installer after a few seconds there's a chance that the higher partitions can be restored.

Last edited by cepheus11; 06-30-2014 at 10:41 AM. Reason: typo partition>harddrive
 
Old 06-30-2014, 11:01 AM   #4
rtmistler
Moderator
 
Registered: Mar 2011
Location: Sutton, MA. USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu
Posts: 4,493
Blog Entries: 10

Rep: Reputation: 1645Reputation: 1645Reputation: 1645Reputation: 1645Reputation: 1645Reputation: 1645Reputation: 1645Reputation: 1645Reputation: 1645Reputation: 1645Reputation: 1645
One thing to consider is to make a full bit copied backup of that entire disk. Yes, I get that it's 1 TB, so you'd have to like have a larger than 1 TB USB flash drive or something. And don't do that by partitions, instead do it by entire disk device using the dd command.

Boot off of Live USB, know the /dev/sd letter for that hard drive, add an external USB drive that's larger than 1 TB and then use dd to copy it all.

Example: (Existing hard drive is say /dev/sdc and added USB drive is /dev/sdf)

Code:
sudo dd if=/dev/sdc of=/dev/sdf
Optionally you can specify a segment size, but even though the shown form of the command may take a very long time (leave it running overnight if you have too) it will still work and get you a full bit by bit copy of what you have there.

And by doing that you can resurrect your system properly to get it running and then later attempt to recover files from that archive.

I have little experience with parted rescue, to me once a partition has been removed and new ones created; that data is gone. However I do understand your point that some or a lot of the data is still physically "there" on the drive and it's a matter of being able to coherently access it.

Best of luck and a suggestion to get the WIFI running it to simply try a different LiveUSB distribution; one that has been shown to specifically work with that adapter, suggest you try regular Ubuntu, or MINT Debian.

And ... well I get that you screwed up the install by destructively exiting it to avoid losing your data; but honestly this is about the ... 18th time I've heard of someone having trouble with Kubuntu. I made that number up, but I've heard/read about problems with Kubuntu a lot lately. Maybe the plasma desktop is enough of a draw that more new users are trying it out.
 
Old 06-30-2014, 12:02 PM   #5
skeledrew
LQ Newbie
 
Registered: Jun 2014
Distribution: Zorin OS
Posts: 3

Original Poster
Rep: Reputation: Disabled
Thanks for the replies so far. I've made some headway, like getting the wifi up. It's a common issue with many ASUS systems running Linux it seems and all I had to do was put it to sleep and the wifi became enabled on wake (temp fix).

So I have installed testdisk, which is currently running. By my estimate it'll take 23 hours to do a deep scan of a 1TB HDD. I am unable to mount /home as it now has a different part table with about 500MB FAT and the rest unallocated. I do have a 2TB external, but that's also partitioned into 3 equal parts and I've copied data from a nearly full and possibly failing 1TB to 2 parts already, so I can't repartition that anymore. Maybe what I can do is bit copy the approximate region of the 2nd partition. I'm not sure why parted rescue was failing, because the format and everything seemed correct.

I was thinking of going to the pure Ubuntu from Zorin OS (which was just supposed to have been a transition from Windows), but then I started doing some research into speech recognition and found Simon which is made for KDE, and also I upgraded my text editor to a more fully featured one for coding which is also on Kubuntu (Kate), so I did some research into it and I liked the idea of having a desktop that mainly prioritized features and compatibility since I had so many issues in the past with getting Ubuntu to support various file types and hardware which discouraged me from using mainly Linux sooner. Zorin had great OOB support but it was giving a variety of system errors, some of the programs started crashing and it was getting pretty outdated for me (runs on Ubuntu 13.04 I think),leading me to want to change even faster...
 
Old 06-30-2014, 04:26 PM   #6
Fred Caro
Member
 
Registered: May 2007
Posts: 999

Rep: Reputation: 166Reputation: 166
Testdisk is used to rescue "lost" partitons and can then be aided by G4Linux (sometimes called 'ghost for linux') to recover files from reconstituted patritions that may appear empty or not mount. I have used G4L with some success but it was before the partitions were lost. G4L is not an easy fix, not so bad for small files but you might, for example, turn a 1000 page pdf into a 1000 pdf's! Good luck.

Fred.
 
Old 07-01-2014, 09:00 PM   #7
skeledrew
LQ Newbie
 
Registered: Jun 2014
Distribution: Zorin OS
Posts: 3

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Fred Caro View Post
Testdisk is used to rescue "lost" partitons and can then be aided by G4Linux (sometimes called 'ghost for linux') to recover files from reconstituted patritions that may appear empty or not mount. I have used G4L with some success but it was before the partitions were lost. G4L is not an easy fix, not so bad for small files but you might, for example, turn a 1000 page pdf into a 1000 pdf's! Good luck.

Fred.
Thanks. TestDisk gave me many results when it completed, and I was able to use it to recover my 3rd partition, which is FAT32. It was only showing 1.6MB being used, but then I used GParted to check it and I believe I have all the files that were originally there.

My only issue now is to recover partition #2 which has my /home and TestDisk was unable to recover and the suggested fsck commands failed (though I only tried 2 of 100s). If GParted doesn't find the EXT4 part then I'll try a loop to try every possible entry for it. Still searching for even more possible ways to recover...
 
Old 07-28-2014, 07:49 AM   #8
dominique657
LQ Newbie
 
Registered: Jul 2014
Posts: 1

Rep: Reputation: Disabled
Lost partition data recovery can be executed with drive hard drive data recovery tool on Windows or Mac computer. Want to know how? Check,
youtu.be/Fa6Wq-36Xak
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
recover lost luks partition ehsdav Linux - General 10 07-09-2013 05:50 AM
How do you recover data from lost partition? Exeis Linux - Hardware 9 12-19-2007 05:46 PM
Partition Table Lost...how to recover rhb327 Slackware 5 07-08-2007 09:17 PM
reiserfs partition lost, any way to recover? kostian Linux - Newbie 7 10-29-2004 05:31 PM
Recover a lost partition!!!!! Caveman Linux - Newbie 4 09-26-2003 02:10 PM


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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration