There are articles on how to do this for the live USB & DVD versions, but not the server version. At least, I can't find any.
I just want to add a small shell script to first prepare the hard drive by running badblocks with some specific options. Where can I find out how to make such changes (directories, files, etc.)? Presumably these mods would be made to the client that gets pushed down when "restore image XYZ" is chosen by the user.
Any advice, pointers to existing HOW-TO articles, etc. would be most appreciated. Thanks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I will give it a try. Where would I add them? I'd be looking to modify the client script that restores the cloned image to the client's hard drive. I just want to do some bash stuff, a couple of lines. The goal is to be able to PXE boot a client and walk away. It would first run badblocks, then do the restore, then shut down. Would these options get placed into a script that later becomes part of the pxelinux.0 file?
Thanks - Pete
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
For PXE booting, you should edit your PXElinux config file, it's /tftpboot/nb_img/pxelinux.cfg/default
The boot parameters are in the "append" line.
For more info, please check http://www.syslinux.org.
Steven.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I got it working by adding some parameters to the APPEND line of the /tftpboot/nb_img/pxelinux.cfg/default file as you suggested. I minimized the complexity needed on this line by invoking "prerun" and "postrun" bash scripts, which can then be altered as desired without having to touch the Clonezilla server configuration again. I added the following parameters:
//First mount the server's directory which holds everything that the client machine will need (scripts and extra binary files such as badblocks, ntpdate, etc.)
ocs_prerun="mount -t nfs 192.168.56.1:/home/partimag /home/partimag/"
//Now execute my prerun bash script which invokes a bunch of stuff. In my case it includes doing some HW checks and wiping the hard drive.
ocs_prerun1="/home/partimag/prerun.sh"
//(Once prerun.sh completes, Clonezilla restores the image to the hard drive per my configuration.)
//Finally execute my postrun bash script which invokes more stuff. In my case this expands one of the partitions on the disk and writes out some log files to the server via the nfs mount.
ocs_postrun="/home/partimag/postrun.sh"
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
By that you mean that you have (scripts and extra binary files such as badblocks)
an option that before start the clonening on the client wil be check the HDD for bad sectors ?
If is that i would like to have that option in my server too.
thank you
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
There are articles on how to do this for the live USB & DVD versions, but not the server version. At least, I can't find any.
I just want to add a small shell script to first prepare the hard drive by running badblocks with some specific options. Where can I find out how to make such changes (directories, files, etc.)? Presumably these mods would be made to the client that gets pushed down when "restore image XYZ" is chosen by the user.
Any advice, pointers to existing HOW-TO articles, etc. would be most appreciated. Thanks.
Basically all the boot parameters listed on
http://clonezilla.org/fine-print-live-doc.php?path=./clonezilla-live/doc/99_Misc/00_live-boot-parameters.doc#00_live-boot-parameters.doc
could be used on DRBL live (Clonezilla SE live).
Do you have any problem to use them?
Steven.
I will give it a try. Where would I add them? I'd be looking to modify the client script that restores the cloned image to the client's hard drive. I just want to do some bash stuff, a couple of lines. The goal is to be able to PXE boot a client and walk away. It would first run badblocks, then do the restore, then shut down. Would these options get placed into a script that later becomes part of the pxelinux.0 file?
Thanks - Pete
For PXE booting, you should edit your PXElinux config file, it's /tftpboot/nb_img/pxelinux.cfg/default
The boot parameters are in the "append" line.
For more info, please check http://www.syslinux.org.
Steven.
I got it working by adding some parameters to the APPEND line of the /tftpboot/nb_img/pxelinux.cfg/default file as you suggested. I minimized the complexity needed on this line by invoking "prerun" and "postrun" bash scripts, which can then be altered as desired without having to touch the Clonezilla server configuration again. I added the following parameters:
//First mount the server's directory which holds everything that the client machine will need (scripts and extra binary files such as badblocks, ntpdate, etc.)
ocs_prerun="mount -t nfs 192.168.56.1:/home/partimag /home/partimag/"
//Now execute my prerun bash script which invokes a bunch of stuff. In my case it includes doing some HW checks and wiping the hard drive.
ocs_prerun1="/home/partimag/prerun.sh"
//(Once prerun.sh completes, Clonezilla restores the image to the hard drive per my configuration.)
//Finally execute my postrun bash script which invokes more stuff. In my case this expands one of the partitions on the disk and writes out some log files to the server via the nfs mount.
ocs_postrun="/home/partimag/postrun.sh"
Hi Peter,
By that you mean that you have (scripts and extra binary files such as badblocks)
an option that before start the clonening on the client wil be check the HDD for bad sectors ?
If is that i would like to have that option in my server too.
thank you
Cool! Thanks for sharing that.
Steven.