You are not logged in.

#1 2005-01-22 14:25:26

thegnu
Member
From: Brooklyn, NY
Registered: 2004-05-04
Posts: 280
Website

Implementing a "system repair" feature? (bad hd)

Hey guys,
My current Arch install is on a crappy old 8 GB drive so my mom would have my old 30GB drive for photos she's been taking of her garden. A bunch of my installs have gotten corrupted as the drive filled up, and I think it's a bad hard drive.

An idea I had is integrating into pacman a system repair feature that would clear your cache and reinstall all of the reported installed applications that you could perform in a minimal boot.  (which is perfect in Arch, because of how elegant the startup scripts are.  I can't imagine trying to disable startup options in Debian just for a single boot.  Ugh! *shivers*)

I don't know if this is a particularly good idea, but it seems to me it would be a pretty powerful tool that would make Arch even better.  I'd like to hear the dev's thoughts on this.

I also once somehow erased half the contents of my /bin directory, but in retrospect it might have been data corruption(?).  At that point I just reinstalled base, but right now there's stuff that's going wrong that I can't figure out, and I'm taking my 100GB drive out of my XBOX and it would be nice to have such a feature so I could just copy my system install over and do a pacman --systemrepair and walk off.

But anyway, I should really install Slackware someday, and today might be that day.  I"ll be dual-booting Arch though.


fffft!

Offline

#2 2005-01-22 14:54:24

neotuli
Lazy Developer
From: London, UK
Registered: 2004-07-06
Posts: 1,204
Website

Re: Implementing a "system repair" feature? (bad hd)

To 'copy' over a system, the process does not need to be painstaking. I recently got a new system, and it's (software-wise) essentially a clone of the old system.

This is extremely easy to accomplish with arch, thanks to pacman. The process I followed went something like this:
1. Figure out what we want to save that isn't pacman managed. ( /home and /etc are very good cantidates), now back up to cdrw.
2. Slip a text file with the output of

 pacman -Q|awk '// {print $1}' 

onto one of those backup disks. This is a package list that will later be used to restore the packages.
3.Go ahead and do whatever hardware stuff, replacing harddrive, building new system, whatever.
4.Install Arch, base ONLY, on the new system
5.Boot up into your cozy new system and run

pacman -Syu

6.Now that the system is up to date, it is time to get back all the lost packages. From the /etc backup you made, I'd suggest restoring all the pacman config files, so pacman knows where to look if you had any other repos set up. When this is done, run

 pacman -S --noconfirm `cat /path/to/backup_package_list`

This will take some time, as it needs to download and install EVERYTHING, but when it is done, you will find that all packages you had on your other system now exist on the new one.
7. Either entirely or selectivly restore /etc , so do what you need to do to get back any old configs that you still want.
8. Restore the /home and other user data backups and recreate users (make sure they all get the same UID's they had previously)
9. The new system should now virtually be a clone of the old system. Everything with settings and all software that existed on the old one are now on the new one, you should now be able to operate exactly like the old one.

Hmm that was a pretty good one, maybe I ought to wikify that smile


The suggestion box only accepts patches.

Offline

#3 2005-01-23 01:03:26

IceRAM
Member
From: Bucharest, Romania
Registered: 2004-03-04
Posts: 772
Website

Re: Implementing a "system repair" feature? (bad hd)

neotuli wrote:

To 'copy' over a system, the process does not need to be painstaking. I recently got a new system, and it's (software-wise) essentially a clone of the old system.

My new system is *really* a clone... meaning that I copied it all... and it works (with proper config adjustments).

Offline

#4 2005-01-24 12:42:41

thegnu
Member
From: Brooklyn, NY
Registered: 2004-05-04
Posts: 280
Website

Re: Implementing a "system repair" feature? (bad hd)

neotuli wrote:

Hmm that was a pretty good one, maybe I ought to wikify that smile

Definitely!  It helps a lot, although I've already done a clean reinstall on the new hard drive.  Next time I'll know.  Thanks a lot. smile


fffft!

Offline

Board footer

Powered by FluxBB