trq Posted January 15, 2007 Share Posted January 15, 2007 Not real happy at this point in time. Silly me whiped a good part of my Gentoo system just now.HOW?Im currently in the process of building my own personal distro using lfs as a guide. I have the entire system committed to cvs. When I want to work on it I mount a spare partition (/dev/hda8) onto /mnt/lfs, delete whatever is there, and then fetch the latest commit from cvs.Just now Ive mounted /dev/hda7 (my current stable Gentoo) onto /mnt/lfs and issued...[code]sudo rm -fr *[/code]Errors appeared, and after about 2 seconds I figured out what was happening and killed the process. Needless to say my sys is foobar'd.Luckily, /home was mounted elsewhere and I also have a simple (role my own) backup system in place that took a snapshot of most of my config files at 1AM this morning. Last weekend I was going to run some tests to see how well this backup system worked (never got around to it) and try rebuilding a system from it. I guess now, I dont have a choice.Way to wreck my day!:( Quote Link to comment https://forums.phpfreaks.com/topic/34331-foobard-my-os/ Share on other sites More sharing options...
Ninjakreborn Posted January 15, 2007 Share Posted January 15, 2007 Sorry to hear that.Hope everything turns out.Stick with it, if you have the backup (I don't know hardly anything about servers), hopefully you can get most or all of your files backGood luck. Quote Link to comment https://forums.phpfreaks.com/topic/34331-foobard-my-os/#findComment-161536 Share on other sites More sharing options...
trq Posted January 15, 2007 Author Share Posted January 15, 2007 This isn't my server, its my main desktop machine.Backup seems to be coming allong OK but I wont really know till Ive recompiled everything. Should know by this time tommorow I guess. Quote Link to comment https://forums.phpfreaks.com/topic/34331-foobard-my-os/#findComment-161543 Share on other sites More sharing options...
Ninjakreborn Posted January 15, 2007 Share Posted January 15, 2007 What are you going to do from now on, to try and prevent it from happening again. Quote Link to comment https://forums.phpfreaks.com/topic/34331-foobard-my-os/#findComment-161576 Share on other sites More sharing options...
trq Posted January 16, 2007 Author Share Posted January 16, 2007 Not much I can do really, it was a simple mistake on my part. I mounted the wrong partition, and then unwittingly deleted its contents.I could alias rm to rm -i but thats just a pain most of the time.Part of the beuty of Linux is its power, you've just gotta be carefull what you do with it. Quote Link to comment https://forums.phpfreaks.com/topic/34331-foobard-my-os/#findComment-161597 Share on other sites More sharing options...
neylitalo Posted January 16, 2007 Share Posted January 16, 2007 The joys of rm -rf. :) Quote Link to comment https://forums.phpfreaks.com/topic/34331-foobard-my-os/#findComment-161605 Share on other sites More sharing options...
Barand Posted January 16, 2007 Share Posted January 16, 2007 I learnt only today that the time between hitting the key and realising that you just deleted everything is defined as an "onosecond" Quote Link to comment https://forums.phpfreaks.com/topic/34331-foobard-my-os/#findComment-161623 Share on other sites More sharing options...
effigy Posted January 16, 2007 Share Posted January 16, 2007 Can you not script the mounting of /dev/hda[b]8[/b], so you don't end up typing 7? Quote Link to comment https://forums.phpfreaks.com/topic/34331-foobard-my-os/#findComment-161635 Share on other sites More sharing options...
.josh Posted January 16, 2007 Share Posted January 16, 2007 [quote author=Barand link=topic=122558.msg505688#msg505688 date=1168910276]I learnt only today that the time between hitting the key and realising that you just deleted everything is defined as an "onosecond"[/quote]LMAO Quote Link to comment https://forums.phpfreaks.com/topic/34331-foobard-my-os/#findComment-161640 Share on other sites More sharing options...
trq Posted January 16, 2007 Author Share Posted January 16, 2007 [quote]Can you not script the mounting of /dev/hda8, so you don't end up typing 7?[/quote]Yes, and I probably should have. The recovery from my backup is not looking real good at present, its allready failed once due to insufficient memory while compiling within a chroot environment setup from a LiveCD. Thing is I can't just copy the backup into position and boot because I didn't actually backup a working /usr/bin dir. I just backed up the configuration files that I thought I would need to rebuild the system from source.Also, its pretty hot here today. My CPU is NOT gonna like compiling for 6-8 hours.Anyway, It appears I may have f'd right up. Have to wait and see I guess. Not happy :( Quote Link to comment https://forums.phpfreaks.com/topic/34331-foobard-my-os/#findComment-161668 Share on other sites More sharing options...
neylitalo Posted January 16, 2007 Share Posted January 16, 2007 Well, you could always start over... as long as you've got the config files, the difficult part is taken care of. For a seasoned Gentoo user as yourself, a fresh install would take a day? Quote Link to comment https://forums.phpfreaks.com/topic/34331-foobard-my-os/#findComment-161670 Share on other sites More sharing options...
trq Posted January 16, 2007 Author Share Posted January 16, 2007 I basically am starting over as it stands, only difference is I have my world file and the entire /etc, /usr/src and /boot directories. Its still giving me grief though. I tried to rebuild the world (emerge -e world) from within the chroot environment and it spat it.Im now downloading a stage3, copying over my /etc, /usr/src and /boot and Im going to see if I can actually boot into it. From there (with any luck) I can emerge my world.The backup is somehting like 300+mg and ity is seriously taking an hour or so to copy into the stage3. Mind you, I forgot that there is several directories containing the source to about the last 6 kernels Ive compiled within /usr/src. I know I dont need them anymore, but....Sheesh.... Quote Link to comment https://forums.phpfreaks.com/topic/34331-foobard-my-os/#findComment-161708 Share on other sites More sharing options...
steviewdr Posted January 16, 2007 Share Posted January 16, 2007 That sucks.On the brighter side (with debian) its just a case of:Cronjob this every day:dpkg --get-selections > selections-$(date -I)And then to reinstall all packages from barebones, do:dpkg --set-selections < selections-$(date -I)Of course this presumes that you have everything from packages (on servers = yes, not sure about workstations), and you have /etc/* backed up.I know a few people who put /etc/* in svn and seems like a very good idea, for backup, for where there are multiple admins etc. etc.Hope you get back most of it.Another way around rm -rf is to alias rm="mv /var/tmp/" but thats not great.Anyhoo.-steve Quote Link to comment https://forums.phpfreaks.com/topic/34331-foobard-my-os/#findComment-161847 Share on other sites More sharing options...
Ninjakreborn Posted January 16, 2007 Share Posted January 16, 2007 World ??? Quote Link to comment https://forums.phpfreaks.com/topic/34331-foobard-my-os/#findComment-161933 Share on other sites More sharing options...
neylitalo Posted January 16, 2007 Share Posted January 16, 2007 [quote author=businessman332211 link=topic=122558.msg506005#msg506005 date=1168955349]World ???[/quote]I assume you're referring to thorpe when he said "emerge my world". This is a Gentoo term, and "world", when you're emerging things, refers to every package that has ever been installed. Quote Link to comment https://forums.phpfreaks.com/topic/34331-foobard-my-os/#findComment-162409 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.