LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-09-2016, 10:22 PM   #1
donald3.heckel
Member
 
Registered: Aug 2014
Posts: 60

Rep: Reputation: Disabled
Unhappy Data Loss over nicked partition table due to faulty Linux installation


Hello all,

I have run into trouble with my little netbook when trying to install Manjaro Linux. I initially had a Lubuntu 14.04.4 installation, and replaced it with a distribution called Voyager. I did not like voyager as it did not include the features in the installation that were originally there in the live environment. As a result, I went to replace it with Manjaro 16.06. Soon after finding the variant I wanted, I attempted installations with Manjaro (with all three separate installers) several times and failed. My intentions were to leave my home directory intact while obliterating everything else of the previous installation to pave the way for the new one. Upon a successful installation of Manjaro, it has rendered my laptop unbootable, with my previously known Lubuntu/Voyager partition, was nicked and gone. I managed to recover the partition by running testdisk and writing it to the partition table. Once that was done, I attempted to repair the filesystem by fsck.ext4, (which took several hours), and finishing with me only being able to see a "lost+found" folder in which I could not view the files due to the terminal hanging on the ls command when I tried to see if my files were there. File Managers were no different as they hung as well, with the files not showing. The end result was running an fsck operation which took many hours, with the files within the directory (practically) unviewable.

I could use some help in this process of attempting to recover my data and my Partition. I guess I will settle with Debian in the end.

All help will be greatly appreciated.

Computer: Dell Inspiron Mini
CPU: Intel Atom 1.66 GHz or so
Misc: w/ Other Intel related Hardware
MultiBoot platform/installation.

Sincerely,

donald3.heckel.
 
Old 08-10-2016, 04:48 AM   #2
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 20 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924
I'll leave it to someone with more knowledge than me to help you recover your data, if possible.

However, what I would *strongly* recommend is that before carrying out any procedure such as an install or upgrade, in future you back up your partitions to an external device using software such as CloneZilla booted off a USB stick. That way, if the procedure goes awry, you can easily revert to the previously good configuration by recovering those partitions to your disk.
 
Old 08-10-2016, 05:51 PM   #3
donald3.heckel
Member
 
Registered: Aug 2014
Posts: 60

Original Poster
Rep: Reputation: Disabled
Hello Hydrurga,

I appreciate the suggestion. Thank you. If at all possible, can you give me some links so that I could find out more about that?

Also, another thing to mention, I have found and am using a tool called lparted to help me with my operation.

Sincerely,

donald3.heckel
 
Old 08-10-2016, 06:09 PM   #4
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 20 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924
Quote:
Originally Posted by donald3.heckel View Post
Hello Hydrurga,

I appreciate the suggestion. Thank you. If at all possible, can you give me some links so that I could find out more about that?

Also, another thing to mention, I have found and am using a tool called lparted to help me with my operation.

Sincerely,

donald3.heckel
Hi Donald,

If you search on the internet for something like "using clonezilla live to image partition" then you will find information on it.

Clonezilla itself has a live doc here: http://clonezilla.org/clonezilla-live-doc.php

CloneZilla isn't the only option - there are other partition imaging applications and Linux commands out there. Personally I use another tool, Macrium Reflect, for historical reasons (I've used it for a long while, even in my Windows days) but this needs built in a Windows environment, for which I use a Windows VM, so would not be a good choice for you.
 
Old 08-10-2016, 06:24 PM   #5
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 4,592

Rep: Reputation: 2114Reputation: 2114Reputation: 2114Reputation: 2114Reputation: 2114Reputation: 2114Reputation: 2114Reputation: 2114Reputation: 2114Reputation: 2114Reputation: 2114
Using Clonezilla, Macrium Reflect, or any other tool that is aware of disk structure is foolhardy when the structure on that drive is known (or even suspected) to be corrupt. The only way to make a meaningful backup of such a drive is with a raw bit-for-bit copy as is done by the dd utility. If you are lucky, the structure-aware tool will figuratively throw up its hands and resort to a bit-for-bit copy, but you shouldn't rely on that. In any event, you will need another drive at least as large as the one you are copying or else a filesystem with at least that much free space.
 
Old 08-10-2016, 06:32 PM   #6
zk1234
4MLinux Maintainer
 
Registered: Oct 2010
Location: Poland
Distribution: 4MLinux, Slackware
Posts: 1,157

Rep: Reputation: 212Reputation: 212Reputation: 212
Quote:
Originally Posted by hydrurga View Post
I'll leave it to someone with more knowledge than me to help you recover your data, if possible.

However, what I would *strongly* recommend is that before carrying out any procedure such as an install or upgrade, in future you back up your partitions to an external device using software such as CloneZilla booted off a USB stick. That way, if the procedure goes awry, you can easily revert to the previously good configuration by recovering those partitions to your disk.
According to what donald3.heckel says, he wanted to "leave his home directory intact". This could be achieved by a simple manual backup to a pen-drive ...

.
 
Old 08-10-2016, 06:39 PM   #7
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 20 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924
Quote:
Originally Posted by rknichols View Post
Using Clonezilla, Macrium Reflect, or any other tool that is aware of disk structure is foolhardy when the structure on that drive is known (or even suspected) to be corrupt. The only way to make a meaningful backup of such a drive is with a raw bit-for-bit copy as is done by the dd utility. If you are lucky, the structure-aware tool will figuratively throw up its hands and resort to a bit-for-bit copy, but you shouldn't rely on that. In any event, you will need another drive at least as large as the one you are copying or else a filesystem with at least that much free space.
Indeed. I'd just like to point out that partition imaging was mentioned not as a solution to the OP's problem but as a measure to be taken in the future *before* carrying out any significant operations that would have the potential of banjaxing the filesystem.

For a case of known or suspected corruption, Macrium Reflect can be used to carry out a "forensic" sector copy (i.e. all sectors are copied, no matter the contents of any filesystem in the partition). I would have hoped that CloneZilla had similar functionality, but that wasn't what was being suggested, it was the idea that you should always back up your system before carrying out a procedure such as an install or upgrade (see my first post).
 
Old 08-10-2016, 06:49 PM   #8
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 20 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924
Quote:
Originally Posted by zk1234 View Post
According to what donald3.heckel says, he wanted to "leave his home directory intact". This could be achieved by a simple manual backup to a pen-drive ...
.
But I *enjoy* using my sledgehammer to crack nuts. Yes, in this case you're spot on.
 
Old 08-10-2016, 07:16 PM   #9
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Mineral, Virginia
Distribution: Debian 11
Posts: 7,908

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
Every user has a user number. These numbers are used to assign file ownership. What number a distribution assigns to a user varies widely from distribution to distribution. If your new distribution assigns different numbers to your users than the user numbers used in the files in your original home directory then your user names become useless.

Therefore I suggest that you back up all of your user data files, install your new system on a new partition, restore your user files to within your new home directory, and then, as root, use the chown command to change the ownership of your user data files to the correct user name.

--------------------
Steve Stites
 
Old 08-17-2016, 02:10 AM   #10
donald3.heckel
Member
 
Registered: Aug 2014
Posts: 60

Original Poster
Rep: Reputation: Disabled
Thank you all for the replies gentlemen.

That advice is very helpful. As for the file recovery, I could look into testdisk a bit further. I am currently using LParted to attempt a full restoration. Could there perhaps be a GNU/OSource forensic solution that could be suggested?

Sincerely,

d3h
 
Old 08-17-2016, 02:27 AM   #11
Weapon S
Member
 
Registered: May 2011
Location: Netherlands
Distribution: Debian, Archlinux
Posts: 260
Blog Entries: 2

Rep: Reputation: 49
There's a (trialware) program by Easeus for Windows that can also recover Linux partitions. I had good results with that.
 
1 members found this post helpful.
Old 08-17-2016, 02:40 AM   #12
RadicalDreamer
Senior Member
 
Registered: Jul 2016
Location: USA
Distribution: Slackware64-Current
Posts: 1,543

Rep: Reputation: 791Reputation: 791Reputation: 791Reputation: 791Reputation: 791Reputation: 791Reputation: 791
I would go with Easeus too!

Last edited by RadicalDreamer; 08-17-2016 at 02:46 AM.
 
  


Reply

Tags
data, linux, loss, partition, recovery


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
Partition without Data Loss SirJinX Linux - Software 9 08-26-2006 01:25 AM
partition resize, loss of data? MetalStorm Linux - General 4 05-12-2006 10:05 PM
Resize / partition without loss of data techsimian Linux - Hardware 6 03-19-2005 01:19 AM
Want to split a partition without data loss. Ebel Linux - Hardware 1 08-10-2004 12:56 AM
Help!! X restart due to faulty installation steps of radeon9200 and misconfiguration prctom Mandriva 6 10-27-2003 04:15 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:27 AM.

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
Open Source Consulting | Domain Registration