I'm evaluating Clonezilla for our school. We have some hundred PCs I
need do clone and
our old clone solution (Ghost) starts to fail with GPT, Win10 und UEFI.
In short: I installed the current Clonezilla Server on a Debian 10.3
machine according
to the docs on clonezilla.org. I manually set up dhcp.conf, hosts and
exports (because
'drblpush -i' doesn't work) und created an entry with dcs
(clonezilla-start) to save
a local disk as image file.
I can boot with PXE, but when I try to load this entry (save disk to
image) it tries to
mount /usr via nfs and fails (because it uses the DHCP-relay-agent's
address).
Two possible solutions I thought of: is it possible to load the
clonezilla client entirely
in RAM without the need for nfs (with Ghost I simply needed to place a
bootimage in /tftpboot
and it started to the gui) and what do I need to do for that?
Or: where can I edit the NFS mount options and which options exactly do
I need to change
to enter a different nfs-server-address.
Simply said: I just want the "Clonezilla-Live-CD/Stick to start with
PXE" since our school-PCs
have USB blocked and no CD/DVD-drives.
Regards
Chris
*
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
So, now I have tried the two mentioned alternatives with no luck. I can't use Clonezilla Lite Server because the current cloning solution is installed on a virtual machine and provides DHCP for the entire school, so the new system has to be installed (with a working dhcp-service) too. Also there are no USB-ports forwarded and it's tiresome to mount the Clonezilla Lite Server-ISO on the guest everytime I need to use cloning.
Using Clonezilla Live Mode in DRBL doesn't work too, because drbl4imp destroys my configuration (it also uses drblpush which doesn't work) and the resulting PXE-Image also tries to mount an NFS-share. Again: I just need to boot the LIVE-ISO via PXE. Third solution I can think of: is there an easy tool to convert ISO's to bootable PXE-Images?
Chris
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
"is there an easy tool to convert ISO's to bootable PXE-Images?" -> Actually you can have another VM to give the this mode a try: https://clonezilla.org/clonezilla-SE/use_clonezilla_live_in_drbl.php
It will extract the Clonezilla live file in your DRBL server, then append a boot menu in the PXE boot menu (/tftpboot/nbi_img/pxelinux.cfg). By checking the the pxelinux.cfg you will realize that. Therefore you can do the similar configuration in your environment.
Steven
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You already mentioned this mode in your first reply and my answer is sadly the same: this doesn't work, because when booting the resulting PXE-entry the system also tries to mount /usr via NFS. If I start the Clonezilla Live-CD on a PC with DVD-ROM there are no NFS-mounts at boottime, so Clonezilla Live on CD is NOT the same as Clonzilla Live in DRBL. Therefore the need for a tool which simply creates a 1:1 PXE-Image from an ISO-Image. I had one on Windows for DOS-Disks, but it can't read Linux-Live-CDs (e.g. Clonezilla Live).
Or again: where do I delete/change this annoying NFS-mounts? Can't find a useful fstab-file in /tftpboot/nbi_img/...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
"is it possible to load the clonezilla client entirely in RAM without the need for nfs (with Ghost I simply needed to place a bootimage in /tftpboot and it started to the gui) and what do I need to do for that?"
"Using Clonezilla Live Mode in DRBL doesn't work too, because drbl4imp destroys my configuration (it also uses drblpush which doesn't work) and the resulting PXE-Image also tries to mount an NFS-share. "
->
Actually what I meant is you replace both vmlinuz and initrd on the server by using the corresponding files from clonezilla live, and use the filesystem.squashfs, which is also from Clonezilla live, as the root file system. Filesystem.squashfs can be loaded to RAM. Basically those are the only 3 files you need to provide for the clients. You can manually setup them , not to run drbl4imp so you can tune the system as you need.
"where do I delete/change this annoying NFS-mounts?" -> It's inside the initramfs. Check these files on the server:
/tftpboot/node_root/init
/tftpboot/nbi_img/initrd-pxe.img
They depends on the mode you configured when running drblpush.
Steven
Last edit: Steven Shiau 2020-04-22
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
After your last post I finally got it working, so that I can start Clonezilla Live via PXE and successfully clone & restore single PCs with unicast. Thanks!
The next step would be to use multicast. I tried to use dcs to create an entry for restoring
a disk with a waitlimit set to 18 PCs (then start), but: any entry I create boots into the
clonezilla menu where I have to choose 'Start_Clonezilla' or 'Enter_Shell' and I have to set the
full settings (image_disk, homedir, etc.) again - no automation whatever.
Do I have to set this startup-paramters in initrd-pxe.img? I couldn't open this file with my Windows-Tools. How do I edit the contents in Linux? (sorry, a bit off topic).
Chris
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The automation command is actually in the boot parameter. Again, you can try Clonezilla lite server in a VM, and switch that to restoring mode, check the corresponding file in /tftpboot/nbi_img/pxelinux.cfg/ and /tftpboot/nbi_img/grub-efi.cfg/. Pay attention to the parameter ocs_live_run and etc.
Steven
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
That's the problem: I used dcs with switching to restoring mode and it tells me this:
Setting the PXE clients to DRBL mode with label "Clonezilla: multicast restore MYIMAGE to disk sda"...
Turn off all MENU DEFAULT in /tftpboot/nbi_img/pxelinux.cfg/default...
Make "Clonezilla-live" as default label in /tftpboot/nbi_img/pxelinux.cfg/default.
So I did check /tftpboot/nbi_img/pxelinux.cfg/default and saw this:
After booting this entry, there goes the menu ( 'Start_Clonezilla' or 'Enter_Shell'...) again without automation. I tried to paste the dcs-generated drbl-ocs command parameters in ocs_live_extra_param:
PS. Next time you can run this command directly:
drbl-ocs -e2 -x -nogui -v -icrc -icds -j2 -sc0 -p reboot --clients-to-wait 18 -l en_US.UTF-8 startdisk multicast_restore MYIMAGE sda
But then I got the error that ocs-sr doesn't recognize multicast_restore....
What commands/parameters do I need on the PXE-client to initiate multicast-restore and can
I script them into the default-file?
Chris
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Since dcs does not create an entry in /tftpboot/nbi_img/pxelinux.cfg/default I tried to start the multicast-session in the shell after booting the clonezilla live image (20200302-eoan-amd64) via PXE with the parameters from the dcs output. And it returns me the attached output...
Dont' know if only the combination with the other parameters is wrong, but If I change multicast_restoredisk to restordisk I can start an unicast session - which correlates with the manpage (e.g. ocs-sr [OPTION] {savedisk|saveparts|restoredisk|restoreparts} IMAGE_NAME DEVICE).
In the spare maching, if you follow this to switch your DRBL server to use Clonezilla live as the working OS on the client: https://clonezilla.org/clonezilla-SE/use_clonezilla_live_in_drbl.php
Once you use dcs to swtich the mode to multicast, you can check /tftpboot/nbi_img/pxelinux.cfg/default, there is a section:
Ok, finally managed to create an entry with dcs (on a fresh virtual machine) and copied the now created parameters to my production-DRBL-server, so that Clonezilla starts and executes my supplied commands automatically. Thank you!
Multicast was a bit of a hussle, but I think I managed it to get it working with the following changes:
I removed--mcast-port 2232 (otherwise timeout and no multicast server was found ???)
I created the supplied image with -q (ntfsclone preferred) and -z2p because if created with standard parameters (e.g. beginner choice at clonezilla start) multicast_restore'ing that image would always fail with CRC error at 99% on every partition.
Next on my to do list: multicast >10 clients (hope --clients-to wait 18 works) and a final question (for now): is there a way to start the multicast-service otherwise than with dcs (-> start clonezilla)? So that my edited /tftpboot/nbi_img/pxelinux.cfg/default on my production machine isn't touched or gets changed.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Addendum: dcs doesn't start a multicast-service on my production system (got error: No ethernet port was assigned for multicast packets), so I need to start it manually. I tried to analyze the scripts, but since I'm not a programmer it's pretty tough stuff finding the command. Looks like drbl-ocs calls a function named udp_send_part_img() in /usr/share/drbl/sbin/ocs-functions which again calls udp-sender $udp_sender_extra_opt $udpcast_hold_opt $udpcast_hold_opt3 --interface $eth_for_multicast --nokbd --mcast-all-addr $MULTICAST_ALL_ADDR --portbase $port $TIME_TO_LIVE_OPT. Is this correct? Then my conclusion is that --clients-to-wait is in reality --min-receivers. But where is the image-dir /home/partimage/MYIMAGE set, that I need to push to the clients?
Last edit: Christian Sudec 2020-05-12
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Addendum2: stumbled across your FAQ (http://drbl.sourceforge.net/faq/fine-print.php?path=./2_System/46_multicast_not_working.faq#46_multicast_not_working.faq) regarding Multicast and set eth_for_multicast in drbl-ocs.conf. Now dcs starts the multicast-service. Now trying again if I can clone my 18 clients...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
*Hi everybody!
I'm evaluating Clonezilla for our school. We have some hundred PCs I
need do clone and
our old clone solution (Ghost) starts to fail with GPT, Win10 und UEFI.
In short: I installed the current Clonezilla Server on a Debian 10.3
machine according
to the docs on clonezilla.org. I manually set up dhcp.conf, hosts and
exports (because
'drblpush -i' doesn't work) und created an entry with dcs
(clonezilla-start) to save
a local disk as image file.
I can boot with PXE, but when I try to load this entry (save disk to
image) it tries to
mount /usr via nfs and fails (because it uses the DHCP-relay-agent's
address).
Two possible solutions I thought of: is it possible to load the
clonezilla client entirely
in RAM without the need for nfs (with Ghost I simply needed to place a
bootimage in /tftpboot
and it started to the gui) and what do I need to do for that?
Or: where can I edit the NFS mount options and which options exactly do
I need to change
to enter a different nfs-server-address.
Simply said: I just want the "Clonezilla-Live-CD/Stick to start with
PXE" since our school-PCs
have USB blocked and no CD/DVD-drives.
Regards
Chris
*
Please try the Clonezilla lite server, it's easier:
https://clonezilla.org/show-live-doc-content.php?topic=clonezilla-live/doc/11_lite_server
Or you can try this mode of Clonezilla SE:
https://clonezilla.org/clonezilla-SE/use_clonezilla_live_in_drbl.php
All the related info you can find here:
https://clonezilla.org/clonezilla-SE/
Steven
Hi Steven!
So, now I have tried the two mentioned alternatives with no luck. I can't use Clonezilla Lite Server because the current cloning solution is installed on a virtual machine and provides DHCP for the entire school, so the new system has to be installed (with a working dhcp-service) too. Also there are no USB-ports forwarded and it's tiresome to mount the Clonezilla Lite Server-ISO on the guest everytime I need to use cloning.
Using Clonezilla Live Mode in DRBL doesn't work too, because drbl4imp destroys my configuration (it also uses drblpush which doesn't work) and the resulting PXE-Image also tries to mount an NFS-share. Again: I just need to boot the LIVE-ISO via PXE. Third solution I can think of: is there an easy tool to convert ISO's to bootable PXE-Images?
Chris
"is there an easy tool to convert ISO's to bootable PXE-Images?" -> Actually you can have another VM to give the this mode a try:
https://clonezilla.org/clonezilla-SE/use_clonezilla_live_in_drbl.php
It will extract the Clonezilla live file in your DRBL server, then append a boot menu in the PXE boot menu (/tftpboot/nbi_img/pxelinux.cfg). By checking the the pxelinux.cfg you will realize that. Therefore you can do the similar configuration in your environment.
Steven
You already mentioned this mode in your first reply and my answer is sadly the same: this doesn't work, because when booting the resulting PXE-entry the system also tries to mount /usr via NFS. If I start the Clonezilla Live-CD on a PC with DVD-ROM there are no NFS-mounts at boottime, so Clonezilla Live on CD is NOT the same as Clonzilla Live in DRBL. Therefore the need for a tool which simply creates a 1:1 PXE-Image from an ISO-Image. I had one on Windows for DOS-Disks, but it can't read Linux-Live-CDs (e.g. Clonezilla Live).
Or again: where do I delete/change this annoying NFS-mounts? Can't find a useful fstab-file in /tftpboot/nbi_img/...
"is it possible to load the clonezilla client entirely in RAM without the need for nfs (with Ghost I simply needed to place a bootimage in /tftpboot and it started to the gui) and what do I need to do for that?"
"Using Clonezilla Live Mode in DRBL doesn't work too, because drbl4imp destroys my configuration (it also uses drblpush which doesn't work) and the resulting PXE-Image also tries to mount an NFS-share. "
->
Actually what I meant is you replace both vmlinuz and initrd on the server by using the corresponding files from clonezilla live, and use the filesystem.squashfs, which is also from Clonezilla live, as the root file system. Filesystem.squashfs can be loaded to RAM. Basically those are the only 3 files you need to provide for the clients. You can manually setup them , not to run drbl4imp so you can tune the system as you need.
"where do I delete/change this annoying NFS-mounts?" -> It's inside the initramfs. Check these files on the server:
/tftpboot/node_root/init
/tftpboot/nbi_img/initrd-pxe.img
They depends on the mode you configured when running drblpush.
Steven
Last edit: Steven Shiau 2020-04-22
Hi again!
After your last post I finally got it working, so that I can start Clonezilla Live via PXE and successfully clone & restore single PCs with unicast. Thanks!
The next step would be to use multicast. I tried to use dcs to create an entry for restoring
a disk with a waitlimit set to 18 PCs (then start), but: any entry I create boots into the
clonezilla menu where I have to choose 'Start_Clonezilla' or 'Enter_Shell' and I have to set the
full settings (image_disk, homedir, etc.) again - no automation whatever.
Do I have to set this startup-paramters in initrd-pxe.img? I couldn't open this file with my Windows-Tools. How do I edit the contents in Linux? (sorry, a bit off topic).
Chris
The automation command is actually in the boot parameter. Again, you can try Clonezilla lite server in a VM, and switch that to restoring mode, check the corresponding file in /tftpboot/nbi_img/pxelinux.cfg/ and /tftpboot/nbi_img/grub-efi.cfg/. Pay attention to the parameter ocs_live_run and etc.
Steven
That's the problem: I used dcs with switching to restoring mode and it tells me this:
So I did check /tftpboot/nbi_img/pxelinux.cfg/default and saw this:
After booting this entry, there goes the menu ( 'Start_Clonezilla' or 'Enter_Shell'...) again without automation. I tried to paste the dcs-generated drbl-ocs command parameters in ocs_live_extra_param:
But then I got the error that ocs-sr doesn't recognize multicast_restore....
What commands/parameters do I need on the PXE-client to initiate multicast-restore and can
I script them into the default-file?
Chris
ocs-sr does not recognize multicast_restoredisk?
Please take photos about the error messags on the screen then post them.
Steven
Since dcs does not create an entry in /tftpboot/nbi_img/pxelinux.cfg/default I tried to start the multicast-session in the shell after booting the clonezilla live image (20200302-eoan-amd64) via PXE with the parameters from the dcs output. And it returns me the attached output...
Dont' know if only the combination with the other parameters is wrong, but If I change
multicast_restoredisktorestordiskI can start an unicast session - which correlates with the manpage (e.g.ocs-sr [OPTION] {savedisk|saveparts|restoredisk|restoreparts} IMAGE_NAME DEVICE).Chris
In the spare maching, if you follow this to switch your DRBL server to use Clonezilla live as the working OS on the client:
https://clonezilla.org/clonezilla-SE/use_clonezilla_live_in_drbl.php
Once you use dcs to swtich the mode to multicast, you can check /tftpboot/nbi_img/pxelinux.cfg/default, there is a section:
The ocs_live_run is using the whole command based on ocs-sr. You can use whatever method to load the live system on the client.
Steven
Ok, finally managed to create an entry with dcs (on a fresh virtual machine) and copied the now created parameters to my production-DRBL-server, so that Clonezilla starts and executes my supplied commands automatically. Thank you!
Multicast was a bit of a hussle, but I think I managed it to get it working with the following changes:
--mcast-port 2232(otherwise timeout and no multicast server was found ???)-q(ntfsclone preferred) and-z2pbecause if created with standard parameters (e.g. beginner choice at clonezilla start) multicast_restore'ing that image would always fail with CRC error at 99% on every partition.Next on my to do list: multicast >10 clients (hope
--clients-to wait 18works) and a final question (for now): is there a way to start the multicast-service otherwise than with dcs (-> start clonezilla)? So that my edited /tftpboot/nbi_img/pxelinux.cfg/default on my production machine isn't touched or gets changed.Addendum: dcs doesn't start a multicast-service on my production system (got error: No ethernet port was assigned for multicast packets), so I need to start it manually. I tried to analyze the scripts, but since I'm not a programmer it's pretty tough stuff finding the command. Looks like drbl-ocs calls a function named udp_send_part_img() in /usr/share/drbl/sbin/ocs-functions which again calls
udp-sender $udp_sender_extra_opt $udpcast_hold_opt $udpcast_hold_opt3 --interface $eth_for_multicast --nokbd --mcast-all-addr $MULTICAST_ALL_ADDR --portbase $port $TIME_TO_LIVE_OPT. Is this correct? Then my conclusion is that--clients-to-waitis in reality--min-receivers. But where is the image-dir /home/partimage/MYIMAGE set, that I need to push to the clients?Last edit: Christian Sudec 2020-05-12
Addendum2: stumbled across your FAQ (http://drbl.sourceforge.net/faq/fine-print.php?path=./2_System/46_multicast_not_working.faq#46_multicast_not_working.faq) regarding Multicast and set
eth_for_multicastin drbl-ocs.conf. Now dcs starts the multicast-service. Now trying again if I can clone my 18 clients...After hours of trying: multicast is simply not working. I'm opening a new thread since the nfs-mount is working and so ... solved.