系统备份和恢复_制作引导维护盘
2015-06-17 19:10
771 查看
【背景】前期多系统安装已经完成(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
f8b2
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
【所用软件下载地址】
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
f8b2
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
相关文章推荐
- 路由器备份配置
- 备份线路的配置
- 数据库备份 SQLServer的备份和灾难恢复
- 简化SQL Server备份与还原到云工作原理及操作方法
- sqlserver2005打造自动备份的维护计划图解教程
- MySQL数据备份之mysqldump的使用详解
- 详解MySQL数据备份之mysqldump使用方法
- mysql备份与恢复详解
- 我的文档和QQ聊天记录备份与恢复技巧
- oracle备份恢复的具体方法
- MySQL中使用innobackupex、xtrabackup进行大数据的备份和还原教程
- 重新安装2003操作系统的注意事项及备份方法
- 如何备份MySQL数据库
- 用户管理的备份(一致性备份、非一致性备份、脱机备份、联机备份)
- 史上最全的MySQL备份方法
- 远程镜像与备份SVN服务器的方法小结第1/2页
- php 备份数据库代码(生成word,excel,json,xml,sql)
- cwrsync 四步实现windows备份
- windows服务器 的DNS服务器备份与还原步骤小结
- IIS备份 自动备份IIS设置和恢复IIS设置(自动还原Web服务器)