uefi Clonezilla 開機選單

UEFI-Windows Restore using CloneZilla

clonezilla 開機後由 /home/partimag/win10 自動還原整個硬碟

修改:

/EFI/boot/grub.cfg

 

#
set pref=/EFI/boot
set default="10"

# Load graphics (only corresponding ones will be found)
# (U)EFI
insmod efi_gop
insmod efi_uga
# legacy BIOS
insmod vbe

if loadfont $pref/unicode.pf2; then
 set gfxmode=auto
 insmod gfxterm
 terminal_output gfxterm
fi
set timeout="5"
set hidden_timeout_quiet=false

insmod png
if background_image $pref/ocswp-grub2.png; then
 set color_normal=black/black
 set color_highlight=magenta/black
else
 set color_normal=cyan/blue
 set color_highlight=white/blue
fi

insmod play
play 960 440 1 0 4 440 1

# Since no network setting in the squashfs image, therefore if ip=, the network is disabled.

menuentry "Clonezilla live (Default settings, VGA 800x600)"{
 search --set -f /live/vmlinuz
#linux /live/vmlinuz boot=live union=overlay username=user hostname=zesty config quiet components noswap edd=on nomodeset locales= keyboard-layouts= ocs_live_run="ocs-live-general" ocs_live_extra_param="" ocs_live_batch="no" vga=788 ip= net.ifnames=0 splash i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.enable_fbdev=1
 linux /live/vmlinuz boot=live union=overlay username=user hostname=zesty config components noswap edd=on nomodeset noeject locales=zh_TW.UTF-8 keyboard-layouts=NONE ocs_live_run="ocs-live-restore" ocs_live_extra_param="-g auto -e1 auto -e2 -hn1 PC -batch -r -j2 -scr -p reboot restoredisk win10 sda" ocs_live_batch="yes" vga=788 ip= net.ifnames=0 quiet splash i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.enable_fbdev=1
 initrd /live/initrd.img
}
menuentry "Clonezilla live (Default settings, VGA 1024x768)"{
 search --set -f /live/vmlinuz
 linux /live/vmlinuz boot=live union=overlay username=user hostname=zesty config quiet components noswap edd=on nomodeset locales= keyboard-layouts= ocs_live_run="ocs-live-general" ocs_live_extra_param="" ocs_live_batch="no" vga=791 ip= net.ifnames=0 splash i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.enable_fbdev=1
 initrd /live/initrd.img
}

menuentry "Clonezilla live (Default settings, VGA 640x480)"{
 search --set -f /live/vmlinuz
 linux /live/vmlinuz boot=live union=overlay username=user hostname=zesty config quiet components noswap edd=on nomodeset locales= keyboard-layouts= ocs_live_run="ocs-live-general" ocs_live_extra_param="" ocs_live_batch="no" vga=785 ip= net.ifnames=0 splash i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.enable_fbdev=1
 initrd /live/initrd.img
}

menuentry "Clonezilla live (Default settings, KMS)"{
 search --set -f /live/vmlinuz
 linux /live/vmlinuz boot=live union=overlay username=user hostname=zesty config quiet components noswap edd=on locales= keyboard-layouts= ocs_live_run="ocs-live-general" ocs_live_extra_param="" ocs_live_batch="no" vga=791 ip= net.ifnames=0 splash
 initrd /live/initrd.img
}

menuentry "Clonezilla live (To RAM, boot media can be removed later)"{
 search --set -f /live/vmlinuz
 linux /live/vmlinuz boot=live union=overlay username=user hostname=zesty config quiet components noswap edd=on nomodeset locales= keyboard-layouts= ocs_live_run="ocs-live-general" ocs_live_extra_param="" ocs_live_batch="no" vga=788 toram=live,syslinux ip= net.ifnames=0 splash i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.enable_fbdev=1
 initrd /live/initrd.img
}

menuentry "Clonezilla live Safe graphic settings (vga=normal)"{
 search --set -f /live/vmlinuz
 linux /live/vmlinuz boot=live union=overlay username=user hostname=zesty config quiet components noswap edd=on nomodeset locales= keyboard-layouts= ocs_live_run="ocs-live-general" ocs_live_extra_param="" ocs_live_batch="no" ip= net.ifnames=0 nomodeset vga=normal nosplash
 initrd /live/initrd.img
}

menuentry "Clonezilla live (Failsafe mode)"{
 search --set -f /live/vmlinuz
 linux /live/vmlinuz boot=live union=overlay username=user hostname=zesty config quiet components noswap edd=on nomodeset locales= keyboard-layouts= ocs_live_run="ocs-live-general" ocs_live_extra_param="" ocs_live_batch="no" acpi=off irqpoll noapic noapm nodma nomce nolapic nosmp ip= net.ifnames=0 nomodeset vga=normal nosplash
 initrd /live/initrd.img
}

menuentry --hotkey=s "Clonezilla live (speech synthesis)"{
 search --set -f /live/vmlinuz
 linux /live/vmlinuz boot=live union=overlay username=user hostname=zesty config quiet components noswap edd=on nomodeset locales= keyboard-layouts= ocs_live_run="ocs-live-general" ocs_live_extra_param="" ocs_live_batch="no" vga=788 ip= net.ifnames=0 splash i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.enable_fbdev=1 speakup.synth=soft ---
 initrd /live/initrd.img
}
menuentry "Local operating system (if available)" --id local-disk {
 echo "Booting first local disk..."
 set root=(hd0,1)
 if [ -e /EFI/redhat/grub.efi ]; then
 chainloader /EFI/redhat/grub.efi +1
 elif [ -e /EFI/fedora/shim.efi ]; then
 chainloader /EFI/fedora/shim.efi +1
 elif [ -e /EFI/fedora/grubx64.efi ]; then
 chainloader /EFI/fedora/grubx64.efi +1
 elif [ -e /EFI/debian/grubx64.efi ]; then
 chainloader /EFI/debian/grubx64.efi +1
 elif [ -e /EFI/ubuntu/grubx64.efi ]; then
 chainloader /EFI/ubuntu/grubx64.efi +1
 elif [ -e /EFI/mageia/grubx64.efi ]; then
 chainloader /EFI/mageia/grubx64.efi +1
 elif [ -e /EFI/opensuse/grubx64.efi ]; then
 chainloader /EFI/opensuse/grubx64.efi +1
 elif [ -e /EFI/sled12/grubx64.efi ]; then
 # SuSE Linux Enterprise 12
 chainloader /EFI/sled12/grubx64.efi +1
 elif [ -e /EFI/SuSE/elilo.efi ]; then
 # SuSE Linux Enterprise 11
 chainloader /EFI/SuSE/elilo.efi +1
 elif [ -e /EFI/Boot/bootx64.efi ]; then
 # MS Windows
 chainloader /EFI/Boot/bootx64.efi +1
 elif [ -e /EFI/Microsoft/Boot/bootmgfw.efi ]; then
 chainloader /EFI/Microsoft/Boot/bootmgfw.efi +1
 else
 echo "No uEFI image was found!"
 sleep 15
 fi
}

#menuentry "memtest"{
# search --set -f /live/memtest
# linux16 /live/memtest
#}

#menuentry "FreeDOS"{
# linux16 memdisk
# initrd /live/freedos.img
#}

menuentry "iPXE"{
 search --no-floppy --set=root -f /live/ipxe.efi
 chainloader /live/ipxe.efi + 1
}

註:

傳統開機則修改:

Legacy(累個西) boot

/syslinux/syslinux.cfg