Sasikumarp’s Weblog

How to take backup of a working system using System rescue Cd

How to take backup of a working system using System rescue Cd

In order to take backup of a system we need a destination to save the image files so we need to create a NFS server

How to create NFS server

1. Make a directory like named as backup in the server (Linux server or windows share)

2. Make sure you have the necessary NFS utilities installed in your NFS Server.

3. Please Install Portmap in your server.

4. Type vi /etc/exports

5. Include the directory name in the file like

/home/backup *(rw)

6. Start the NFS service

Service nfs start

Service nfslock start

Service portmap start

7. Boot the system with system rescue cd which you want to take backup

8. Type net-setup or net-setup eth0 and hit enter

9. Choose appropriate options based upon your network and assign the ip address

10. Create a directory by using the cmd mkdir image

11. Check whether the NFS services started in the system rescue cd

12 If not please type /etc/init.d/nfsmount start this will help you to start the nfs in the system rescue cd

13. Type mount 192.168.10.20:/home/backup image (ip addr is the nfs server’s ip and image is the directory which we created in the system rescue cd)

14. Check whether it’s mounted with opening the directory named image

15. Type fdisk –l and this will display the harddisk partition info like below

Device Boot Start End Blocks Id System

/dev/sda1 * 1 13 104391 83 Linux

/dev/sda2 14 3200 25599577+ 83 Linux

/dev/sda3 3201 6260 24579450 83 Linux

/dev/sda4 6261 9729 27864742+ 5 Extended

/dev/sda5 6261 6518 2072353+ 82 Linux swap / Solaris

/dev/sda6 6519 9729 25792326 83 Linux

Just make a note of the above table for precaution with id no and starting and ending cylinders

16. If you want to backup the partition /dev/sda1 then just type

partimage save /dev/sda1 image sda1.gz this will save the /dev/sda1 as an image file in the NFS server.

17. Use the same cmd and save all other remaining partitions in the NFS server.

18. If you want to backup of your MBR and Partition Table just type the following cmd

dd if=/dev/sda of=image/root-sda-MBR-PARTTABLE-230408 count=1 bs=512

To Restore the image files to a system follow the steps 7 to 13 again

  1. First we going to restore the MBR and Partition table to the new system which have the hardware
  2. Just type the following cmd to restore the MBR and partition table

dd if=image/root-sda-MBR-PARTTABLE-230408 of=/dev/sda count=1 bs=512

and this will restore the MBR and the partition table to the new system

  1. Just type fdisk –l and make sure the partition is created
  2. If there is no partition then just create the partitions with noted cylinder information the step no 15
  3. Type the cmd like mkfs -t ntfs /dev/sda1 for ntfs partition or mkfs .vfat /dev/sda2 cmd for ext3 just use the cmd mkfs .ext3 /dev/sda3
  4. Type the cmd partimage and hit enter
  5. It will display a screen like this

Choose the partition which you want to restore and use the tab key to move the options

8. Type the image file location in the image file to create option

9. Choose Restore partition from an image file and press F5 and follow the steps and that will restore the backed up image to the new system

10. Follow the same to restore all other partitions

11. After restore reboot the system and take off the system rescue cd and that will boot with all applications which you had before

12. If you are using a Dual boot system some time you may have some error like autochk not found and reboot automatically when booting windows (This will happen only when the partition table id is changed)

13. If you have dual boot just boot in to Linux and open the terminal and type fdisk /dev/sda and hit enter

14. Just type t and hit enter and change the id for partition by referring the id no which you noted before in step no 15 and type w to save the partition table

15. If you using only windows and getting the same autochck error then boot with system rescue cd and follow step no 14 to change the id no in the partition table or just follow the steps below

1) Click the link below and save PTEDIT.ZIP to your desktop

ftp://ftp.symantec.com/public/english_us_canada/tools/pq/utilities/ptedit.zip

2) Create a bootable MS-DOS disk for Windows

In Windows XP

  • Place a blank floppy disk in Drive A
  • Open My Computer
  • Right-click on Drive A (floppy drive)
  • Click on Format
  • Check the box for “Create an MS-DOS Startup Disk”
  • Click Start
  • Click OK to the warning about formatting the disk will erase all data
  • Click Ok to Format Complete
  • Close the Format Disk window

For boot disks for other operating systems, you may want to visit bootdisk.com

3) Copy PTEDIT to the floppy disk

  • Double-click on the PTEDIT.ZIP file you downloaded to the desktop
  • Right-click on PTEDIT.EXE and click on Copy
  • Open My Computer
  • Double-click on Drive A
  • Click on Edit
  • Click on Paste

4) Remove the disk from the floppy drive and place it in the floppy drive of the problem computer

5) Turn on the power to the problem computer and allow it to boot to from the floppy drive. Make sure the BIOS in your computer is set to boot from the floppy drive first.

6) At the A:\> prompt, type the following

PTEDIT and press Enter

7) You’ll be presented with “Power Quest Partition Table Editor” screen. The key is to look in the first column of the table under Type. The number here should generally be 07 (hex), meaning the partition is an “Installable File System”, in other words a bootable drive. If its anything else its not bootable.

Using your tab key, tab down to the Type box and hold down ALT + T to open the Set Type menu, then with your keyboard arrow, select 07, tab down to Ok and press Enter

8) Hold down ALT + S to Save Changes to the partition table and then Press CTRL +C to exit out of the program.

9) Reboot your computer and it should now boot normally into Windows.

Of course, all these steps should be followed correctly, and if you are not comfortable changing this information you should consult a friend or computer tech that can help you with the problem.

Just leave your comments for this article

Leave a comment