歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux管理 >> Linux維護 >> Linux攻略 用Ghost備份Linux系統的方法

Linux攻略 用Ghost備份Linux系統的方法

日期:2017/3/2 10:38:10   编辑:Linux維護

工具:ghost.exe image file ( 最小而完整的系統所作出來的image文件 ).

  Ghost linux主要幾個步驟:

  1、 boot from cd

  2、 restore redhat image into hard disk

  3、 define major hard disk space as reiserfs partition

  4、 update /etc/lilo.conf and execute lilo –v update the /etc/fstab

  5、 cp all / files into /reiser ( the mount partition reiserfs partition )

  6、 reboot ,,ok!!!

  每步的詳細操作:

  一、 boot from cd

  二、 restore with ghost

  select destination drive and make sure the new and old sizes are the same.

  (we want to use the free space for reiserfs later )

  ghost過程應該很快,然後reboot,別忘了取出光盤。

  按提示config系統查找到的硬件。

  三、 define new partition with fdisk

  # fdisk /dev/had

  command ( m for help) : p 查看分區情況。

  Command ( m for help ) : n define a new partition .

  1 , 2 分區都已經用了,我們選 3 ,

  first cylinder and last cylinder 都按 default , 也就是用了其它的剩余空間。

  確認他的ID 是83 ,,83對應的是liunx,ID 等於的5對應為extend , 82對應為linux swap 。

在按p查看一下分區表的情況。這時應該添加了/dev/hda3 了。

  之後 # sync;sync;sync;reboot

  然後 # mkreiserfs / dev / hda3

  系統會提示attention : all data will be lost on ‘ / dev/ hda3 ’ !(y /n ) 選 y 繼續

  initializing journa 10% ……20 % ………100%

  syncing …….

  四、update /etc/lilo.conf and execute lilo –v update the /etc/fstab

  修改lilo.conf

  #vi /etc/lilo.conf

  change “root=/dev/hda1 ” to “ root= /dev/hda3 ”

  # lilo -v -v

  修改 fstab

  # vi /etc/fstab

  把第一行注釋掉,然後加入

  “ /dev/hda3 / reiserfs default 1 1 ”

  保存退出。

  五、cp all / files into /reiser ( the mount partition reiserfs partition )

  # mkdir /reiser

  # mount –t reiserfs /devhda3 /reiser

  # cp -a -x / /reiser

  這步需要點時間,可以出去抽兩根煙在回來。

  Cp 完成後

  # sync ; sync ; sync ; reboot

  這樣系統的ghost就算大功告成了。

Copyright © Linux教程網 All Rights Reserved