Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Automatic clonezilla recovery
#1
Good afternoon, I'm trying to repeat the instructions given here https://stackoverflow.com/questions/6584...e-solution for

I unpacked Clonezilla into an iso image on a USB stick and try the following in ventoy_grub.cfg:


menuentry "Clonezilla" --id live-default {
  set root=$vtoy_iso_part
  search --set -f /live/vmlinuz
  linuxefi $vtoy_iso_part/live/vmlinuz parameter1 parameter2 parameter3...
  initrdefi $vtoy_iso_part/live/initrd.img
}


At the same time, no matter what options I try, I get it out during the startup process

boot failed This system image failed to boot. and initfarms next, maybe this is the wrong way, but I can't come up with anything. Thank you so much for your help!
Reply
#2
You need open ISO file Clonozilla. And fix 2 files:
- \syslinux\isolinux.cfg (from to CSM mode bios)
- \boot\grub\grub.cfg (from to UEFI mode bios)

Exemple:

- grub.cfg:

menuentry "Auto Creat Backup HDD&SSD (without checking for errors)" {
  search --set -f /live/vmlinuz
  $linux_cmd /live/vmlinuz boot=live union=overlay username=user hostname=Comp config quiet components noswap edd=on nomodeset nodmraid noeject locales=ru_RU.UTF-8 keyboard-layouts=NONE ocs_prerun="mount -L Ventoy /mnt" ocs_prerun1="mount --bind /mnt/Clonozilla_Backup /home/partimag" ocs_live_run="/usr/sbin/ocs-sr -q2 -j2 -z1 -i 4000 -sc -rm-win-swap-hib -scpt -sfsck -p poweroff savedisk ask_user sda" ocs_live_batch=no vga=788 ip= splash i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.enable_fbdev=1
  $initrd_cmd /live/initrd.img
}

- isolinux.cfg:

label Auto-Clone HDD
  MENU DEFAULT
  MENU LABEL Auto Creat Backup HDD&SSD (without checking for errors)
  kernel /live/vmlinuz
  append initrd=/live/initrd.img boot=live union=overlay username=user hostname=Comp config quiet components noswap edd=on nomodeset nodmraid noeject locales=ru_RU.UTF-8 keyboard-layouts=NONE ocs_prerun="mount -L Ventoy /mnt" ocs_prerun1="mount --bind /mnt/Clonozilla_Backup /home/partimag" ocs_live_run="/usr/sbin/ocs-sr -q2 -j2 -z1 -i 4000 -sc -rm-win-swap-hib -scpt -sfsck -p poweroff savedisk ask_user sda" ocs_live_batch=no vga=788 ip= splash i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.enable_fbdev=1
  ENDTEXT
 
Done !

Addition:

If you save Clonozilla image hdd to Ventoy usb, you need include this option in file ventoy.json, section "control":

"control":[
{ "VTOY_LINUX_REMOUNT": "1" },

otherwise, Ventoy won't let you write the file.
Reply
#3
Thanks a lot for the answer, I have already reached the point of editing the .iso file myself, but I thought there was an option without editing.iso but in principle, if it works, then why not Smile

True, I tried to perform automatic recovery, and you gave an example with automatic cloning, but okay, this will also come in handy. I'll give you my example of the menu, maybe it will be useful to someone.

grub cfg
menuentry "auto restore SSD" {
search --set -f /live/vmlinuz
$linux_cmd /live/vmlinuz boot=live union=overlay username=user config components quiet loglevel=0 noswap edd=on nomodeset enforcing=0 noprompt ocs_prerun="mount /dev/sdb3 /mnt" ocs_prerun1="mount --bind /mnt/images /home/partimag/" ocs_live_run="ocs-sr -g auto -e1 auto -e2 -r -j2 -k1 -icds -scr -batch -p reboot restoredisk xubuntu-efi sda" keyboard-layouts="en" ocs_live_batch="yes" locales=en_US.UTF-8 vga=788 ip= nosplash net.ifnames=0 splash i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.enable_fbdev=1
$initrd_cmd /live/initrd.img
}

menuentry "auto restore nvme" {
search --set -f /live/vmlinuz
$linux_cmd /live/vmlinuz boot=live union=overlay username=user config components quiet loglevel=0 noswap edd=on nomodeset enforcing=0 noprompt ocs_prerun="mount /dev/sda3 /mnt" ocs_prerun1="mount --bind /mnt/images /home/partimag/" ocs_live_run="ocs-sr -g auto -e1 auto -e2 -r -j2 -k1 -icds -scr -batch -p reboot restoredisk ask_user nvme0n1" keyboard-layouts="en" ocs_live_batch="yes" locales=en_US.UTF-8 vga=788 ip= nosplash net.ifnames=0 splash i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.enable_fbdev=1
$initrd_cmd /live/initrd.img
}

--------------------------------------------------------
isolinux.cfg

label auto restore SSD
MENU DEFAULT
MENU LABEL auto restore SSD
# MENU PASSWD
kernel /live/vmlinuz
append initrd=/live/initrd.img boot=live union=overlay username=user config components quiet loglevel=0 noswap edd=on nomodeset enforcing=0 noprompt ocs_prerun="mount /dev/sdb3 /mnt" ocs_prerun1="mount --bind /mnt/images /home/partimag/" ocs_live_run="ocs-sr -g auto -e1 auto -e2 -r -j2 -k1 -icds -scr -batch -p reboot restoredisk xubuntu-efi sda" keyboard-layouts="en" ocs_live_batch="yes" locales=en_US.UTF-8 vga=788 ip= nosplash net.ifnames=0 splash i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.enable_fbdev=1
TEXT HELP
* Boot menu for BIOS machine
* Clonezilla live version: 20240408-noble-amd64. © 2003-2024, NCHC, Taiwan
* Disclaimer: Clonezilla comes with ABSOLUTELY NO WARRANTY
ENDTEXT

label auto restore nvme
#MENU DEFAULT
MENU LABEL auto restore nvme
# MENU PASSWD
kernel /live/vmlinuz
append initrd=/live/initrd.img boot=live union=overlay username=user config components quiet loglevel=0 noswap edd=on nomodeset enforcing=0 noprompt ocs_prerun="mount /dev/sda3 /mnt" ocs_prerun1="mount --bind /mnt/images /home/partimag/" ocs_live_run="ocs-sr -g auto -e1 auto -e2 -r -j2 -k1 -icds -scr -batch -p reboot restoredisk ask_user nvme0n1" keyboard-layouts="en" ocs_live_batch="yes" locales=en_US.UTF-8 vga=788 ip= nosplash net.ifnames=0 splash i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.enable_fbdev=1
TEXT HELP
* Boot menu for BIOS machine
* Clonezilla live version: 20240408-noble-amd64. © 2003-2024, NCHC, Taiwan
* Disclaimer: Clonezilla comes with ABSOLUTELY NO WARRANTY
ENDTEXT

In this example, xubuntu-efi is the name of the folder with the image files.

!!!Be careful with this approach, the image is restored automatically without asking anything!!!

I apologize for my poor English, I am writing through a translator.
Reply
#4
It turns out that everything in vento has already been thought up for us, and you can change the necessary files using the Vento BootConf Replace Plugin https://ventoy.net/en/plugin_bootconf_replace.html

Thanks a lot, longpanda!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)