LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Quick System Recovery (https://www.linuxquestions.org/questions/linux-software-2/quick-system-recovery-154326/)

1kyle 03-06-2004 04:19 PM

Quick System Recovery
 
With all the installs / testing different distros I've been doing I looked for a quick, cheap and easy Linux Backup / restore system. There's plenty out there for the EXPENSIVE corporate suits running large servers but for home use there's nothing so I've finally come up with this EASY method. Should work for ANY Distro.

You do need 2 pieces of commercial software -- but they are cheap and you need access to a 'Doze Machine one time to create bootable media and your distro bootable install CD / DVD.

1) Create a small say 16 MB or a minimum size 7MB FAT16 partition and install a Boot manager.

2 choices here -- Bootmanager (powerquest or Acronis).

http://www.powerquest.com or http://www.acronis.com

2) install Acronis True Image or power quest's Drive Image -- If you opt for Drive Image then ensure you are using the OLD (DRIVEIMAGE 2003) and not the new one. You'll need 'Doze once to install these -- then create BOOTABLE media from the application. After you are done you won't need the 'Doze machine again as you can run these apps from the boot media directly even if your hard disk is totally wiped.

3) on your Linux machine ENSURE THAT GRUB / LILO is installed on the ROOT or BOOT PARTITION.

DON'T INSTALL IT UNDER ANY CIRCUMSTANCES ON THE MBR (MASTER BOOT RECORD) OR YOU WILL GET TOTALLY HOSED.

(If the MBR is written then after you restore your linux system the MBR boot won't find the actual physical address of the Linux Boot program and you'll be stuck as you won't even be able to boot into 'Doze even if you had a dual boot machine -- and it gets worse as you can't fix it by booting a Dos system and doing FDISK /MBR since a) this won't work under Windows XP, and b) if you are using NTFS for your Windows system parition the DOS system won't be able to access the 'C' drive anyway).

All these problems go away if you DON'T OVEWRITE THE MBR.

THE BOOTMANAGER (ACRONIS / POWERQUEST) WILL LOAD YOUR LINUX BOOT RECORD FROM THE BOOT / ROOT PARTITION -- AFTER YOU'VE FOLLOWED THE INSTRUCTIONS BELOW AND YOU CAN THEN BOOT LINUX NORMALLY.

4) Run the stand alone software (Drive Image / True Image -- or I suppose GHOST might also work) to image your linux partitions. You can also do this under 'Doze if you are dual booting your machine. If you have plenty of disk space write to a disk otherwise write to DVD / CD / CD-RW. My 15 GB Linux system (2.7GB used) compressed down to 950 MB which easily fitted on to 1 DVD and took around 20 mins on a Sony VAIO Laptop .

5) You can then alter / resize partitions etc.

6) Now boot the restore program and restore.

7) You won't be able to boot into your linux system just yet -- if you try you'll just get a GRUB or LILO line so after RESTORE boot your Linux install disk.

8) Using the install disk re-create GRUB / LILO -- ensuring the boot record is wriiten to either ROOT partition or /BOOT if you have a /BOOT partition. Don't format anything -- and you might be prompted to change some FSTAB entries if you've added / deleted partitions (including Windows partitions as the partition table / numbering might have changed).

9) Now re-boot. Your Boot manager will indicate the Linux system on the menu. Choose it and you will be booted into your restored system.

Really easy and quick --especially if you already have Disk Imaging software.

The trick in making this easy is DON'T CREATE LILO / GRUB SO IT WRITES THE MBR.

Hope this saves you a lot of time when messing around with different distros, config files, hardware etc.

Have Fun.

Cheers
-K

david_ross 03-06-2004 04:30 PM

Did you try partimage?
http://partimage.org/

You can do a network restore too:
http://www.partimage.org/doc/index-3.html#ss3.5

1kyle 03-06-2004 04:43 PM

I looked at that -- but 1) Doesn't do NTFS so you can't image your 'Doze stuff -- might not be important but a lot of people still dual boot with 'DOZE so when backing up you can do the whole lot in one go with one program. Selective restore of an individual partition works from a full disk image as well abd for 'DOZE individual files can be retrieved from an imge.

The programs I've used above work for almost ANY file system / OS.

2) It's best when imaging the disks to do it from a stand alone program so nothing is running on the linux system -- on a normal linux box there's always some processes running even when you are not typing anything.

3) After a restore you'll probably still have to re-create GRUB / LILO -- no big deal of course. I still think that what I said about the MBR is valid.

This program looks however if it could be useful and will definitely improve in the next release or so.

Thanks for the Link
-K

quatsch 03-06-2004 04:48 PM

partimage can do ntfs pretty well. I've done with no problems. They say heavy fragmentation can cause problems and it can't deal with compressed NTFS folders (not a biggy; justdefrag and disable compression). there's also a CD version - kind of a live CD thing that just does the partimage thing. I just have a minimal linux installed on a separate partition for system maintainance puposes installed on a separate partition and I have partimage installed as well (I used to hose my system all the time) Partimage also comes with Knoppix in case things are really hosed. It's not as convenient as some commercial programs but it's free :)

david_ross 03-06-2004 04:50 PM

1) It will Do Vfat (fat32) partitions, so you don't need to use NTFS
2) I'm really not sure what you mean by this. You don't need to run partimage from the disk that you are imaging.
3) The MBR will not be restored but another good tip to add is that you can backup your MBR with dd, then just write it back to the disk.

Hope this helps.

geesh 03-07-2004 08:31 PM

dd sounds like something I need as I'm always hosing my system also. The only benefit of constantly doing a hose job has to been accelerating the learning curve :) Could you be a bit more specific about dd please?

Thanks

Greg

david_ross 03-08-2004 12:28 PM

You can backup your mbr to a file (could be kept on a floppy) with:
dd if=/dev/hda of=/root/mbr.bak bs=512 count=1

if=In File (The source)
of=Out File (The destination)
bs=Block size in bytes to read at a time
count=Number of blocks to read

To restore the MBR just reverse the "if" and "of" values.

geesh 03-08-2004 09:12 PM

doh,
Thanks much! I did a dd --help and now realize that it's a utility right in linux :) looks like this old dog still can learn new tricks .

Greg


All times are GMT -5. The time now is 02:15 AM.