You are not logged in.

#1 2013-03-24 07:57:05

MagicSkyFairy
Member
Registered: 2013-03-14
Posts: 79

[Solved] I think I maye have wiped out my system. Chance of recovery?

I know how to recover my files(running photorec as I type this), but I just need to know if I really fudged up or not and if it will even be possible to recover my /home/<user> directory.

I was following this wiki page:

https://wiki.archlinux.org/index.php/In … _in_Arch64

I had chrooted into /opt/arch32.  I then wanted to get rid of the whole thing because what I was trying didn't work.

So I issued this command:

pacman -Rd linux mkinitcpio dhcpcd ppp xfsprogs reiserfsprogs jfsutils logrotate lvm2 pcmciautils netcfg heirloom-mailx iputils iproute2 man-pages mdadm inetutils man-db cronie vi vim sudo

That ran fine. and then

pacman -Scc

That also ran fine.  After that I wanted to just get rid of the whole directory, so I issued the command:

rm -R /opt/arch32

and then all of a sudden everything was gone!

I was pretty sure I did these commands where I was supposed to and I didn't do the pacman -Rd in my x64 environment.  At least I don't think I did.

I remounted the partition my home directory was one and it just showed Desktop.  I rebooted in hopes that I didn't really just delete everything.

startx gave me some errors and instead of booting xorg it booted the Test X screen. (see the beginners guide)

I don't care about the packages, configurations, plugins, bookmarks and what not but I had some important documents in my home directory that I really need. 

I checked my home directory and everything was replaced my the default "Documents, Downloads, etc..." files.

I had my root on one partition, I had my home on another partition, /var on another, and /boot also on it's own.

To re-state my question:

Did I really delete everything, and is there any real chance of recovery now that I rebooted it and the home directory was replaced.  I don't need instructions.  I just need to know if it was chroot that messed me up, and if I could some how chroot into my old system?  I've never used chroot before this so I'm oblivious to how it works.  I can look it myself so you don't need to explain what it is.

I haven't saved anything else to the partition, so the data should still be there somewhere even though it's "deleted"...

I'm freaking out, man. >_o

Last edited by MagicSkyFairy (2013-03-24 20:49:14)


I have wasted atleast a second of your time by making you read my signature.

Offline

#2 2013-03-24 08:25:14

andmars
Member
Registered: 2012-03-13
Posts: 158

Re: [Solved] I think I maye have wiped out my system. Chance of recovery?

MagicSkyFairy wrote:

I know how to recover my files

I seriously doubt that.

MagicSkyFairy wrote:
pacman -Rd linux mkinitcpio dhcpcd ppp xfsprogs reiserfsprogs jfsutils logrotate lvm2 pcmciautils netcfg heirloom-mailx iputils iproute2 man-pages mdadm inetutils man-db cronie vi vim sudo

Why on earth would you want to do that? That's about the stupidest command I've seen someone use on Arch.

MagicSkyFairy wrote:

I don't care about the packages, configurations, plugins, bookmarks and what not but I had some important documents in my home directory that I really need.

Then why didn't you backup your stuff before? Like, on a usb-stick or to a DVD? Why use Arch in such a stupid way and later complain about lost data?

MagicSkyFairy wrote:

I've never used chroot before this so I'm oblivious to how it works.  I can look it myself so you don't need to explain what it is.

Good because the Arch way is not about spoonfeeding you.

MagicSkyFairy wrote:

I haven't saved anything else to the partition, so the data should still be there somewhere even though it's "deleted"...
I'm freaking out, man. >_o

Seriously I doubt that Arch is the right distro for you. I can't see that you have followed the Arch Beginner's Guide carefully and that you have an understanding of how things work (like chrooting). I'm sorry if your data is lost but hopefully that will teach you something. Some additional reading for you;

http://jasonwryan.com/blog/2012/06/16/misunderstanding/

https://wiki.archlinux.org/index.php/The_Arch_Way_v2.0

Last edited by andmars (2013-03-24 08:36:26)

Offline

#3 2013-03-24 10:21:58

stryder
Member
Registered: 2009-02-28
Posts: 498

Re: [Solved] I think I maye have wiped out my system. Chance of recovery?

andmars wrote:
MagicSkyFairy wrote:

I know how to recover my files

I seriously doubt that.

MagicSkyFairy wrote:
pacman -Rd linux mkinitcpio dhcpcd ppp xfsprogs reiserfsprogs jfsutils logrotate lvm2 pcmciautils netcfg heirloom-mailx iputils iproute2 man-pages mdadm inetutils man-db cronie vi vim sudo

Why on earth would you want to do that? That's about the stupidest command I've seen someone use on Arch.

Rather harsh, considering he was just following commands suggested in the wiki page he linked.

You can always try recovering. I have had no success before though. Good luck.

Looks like you exited chroot without umounting which should have happened if you had used "arch32 stop".  So when you rm -f /opt/arch32 your home, and other folders mounted inside /opt/arch32 were also deleted. You really need to know what you are doing in these cases so you know what is at risk, and especially when issuing rm -f.

Offline

#4 2013-03-24 13:40:21

MagicSkyFairy
Member
Registered: 2013-03-14
Posts: 79

Re: [Solved] I think I maye have wiped out my system. Chance of recovery?

Wow, this is probably the most unhelpful answer on this forum. I don't know what your problem is but you sound like a child.

andmars wrote:
MagicSkyFairy wrote:

I know how to recover my files

I seriously doubt that.

Yeah, it's real hard, bro.  Download a program, and scan the partition I was to scan from.  Damn I think I might have make a separate post just so you can walk me through it.  Do I need a microsoft??/?

andmars wrote:
MagicSkyFairy wrote:
pacman -Rd linux mkinitcpio dhcpcd ppp xfsprogs reiserfsprogs jfsutils logrotate lvm2 pcmciautils netcfg heirloom-mailx iputils iproute2 man-pages mdadm inetutils man-db cronie vi vim sudo

Why on earth would you want to do that? That's about the stupidest command I've seen someone use on Arch.

Did you even READ the wiki?  It's right there on the damn page.  I have no idea why you wouldn't have read the wiki,  Here, I'll link it again for your convenience. :]  Maybe you should study up.

Hahahahahahaha, this cracks me up.  How ironic.  Kid asks me if I read the wiki yet he didn't even take the time to read it himself.  HA HA HA! XD

I followed the wiki as closely as possible.  I came here for advice, not a step by step walk through, and you give me a super condescending answer like I screwed your girlfriend, or something. XD

Get over yourself, and follow your own advice and read the wiki.

andmars wrote:
MagicSkyFairy wrote:

I don't care about the packages, configurations, plugins, bookmarks and what not but I had some important documents in my home directory that I really need.

Then why didn't you backup your stuff before? Like, on a usb-stick or to a DVD? Why use Arch in such a stupid way and later complain about lost data?

You ever think that I don't have a usb big enough to hold everything, and we're not all made of money.  Yet another unhelpful answer.  Did you post this on your iPad?

andmars wrote:
MagicSkyFairy wrote:

I've never used chroot before this so I'm oblivious to how it works.  I can look it myself so you don't need to explain what it is.

Good because the Arch way is not about spoonfeeding you.

What a condescending thing to say to someone who actually takes the time to do things himself.  This one line pretty much makes you a POS.  I asked for advice.  Not a step by step tutorial on something that is already on the front page of the forum...-_-

andmars wrote:
MagicSkyFairy wrote:

I haven't saved anything else to the partition, so the data should still be there somewhere even though it's "deleted"...
I'm freaking out, man. >_o

Seriously I doubt that Arch is the right distro for you. I can't see that you have followed the Arch Beginner's Guide carefully and that you have an understanding of how things work (like chrooting). I'm sorry if your data is lost but hopefully that will teach you something. Some additional reading for you;

http://jasonwryan.com/blog/2012/06/16/misunderstanding/

https://wiki.archlinux.org/index.php/The_Arch_Way_v2.0

Don't pretend to know me, kid.  Shit happens.  Arch is the perfect distro for me, and I'm going to stick with it despite your unnecessarily harsh words.  Everyone makes mistakes.  Don't come in here pretending like you haven't. It's not I came here asking for you to hold my goddamn hand.  I asked for advice, not instructions, and you talk down to me before even doing the research yourself.

What a hypocrite.  You weren't helpful at all.  Think twice before responding next time and take the stick out of your ass.

Hopefully you can add people to an ignore list on this forum... It's obvious that this kid wouldn't be able to help me wipe my own butt if I was paralyzed and drooling all over myself

Life pro tip for ya, do the research before you criticize me, buddy. wink

Or at least say something remotely helpful.

Last edited by MagicSkyFairy (2013-03-24 13:41:26)


I have wasted atleast a second of your time by making you read my signature.

Offline

#5 2013-03-24 14:18:35

MagicSkyFairy
Member
Registered: 2013-03-14
Posts: 79

Re: [Solved] I think I maye have wiped out my system. Chance of recovery?

stryder wrote:
andmars wrote:
MagicSkyFairy wrote:

I know how to recover my files

I seriously doubt that.

MagicSkyFairy wrote:
pacman -Rd linux mkinitcpio dhcpcd ppp xfsprogs reiserfsprogs jfsutils logrotate lvm2 pcmciautils netcfg heirloom-mailx iputils iproute2 man-pages mdadm inetutils man-db cronie vi vim sudo

Why on earth would you want to do that? That's about the stupidest command I've seen someone use on Arch.

Rather harsh, considering he was just following commands suggested in the wiki page he linked.

You can always try recovering. I have had no success before though. Good luck.

Looks like you exited chroot without umounting which should have happened if you had used "arch32 stop".  So when you rm -f /opt/arch32 your home, and other folders mounted inside /opt/arch32 were also deleted. You really need to know what you are doing in these cases so you know what is at risk, and especially when issuing rm -f.

Darn, I did not know I had to unmount.  I exited the chroot, and then issued the command on the folder like I normally would.  I've used the rm command a million times before, but this is the first time I've used the chroot command.  I assumed that all I had to do was to exit the terminal session of the chroot, and then run the rm command on the folder I had the 32 bit system installed on. Derp, guess not!

But hey, on the bright side, at least I now know!

Do you have any recommendations on data recovery software?  I have test disk, but isn't that more for partitions that were deleted?  I just overwrote what was in the partitions, and the partitions themselves are fine.

If you have no recommendations, I'll probably just try test disk.  If that doesn't work I have foremost, and if plan B doesn't work, I'm going to try a program call extundelete. but if you know of something that is very reliable for just recovering files, and not partitions, I would love to get the names of them to save me some time of running 10 million different recovery tools.  I'm a very persistent fellow and I'll probably be up for a week straight until I get this or find out the files are unrecoverable! XD

All I want are those PDFs, and one virtualbox image that has a bunch of homework and labs for a class, but the programs I downloaded would be cool too. tongue  I'm not too worried about those since I just downloaded arch like a week ago, so I haven't had time to actually fill up much.  The programs are of little importance.  Those can be easily re-downloaded.  If I could just get my home directory, I would be very happy.  BUT, new data was written to it.  It was just folders though, like "Downloads", "Picture", and so on... so a very small amount of data was written  along with still having a lot of space left in my home directory.  I feel like a good amount of those 1s and 0s are still there.  I haven't touched the linux partitions since.

You should of seen my face when I ran this command and then noticed things going wrong.  I didn't even notice at first until firefox was bugging out. hahahaha

Last edited by MagicSkyFairy (2013-03-24 14:39:28)


I have wasted atleast a second of your time by making you read my signature.

Offline

#6 2013-03-24 15:43:00

stryder
Member
Registered: 2009-02-28
Posts: 498

Re: [Solved] I think I maye have wiped out my system. Chance of recovery?

I assume you used the script in the wiki. If you go through it you will see that it mounts several folders. Sometimes it is better to do the chroot command by command. This way you know what is actually happening. Chroot is just a command. But there are several things you do to prepare for it. And after that, you undo them. That script automated all these.

I can't help you with recovering deleted files. I didn't succeed. But you might. I think testdisk is the weapon of choice. You can read my brief disaster here: https://bbs.archlinux.org/viewtopic.php … 5#p1203355. I can only suggest you read up. Most people suggest you work on an image of the disk but then you said you already have space problems.

Good luck. Glad you can laugh at this. Good attitude.

Offline

#7 2013-03-24 16:07:07

Nico666
Member
Registered: 2012-04-24
Posts: 56

Re: [Solved] I think I maye have wiped out my system. Chance of recovery?

My first tough would be to use a live distro and access to the home partition on the local hard drive from it. Then, I started to think why this might be not possible: All the removed packages would be provided by the Live CD, so in theory should work, unless the removal of the filesystems had an effect in the partitions formatted in the given filesystem. But instead of speculate, you could just try to mount your /home on the fly on a Live distro, put your important files on a safe external place, and proceed to re-install.

Good luck!

PS: This place is really becoming a stronghold of smartasses. My apologies for the rude and uneducated response-. This place use to be friendly, but that was a long time ago.

Offline

#8 2013-03-24 16:41:02

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 13,441

Re: [Solved] I think I maye have wiped out my system. Chance of recovery?

Nico666 wrote:

PS: This place is really becoming a stronghold of smartasses. My apologies for the rude and uneducated response-. This place use to be friendly, but that was a long time ago.

Well, I try to keep it a friendly place.  I agree, there exists a subset of members who are quick to be, er, difficult. 
This is probably a good time to quote our policy.  That rule is just as important as any other in the Etiquette page.

MagicSkyFairy: Personally, I've enjoyed your posts and think you are a great addition to the forums (even if you are a hippie tongue )
As to your immediate problem -- If you've a spare drive, I strongly recommend you clone your compromised disk and work only on the copy.  That way, if your recovery efforts make things worse, you can go back to your starting point by re-cloning.  You can use the dd  command to make a sector by sector copy to another drive, or (my preference) to a file on another file system that can then be mounted on /dev/loop. 

I am only on my second cup of coffee, but I don't recall seeing if you told us what the file system was(is).

Edit:  BTW, if you use the dd command, be very, very careful.  It is easy to get the incantation wrong and make things worse.  That is why it is known by the pseudonym, "Data Destroyer"

Last edited by ewaller (2013-03-24 16:43:43)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
You assume people are rational and influenced by evidence.  You must not work with the public much. -- Trilby
----
How to Ask Questions the Smart Way

Offline

#9 2013-03-24 16:54:32

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: [Solved] I think I maye have wiped out my system. Chance of recovery?

ewaller wrote:

MagicSkyFairy: Personally, I've enjoyed your posts and think you are a great addition to the forums (even if you are a hippie tongue)

He probably needs to sleep a bit more though, now and then, to avoid some of the more problematic conversations we've seen the last few days. wink

MagicSkyFairy wrote:

I haven't sleeped in over 24 hours so my brain is all over the place today.  I hope you can decipher what I'm trying to say.  -_-


ᶘ ᵒᴥᵒᶅ

Offline

#10 2013-03-24 18:19:43

aesiris
Member
Registered: 2012-02-25
Posts: 94

Re: [Solved] I think I maye have wiped out my system. Chance of recovery?

When you will be finished recovering from this failure, I suggest to set these aliases:

alias mv='mv -i'
alias cp='cp -i'
alias mv='mv -i'
alias rm='rm --one-file-system -i'

They have served me well in the past, the "--one-file-system" option would have probably saved you here.

Offline

#11 2013-03-24 19:37:36

Awebb
Member
Registered: 2010-05-06
Posts: 4,541

Re: [Solved] I think I maye have wiped out my system. Chance of recovery?

So you suggest to alias mv to mv -i twice, to make sure bash got it? :-D

EDIT:

Another tip for such situations… always provide the file system you are working with. Some user will pop up and recommend a file system specific recovery tool.

Last edited by Awebb (2013-03-24 19:40:34)

Offline

#12 2013-03-24 20:57:33

andmars
Member
Registered: 2012-03-13
Posts: 158

Re: [Solved] I think I maye have wiped out my system. Chance of recovery?

MagicSkyFairy wrote:

Arch is the perfect distro for me, and I'm going to stick with it despite your unnecessarily harsh words.  Everyone makes mistakes.  Don't come in here pretending like you haven't.

That's the spirit! My appologies and I hope you can get your data back.

Offline

#13 2013-03-24 21:28:16

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: [Solved] I think I maye have wiped out my system. Chance of recovery?

So I am assuming by "Solved" you mean that you have simply confirmed that you hosed your system?

I would be interested to hear about any recovery you might be able to achieve and the tools you use.

Also, litemotiv is right, you need to get some sleep!

Offline

#14 2013-03-24 21:58:02

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,675

Re: [Solved] I think I maye have wiped out my system. Chance of recovery?

https://wiki.archlinux.org/index.php/File_Recovery

[I know this is marked as solved but lest someone else find it.]


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

#15 2013-04-01 17:19:49

MagicSkyFairy
Member
Registered: 2013-03-14
Posts: 79

Re: [Solved] I think I maye have wiped out my system. Chance of recovery?

Sorry I haven't updated this.  I was on vacation from school and I worked full time so I always came home tired and didn't feel like doing anything.  tongue

I never got my PDFs back.  I tried a ton of different file recovery programs, but I was able to recover my virtual machine I needed for my class so that's good! big_smile

I haven't even booted my arch partition, I plan on reinstalling sometime soon.  So that's that.


I have wasted atleast a second of your time by making you read my signature.

Offline

#16 2013-04-01 21:05:33

linas
Member
Registered: 2010-03-06
Posts: 39

Re: [Solved] I think I maye have wiped out my system. Chance of recovery?

What filesystem did you use, and how full was it?

One of the main problems when recovering files is fragmentation. You have all the data there... spread in 4KB clusters.

Under ext2, the inodes are still intact (although marked as "free"), and glueing back the clusters together is relatively simple. ext3/ext4 also clear the pointers to them, so it's hard to detect which pieces matched a single file.* If your partition had little fragmentation, it is likely that they are stored consecutively. So for recovering a pdf you would start from the cluster containing "%PDF-" and read as many blocks as they look the same content (you can actually get the size from the pdf header, but it's quite easy just by looking how the data looks like).

ewaller suggestion of cloning before changing the damaged disk is also a good one.

* But note the http://extundelete.sourceforge.net/ program, which is able to recover that data from the journal (sadly, in your case you probably deleted much more than the journal).

Offline

Board footer

Powered by FluxBB