LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Vista dead - need to backup Linux to reinstall (https://www.linuxquestions.org/questions/linux-software-2/vista-dead-need-to-backup-linux-to-reinstall-600381/)

Phyrexicaid 11-17-2007 08:52 AM

Vista dead - need to backup Linux to reinstall
 
(Relax, it's a Linux question ;) )

Windows Vista died after CHKDSK helpfully found errors, fixed errors, and, in the process, killed Vista. I can't boot into Windows, registry is now corrupt. It is an HP Pavillion laptop, and I have the recovery disk.

I cannot simply repair windows with this recovery disk, the only options are to use a restore point (oops, restored to last restore point, now no more restore points), or to use factory reset.

I am assuming factory reset will wipe everything, including partition table, getting rid of Ubuntu. I do everything on Ubuntu, I only booted into windows for Half Life 2. How can I back up Ubuntu so that once Windows has been restored I can simply reload Ubuntu as it is now?

I have installed a lot of software that I don't want to have to go through again.

jiml8 11-17-2007 09:17 AM

If the restore disk does in fact wipe the partition table and reformat it, you have a serious (though not insurmountable) problem. I am not sure this is what will happen; I would expect the restore disk to use the partition it found, but I could easily be wrong.

In any case, the easiest route for you to take is to copy (not image, just copy) the entire contents of the Linux partition off to another HD, using a Linux Live CD. Then go through the reinstall process for Vista.

When the reinstall is complete, check the partition table to see if your Linux distro survived. If it did, then from the Linux Live CD, reinstall grub. If it didn't, then defragment the Windows drive to make sure all the Windows stuff is packed at the front of the partition and use the Linux Live CD to repartition the drive.

Format that partition using a Linux FS (probably ext3), then just copy your Linux system onto the partition. When you have finished this, reinstall grub and you are done.

Phyrexicaid 11-17-2007 10:31 AM

Brilliant, thanks.

I'll try that and keep fingers crossed. Thought I might have to use the "dd" command, never used it before :P

DropSig 11-17-2007 10:59 AM

look here
but if vista allready killed itself are you sure you want to reinstall it??????

brianL 11-17-2007 11:22 AM

Let it Rest In Peace.
:D

Phyrexicaid 11-17-2007 12:25 PM

Quote:

Originally Posted by DropSig (Post 2962113)
look here
but if vista allready killed itself are you sure you want to reinstall it??????

I'm trying my hardest to get Half Life 2 - Episode One running under Crossover, but having sound issues. Vista is my backup. It is soooo tempting to just nuke it though. Free up the 40 gigs.

Thanks for that link! The tarball idea is great

Phyrexicaid 12-02-2007 03:57 AM

Quote:

Originally Posted by DropSig (Post 2962113)
look here
but if vista allready killed itself are you sure you want to reinstall it??????


Ok, I am finally getting around to restoring Vista :p I am trying to use your suggestion and tar the root directory. I'm using:
Code:

tar -pcvf /media/disk/backup.tar .
running from / obviously.
It works, but it descends into /home which is on a separate partition. I just want the / partition backed up, that way it's only 3.5Gb.

I tried using --exclude=/home/ but that doesn't seem to work. Man page is unhelpful. Suggestions?

bigrigdriver 12-02-2007 04:28 AM

Unmount the /home partition, then run tar. Tar will record it as an empty directory.

Caution: when you restore the tar file, be sure that /home is unmounted, otherwise it may be overwritten by an empty /home directory.

Phyrexicaid 12-02-2007 04:56 AM

Quote:

Originally Posted by bigrigdriver (Post 2977356)
Unmount the /home partition, then run tar. Tar will record it as an empty directory.

Caution: when you restore the tar file, be sure that /home is unmounted, otherwise it may be overwritten by an empty /home directory.

Thanks! That's smart (or I am dumb ;) )

jschiwal 12-02-2007 05:04 AM

You don't want to backup the /media or /mnt directories either. Also not the /proc, /dev or /sys directories. It would be pointless backing up /tmp. Also, clear your browser cache. That will contain thousands of worthless files. Your ~/.beagle/ directory might contain 70,000 index files that could be regenerated. Backing up so many files would take a long time.

Try to exclude them by adding the arguments "--exclude=media --exclude=mnt --exclude=proc --exclude=dev --exclude=sys" --exclude=tmp".


Another option is to start in the root directory and add each directory you want to backup in the the arguments.
Code:

cd /
tar cpvf /media/disk/backup.tar /bin /usr /var /srv /boot /root
tar cpvf /media/disk/homebackup.tar /home

Besides this backup you might want to save the output of: "sudo /sbin/fdisk -l", the /etc/fstab and /etc/grub/menu.lst files. They are small and you could even print them out if you wanted. They supply the info you could use to reconstruct the partition system you had before.


All times are GMT -5. The time now is 04:26 PM.