JavaScript must be enabled in order for you to see "WP Copy Data Protect" effect. However, it seems JavaScript is either disabled or not supported by your browser. To see full result of "WP Copy Data Protector", enable JavaScript by changing your browser options, then try again.

修復Grub files從Clonezilla restore to disk from image with RHEL 6 & SLES 11.3


最近在Survey如何縮短TXT和SR-IOV Validation時間,透過控哩啦(Clonezilla)事先準備好雙OS Environment倒回去到新的HDD上,而且做出來的Image總Total也不超過20G(原本加起來大約80G左右),時間也從原本4~6小時縮短至1小時左右,只是倒回去的時候因為雙系統的關係,導致無法直接順利開進去到OS內,所以在這邊Record一下怎樣將倒回去的OS EnvironmentGrub files的修復(只要設定完Saved Location之後,就會出現Restore的相關Options,反之則不會出現),使得可以成功且快速達到減少時間目的,直接看下去吧,如下:

I.TXT Environment(SLES 11.3 -> sda1&sda2;RHEL -> sda3&sda5)
1) Modify the grub file in the RHEL 6(倒好之後Reboot會看到RHEL的Grub)
#vi /boot/grub/grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You do not have a /boot partition. This means that
# all kernel and initrd paths are relative to /, eg.
# root (hd0,2)
# kernel /boot/vmlinuz-version ro root=/dev/sda3
# initrd /boot/initrd-[generic-]version.img
#boot=/dev/sda
default=0
timeout=-1
splashimage=(hd0,2)/boot/grub/splash.xpm.gz
#hiddenmenu
title Red Hat Enterprise Linux 6 (2.6.32-504.el6.x86_64) with tboot
root (hd0,2)
kernel /boot/tboot.gz logging=vga,serial,memory
module /boot/vmlinuz-2.6.32-504.el6.x86_64 ro root=UUID=e1055f1c-42eb-4e36-8c2d-9a3ba2bacb1c intel_iommu=on amd_iommu=on rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=128M KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet
module /boot/initramfs-2.6.32-504.el6.x86_64.img
title SUSE Linux Enterprise Server 11 SP3 - 3.0.76-0.11 with tboot
rootnoverify (hd0,0)
makeactive
chainloader +1

2) Modify the grub file about the SLES 11.3 in the RHEL6(因SLES 11.3是用HDD Type所定義root partition的位置,修改之後Reboot即可)
#mount /dev/sda1 /mnt
#ls /dev/disk/by-id -> Query the name about HDD type
#vi /mnt/boot/grub/menu.lst
# Modified by YaST2. Last modification on Wed Oct 22 04:44:55 CST 2014
default 0
timeout 8
##YaST - generic_mbr
gfxmenu (hd0,0)/boot/message
##YaST - activate
###Don't change this comment - YaST2 identifier: Original name: linux###
title SUSE Linux Enterprise Server 11 SP3 - 3.0.76-0.11 with tboot
root (hd0,0)
kernel /boot/tboot.gz logging=vga,serial,memory
module /boot/vmlinuz-3.0.76-0.11-default root=/dev/disk/by-id/ata-ST91000640NS_9XG5708H-part1 showpts resume=/dev/disk/by-id/ata-ST91000640NS_9XG5708H-part2 splash=silent crashkernel=256M-:128M showopts vga=0x314
module /boot/initrd-3.0.76-0.11-default
###Don't change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe -- SUSE Linux Enterprise Server 11 SP3 - 3.0.76-0.11
root (hd0,0)
kernel /boot/vmlinuz-3.0.76-0.11-default root=/dev/disk/by-id/ata-INTEL_SSDSC2BA100G3L_BTTV335302TR100FGN-part1 showopts ide=nodma apm=off noresume edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 nomodeset x11failsafe vga=0x314
initrd /boot/initrd-3.0.76-0.11-default

II.SR-IOV Environment(SLES 11.3 -> sda1&sda2;RHEL -> sda3&sda5)
3) Modify the grub file through PXE with RHEL 6(很不幸,倒好開出來是SLES的Grub)
#mkdir -p /temp -> 怕蓋掉原本PXE在用的/mnt
#mount /dev/sda1 /temp
#ls /dev/disk/by-id -> Query the name about HDD type
#vi /temp/boot/grub/menu.lst -> 怕只有一個tty可以在vi內執行:r! ls /dev/disk/by-id來找
# Modified by YaST2. Last modification on Thu Oct 23 10:33:26 CST 2014
default 0
timeout 8
##YaST - generic_mbr
gfxmenu (hd0,0)/boot/message
##YaST - activate
###Don't change this comment - YaST2 identifier: Original name: linux###
title SUSE Linux Enterprise Server 11 SP3 - 3.0.76-0.11 SRIOV
root (hd0,0)
##Please ref /dev/disk/by-id/ata-XXX to modify the information about root partition through rhel6
kernel /boot/vmlinuz-3.0.76-0.11-default root=/dev/disk/by-id/ata-ST91000640NS_9XG5708H-part1 showpts resume=/dev/disk/by-id/ata-ST91000640NS_9XG5708H-part2 splash=silent crashkernel=256M-:128M showopts vga=0x314 intel_iommu=on
initrd /boot/initrd-3.0.76-0.11-default
###Don't change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe -- SUSE Linux Enterprise Server 11 SP3 - 3.0.76-0.11
root (hd0,0)
kernel /boot/vmlinuz-3.0.76-0.11-default root=/dev/disk/by-id/ata-INTEL_SSDSC2BA100G3L_BTTV335302TR100FGN-part1 showopts ide=nodma apm=off noresume edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 nomodeset x11failsafe vga=0x314
initrd /boot/initrd-3.0.76-0.11-default
title Red Hat Enterprise Linux 6 (2.6.32-504.el6.x86_64) SRIOV
root (hd0,2)
makeactive
chainloader +1

4) Preparation the environment before clonezillaing and check the grub file in the RHEL 6(因透過SLES Grub做引導,所以不用修改RHEL的Grub file)
#grub-install /dev/sda3 -> Preparation before clonezillaing
#cat /boot/grub/grub.conf -> Check the file
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You do not have a /boot partition. This means that
# all kernel and initrd paths are relative to /, eg.
# root (hd0,2)
# kernel /boot/vmlinuz-version ro root=/dev/sda3
# initrd /boot/initrd-[generic-]version.img
#boot=/dev/sda
default=0
timeout=-1
splashimage=(hd0,2)/boot/grub/splash.xpm.gz
#hiddenmenu
title Red Hat Enterprise Linux 6 (2.6.32-504.el6.x86_64) SRIOV
root (hd0,2)
kernel /boot/vmlinuz-2.6.32-504.el6.x86_64 ro root=UUID=b1de227d-77b1-4688-ad36-54bc99f47823 rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=128M KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet intel_iommu=on
initrd /boot/initramfs-2.6.32-504.el6.x86_64.img
title SUSE Linux Enterprise Server 11 SP3 - 3.0.76-0.11 SRIOV
root (hd0,0)
makeactive
chainloader +1

◎、以上就是修復RHEL 6 & SLES 11.3 Grub files的簡易介紹,純粹紀錄一下Progress,如果看倌們有興趣也可以自己玩一玩,等有空再補上RHEL 7&SLES 12的部分,先到這,收工囉!

  1. 請問如何開啟被黏功能?
    放"家後"有用嗎?

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

 
This site is protected by WP-CopyRightPro