/[clonezilla-sysresccd]/trunk/create-clonezilla-sysresccd/files/ocs-iso
ViewVC logotype

Diff of /trunk/create-clonezilla-sysresccd/files/ocs-iso

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 189 by sng, Tue Aug 21 13:20:56 2012 UTC revision 190 by sng, Sun Aug 26 14:25:43 2012 UTC
# Line 26  iso9660_file_size_limit="2000M"   # For Line 26  iso9660_file_size_limit="2000M"   # For
26  mkiso_exclude_list_1="isolinux syslinux md5sum.txt doc live etc pkg ocs-live.d utils"  mkiso_exclude_list_1="isolinux syslinux md5sum.txt doc live etc pkg ocs-live.d utils"
27  mkiso_exclude_list_2="home"  # This should not be a duplicated count.  mkiso_exclude_list_2="home"  # This should not be a duplicated count.
28  mkiso_exclude_list="$mkiso_exclude_list_1 $mkiso_exclude_list_2"  mkiso_exclude_list="$mkiso_exclude_list_1 $mkiso_exclude_list_2"
29    # Flag to put EFI booting image in iso
30    enabled_EFI=""
31    
32  #  #
33  prog="$(basename $0)"  prog="$(basename $0)"
# Line 85  check_file_size_in_ocs_image() { Line 87  check_file_size_in_ocs_image() {
87      if [ "$size_t_tot" -gt "$FILE_LIMIT" ]; then      if [ "$size_t_tot" -gt "$FILE_LIMIT" ]; then
88  ################################################################################  ################################################################################
89  # Section edited by S. Georgaras <sng@hellug.gr>  # Section edited by S. Georgaras <sng@hellug.gr>
90        
91  #      [ "$BOOTUP" = "color" ] && $SETCOLOR_WARNING  #      [ "$BOOTUP" = "color" ] && $SETCOLOR_WARNING
92  #      echo "$ifile size ($size_t MB) is too large! $msg_mkisofs_unable_process_that"  #      echo "$ifile size ($size_t MB) is too large! $msg_mkisofs_unable_process_that"
93  #      [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL  #      [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL
# Line 324  if ! type genisoimage &>/dev/null; then Line 326  if ! type genisoimage &>/dev/null; then
326    exit 1    exit 1
327  fi  fi
328    
329    # Check if genisoimage support -efi-boot option
330    if [ -n "$(LC_ALL=C genisoimage --help 2>&1 | grep -E -- "-efi-boot")" ]; then
331      enabled_EFI="true"
332    else
333      [ "$BOOTUP" = "color" ] && $SETCOLOR_WARNING
334      echo "Warning! Setting EFI boot image name is not supported in genisoimage!"
335      [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL
336      enabled_EFI="false"
337    fi
338    
339  if [ "$output_mode" = "cdwriter" -a type wodim &>/dev/null ]; then  if [ "$output_mode" = "cdwriter" -a type wodim &>/dev/null ]; then
340    [ "$BOOTUP" = "color" ] && $SETCOLOR_FAILURE    [ "$BOOTUP" = "color" ] && $SETCOLOR_FAILURE
341    echo "Program wodim is not aviailable! You have to install it."    echo "Program wodim is not aviailable! You have to install it."
# Line 796  if [ "$allow_limited_size_flag" = "yes" Line 808  if [ "$allow_limited_size_flag" = "yes"
808    allow_limited_size_opt="-allow-limited-size"    allow_limited_size_opt="-allow-limited-size"
809  fi  fi
810    
811    # Remove the existing iso
812    [ -e "$target_iso" ] && rm -f $target_iso
813    
814    # Build the EFI boot image. This is especially for iso file. Not for USB stick.
815    efi_img_opt=""
816    if [ "$enabled_EFI" = "true" ]; then
817      # The following codes are referred from Fedora
818      EFI_BOOTIMG_TMP="$(mktemp -d /tmp/efi-boot.XXXXXX)"
819      EFI_BOOTTREE="$DEBIAN_ISO_TMP/EFI"
820      EFI_IMGTREE="$ISOSYSLNX_TMP/EFI-imgs"
821      EFI_IMG="$EFI_IMGTREE/efiboot.img"
822      mkdir -p $EFI_IMGTREE
823      rm -rf $ISOSYSLNX_TMP/.disk
824      rm -f $EFI_IMG
825      
826      BOOTDISKSIZE="$(LC_ALL=C du -kcs $EFI_BOOTTREE | tail -n1 | awk '{print $1}')"
827      BOOTDISKSIZE="$(LC_ALL=C expr $BOOTDISKSIZE + 100)"
828      echo "The size of the $EFI_IMG is $BOOTDISKSIZE"
829      mkdosfs -n OCS-EFI -C $EFI_IMG $BOOTDISKSIZE >/dev/null
830      mount -o loop,shortname=winnt,umask=0077 -t vfat $EFI_IMG $EFI_BOOTIMG_TMP
831      mkdir -p $EFI_BOOTIMG_TMP/EFI/
832      cp -R $EFI_BOOTTREE/* $EFI_BOOTIMG_TMP/EFI/
833      umount $EFI_BOOTIMG_TMP
834      if [ -d "$EFI_BOOTIMG_TMP" -a -n \
835            "$(echo $EFI_BOOTIMG_TMP | grep -e "efi-boot")" ]; then
836        rm -rf $EFI_BOOTIMG_TMP
837      fi
838      
839      # Create an info file for grub2 to autodetect the cd root
840      # Ref: http://www.sysresccd.org/forums/viewtopic.php?f=5&t=4410
841      mkdir $ISOSYSLNX_TMP/.disk
842      echo -n "[Clonezilla]" > $ISOSYSLNX_TMP/.disk/info
843      
844      efi_img_opt="-eltorito-alt-boot -efi-boot EFI-imgs/efiboot.img -no-emul-boot"
845      efi_img_graft_opt="/EFI-imgs/=$EFI_IMG /.disk/=$ISOSYSLNX_TMP/.disk"
846    fi
847    
848  ############################################################################  ############################################################################
849  #  #
# Line 878  if [ -e /tmp/isodata ];then Line 926  if [ -e /tmp/isodata ];then
926    rm /tmp/isodata 2>/dev/null    rm /tmp/isodata 2>/dev/null
927  fi  fi
928    
 # Remove the existing iso  
 [ -e "$target_iso" ] && rm -f $target_iso  
929    
930  # make iso file  # make iso file
931  genisoimage \  genisoimage \
# Line 889  genisoimage \ Line 935  genisoimage \
935   -f -r -J -l $allow_limited_size_opt \   -f -r -J -l $allow_limited_size_opt \
936   -b isolinux/isolinux.bin -c isolinux/boot.cat \   -b isolinux/isolinux.bin -c isolinux/boot.cat \
937   -no-emul-boot -boot-load-size 4 -boot-info-table \   -no-emul-boot -boot-load-size 4 -boot-info-table \
938   $mkiso_exclude_opt \   $mkiso_exclude_opt $efi_img_opt \
939   -graft-points \   -graft-points \
940    $sys_files_dir_graft_point \    $sys_files_dir_graft_point \
941    $utils_files_dir_graft_point \    $utils_files_dir_graft_point \
942    $doc_insert_in_root \    $doc_insert_in_root \
943    $ocs_imgs_with_abs_path \    $ocs_imgs_with_abs_path \
944      $efi_img_graft_opt \
945    $custom_ocs_opt \    $custom_ocs_opt \
946    $include_dir_graft_point \    $include_dir_graft_point \
947    | \    | \
# Line 939  if [ -e "$target_iso" ]; then Line 986  if [ -e "$target_iso" ]; then
986    echo "$msg_burn_clonezilla_img_iso: $target_iso"    echo "$msg_burn_clonezilla_img_iso: $target_iso"
987    [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL    [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL
988  fi  fi
   
 #  
 # ################################################################################  
 # # Section edited by S. Georgaras <sng@hellug.gr>  
 # ifile1=`dirname "$ifile"`  
 # if [ "$going2RAM" = "prog_only" ];then  
 #   whiptail --backtitle Clonezilla-SysRescCD --title ' Info ' --msgbox "The ISO file has been saved as $target_iso  
 #  
 # This ISO file contains the program and settings to restore your image  
 # ($(basename ${ifile%/})), but not the image itself. Now you have to burn  
 # the ISO file to a 8GB DVD and then add the image file to it.  
 #  
 # These are the commands to execute:  
 #     cd /home/partimag  
 #     growisofs -Z \$(what-cd -dwb)=$target_iso  
 #     eject \$(what-cd -dwb)  
 #     growisofs -M \$(what-cd -dwb) -R -J \\  
 #     -V \"$iso_label_tag\" --publisher \"$isoPublisher\" \\  
 #     -graft-points /$(basename ${ifile%/})/=${ifile%/}  
 #  
 # Alternatively, you can excute the file /tmp/burnISO  
 #  
 # NOTE: \$(what-cd -dwb) will use your first DVD-writer. In case you want  
 #       to use another device, you have to replace \$(what-cd -dwb) with  
 #       that device name e.g. /dev/hdd  
 # " 0 0  
 # fi  
 #  
 # echo "#!/bin/bash" > /tmp/burnISO  
 # echo "eject \$(what-cd -dwb)" >> /tmp/burnISO  
 # echo "echo -n \"Place an empty DVD in the DVD-writer and press ENTER   \"" >> /tmp/burnISO  
 # echo "read"  >> /tmp/burnISO  
 # echo "cd /home/partimag" >> /tmp/burnISO  
 # echo "growisofs -Z \$(what-cd -dwb)=$target_iso" >> /tmp/burnISO  
 # echo "eject \$(what-cd -dwb)" >> /tmp/burnISO  
 # echo "echo \"The medium must now be ejected and reinserted into\"" >> /tmp/burnISO  
 # echo "echo \"the DVD-writer for the burning process to continue\"" >> /tmp/burnISO  
 # echo "echo -n \"Place reload the DVD in the DVD-writer and press ENTER   \"" >> /tmp/burnISO  
 # echo "read"  >> /tmp/burnISO  
 # echo "growisofs -M \$(what-cd -dwb) -R -J \\" >> /tmp/burnISO  
 # echo "-V \"$iso_label_tag\" --publisher \"$isoPublisher\" \\" >> /tmp/burnISO  
 # echo "-graft-points /$(basename ${ifile%/})/=${ifile%/}" >> /tmp/burnISO  
 # chmod +x /tmp/burnISO  
 #  
 # ################################################################################  
 #  

Legend:
Removed from v.189  
changed lines
  Added in v.190

webmaster@linux.gr
ViewVC Help
Powered by ViewVC 1.1.26