系统备份和恢复_制作引导维护盘

【背景】前期多系统安装已经完成(win7 32位、win8.1 64位、centos7、ubuntu14、opensuse、suse linux),如果出现问题怎么办?为了预防系统出现问题,所以需要进行备份恢复。先做一个维护引导盘,支持

【所用软件下载地址】

1、再生龙clonezilla:(官网地址)(官网下载地址)(本站下载地址

2、ghost.img(搜一下,还是比较多的)(本站下载地址)

3、grub2:(官网地址)(本站下载地址)

4、syslinux:(官网下载地址

5、memdisk:(从上面下载的压缩包中解出)

6、centos7-livecd(官网下载地址)

7、整体打包,参见(云盘下载

【制作】

1、格式化U盘或移动硬盘,大约需要1.4GB。

2、下载维护引导盘_共享版.rar,然后解压到U盘的根目录下,目录格式如下:

I:\usb_boot_part.txt
I:\boot
I:\boot\grub2win
I:\boot\grub2win\grub
I:\boot\grub2win\grub\bg004_1366_768.png
I:\boot\grub2win\grub\grub.cfg
I:\boot\grub2win\grub\grubenv
I:\boot\grub2win\grub\memdisk
I:\boot\grub2win\grub\fonts
I:\boot\grub2win\grub\fonts\unicode.pf2
I:\boot\grub2win\grub\i386-pc
I:\boot\grub2win\grub\locale
I:\boot\grub2win\grub\themes
I:\boot\img_set
I:\boot\img_set\CentOS-7.0-1406-x86_64-livecd.iso
I:\boot\img_set\clonezilla-live-2.4.2-10-amd64.iso
I:\boot\img_set\clonezilla-live-2.4.2-10-i586.iso
I:\boot\img_set\ghost.img
I:\boot\img_set\W7PE.ISO
I:\boot\tools
I:\boot\tools\grub-2.02~beta2-for-windows_reame.txt
I:\boot\tools\grub2b2_4_win

3、安装gurb2引导

(1)打开cmd窗口,以管理员运行。

(2)执行wmic diskdrive  list brief,查看U盘所在磁盘序号,实例如下:

C:\Windows\system32>i:
I:\>cd I:\boot\tools\grub2b2_4_win
I:\boot\tools\grub2b2_4_win>wmic diskdrive  list brief
Caption                    DeviceID            Model                      Partit
ions  Size
HGST HTS721010A9E630       \\.\PHYSICALDRIVE0  HGST HTS721010A9E630       15      1000202273280
RAM Disk (SuperSpeed LLC)  \\.\PHYSICALDRIVE1  RAM Disk (SuperSpeed LLC)  1      3684925440
磁盘驱动器                 \\.\PHYSICALDRIVE2  磁盘驱动器                 1      1998743040

(3)假设U盘的盘符是I,则执行如下:

I:\boot\tools\grub2b2_4_win>grub-install --force --debug  --target=i386-pc --root-directory=I:\boot\grub2win --boot-directory=I:\boot\grub2win //./physicaldrive2
4、处理完毕,使用U盘重启后如下,可以使用ghost进行window分区的备份和恢复;可以使用再生龙进行linux系统备份和恢复。也可以进入Win7 PE或centos7 live进行系统哦南方维护。


5、本文使用的grub.cfg部分如下:

#必须为utf8的格式
#uefi平台
insmod efi_gop
insmod efi_uga
#bios平台
insmod vbe

search --no-floppy --set=root -f /usb_boot_part.txt
set bootpart=$root
insmod font
if loadfont /boot/grub2win/grub/fonts/unicode.pf2
then
    insmod gfxterm
    set gfxmode=auto
    set gfxpayload=keep
    terminal_output gfxterm
    set locale_dir=/boot/grub2win/grub/locale
    set lang=zh_CN
    insmod gettext
    insmod vga
    insmod ieee1275_fb
    insmod video_bochs
    insmod video_cirrus
fi


#这二行是支持jpeg和png图片格式
insmod jpeg  
insmod png
if background_image /boot/grub2win/grub/bg004_1366_768.png; then
  true
else
  set menu_color_normal=cyan/blue
  set menu_color_highlight=white/blue
fi   


#set color_normal=red/black #菜单中未选中项目的字体颜色
#set color_highlight=light-gray/blue #选中项目的字体颜色
set color_normal=white/black #菜单中未选中项目的字体颜色
set color_highlight=light-red/blue #选中项目的字体颜色


insmod part_msdos
insmod fat
insmod ntfs
insmod ext2
insmod loopback
insmod iso9660


menuentry "GHOST, DISKGEN, HDDREG, MHDD, DOS" {
    insmod ntfs
    linux16 /boot/grub2win/grub/memdisk raw
    initrd16 /boot/img_set/ghost.img
}
menuentry "Window7 PE X86" {
    insmod ntfs
    linux16 /boot/grub2win/grub/memdisk iso raw
    initrd16 /boot/img_set/W7PE.ISO
}


menuentry "Clonezilla-live-2.4.2-10 amd64 ISO" {
search --no-floppy --set=root -f /usb_boot_part.txt
set isofile=/boot/img_set/clonezilla-live-2.4.2-10-amd64.iso
loopback loop $isofile
linux (loop)/live/vmlinuz boot=live union=overlay username=user config components quiet noswap edd=on nomodeset nodmraid locales= keyboard-layouts= ocs_live_run=\"ocs-live-general\" ocs_live_extra_param=\"\" ocs_live_batch=no vga=788 ip=  nosplash i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.enable_fbdev=1 findiso=$isofile
initrd (loop)/live/initrd.img
}


menuentry "Clonezilla-live-2.4.2-10 amd64 ISO(VGA mode 1024x768)" {
search --no-floppy --set=root -f /usb_boot_part.txt
set isofile=/boot/img_set/clonezilla-live-2.4.2-10-amd64.iso
loopback loop $isofile
linux (loop)/live/vmlinuz boot=live union=overlay username=user config components quiet noswap edd=on nomodeset nodmraid locales= keyboard-layouts= ocs_live_run=\"ocs-live-general\" ocs_live_extra_param=\"\" ocs_live_batch=no vga=791 ip=  nosplash i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.enable_fbdev=1 findiso=$isofile
initrd (loop)/live/initrd.img
}


menuentry "Clonezilla-live-2.4.2-10 amd64 ISO 中文" {
search --no-floppy --set=root -f /usb_boot_part.txt
set isofile=/boot/img_set/clonezilla-live-2.4.2-10-amd64.iso
loopback loop $isofile
linux (loop)/live/vmlinuz boot=live union=overlay username=user config components quiet noswap edd=on nomodeset nodmraid locales=\"zh_CN.UTF-8\" keyboard-layouts= ocs_live_run=\"ocs-live-general\" ocs_live_extra_param=\"\" ocs_live_batch=no vga=788 ip=  nosplash i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.enable_fbdev=1 findiso=$isofile
initrd (loop)/live/initrd.img
}


menuentry "Clonezilla-live-2.4.2-10 amd64 ISO 中文(VGA mode 1024x768)" {
search --no-floppy --set=root -f /usb_boot_part.txt
set isofile=/boot/img_set/clonezilla-live-2.4.2-10-amd64.iso
loopback loop $isofile
linux (loop)/live/vmlinuz boot=live union=overlay username=user config components quiet noswap edd=on nomodeset nodmraid locales=\"zh_CN.UTF-8\" keyboard-layouts=\"\" ocs_live_run=\"ocs-live-general\" ocs_live_extra_param=\"\" ocs_live_batch=\"no\" vga=791 ip=  nosplash i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.enable_fbdev=1 findiso=$isofile
initrd (loop)/live/initrd.img
}
menuentry "Clonezilla-live-2.4.2-10-i586 ISO" {
search --no-floppy --set=root -f /usb_boot_part.txt
set isofile=/boot/img_set/clonezilla-live-2.4.2-10-i586.iso
loopback loop $isofile
linux (loop)/live/vmlinuz boot=live union=overlay username=user config components quiet noswap edd=on nomodeset nodmraid locales= keyboard-layouts= ocs_live_run=\"ocs-live-general\" ocs_live_extra_param=\"\" ocs_live_batch=no vga=788 i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.enable_fbdev=1 ip=frommedia  nosplash findiso=$isofile toram=filesystem.squashfs
initrd (loop)/live/initrd.img
}


menuentry "Clonezilla-live-2.4.2-10-i586 ISO(VGA mode 1024x768)" {
search --no-floppy --set=root -f /usb_boot_part.txt
set isofile=/boot/img_set/clonezilla-live-2.4.2-10-i586.iso
loopback loop $isofile
linux (loop)/live/vmlinuz boot=live union=overlay username=user config components quiet noswap edd=on nomodeset nodmraid noeject locales= keyboard-layouts= ocs_live_run="ocs-live-general" ocs_live_extra_param="" ocs_live_batch=no vga=791 ip=  nosplash i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.enable_fbdev=1 findiso=$isofile
initrd (loop)/live/initrd.img
}


menuentry "Clonezilla-live-2.4.2-10-i586 ISO zh_CN" {
search --no-floppy --set=root -f /usb_boot_part.txt
set isofile=/boot/img_set/clonezilla-live-2.4.2-10-i586.iso
loopback loop $isofile
linux (loop)/live/vmlinuz boot=live union=overlay username=user config components quiet noswap edd=on nomodeset nodmraid locales=\"zh_CN.UTF-8\" keyboard-layouts=\"\" ocs_live_run=\"ocs-live-general\" ocs_live_extra_param=\"\" ocs_live_batch=no vga=788 ip=  nosplash i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.enable_fbdev=1 findiso=$isofile
initrd (loop)/live/initrd.img
}


menuentry "Clonezilla-live-2.4.2-10-i586 ISO 中文(VGA mode 1024x768)" {
search --no-floppy --set=root -f /usb_boot_part.txt
set isofile=/boot/img_set/clonezilla-live-2.4.2-10-i586.iso
loopback loop $isofile
linux (loop)/live/vmlinuz boot=live union=overlay username=user config components quiet noswap edd=on nomodeset nodmraid noeject locales=\"zh_CN.UTF-8\" keyboard-layouts= ocs_live_run=\"ocs-live-general\" ocs_live_extra_param=\"\" ocs_live_batch=no vga=791 ip=  nosplash i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.enable_fbdev=1 findiso=$isofile
initrd (loop)/live/initrd.img
}


menuentry 'Start CentOS Linux 7 Live' --class fedora --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set isofile=/boot/img_set/CentOS-7.0-1406-x86_64-livecd.iso
loopback loop $isofile
linux (loop)/isolinux/vmlinuz0 root=live:CDLABEL=CentOS-7-livecd-x86_64 iso-scan/filename=$isofile rootfstype=auto ro rd.live.image quiet  rhgb locale=zh_CN.UTF-8
initrd (loop)/isolinux/initrd0.img
}


menuentry 'Start CentOS Linux 7 Live in basic graphics mode' --class fedora --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set isofile=/boot/img_set/CentOS-7.0-1406-x86_64-livecd.iso
loopback loop $isofile
linux (loop)/isolinux/vmlinuz0 root=live:CDLABEL=CentOS-7-livecd-x86_64 iso-scan/filename=$isofile rootfstype=auto ro rd.live.image quiet  rhgb rd.luks=0 rd.md=0 rd.dm=0 nomodeset locale=zh_CN.UTF-8
initrd (loop)/isolinux/initrd0.img
}

menuentry "重启" {
    reboot
}

menuentry "关机" {
    halt
}



                                                                                                                                 


【附录】下面的没有验证过,仅是记录一下

1、centos7下载地址

http://mirrors.aliyun.com/centos/7.1.1503/isos/x86_64/

http://ftp.sjtu.edu.cn/

http://livecdlist.com/

2、通过iso引导ubuntu live-cd

通过iso引导ubuntu live-cd:

在grub2中通过loopback设备加载,或者其它方法,只要能够访问到该iso中的casper目录,如果是在grub2中,可以通过以下方式引导:
grub> loopback lo (hd0,1)/ubuntu-11.10-desktop-i386.iso
grub> linux (lo)/casper/vmlinuz boot=casper iso-scan/filename=/ubuntu-11.10-desktop-i386.iso
grub> initrd (lo)/casper/initrd.lz
grub> boot

menuentry "ubuntukylin-14.10-desktop-amd64.iso" {
    search --no-floppy --set -f /ubuntukylin-14.10-desktop-amd64.iso
    loopback loop ($root)/ubuntukylin-14.10-desktop-amd64.iso
    linux (loop)/casper/vmlinuz.efi boot=casper iso-scan/filename=/ubuntukylin-14.10-desktop-amd64.iso locale=zh_CN.UTF-8 quiet splash --
    initrd (loop)/casper/initrd.lz
}

menuentry 'Ubuntu LiveCD' { 
set root='(hd0,msdos1)'
loopback loop (hd0,msdos1)/ubuntu-12.04-desktop-i386.iso
linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/ubuntu-12.04-desktop-i386.iso
initrd (loop)/casper/initrd.lz
}

3、通过iso引导openSuse live-cd

menuentry "openSUSE-13.2-KDE-Live-x86_64.iso" {
  set root='hd0,msdos5'
  set device='/dev/sda5'
  set isofile='/openSUSE-13.2-KDE-Live-x86_64.iso'
  set loader='/boot/x86_64/loader'                        
  loopback loop $isofile
  linux   (loop)$loader/linux isofrom_device=$device isofrom_system=$isofile LANG=zh_CN.UTF-8
  initrd  (loop)$loader/initrd
}

4、通过iso引导其他方式

title disk boot DT7
root (hd0,0)
kernel /vmlinuz0 root=CDLABEL=redflag-DT7-livecd isodev=/dev/sda1 isodev_dir=/ rootfstype=iso9660 vga=788 live_locale=zh_CN.UTF-8
initrd /initrd4disk.img



  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

mengyoufengyu

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值