Magellan Linux

Diff of /trunk/installer-simple/bin/installer.sh.in

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

revision 2890 by niro, Fri Jul 31 11:11:58 2015 UTC revision 2942 by niro, Mon Jun 13 12:29:59 2016 UTC
# Line 40  do Line 40  do
40   fi   fi
41  done  done
42    
43    # fetch cmdline
44    for argv in $*
45    do
46     case $1 in
47     --liveroot) shift; cmdliveroot="$1" ;;
48     --imageroot) shift; cmdimageroot="$1" ;;
49     --installroot) shift; cmdinstallroot="$1" ;;
50     --filesystem) shift; cmdformatfilesystem="$1" ;;
51     --help)
52     echo "$0 options:"
53     echo " --liveroot [path]     - override default liveroot"
54     echo " --imageroot [path]    - override default imageroot"
55     echo " --installroot [path]  - override default installroot"
56     echo " --filesystem [fstype] - override default filesystem used to format the disk"
57     exit 0 ;;
58     esac
59     shift
60    done
61    
62  ### System/Config Version  ### System/Config Version
63  VERSION="%VERSIONTAG%"  VERSION="%VERSIONTAG%"
64  TITLE="${DEFAULT_TITLE} - ${VERSION}"  TITLE="${DEFAULT_TITLE} - ${VERSION}"
65    
66  # initialize global variables so they are exportable  # initialize global variables so they are exportable
67  # some sane defaults  # some sane defaults
68  LIVEROOT="${DEFAULT_LIVEROOT}"  INSTALL_METHOD=""
69  IMAGEROOT="${DEFAULT_IMAGEROOT}"  if [[ -n ${cmdliveroot} ]]
70  INSTALLROOT="${DEFAULT_INSTALLROOT}"  then
71     LIVEROOT="${cmdliveroot}"
72    else
73     LIVEROOT="${DEFAULT_LIVEROOT}"
74    fi
75    if [[ -n ${cmdimageroot} ]]
76    then
77     IMAGEROOT="${cmdimageroot}"
78    else
79     IMAGEROOT="${DEFAULT_IMAGEROOT}"
80    fi
81    if [[ -n ${cmdinstallroot} ]]
82    then
83     INSTALLROOT="${cmdinstallroot}"
84    else
85     INSTALLROOT="${DEFAULT_INSTALLROOT}"
86    fi
87  KERNELPKG="${DEFAULT_KERNELPKG}"  KERNELPKG="${DEFAULT_KERNELPKG}"
88  KERNELOPTS="${DEFAULT_KERNELOPTS}"  KERNELOPTS="${DEFAULT_KERNELOPTS}"
89  GRUBLEGACYOPTS=""  GRUBLEGACYOPTS=""
# Line 56  GRUB2OPTS="" Line 91  GRUB2OPTS=""
91  FDISKPARTIONBELOW256MB=0  FDISKPARTIONBELOW256MB=0
92  SPECIALDEVICE=""  SPECIALDEVICE=""
93  FORMFACTOR="${DEFAULT_FORMFACTOR}"  FORMFACTOR="${DEFAULT_FORMFACTOR}"
94  FORMAT_FILESYSTEM="${DEFAULT_FILESYSTEM}"  if [[ -n ${cmdformatfilesystem} ]]
95    then
96     FORMAT_FILESYSTEM="${cmdformatfilesystem}"
97    else
98     FORMAT_FILESYSTEM="${DEFAULT_FILESYSTEM}"
99    fi
100  FLASHDISK=0  FLASHDISK=0
101    
102  # TOTALLINES=linecount of ${CDIMAGENAME}-tarball -1 !  # TOTALLINES=linecount of ${CDIMAGENAME}-tarball -1 !
# Line 153  install_do_reboot() Line 193  install_do_reboot()
193  run_hardware_detection()  run_hardware_detection()
194  {  {
195   local hwinfo   local hwinfo
   
196   hwinfo="$(hwinfo --bios --storage --pci --gfxcard --sys)"   hwinfo="$(hwinfo --bios --storage --pci --gfxcard --sys)"
197    
198   # check for special devices/clients:   # check for special devices/clients:
# Line 201  run_hardware_detection() Line 240  run_hardware_detection()
240   export GRUBLEGACYOPTS=""   export GRUBLEGACYOPTS=""
241   fi   fi
242    
243     # check for i845 Chipsets and enable KMS and use 915 drm driver later in initrd
244     if [[ ! -z $(echo "${hwinfo}" | grep -i i845) ]]
245     then
246     export SPECIALDEVICE="i845"
247     # unset default video=1024x768 opt or the drm driver breaks
248     export KERNELOPTS="quiet"
249     export GRUBLEGACYOPTS=""
250     # enable full kms support
251     export GRUB2GFXPAYLOAD="keep"
252     fi
253    
254     # check for radeon gfxcards
255     if [[ ! -z $(echo "${hwinfo}" | grep -i radeon) ]]
256     then
257     # enable full kms support
258     export GRUB2GFXPAYLOAD="keep"
259     fi
260    
261     # requires nomsi to prevent massive IRQ error spam
262     # see: http://ubuntuforums.org/showthread.php?t=1234983
263     if [[ ! -z $(echo "${hwinfo}" | grep -i 'P5VD2-X') ]] || [[ ! -z $(echo "${hwinfo}" | grep -i 'VT8237') ]] || [[ ! -z $(echo "${hwinfo}" | grep -i 'VX700') ]]
264     then
265     export SPECIALDEVICE="nomsi"
266     export KERNELOPTS="${KERNELOPTS} pci=nomsi,noaer"
267     fi
268    
269   # check for special devices/clients:   # check for special devices/clients:
270   # check for laptops and activate cpufreq scaling   # check for laptops and activate cpufreq scaling
271   if [[ $(echo "${hwinfo}" | grep 'Formfactor:' | sed 's:.*Formfactor\:\ \"\(.*\)\":\1:') = laptop ]]   if [[ $(echo "${hwinfo}" | grep 'Formfactor:' | sed 's:.*Formfactor\:\ \"\(.*\)\":\1:') = laptop ]]
# Line 539  task_hardware_detection() Line 604  task_hardware_detection()
604   zotac*) message+=$"\n\Z2Zotac device detected.\Zn" ;;   zotac*) message+=$"\n\Z2Zotac device detected.\Zn" ;;
605   rangee) message+=$"\n\Z2Rangee device detected.\Zn" ;;   rangee) message+=$"\n\Z2Rangee device detected.\Zn" ;;
606   maxdata) message+=$"\n\Z2Maxdata device detected.\Zn" ;;   maxdata) message+=$"\n\Z2Maxdata device detected.\Zn" ;;
607     i845) message+=$"\n\Z2Intel i845 VGA device detected.\Zn" ;;
608     nomsi) message+=$"\n\Z2Mainboard with P5VD2-X/VT8237/VX700 chipset detected.\Zn"
609     message+=$"\n\Z2Disabling Message Signaled Interrupts (MSI) capability of the kernel.\Zn" ;;
610   *) message+=$"\n\ZnCommon device detected.\Zn" ;;   *) message+=$"\n\ZnCommon device detected.\Zn" ;;
611   esac   esac
612   if [[ ${FORMFACTOR} = laptop ]]   if [[ ${FORMFACTOR} = laptop ]]
# Line 548  task_hardware_detection() Line 616  task_hardware_detection()
616   if [[ ${FLASHDISK} = 1 ]]   if [[ ${FLASHDISK} = 1 ]]
617   then   then
618   message+=$"\n\ZnFlash memory detected.\Zn"   message+=$"\n\ZnFlash memory detected.\Zn"
619   message+=$"\n\ZnF2FS will be used as default filesystem withn the auto installation mode.\Zn"   message+=$"\n\ZnF2FS will be used as default filesystem within the auto installation mode.\Zn"
620   fi   fi
621    
622   messagebox -y 12 -h $"Detected hardware:" "${message}"   messagebox -y 12 -h $"Detected hardware:" "${message}"
623  }  }
624    
625    task_select_target_hdd()
626    {
627     if [[ -z ${ALL_DISKS} ]]
628     then
629     dialog_no_harddrive_found
630     exit 1
631     else
632     export HDD=$(dialog_select_target_harddrive)
633     fi
634    }
635    
636  task_setup_hdd_partitions()  task_setup_hdd_partitions()
637  {  {
  local i  
638   local retval   local retval
639    
640   if [[ -z ${ALL_DISKS} ]]   if [[ -z ${HDD} ]]
641   then   then
642   dialog_no_harddrive_found   dialog_no_harddrive_found
643   exit 1   exit 1
644   else   else
645   HDD=$(dialog_select_target_harddrive)   dialog_setup_hdd_info
646   retval=$?   setup_hdd_partitions
  [[ ${retval} -eq 1 ]] && return 1  
  if [[ ${retval} -eq 0 ]]  
  then  
  dialog_setup_hdd_info  
  setup_hdd_partitions  
  fi  
647   fi   fi
648  }  }
649    
# Line 602  run_install() Line 674  run_install()
674   local method="$1"   local method="$1"
675    
676   task_hardware_detection   task_hardware_detection
677     task_select_target_hdd
678    
679   case "${method}" in   case "${method}" in
680   auto)   auto)
# Line 610  run_install() Line 683  run_install()
683   export BOOTHDD="${HDD}1"   export BOOTHDD="${HDD}1"
684   export SWAPHDD=""   export SWAPHDD=""
685   export ROOTHDD="${HDD}2"   export ROOTHDD="${HDD}2"
686   export FORMAT_FILESYSTEM_BOOTHDD="f2fs"   export FORMAT_FILESYSTEM_BOOTHDD="ext2"
687   export FORMAT_FILESYSTEM_ROOTHDD="ext2"   export FORMAT_FILESYSTEM_ROOTHDD="f2fs"
688   else   else
689   export BOOTHDD=""   # ext4 seems not to be compatible again
690   export SWAPHDD=""   if [[ ${FORMAT_FILESYSTEM} = ext4 ]]
691   export ROOTHDD="${HDD}1"   then
692   export FORMAT_FILESYSTEM_BOOTHDD=""   export BOOTHDD="${HDD}1"
693   export FORMAT_FILESYSTEM_ROOTHDD="${FORMAT_FILESYSTEM}"   export SWAPHDD=""
694     export ROOTHDD="${HDD}2"
695     export FORMAT_FILESYSTEM_BOOTHDD="ext2"
696     export FORMAT_FILESYSTEM_ROOTHDD="${FORMAT_FILESYSTEM}"
697     else
698     export BOOTHDD=""
699     export SWAPHDD=""
700     export ROOTHDD="${HDD}1"
701     export FORMAT_FILESYSTEM_BOOTHDD=""
702     export FORMAT_FILESYSTEM_ROOTHDD="${FORMAT_FILESYSTEM}"
703     fi
704   fi   fi
705   export INSTALL_METHOD="${method}"   export INSTALL_METHOD="${method}"
706   ;;   ;;
# Line 641  run_install() Line 724  run_install()
724   export BOOTHDD="${HDD}1"   export BOOTHDD="${HDD}1"
725   export SWAPHDD=""   export SWAPHDD=""
726   export ROOTHDD="${HDD}2"   export ROOTHDD="${HDD}2"
727   export FORMAT_FILESYSTEM_BOOTHDD="${FORMAT_FILESYSTEM}"   export FORMAT_FILESYSTEM_BOOTHDD="ext2"
728   export FORMAT_FILESYSTEM_ROOTHDD="f2fs"   export FORMAT_FILESYSTEM_ROOTHDD="f2fs"
729   export INSTALL_METHOD="${method}"   export INSTALL_METHOD="${method}"
730   ;;   ;;

Legend:
Removed from v.2890  
changed lines
  Added in v.2942