Magellan Linux

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

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

revision 2489 by niro, Wed Jan 8 12:14:37 2014 UTC revision 2890 by niro, Fri Jul 31 11:11:58 2015 UTC
# Line 9  Line 9 
9    
10  # setup locales  # setup locales
11  TEXTDOMAIN=installer  TEXTDOMAIN=installer
 LC_MESSAGES=C  
12    
13  # include dir  # include dir
14  INSTALLER_LIBDIR="%LIBDIR%"  INSTALLER_LIBDIR="%LIBDIR%"
# Line 41  do Line 40  do
40   fi   fi
41  done  done
42    
 # TOTALLINES=linecount of ${CDIMAGENAME}-tarball -1 !  
 # -> now in images.conf  
 CDIMAGENAME=""  
 TOTALLINES=""  
 CURRENTLINE=0  
 if [ -e /mnt/cdrom/system/images.conf ]  
 then  
  source /mnt/cdrom/system/images.conf  
  # check if all required variables are set  
  [[ -z ${CDIMAGENAME} ]] && die "CDIMAGENAME is empty in /mnt/cdrom/system/images.conf"  
  [[ -z ${TOTALLINES} ]] && die "TOTALLINES is empty in /mnt/cdrom/system/images.conf"  
 else  
  die "/mnt/cdrom/system/images.conf not found"  
 fi  
   
43  ### System/Config Version  ### System/Config Version
44  VERSION="%VERSIONTAG%"  VERSION="%VERSIONTAG%"
45  TITLE="${DEFAULT_TITLE} - ${VERSION}"  TITLE="${DEFAULT_TITLE} - ${VERSION}"
46    
47    # initialize global variables so they are exportable
48  # some sane defaults  # some sane defaults
49  CDROOT="${DEFAULT_CDROOT}"  LIVEROOT="${DEFAULT_LIVEROOT}"
50    IMAGEROOT="${DEFAULT_IMAGEROOT}"
51  INSTALLROOT="${DEFAULT_INSTALLROOT}"  INSTALLROOT="${DEFAULT_INSTALLROOT}"
52  KERNELPKG="${DEFAULT_KERNELPKG}"  KERNELPKG="${DEFAULT_KERNELPKG}"
53  KERNELOPTS="${DEFAULT_KERNELOPTS}"  KERNELOPTS="${DEFAULT_KERNELOPTS}"
# Line 71  FDISKPARTIONBELOW256MB=0 Line 57  FDISKPARTIONBELOW256MB=0
57  SPECIALDEVICE=""  SPECIALDEVICE=""
58  FORMFACTOR="${DEFAULT_FORMFACTOR}"  FORMFACTOR="${DEFAULT_FORMFACTOR}"
59  FORMAT_FILESYSTEM="${DEFAULT_FILESYSTEM}"  FORMAT_FILESYSTEM="${DEFAULT_FILESYSTEM}"
60    FLASHDISK=0
61    
62    # TOTALLINES=linecount of ${CDIMAGENAME}-tarball -1 !
63    # -> now in images.conf
64    CDIMAGENAME=""
65    TOTALLINES=""
66    CURRENTLINE=0
67    if [ -e ${IMAGEROOT}/images.conf ]
68    then
69     source ${IMAGEROOT}/images.conf
70     # check if all required variables are set
71     [[ -z ${CDIMAGENAME} ]] && die "CDIMAGENAME is empty in ${IMAGEROOT}/images.conf"
72     [[ -z ${TOTALLINES} ]] && die "TOTALLINES is empty in ${IMAGEROOT}/images.conf"
73    else
74     die "${IMAGEROOT}/images.conf not found"
75    fi
76    
77  ### helper scripts ###  ### helper scripts ###
78    
# Line 82  trap_exit() Line 83  trap_exit()
83   is_mounted --location "${INSTALLROOT}/sys" && umount ${INSTALLROOT}/sys   is_mounted --location "${INSTALLROOT}/sys" && umount ${INSTALLROOT}/sys
84   is_mounted --location "${INSTALLROOT}/boot" && umount ${INSTALLROOT}/boot   is_mounted --location "${INSTALLROOT}/boot" && umount ${INSTALLROOT}/boot
85   is_mounted --location "${INSTALLROOT}" && umount ${INSTALLROOT}   is_mounted --location "${INSTALLROOT}" && umount ${INSTALLROOT}
86     [[ -n ${SWAPHDD} ]] && swapoff ${SWAPHDD}
87    
88   echo $"Installation aborted."   echo $"Installation aborted."
89   exit 1   exit 1
# Line 104  mount_rootfs() Line 106  mount_rootfs()
106  {  {
107   local retval   local retval
108    
109   if is_mounted --location "${INSTALLROOT}"   if [[ -n ${SWAPHDD} ]]
110   then   then
111   echo $"${INSTALLROOT} already mounted" >&2   swapon ${SWAPHDD} || dialog_die $"Could not enable swap space '${SWAPHDD}'"
  else  
  mount "${ROOTHDD}" "${INSTALLROOT}" || dialog_die $"Could not mount rootfs - drive'${ROOTHDD}' -> '${INSTALLROOT}'"  
112   fi   fi
113    
114     if [[ -n ${ROOTHDD} ]]
115     then
116     if is_mounted --location "${INSTALLROOT}"
117     then
118     echo $"${INSTALLROOT} already mounted" >&2
119     else
120     mount -t "${FORMAT_FILESYSTEM_ROOTHDD}" "${ROOTHDD}" "${INSTALLROOT}" || dialog_die $"Could not mount rootfs - drive '${ROOTHDD}' -> '${INSTALLROOT}'"
121     fi
122     fi
123    
124   [[ -d ${INSTALLROOT}/boot ]] || install -d ${INSTALLROOT}/boot   [[ -d ${INSTALLROOT}/boot ]] || install -d ${INSTALLROOT}/boot
125    
126     if [[ -n ${BOOTHDD} ]]
127     then
128     if is_mounted --location "${INSTALLROOT}"/boot
129     then
130     echo $"${INSTALLROOT}/boot already mounted" >&2
131     else
132     mount -t "${FORMAT_FILESYSTEM_BOOTHDD}" "${BOOTHDD}" "${INSTALLROOT}"/boot || dialog_die $"Could not mount bootfs - drive '${BOOTHDD}' -> '${INSTALLROOT}/boot'"
133     fi
134     fi
135  }  }
136    
137  umount_rootfs()  umount_rootfs()
138  {  {
139   is_mounted --location ${INSTALLROOT}/boot && umount ${INSTALLROOT}/boot   is_mounted --location ${INSTALLROOT}/boot && umount ${INSTALLROOT}/boot
140   is_mounted --location ${INSTALLROOT} && umount ${INSTALLROOT}   is_mounted --location ${INSTALLROOT} && umount ${INSTALLROOT}
141    
142     if [[ -n ${SWAPHDD} ]]
143     then
144     swapoff ${SWAPHDD} || die
145     fi
146  }  }
147    
148  install_do_reboot()  install_do_reboot()
# Line 130  run_hardware_detection() Line 156  run_hardware_detection()
156    
157   hwinfo="$(hwinfo --bios --storage --pci --gfxcard --sys)"   hwinfo="$(hwinfo --bios --storage --pci --gfxcard --sys)"
158    
159   ## check for special devices/clients:   # check for special devices/clients:
160   ## 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
161   #local removable=0   local removable=0
162   #if [[ ! -z $(echo "${hwinfo}" | grep -i zotac) ]]   if [[ ! -z $(echo "${hwinfo}" | grep -i zotac) ]]
163   #then   then
164   #for i in /sys/block/[hs]d*/removable   for i in /sys/block/[hs]d*/removable
165   #do   do
166   #if [[ $(< ${i}) = 1 ]]   if [[ $(< ${i}) = 1 ]]
167   #then   then
168   #removable=1   removable=1
169   #fi   # we assume that all removable disks are flash disks on a zotac
170   #done   export FLASHDISK=1
171   ## smartcard = udevadm info -n /dev/sda -a | grep -i 'configuration.*card'   fi
172     done
173   ## only add this for grub legacy, grub2 detect these settings on its own   # smartcard = udevadm info -n /dev/sda -a | grep -i 'configuration.*card'
174   #export GRUBLEGACYOPTS="rootdelay=8"  
175   ## 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
176   #if [[ ! -z $(echo "${hwinfo}" | grep -i nouveau) ]]   export GRUBLEGACYOPTS="rootdelay=8"
177   #then   # there are to zotac types in the wild, nvidia based gfx and intel
178   #export SPECIALDEVICE="zotac_nvidia"   if [[ ! -z $(echo "${hwinfo}" | grep -i nouveau) ]]
179   #else   then
180   #export SPECIALDEVICE="zotac_intel"   export SPECIALDEVICE="zotac_nvidia"
181   #fi   else
182   #fi   export SPECIALDEVICE="zotac_intel"
183     fi
184     fi
185    
186   # check for special devices/clients:   # check for special devices/clients:
187   # 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 189  run_hardware_detection_disks() Line 217  run_hardware_detection_disks()
217   # all disks but exclude ramdisks   # all disks but exclude ramdisks
218   export ALL_DISKS=$(get_hwinfo disk | sed '/\/dev\/ram[0-9].*/d')   export ALL_DISKS=$(get_hwinfo disk | sed '/\/dev\/ram[0-9].*/d')
219   # remove the boot device from ALL_DISKS if it was an usbstick   # remove the boot device from ALL_DISKS if it was an usbstick
220   if [[ $(grep '[[:space:]]/mnt/cdrom[[:space:]]' /proc/mounts | cut -d' ' -f3) != iso9660 ]]   if [[ $(grep '[[:space:]]${LIVEROOT}[[:space:]]' /proc/mounts | cut -d' ' -f3) != iso9660 ]]
221   then   then
222   bootdev="$(grep '[[:space:]]/mnt/cdrom[[:space:]]' /proc/mounts | cut -d' ' -f1 | sed 's:[0-9]::g')"   bootdev=$(grep "[[:space:]]${LIVEROOT}[[:space:]]" /proc/mounts | cut -d' ' -f1 | sed 's:[0-9]::g')
223   export ALL_DISKS=$(echo "${ALL_DISKS}" | grep -v "${bootdev}")   export ALL_DISKS=$(echo "${ALL_DISKS}" | grep -v "${bootdev}")
224   fi   fi
225   export ALL_CDROMS="$(get_hwinfo cdrom)"   export ALL_CDROMS="$(get_hwinfo cdrom)"
226  }  }
227    
228  setup_hdd_partitions_auto()  setup_hdd_partitions()
229  {  {
  ROOTHDD="${HDD}1"  
   
230   # sanity check - should not happen   # sanity check - should not happen
231   if is_mounted --device "${ROOTHDD}"   if is_mounted --device "${ROOTHDD}"
232   then   then
233   echo "partition: device ${ROOTHDD} is already mounted, umount it" >&2   echo "partition: device ${ROOTHDD} is already mounted, umount it" >&2
234   umount "${ROOTHDD}"   umount "${ROOTHDD}"
235   fi   fi
236     if [[ -n ${BOOTHDD} ]]
  # run this only if FDISKPARTITIONBELOW256MB is not already 1  
  if [[ ${FDISKPARTIONBELOW256MB} != 1 ]]  
237   then   then
238   if hdd_size_below_256mb ${HDD}   if is_mounted --device "${BOOTHDD}"
239   then   then
240   FDISKPARTIONBELOW256MB=1   echo "partition: device ${BOOTHDD} is already mounted, umount it" >&2
241   else   umount "${BOOTHDD}"
  FDISKPARTIONBELOW256MB=0  
242   fi   fi
243   fi   fi
244    
245   ## delete disk   if [[ ${INSTALL_METHOD} = auto ]]
  dd if=/dev/zero of=${HDD} count=1 &> /dev/null || dialog_die  
   
  if [[ ${FDISKPARTIONBELOW256MB} = 1 ]]  
246   then   then
247   ## setup one bootable partition   # run this only if FDISKPARTITIONBELOW256MB is not already 1
248   #1. n= new disk   if [[ ${FDISKPARTIONBELOW256MB} != 1 ]]
249   #2. p= primary disk   then
250   #3. 1= first partition   if device_minimum_size "${HDD}" 256
251   #4. 2= default sector start // small disk needs more space for grub2 mbr sector   then
252   #5. ''= defaul sector end   FDISKPARTIONBELOW256MB=1
253   #6. a= bootable flag   else
254   #7. 1= boot flag for partition 1   FDISKPARTIONBELOW256MB=0
255   #8. w= write/quit   fi
256   fdisk ${HDD} &> /dev/null << EOF   fi
257    
258     ## delete disk
259     dd if=/dev/zero of=${HDD} count=1 &> /dev/null || dialog_die
260    
261     if [[ ${FLASHDISK} = 1 ]]
262     then
263     if [[ ${FDISKPARTIONBELOW256MB} = 1 ]]
264     then
265     ## setup one bootable partition
266     # 1. n= new disk
267     # 2. p= primary disk
268     # 3. 1= first partition
269     # 4. 2= default sector start // small disk needs more space for grub2 mbr sector
270     # 5. ''= defaul sector end
271     # 6. a= bootable flag
272     # 7. 1= boot flag for partition 1
273     # 8. n= new disk
274     #10. p= primary disk
275     #11. 2= second partition
276     #12. ''= default sector start
277     #13. ''= defaul sector end
278     #14. w= write/quit
279     fdisk ${HDD} &> /dev/null << EOF
280  n  n
281  p  p
282  1  1
283  2  2
284    +50M
285    a
286    1
287    n
288    p
289    2
290    
291    
292    w
293    EOF
294     else
295     ## setup one bootable partition
296     # 1. n= new disk
297     # 2. p= primary disk
298     # 3. 1= first partition
299     # 4. ''= default sector start
300     # 5. ''= defaul sector end
301     # 6. a= bootable flag
302     # 7. 1= boot flag for partition 1
303     # 8. n= new disk
304     #10. p= primary disk
305     #11. 2= second partition
306     #12. ''= default sector start
307     #13. ''= defaul sector end
308     #14. w= write/quit
309     fdisk ${HDD} &> /dev/null << EOF
310    n
311    p
312    1
313    
314    +50M
315  a  a
316  1  1
317    n
318    p
319    2
320    
321    
322  w  w
323  EOF  EOF
324   else   fi
325   ## setup one bootable partition   else
326   #1. n= new disk   if [[ ${FDISKPARTIONBELOW256MB} = 1 ]]
327   #2. p= primary disk   then
328   #3. 1= first partition   ## setup one bootable partition
329   #4. ''= default sector start   #1. n= new disk
330   #5. ''= defaul sector end   #2. p= primary disk
331   #6. a= bootable flag   #3. 1= first partition
332   #7. 1= boot flag for partition 1   #4. 2= default sector start // small disk needs more space for grub2 mbr sector
333   #8. w= write/quit   #5. ''= defaul sector end
334   fdisk ${HDD} &> /dev/null << EOF   #6. a= bootable flag
335     #7. 1= boot flag for partition 1
336     #8. w= write/quit
337     fdisk ${HDD} &> /dev/null << EOF
338    n
339    p
340    1
341    2
342    
343    a
344    1
345    w
346    EOF
347     else
348     ## setup one bootable partition
349     #1. n= new disk
350     #2. p= primary disk
351     #3. 1= first partition
352     #4. ''= default sector start
353     #5. ''= defaul sector end
354     #6. a= bootable flag
355     #7. 1= boot flag for partition 1
356     #8. w= write/quit
357     fdisk ${HDD} &> /dev/null << EOF
358  n  n
359  p  p
360  1  1
# Line 263  a Line 364  a
364  1  1
365  w  w
366  EOF  EOF
367     fi
368     fi
369     else
370     cfdisk ${HDD} || dialog_die
371   fi   fi
372  }  }
373    
 setup_hdd_partitions_manual()  
 {  
  ROOTHDD="${HDD}1"  
  SWAPHDD=""  
  BOOTHDD=""  
  cfdisk ${HDD} || dialog_die  
 }  
   
374  setup_hdd_format()  setup_hdd_format()
375  {  {
376   # sanity check - should not happen   install -d /tmp
377   if is_mounted --device "${ROOTHDD}"   :> /tmp/format.log
378    
379     if [[ -n ${SWAPHDD} ]]
380   then   then
381   echo "format: device ${ROOTHDD} is already mounted, umount it" >&2   # sanity check - should not happen
382   umount "${ROOTHDD}"   if is_mounted --device "${SWAPHDD}"
383     then
384     echo "format: device ${SWAPHDD} is already mounted, umount it" >&2
385     umount "${SWAPHDD}"
386     fi
387     mkswap ${SWAPHDD} || die
388     fi
389    
390     if [[ -n ${BOOTHDD} ]]
391     then
392     # sanity check - should not happen
393     if is_mounted --device "${BOOTHDD}"
394     then
395     echo "format: device ${BOOTHDD} is already mounted, umount it" >&2
396     umount "${BOOTHDD}"
397     fi
398    
399     mkfs."${FORMAT_FILESYSTEM_BOOTHDD}" "${BOOTHDD}" &>> /tmp/format.log || dialog_die
400   fi   fi
401    
402   mkfs."${FORMAT_FILESYSTEM}" -q "${ROOTHDD}" || dialog_die   if [[ -n ${ROOTHDD} ]]
403     then
404     # sanity check - should not happen
405     if is_mounted --device "${ROOTHDD}"
406     then
407     echo "format: device ${ROOTHDD} is already mounted, umount it" >&2
408     umount "${ROOTHDD}"
409     fi
410    
411     mkfs."${FORMAT_FILESYSTEM_ROOTHDD}" "${ROOTHDD}" &>> /tmp/format.log || dialog_die
412     fi
413  }  }
414    
415  install_system_image()  install_system_image()
416  {  {
417   pushd ${INSTALLROOT} > /dev/null   pushd ${INSTALLROOT} > /dev/null
418   tar xvjpf ${CDROOT}/system/${CDIMAGENAME} -C ${INSTALLROOT}   tar xvjpf ${IMAGEROOT}/${CDIMAGENAME} -C ${INSTALLROOT}
419   popd > /dev/null   popd > /dev/null
420  }  }
421    
# Line 300  install_system_settings() Line 426  install_system_settings()
426   # write fstab   # write fstab
427   CONFIG="${INSTALLROOT}/etc/fstab"   CONFIG="${INSTALLROOT}/etc/fstab"
428   clearconfig   clearconfig
429   addconfig -e "UUID=$(get_uuid ${ROOTHDD})\t/\t${FORMAT_FILESYSTEM}\tnoatime,noauto\t1 1"   if [[ -n ${BOOTHDD} ]]
430     then
431     addconfig -e "UUID=$(get_uuid ${BOOTHDD})\t/\t${FORMAT_FILESYSTEM_BOOTHDD}\tnoatime\t1 1"
432     fi
433     if [[ -n ${ROOTHDD} ]]
434     then
435     addconfig -e "UUID=$(get_uuid ${ROOTHDD})\t/\t${FORMAT_FILESYSTEM_ROOTHDD}\tnoatime\t0 0"
436     fi
437     if [[ -n ${SWAPHDD} ]]
438     then
439     addconfig -e "UUID='$(get_uuid ${SWAPHDD})'\tswap\tswap\tpri=1\t0 0"
440     fi
441   addconfig -e "proc\t/proc\tproc\tdefaults\t0 0"   addconfig -e "proc\t/proc\tproc\tdefaults\t0 0"
442   addconfig -e "shm\t/dev/shm\ttmpfs\tdefaults\t0 0"   addconfig -e "shm\t/dev/shm\ttmpfs\tdefaults\t0 0"
443    
# Line 311  install_system_settings() Line 448  install_system_settings()
448   addconfig 'NETWORKING="dhcp"'   addconfig 'NETWORKING="dhcp"'
449    
450   # intel framebuffer quirk   # intel framebuffer quirk
451   if [ -e ${INSTALLROOT}/etc/splash/splash.conf ]   CONFIG="${INSTALLROOT}/etc/splash/splash.conf"
452     if [ -e ${CONFIG} ] && [ -e /proc/fb ]
453   then   then
454   if [ -e /proc/fb ]   if [[ ! -z $(grep 'inteldrmfb' /proc/fb) ]]
455   then   then
456   if [[ ! -z $(grep 'inteldrmfb' /proc/fb) ]]   fbdev=$(grep 'inteldrmfb' /proc/fb | sed 's:\([0-9]\).*:\1:')
457   then   [[ ${fbdev} != 0 ]] && sed -i "s:^\(SPLASH_DEV=\).*:\1\"/dev/fb${fbdev}\":" ${CONFIG} || dialog_die
  fbdev=$(grep 'inteldrmfb' /proc/fb | sed 's:\([0-9]\).*:\1:')  
  if [[ ${fbdev} != 0 ]]  
  then  
  sed -i "s:^\(SPLASH_DEV=\).*:\1\"/dev/fb${fbdev}\":" ${INSTALLROOT}/etc/splash/splash.conf || dialog_die  
  fi  
  fi  
458   fi   fi
459   fi   fi
460  }  }
# Line 366  task_setup_system_menu() Line 498  task_setup_system_menu()
498   if [[ ${retval} -eq 0 ]]   if [[ ${retval} -eq 0 ]]
499   then   then
500   case "${mode}" in   case "${mode}" in
501   "1") run_install_auto ;;   "1") run_install auto ;;
502   "2") run_install_normal ;;   "2") run_install normal ;;
503   "") task_setup_system_menu;;   "") task_setup_system_menu;;
504   esac   esac
505   fi   fi
# Line 413  task_hardware_detection() Line 545  task_hardware_detection()
545   then   then
546   message+=$"\n\ZnFormfactor Laptop, activating 'ondemand' powersaving mode.\Zn"   message+=$"\n\ZnFormfactor Laptop, activating 'ondemand' powersaving mode.\Zn"
547   fi   fi
548     if [[ ${FLASHDISK} = 1 ]]
549     then
550     message+=$"\n\ZnFlash memory detected.\Zn"
551     message+=$"\n\ZnF2FS will be used as default filesystem withn the auto installation mode.\Zn"
552     fi
553    
554   messagebox -y 12 -h $"Detected hardware:" "${message}"   messagebox -y 12 -h $"Detected hardware:" "${message}"
555  }  }
556    
557  task_setup_hdd_partitions_manual()  task_setup_hdd_partitions()
558  {  {
559   local i   local i
560   local retval   local retval
# Line 433  task_setup_hdd_partitions_manual() Line 570  task_setup_hdd_partitions_manual()
570   if [[ ${retval} -eq 0 ]]   if [[ ${retval} -eq 0 ]]
571   then   then
572   dialog_setup_hdd_info   dialog_setup_hdd_info
573   setup_hdd_partitions_manual   setup_hdd_partitions
  fi  
  fi  
 }  
   
 task_setup_hdd_partitions_auto()  
 {  
  local i  
  local retval  
   
  if [[ -z ${ALL_DISKS} ]]  
  then  
  dialog_no_harddrive_found  
  exit 1  
  else  
  HDD=$(dialog_select_target_harddrive)  
  retval=$?  
  [[ ${retval} -eq 1 ]] && return 1  
  if [[ ${retval} -eq 0 ]]  
  then  
  dialog_setup_hdd_info_auto  
  dialog_setup_hdd_create_partitions  
  setup_hdd_partitions_auto  
574   fi   fi
575   fi   fi
576  }  }
# Line 482  task_main() Line 597  task_main()
597   done   done
598  }  }
599    
600  run_install_normal()  run_install()
601  {  {
602   task_hardware_detection   local method="$1"
   
  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  
603    
  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()  
 {  
604   task_hardware_detection   task_hardware_detection
605    
606   task_setup_hdd_partitions_auto   case "${method}" in
607     auto)
608     if [[ ${FLASHDISK} = 1 ]]
609     then
610     export BOOTHDD="${HDD}1"
611     export SWAPHDD=""
612     export ROOTHDD="${HDD}2"
613     export FORMAT_FILESYSTEM_BOOTHDD="f2fs"
614     export FORMAT_FILESYSTEM_ROOTHDD="ext2"
615     else
616     export BOOTHDD=""
617     export SWAPHDD=""
618     export ROOTHDD="${HDD}1"
619     export FORMAT_FILESYSTEM_BOOTHDD=""
620     export FORMAT_FILESYSTEM_ROOTHDD="${FORMAT_FILESYSTEM}"
621     fi
622     export INSTALL_METHOD="${method}"
623     ;;
624     normal)
625     export BOOTHDD="${HDD}1"
626     export SWAPHDD="${HDD}2"
627     export ROOTHDD="${HDD}3"
628     export FORMAT_FILESYSTEM_BOOTHDD="${FORMAT_FILESYSTEM}"
629     export FORMAT_FILESYSTEM_ROOTHDD="${FORMAT_FILESYSTEM}"
630     export INSTALL_METHOD="${method}"
631     ;;
632     single)
633     export BOOTHDD=""
634     export SWAPHDD=""
635     export ROOTHDD="${HDD}1"
636     export FORMAT_FILESYSTEM_BOOTHDD=""
637     export FORMAT_FILESYSTEM_ROOTHDD="${FORMAT_FILESYSTEM}"
638     export INSTALL_METHOD="${method}"
639     ;;
640     flash)
641     export BOOTHDD="${HDD}1"
642     export SWAPHDD=""
643     export ROOTHDD="${HDD}2"
644     export FORMAT_FILESYSTEM_BOOTHDD="${FORMAT_FILESYSTEM}"
645     export FORMAT_FILESYSTEM_ROOTHDD="f2fs"
646     export INSTALL_METHOD="${method}"
647     ;;
648     *)
649     die "Unknown install method '${method}', aborting."
650     ;;
651     esac
652    
653     task_setup_hdd_partitions
654   dialog_setup_hdd_format   dialog_setup_hdd_format
655   setup_hdd_format > /dev/null   setup_hdd_format > /dev/null
656   mount_rootfs   mount_rootfs

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