Jump to content

Recommended Posts

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!

:(
Link to comment
https://forums.phpfreaks.com/topic/34331-foobard-my-os/
Share on other sites

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.
Link to comment
https://forums.phpfreaks.com/topic/34331-foobard-my-os/#findComment-161597
Share on other sites

[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 :(
Link to comment
https://forums.phpfreaks.com/topic/34331-foobard-my-os/#findComment-161668
Share on other sites

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....
Link to comment
https://forums.phpfreaks.com/topic/34331-foobard-my-os/#findComment-161708
Share on other sites

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

Link to comment
https://forums.phpfreaks.com/topic/34331-foobard-my-os/#findComment-161847
Share on other sites

[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.
Link to comment
https://forums.phpfreaks.com/topic/34331-foobard-my-os/#findComment-162409
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.