#!/bin/bash # script permettant de mettre en place sur le SE3 Clonezilla dans le module tftp menu clonage # passage en version live 20140518_Trusty 64bits et correction de qq erreurs dans le tftpboot/pxelinux.cfg/clonage.menu # $id=mise_en_place_tftp_clonezilla_trusty_64bits.sh # modifie le 04/02/2014 # modifie le 25/06/2014 # version du 26/06/2014 : OK : Trusty 20140518 AMD 64 bits . /etc/se3/config_m.cache.sh if [ -z "$se3ip" ]; then echo -e "IP SE3: \c" read se3ip fi ladate=$(date +%Y%m%d%H%M%S) tmp=/var/se3/tmp_${ladate} mkdir -p $tmp cd $tmp #Correction de la version a telecharger en alternatives 20140518 prise en charge reseau #Passage à la version stable alternative #wget http://freefr.dl.sourceforge.net/project/clonezilla/clonezilla_live_stable/2.1.2-43/clonezilla-live-2.1.2-43-i686-pae.zip #wget http://freefr.dl.sourceforge.net/project/clonezilla/clonezilla_live_stable/2.2.1-25/clonezilla-live-2.2.1-25-i686-pae.zip #wget http://sourceforge.net/projects/clonezilla/files/clonezilla_live_stable/2.2.3-10/clonezilla-live-2.2.3-10-i686-pae.zip #wget http://sourceforge.net/projects/clonezilla/files/clonezilla_live_stable/2.2.3-10/clonezilla-live-2.2.3-10-i486.zip #wget http://sourceforge.net/projects/clonezilla/files/clonezilla_live_alternative/20140518-trusty/clonezilla-live-20140518-trusty-i386.zip wget http://sourceforge.net/projects/clonezilla/files/clonezilla_live_alternative/20140518-trusty/clonezilla-live-20140518-trusty-amd64.zip if [ "$?" = "0" ]; then unzip clonezilla-live-*.zip mkdir /tftpboot/clonezilla64 mv -f live/filesystem.squashfs live/initrd.img live/vmlinuz /tftpboot/clonezilla64 # ecriture du fichier tftpboot/pxelinux.cfg/clonage.menu afin d avoir le choix de clonezilla live dans le menu clonage # modifications donc au niveau de la ligne KERNEL et APPEND avec codage en dur sans /tftpboot echo ' label Clonezilla-live 20140518 MENU LABEL Clonezilla Live 20140518 64bits KERNEL clonezilla64/vmlinuz APPEND initrd=clonezilla64/initrd.img boot=live config noswap nolocales edd=on nomodeset ocs_live_run="ocs-live-general" ocs_live_extra_param="" keyboard-layouts="" ocs_live_batch="no" locales="" vga=788 nosplash noprompt fetch=tftp://'$se3ip'/tftpboot/clonezilla64/filesystem.squashfs' >> /tftpboot/pxelinux.cfg/clonage.menu cd /root rm -fr $tmp else echo "ERREUR lors du telechargement." fi