Magellan Linux

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

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

revision 2653 by niro, Thu Jul 3 08:01:05 2014 UTC revision 2937 by niro, Wed Feb 3 13:57:02 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
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 55  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
101    
102  # TOTALLINES=linecount of ${CDIMAGENAME}-tarball -1 !  # TOTALLINES=linecount of ${CDIMAGENAME}-tarball -1 !
103  # -> now in images.conf  # -> now in images.conf
# Line 81  trap_exit() Line 123  trap_exit()
123   is_mounted --location "${INSTALLROOT}/sys" && umount ${INSTALLROOT}/sys   is_mounted --location "${INSTALLROOT}/sys" && umount ${INSTALLROOT}/sys
124   is_mounted --location "${INSTALLROOT}/boot" && umount ${INSTALLROOT}/boot   is_mounted --location "${INSTALLROOT}/boot" && umount ${INSTALLROOT}/boot
125   is_mounted --location "${INSTALLROOT}" && umount ${INSTALLROOT}   is_mounted --location "${INSTALLROOT}" && umount ${INSTALLROOT}
126     [[ -n ${SWAPHDD} ]] && swapoff ${SWAPHDD}
127    
128   echo $"Installation aborted."   echo $"Installation aborted."
129   exit 1   exit 1
# Line 103  mount_rootfs() Line 146  mount_rootfs()
146  {  {
147   local retval   local retval
148    
149   if is_mounted --location "${INSTALLROOT}"   if [[ -n ${SWAPHDD} ]]
150   then   then
151   echo $"${INSTALLROOT} already mounted" >&2   swapon ${SWAPHDD} || dialog_die $"Could not enable swap space '${SWAPHDD}'"
152   else   fi
153   mount "${ROOTHDD}" "${INSTALLROOT}" || dialog_die $"Could not mount rootfs - drive '${ROOTHDD}' -> '${INSTALLROOT}'"  
154     if [[ -n ${ROOTHDD} ]]
155     then
156     if is_mounted --location "${INSTALLROOT}"
157     then
158     echo $"${INSTALLROOT} already mounted" >&2
159     else
160     mount -t "${FORMAT_FILESYSTEM_ROOTHDD}" "${ROOTHDD}" "${INSTALLROOT}" || dialog_die $"Could not mount rootfs - drive '${ROOTHDD}' -> '${INSTALLROOT}'"
161     fi
162   fi   fi
163    
164   [[ -d ${INSTALLROOT}/boot ]] || install -d ${INSTALLROOT}/boot   [[ -d ${INSTALLROOT}/boot ]] || install -d ${INSTALLROOT}/boot
165    
166     if [[ -n ${BOOTHDD} ]]
167     then
168     if is_mounted --location "${INSTALLROOT}"/boot
169     then
170     echo $"${INSTALLROOT}/boot already mounted" >&2
171     else
172     mount -t "${FORMAT_FILESYSTEM_BOOTHDD}" "${BOOTHDD}" "${INSTALLROOT}"/boot || dialog_die $"Could not mount bootfs - drive '${BOOTHDD}' -> '${INSTALLROOT}/boot'"
173     fi
174     fi
175  }  }
176    
177  umount_rootfs()  umount_rootfs()
178  {  {
179   is_mounted --location ${INSTALLROOT}/boot && umount ${INSTALLROOT}/boot   is_mounted --location ${INSTALLROOT}/boot && umount ${INSTALLROOT}/boot
180   is_mounted --location ${INSTALLROOT} && umount ${INSTALLROOT}   is_mounted --location ${INSTALLROOT} && umount ${INSTALLROOT}
181    
182     if [[ -n ${SWAPHDD} ]]
183     then
184     swapoff ${SWAPHDD} || die
185     fi
186  }  }
187    
188  install_do_reboot()  install_do_reboot()
# Line 126  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:
199   ## if zotac a zotac and the disk is a removeable device, then add rootdelay to kernelcmd   # if zotac a zotac and the disk is a removeable device, then add rootdelay to kernelcmd
200   #local removable=0   local removable=0
201   #if [[ ! -z $(echo "${hwinfo}" | grep -i zotac) ]]   if [[ ! -z $(echo "${hwinfo}" | grep -i zotac) ]]
202   #then   then
203   #for i in /sys/block/[hs]d*/removable   for i in /sys/block/[hs]d*/removable
204   #do   do
205   #if [[ $(< ${i}) = 1 ]]   if [[ $(< ${i}) = 1 ]]
206   #then   then
207   #removable=1   removable=1
208   #fi   # we assume that all removable disks are flash disks on a zotac
209   #done   export FLASHDISK=1
210   ## smartcard = udevadm info -n /dev/sda -a | grep -i 'configuration.*card'   fi
211     done
212   ## only add this for grub legacy, grub2 detect these settings on its own   # smartcard = udevadm info -n /dev/sda -a | grep -i 'configuration.*card'
213   #export GRUBLEGACYOPTS="rootdelay=8"  
214   ## there are to zotac types in the wild, nvidia based gfx and intel   # only add this for grub legacy, grub2 detect these settings on its own
215   #if [[ ! -z $(echo "${hwinfo}" | grep -i nouveau) ]]   export GRUBLEGACYOPTS="rootdelay=8"
216   #then   # there are to zotac types in the wild, nvidia based gfx and intel
217   #export SPECIALDEVICE="zotac_nvidia"   if [[ ! -z $(echo "${hwinfo}" | grep -i nouveau) ]]
218   #else   then
219   #export SPECIALDEVICE="zotac_intel"   export SPECIALDEVICE="zotac_nvidia"
220   #fi   else
221   #fi   export SPECIALDEVICE="zotac_intel"
222     fi
223     fi
224    
225   # check for special devices/clients:   # check for special devices/clients:
226   # if a rangee and disk ist smaller then 256mb move partion one block further ahead   # if a rangee and disk ist smaller then 256mb move partion one block further ahead
# Line 172  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 196  run_hardware_detection_disks() Line 290  run_hardware_detection_disks()
290   export ALL_CDROMS="$(get_hwinfo cdrom)"   export ALL_CDROMS="$(get_hwinfo cdrom)"
291  }  }
292    
293  setup_hdd_partitions_auto()  setup_hdd_partitions()
294  {  {
  ROOTHDD="${HDD}1"  
   
295   # sanity check - should not happen   # sanity check - should not happen
296   if is_mounted --device "${ROOTHDD}"   if is_mounted --device "${ROOTHDD}"
297   then   then
298   echo "partition: device ${ROOTHDD} is already mounted, umount it" >&2   echo "partition: device ${ROOTHDD} is already mounted, umount it" >&2
299   umount "${ROOTHDD}"   umount "${ROOTHDD}"
300   fi   fi
301     if [[ -n ${BOOTHDD} ]]
  # run this only if FDISKPARTITIONBELOW256MB is not already 1  
  if [[ ${FDISKPARTIONBELOW256MB} != 1 ]]  
302   then   then
303   if device_minimum_size "${HDD}" 256   if is_mounted --device "${BOOTHDD}"
304   then   then
305   FDISKPARTIONBELOW256MB=1   echo "partition: device ${BOOTHDD} is already mounted, umount it" >&2
306   else   umount "${BOOTHDD}"
  FDISKPARTIONBELOW256MB=0  
307   fi   fi
308   fi   fi
309    
310   ## delete disk   if [[ ${INSTALL_METHOD} = auto ]]
  dd if=/dev/zero of=${HDD} count=1 &> /dev/null || dialog_die  
   
  if [[ ${FDISKPARTIONBELOW256MB} = 1 ]]  
311   then   then
312   ## setup one bootable partition   # run this only if FDISKPARTITIONBELOW256MB is not already 1
313   #1. n= new disk   if [[ ${FDISKPARTIONBELOW256MB} != 1 ]]
314   #2. p= primary disk   then
315   #3. 1= first partition   if device_minimum_size "${HDD}" 256
316   #4. 2= default sector start // small disk needs more space for grub2 mbr sector   then
317   #5. ''= defaul sector end   FDISKPARTIONBELOW256MB=1
318   #6. a= bootable flag   else
319   #7. 1= boot flag for partition 1   FDISKPARTIONBELOW256MB=0
320   #8. w= write/quit   fi
321   fdisk ${HDD} &> /dev/null << EOF   fi
322    
323     ## delete disk
324     dd if=/dev/zero of=${HDD} count=1 &> /dev/null || dialog_die
325    
326     if [[ ${FLASHDISK} = 1 ]]
327     then
328     if [[ ${FDISKPARTIONBELOW256MB} = 1 ]]
329     then
330     ## setup one bootable partition
331     # 1. n= new disk
332     # 2. p= primary disk
333     # 3. 1= first partition
334     # 4. 2= default sector start // small disk needs more space for grub2 mbr sector
335     # 5. ''= defaul sector end
336     # 6. a= bootable flag
337     # 7. 1= boot flag for partition 1
338     # 8. n= new disk
339     #10. p= primary disk
340     #11. 2= second partition
341     #12. ''= default sector start
342     #13. ''= defaul sector end
343     #14. w= write/quit
344     fdisk ${HDD} &> /dev/null << EOF
345  n  n
346  p  p
347  1  1
348  2  2
349    +50M
350    a
351    1
352    n
353    p
354    2
355    
356    
357    w
358    EOF
359     else
360     ## setup one bootable partition
361     # 1. n= new disk
362     # 2. p= primary disk
363     # 3. 1= first partition
364     # 4. ''= default sector start
365     # 5. ''= defaul sector end
366     # 6. a= bootable flag
367     # 7. 1= boot flag for partition 1
368     # 8. n= new disk
369     #10. p= primary disk
370     #11. 2= second partition
371     #12. ''= default sector start
372     #13. ''= defaul sector end
373     #14. w= write/quit
374     fdisk ${HDD} &> /dev/null << EOF
375    n
376    p
377    1
378    
379    +50M
380  a  a
381  1  1
382    n
383    p
384    2
385    
386    
387  w  w
388  EOF  EOF
389   else   fi
390   ## setup one bootable partition   else
391   #1. n= new disk   if [[ ${FDISKPARTIONBELOW256MB} = 1 ]]
392   #2. p= primary disk   then
393   #3. 1= first partition   ## setup one bootable partition
394   #4. ''= default sector start   #1. n= new disk
395   #5. ''= defaul sector end   #2. p= primary disk
396   #6. a= bootable flag   #3. 1= first partition
397   #7. 1= boot flag for partition 1   #4. 2= default sector start // small disk needs more space for grub2 mbr sector
398   #8. w= write/quit   #5. ''= defaul sector end
399   fdisk ${HDD} &> /dev/null << EOF   #6. a= bootable flag
400     #7. 1= boot flag for partition 1
401     #8. w= write/quit
402     fdisk ${HDD} &> /dev/null << EOF
403    n
404    p
405    1
406    2
407    
408    a
409    1
410    w
411    EOF
412     else
413     ## setup one bootable partition
414     #1. n= new disk
415     #2. p= primary disk
416     #3. 1= first partition
417     #4. ''= default sector start
418     #5. ''= defaul sector end
419     #6. a= bootable flag
420     #7. 1= boot flag for partition 1
421     #8. w= write/quit
422     fdisk ${HDD} &> /dev/null << EOF
423  n  n
424  p  p
425  1  1
# Line 262  a Line 429  a
429  1  1
430  w  w
431  EOF  EOF
432     fi
433     fi
434     else
435     cfdisk ${HDD} || dialog_die
436   fi   fi
437  }  }
438    
 setup_hdd_partitions_manual()  
 {  
  ROOTHDD="${HDD}1"  
  SWAPHDD=""  
  BOOTHDD=""  
  cfdisk ${HDD} || dialog_die  
 }  
   
439  setup_hdd_format()  setup_hdd_format()
440  {  {
441   # sanity check - should not happen   install -d /tmp
442   if is_mounted --device "${ROOTHDD}"   :> /tmp/format.log
443    
444     if [[ -n ${SWAPHDD} ]]
445   then   then
446   echo "format: device ${ROOTHDD} is already mounted, umount it" >&2   # sanity check - should not happen
447   umount "${ROOTHDD}"   if is_mounted --device "${SWAPHDD}"
448     then
449     echo "format: device ${SWAPHDD} is already mounted, umount it" >&2
450     umount "${SWAPHDD}"
451     fi
452     mkswap ${SWAPHDD} || die
453   fi   fi
454    
455   mkfs."${FORMAT_FILESYSTEM}" -q "${ROOTHDD}" || dialog_die   if [[ -n ${BOOTHDD} ]]
456     then
457     # sanity check - should not happen
458     if is_mounted --device "${BOOTHDD}"
459     then
460     echo "format: device ${BOOTHDD} is already mounted, umount it" >&2
461     umount "${BOOTHDD}"
462     fi
463    
464     mkfs."${FORMAT_FILESYSTEM_BOOTHDD}" "${BOOTHDD}" &>> /tmp/format.log || dialog_die
465     fi
466    
467     if [[ -n ${ROOTHDD} ]]
468     then
469     # sanity check - should not happen
470     if is_mounted --device "${ROOTHDD}"
471     then
472     echo "format: device ${ROOTHDD} is already mounted, umount it" >&2
473     umount "${ROOTHDD}"
474     fi
475    
476     mkfs."${FORMAT_FILESYSTEM_ROOTHDD}" "${ROOTHDD}" &>> /tmp/format.log || dialog_die
477     fi
478  }  }
479    
480  install_system_image()  install_system_image()
481  {  {
482   pushd ${INSTALLROOT} > /dev/null   pushd ${INSTALLROOT} > /dev/null
483   tar xvjpf ${IMAGEROOT}}/${CDIMAGENAME} -C ${INSTALLROOT}   tar xvjpf ${IMAGEROOT}/${CDIMAGENAME} -C ${INSTALLROOT}
484   popd > /dev/null   popd > /dev/null
485  }  }
486    
# Line 299  install_system_settings() Line 491  install_system_settings()
491   # write fstab   # write fstab
492   CONFIG="${INSTALLROOT}/etc/fstab"   CONFIG="${INSTALLROOT}/etc/fstab"
493   clearconfig   clearconfig
494   addconfig -e "UUID=$(get_uuid ${ROOTHDD})\t/\t${FORMAT_FILESYSTEM}\tnoatime,noauto\t1 1"   if [[ -n ${BOOTHDD} ]]
495     then
496     addconfig -e "UUID=$(get_uuid ${BOOTHDD})\t/\t${FORMAT_FILESYSTEM_BOOTHDD}\tnoatime\t1 1"
497     fi
498     if [[ -n ${ROOTHDD} ]]
499     then
500     addconfig -e "UUID=$(get_uuid ${ROOTHDD})\t/\t${FORMAT_FILESYSTEM_ROOTHDD}\tnoatime\t0 0"
501     fi
502     if [[ -n ${SWAPHDD} ]]
503     then
504     addconfig -e "UUID='$(get_uuid ${SWAPHDD})'\tswap\tswap\tpri=1\t0 0"
505     fi
506   addconfig -e "proc\t/proc\tproc\tdefaults\t0 0"   addconfig -e "proc\t/proc\tproc\tdefaults\t0 0"
507   addconfig -e "shm\t/dev/shm\ttmpfs\tdefaults\t0 0"   addconfig -e "shm\t/dev/shm\ttmpfs\tdefaults\t0 0"
508    
# Line 360  task_setup_system_menu() Line 563  task_setup_system_menu()
563   if [[ ${retval} -eq 0 ]]   if [[ ${retval} -eq 0 ]]
564   then   then
565   case "${mode}" in   case "${mode}" in
566   "1") run_install_auto ;;   "1") run_install auto ;;
567   "2") run_install_normal ;;   "2") run_install normal ;;
568   "") task_setup_system_menu;;   "") task_setup_system_menu;;
569   esac   esac
570   fi   fi
# Line 401  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 ]]
613   then   then
614   message+=$"\n\ZnFormfactor Laptop, activating 'ondemand' powersaving mode.\Zn"   message+=$"\n\ZnFormfactor Laptop, activating 'ondemand' powersaving mode.\Zn"
615   fi   fi
616     if [[ ${FLASHDISK} = 1 ]]
617     then
618     message+=$"\n\ZnFlash memory detected.\Zn"
619     message+=$"\n\ZnF2FS will be used as default filesystem withn the auto installation mode.\Zn"
620     fi
621    
622   messagebox -y 12 -h $"Detected hardware:" "${message}"   messagebox -y 12 -h $"Detected hardware:" "${message}"
623  }  }
624    
625  task_setup_hdd_partitions_manual()  task_select_target_hdd()
626  {  {
  local i  
  local retval  
   
627   if [[ -z ${ALL_DISKS} ]]   if [[ -z ${ALL_DISKS} ]]
628   then   then
629   dialog_no_harddrive_found   dialog_no_harddrive_found
630   exit 1   exit 1
631   else   else
632   HDD=$(dialog_select_target_harddrive)   export HDD=$(dialog_select_target_harddrive)
  retval=$?  
  [[ ${retval} -eq 1 ]] && return 1  
  if [[ ${retval} -eq 0 ]]  
  then  
  dialog_setup_hdd_info  
  setup_hdd_partitions_manual  
  fi  
633   fi   fi
634  }  }
635    
636  task_setup_hdd_partitions_auto()  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_auto  
  dialog_setup_hdd_create_partitions  
  setup_hdd_partitions_auto  
  fi  
647   fi   fi
648  }  }
649    
# Line 476  task_main() Line 669  task_main()
669   done   done
670  }  }
671    
672  run_install_normal()  run_install()
673  {  {
674   task_hardware_detection   local method="$1"
675    
  task_setup_hdd_partitions_manual  
  dialog_setup_hdd_format  
  setup_hdd_format > /dev/null  
  mount_rootfs  
  (install_system_image > /tmp/install.log) 2> /tmp/install_errors.log | install_meter | dialog_install_system_image  
   
  dialog_install_settings  
  sleep 1  
  install_system_settings  
  if is_initrd_supported  
  then  
  dialog_install_initrd  
  initrd_config  
  initrd_install  
  fi  
   
  dialog_install_bootsector  
  bootloader_config  
  bootloader_install  
   
  umount_rootfs  
  dialog_install_successful  
 }  
   
 run_install_auto()  
 {  
676   task_hardware_detection   task_hardware_detection
677     task_select_target_hdd
678    
679     case "${method}" in
680     auto)
681     if [[ ${FLASHDISK} = 1 ]]
682     then
683     export BOOTHDD="${HDD}1"
684     export SWAPHDD=""
685     export ROOTHDD="${HDD}2"
686     export FORMAT_FILESYSTEM_BOOTHDD="f2fs"
687     export FORMAT_FILESYSTEM_ROOTHDD="ext2"
688     else
689     export BOOTHDD=""
690     export SWAPHDD=""
691     export ROOTHDD="${HDD}1"
692     export FORMAT_FILESYSTEM_BOOTHDD=""
693     export FORMAT_FILESYSTEM_ROOTHDD="${FORMAT_FILESYSTEM}"
694     fi
695     export INSTALL_METHOD="${method}"
696     ;;
697     normal)
698     export BOOTHDD="${HDD}1"
699     export SWAPHDD="${HDD}2"
700     export ROOTHDD="${HDD}3"
701     export FORMAT_FILESYSTEM_BOOTHDD="${FORMAT_FILESYSTEM}"
702     export FORMAT_FILESYSTEM_ROOTHDD="${FORMAT_FILESYSTEM}"
703     export INSTALL_METHOD="${method}"
704     ;;
705     single)
706     export BOOTHDD=""
707     export SWAPHDD=""
708     export ROOTHDD="${HDD}1"
709     export FORMAT_FILESYSTEM_BOOTHDD=""
710     export FORMAT_FILESYSTEM_ROOTHDD="${FORMAT_FILESYSTEM}"
711     export INSTALL_METHOD="${method}"
712     ;;
713     flash)
714     export BOOTHDD="${HDD}1"
715     export SWAPHDD=""
716     export ROOTHDD="${HDD}2"
717     export FORMAT_FILESYSTEM_BOOTHDD="${FORMAT_FILESYSTEM}"
718     export FORMAT_FILESYSTEM_ROOTHDD="f2fs"
719     export INSTALL_METHOD="${method}"
720     ;;
721     *)
722     die "Unknown install method '${method}', aborting."
723     ;;
724     esac
725    
726   task_setup_hdd_partitions_auto   task_setup_hdd_partitions
727   dialog_setup_hdd_format   dialog_setup_hdd_format
728   setup_hdd_format > /dev/null   setup_hdd_format > /dev/null
729   mount_rootfs   mount_rootfs

Legend:
Removed from v.2653  
changed lines
  Added in v.2937