Magellan Linux

Diff of /alx-src/trunk/alxinstall-ng/bin/alxinstall-ng.sh.in

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

revision 6799 by niro, Wed Jul 22 11:08:40 2015 UTC revision 6826 by niro, Thu Jul 23 11:26:26 2015 UTC
# Line 1  Line 1 
1  #!/bin/sh  #!/bin/sh
2  #  # $Id$
 # $Header: /home/cvsd/alx-cvs/alx-src/alxinstall-ng/bin/alxinstall-ng.sh,v 1.15 2008-06-28 00:37:45 niro Exp $  
 #  
 # AutoSta_LX Installation Script  
 #  
 # Niels Rogalla <niro@magellan-linux.de>  
 # <rogalla@augusta-bochum.de>  
 #  
 #  
 # Install Navigation Gui  
 #  
3    
4  #images: (get ${CDIMAGENAME})  # ignore environment!
5    LC_ALL=C
6    
7    MLIBDIR="/usr/lib/alxinstall-ng"
8    
9    # images: (get ${CDIMAGENAME})
10  source /mnt/cdrom/system/images.conf  source /mnt/cdrom/system/images.conf
11    
12  #Includes  # includes
13  source /usr/lib/alxinstall-ng/functions/findhdd.sh > /dev/null  source ${MLIBDIR}/functions/hwdetection.sh
 ### bugfix ###############################  
 cdromdev="$(echo ${cdromdev} | sed 's/ //')"  
 ########################################  
14    
15  ### System/Config Version  ### System/Config Version
16  VERSION="%VERSIONTAG%"  VERSION="@@VERSION@@"
17  TITLE="alxinstall-ng - ${VERSION}"  TITLE="alxinstall-ng - ${VERSION}"
18    
19    # locations
20  CDPATH="/mnt/cdrom"  CDPATH="/mnt/cdrom"
21  INSTALLPATH="/mnt/magellan"  INSTALLPATH="/mnt/magellan"
22    
23  ### WICHTIG: anzahl lines in der autosta_lx.tar.gz -1  # default system settings
 CURRENTLINE=0  
 #TOTALLINES=11072 # -> now in images.conf  
   
24  # standard kernel opts  # standard kernel opts
25  KERNELOPTS="quiet video=1024x768"  DEFAULT_KERNELOPTS="quiet video=1024x768"
26    
27  # grub options  # grub options
28  GRUBLEGACYOPTS=""  DEFAULT_GRUBLEGACYOPTS=""
29  GRUB2OPTS=""  DEFAULT_GRUB2OPTS=""
30  GRUB2GFXPAYLOAD="1024x768x16,1024x768"  DEFAULT_GRUB2GFXPAYLOAD="1024x768x16,1024x768"
   
 # fdisk options  
 FDISKPARTIONBELOW256MB=0  
31    
32  # default specialdevices  # default specialdevices
33  SPECIALDEVICE=""  DEFAULT_FORMFACTOR="desktop"
 FORMFACTOR="desktop"  
34    
35  # target filesystem  # target filesystem
36  FORMAT_FILESYSTEM="ext4"  DEFAULT_FORMAT_FILESYSTEM="ext4"
37    
38    # initialize global variables so they are exportable
39    INSTALL_METHOD=""
40    KERNELOPTS=""
41    GRUBLEGACYOPTS=""
42    GRUB2OPTS=""
43    GRUB2GFXPAYLOAD=""
44    FORMFACTOR=""
45    FORMAT_FILESYSTEM=""
46    FDISKPARTIONBELOW256MB=0
47    SPECIALDEVICE=""
48    ### linecount of system.tar.gz -1 !
49    CURRENTLINE=0
50    #TOTALLINES=11072 # -> now in images.conf
51    
52  #################################################  #################################################
53  #  DIALOG BOXEN #  #  DIALOG BOXES #
54  #################################################  #################################################
55    
56  die()  die()
# Line 81  dialog_warning() Line 81  dialog_warning()
81    
82  dialog_setup_hdd_info()  dialog_setup_hdd_info()
83  {  {
84     case "${INSTALL_METHOD}" in
85     auto)
86     dialog_setup_hdd_info_auto
87     dialog_setup_hdd_create_partitions
88     ;;
89     normal) dialog_setup_hdd_info_normal ;;
90     single) dialog_setup_hdd_info_single ;;
91     esac
92    }
93    
94    dialog_setup_hdd_info_normal()
95    {
96   local SHDD="$(echo ${HDD} | sed 's/\/dev\///')"   local SHDD="$(echo ${HDD} | sed 's/\/dev\///')"
97    
98   dialog \   dialog \
# Line 95  dialog_setup_hdd_info() Line 107  dialog_setup_hdd_info()
107   Bitte ${SHDD}1 als \Z3bootable\Zn markieren." 12 81   Bitte ${SHDD}1 als \Z3bootable\Zn markieren." 12 81
108  }  }
109    
110  dialog_setup_hdd_info_simple()  dialog_setup_hdd_info_single()
111  {  {
112   local SHDD="$(echo $HDD | sed 's/\/dev\///')"   local SHDD="$(echo $HDD | sed 's/\/dev\///')"
113    
# Line 138  dialog_setup_system_menu() Line 150  dialog_setup_system_menu()
150   "" "" \   "" "" \
151   "" "\Z1Experten Modi:\Zn" \   "" "\Z1Experten Modi:\Zn" \
152   "2" "Normale IDE-Disk (Manuell)" \   "2" "Normale IDE-Disk (Manuell)" \
153   "3" "Flash-Speicher (Manuell)")   "3" "Normale IDE Disk (Single)")
154   RES=$?   RES=$?
155   [[ ${RES} -eq 1 ]] && return 1   [[ ${RES} -eq 1 ]] && return 1
156   if [[ ${RES} -eq 0 ]]   if [[ ${RES} -eq 0 ]]
157   then   then
158   case "${i}" in   case "${i}" in
159   "1") run_install_auto ;;   "1") run_install auto ;;
160   "2") run_install_normal ;;   "2") run_install normal ;;
161   "3") run_install_simple ;;   "3") run_install single ;;
162   "") dialog_setup_system_menu;;   "") dialog_setup_system_menu;;
163   esac   esac
164   fi   fi
# Line 164  dialog_hardware_detection() Line 176  dialog_hardware_detection()
176   hwtmp="/tmp/hwtmp.sh"   hwtmp="/tmp/hwtmp.sh"
177   fi   fi
178    
179   [[ ! -z ${installdevs} ]] && installdevs=""   run_hardware_detection_disks
180    
181   echo "dialog \\"  > ${hwtmp}   echo "dialog \\"  > ${hwtmp}
182   echo "--backtitle \"${TITLE}\" \\" >> ${hwtmp}   echo "--backtitle \"${TITLE}\" \\" >> ${hwtmp}
# Line 174  dialog_hardware_detection() Line 186  dialog_hardware_detection()
186   echo "--msgbox \"Gefundene Hardware:\n\n \\" >> ${hwtmp}   echo "--msgbox \"Gefundene Hardware:\n\n \\" >> ${hwtmp}
187   echo " Festplatten:\n \\" >> ${hwtmp}   echo " Festplatten:\n \\" >> ${hwtmp}
188    
189   if [[ ! -z ${scsidisks} ]]   if [[ ! -z ${ALL_DISKS} ]]
190   then   then
191   for i in ${scsidisks}   for i in ${ALL_DISKS}
192   do   do
193   if [[ ${i} != ${cdromdev} ]]   echo " \\Z3${i}\\Zn\n \\" >> ${hwtmp}
  then  
  echo " \\Z7SCSI: \\Z3${i}\\Zn\n \\" >> ${hwtmp}  
  installdevs="${installdevs} ${i}"  
  fi  
194   done   done
195   fi   fi
196    
197   if [[ ! -z ${idedisks} ]]   if [[ ! -z ${ALL_CDROMS} ]]
198   then   then
199   for i in ${idedisks}   echo " \n \\" >> ${hwtmp}
200     echo " CDROM Laufwerke:\n \\" >> ${hwtmp}
201     for i in ${ALL_CDROMS}
202   do   do
203   if [[ ${i} != ${cdromdev} ]]   echo " \\Z3${i}\\Zn\n \\" >> ${hwtmp}
  then  
  echo " \\Z7IDE:  \\Z3${i}\\Zn\n \\" >> ${hwtmp}  
  installdevs="${installdevs} ${i}"  
  fi  
204   done   done
205   fi   fi
206    
  if [[ ! -z ${cdromdev} ]]  
  then  
  echo " \n \\" >> ${hwtmp}  
  echo " \\Z7andere Laufwerke:\n \\" >> ${hwtmp}  
  echo " CDROM: \\Z3${cdromdev}\\Zn\n \\" >> ${hwtmp}  
  fi  
   
207   # other devices   # other devices
208   run_hardware_detection   run_hardware_detection
209   case "${SPECIALDEVICE}" in   case "${SPECIALDEVICE}" in
210   zotac*) echo " \n\n\n \\Z2Zotac Device erkannt.\\Zn \\" >> ${hwtmp} ;;   zotac*) echo " \n \\Z2Zotac Device erkannt.\\Zn \\" >> ${hwtmp} ;;
211   rangee) echo " \n\n\n \\Z2Rangee Device erkannt.\\Zn \\" >> ${hwtmp} ;;   rangee) echo " \n \\Z2Rangee Device erkannt.\\Zn \\" >> ${hwtmp} ;;
212   maxdata) echo " \n\n\n \\Z2Maxdata Device erkannt.\\Zn \\" >> ${hwtmp} ;;   maxdata) echo " \n \\Z2Maxdata Device erkannt.\\Zn \\" >> ${hwtmp} ;;
213   i845) echo " \n\n\n \\Z2Intel i845 Device erkannt.\\Zn \\" >> ${hwtmp} ;;   i845) echo " \n \\Z2Intel i845 Device erkannt.\\Zn \\" >> ${hwtmp} ;;
214   *) echo " \n\n\n \\ZnStandard Device erkannt.\\Zn \\" >> ${hwtmp} ;;   *) echo " \n \\ZnStandard Device erkannt.\\Zn \\" >> ${hwtmp} ;;
215   esac   esac
216   if [[ ${FORMFACTOR} = laptop ]]   if [[ ${FORMFACTOR} = laptop ]]
217   then   then
# Line 230  dialog_hardware_detection() Line 229  dialog_hardware_detection()
229   fi   fi
230  }  }
231    
232  dialog_setup_hdd_partitions_manuell()  dialog_setup_hdd_partitions()
233  {  {
234   local i   local i
235    
236   if [[ -z ${installdevs} ]]   if [[ -z ${ALL_DISKS} ]]
237   then   then
238   dialog \   dialog \
239   --backtitle "${TITLE}" \   --backtitle "${TITLE}" \
# Line 250  dialog_setup_hdd_partitions_manuell() Line 249  dialog_setup_hdd_partitions_manuell()
249   echo "--stdout \\" >> /tmp/hddtmp.sh   echo "--stdout \\" >> /tmp/hddtmp.sh
250   echo "--menu \"Installations Laufwerk auswaehlen:\" 10 70 3 \\" >> /tmp/hddtmp.sh   echo "--menu \"Installations Laufwerk auswaehlen:\" 10 70 3 \\" >> /tmp/hddtmp.sh
251    
252   for i in ${installdevs}   for i in ${ALL_DISKS}
253   do   do
254   echo "\"${i}\" \"\" \\" >> /tmp/hddtmp.sh   echo "\"${i}\" \"\" \\" >> /tmp/hddtmp.sh
255   done   done
# Line 263  dialog_setup_hdd_partitions_manuell() Line 262  dialog_setup_hdd_partitions_manuell()
262   if [[ ${RES} -eq 0 ]]   if [[ ${RES} -eq 0 ]]
263   then   then
264   dialog_setup_hdd_info   dialog_setup_hdd_info
265   setup_hdd_partitions_manuell   setup_hdd_partitions
  fi  
  fi  
 }  
   
 dialog_setup_hdd_partitions_manuell_simple()  
 {  
  local i  
   
  if [[ -z ${installdevs} ]]  
  then  
  dialog \  
  --backtitle "${TITLE}" \  
  --ok-label "Beenden" \  
  --msgbox "Kein geeignetes Laufwerk gefunden.\nDie Installation ist fehlgeschlagen." 6 70  
  exit 1  
  else  
   
  echo "dialog \\" > /tmp/hddtmp.sh  
  echo "--backtitle \"${TITLE}\" \\" >> /tmp/hddtmp.sh  
  echo "--ok-label \"Weiter\" \\" >> /tmp/hddtmp.sh  
  echo "--cancel-label \"Beenden\" \\" >> /tmp/hddtmp.sh  
  echo "--stdout \\" >> /tmp/hddtmp.sh  
  echo "--menu \"Installations Laufwerk auswaehlen:\" 10 70 3 \\" >> /tmp/hddtmp.sh  
   
  for i in ${installdevs}  
  do  
  echo "\"${i}\" \"\" \\" >> /tmp/hddtmp.sh  
  done  
  echo -e "\n" >> /tmp/hddtmp.sh  
   
  chmod a+x /tmp/hddtmp.sh  
  HDD="$(/tmp/hddtmp.sh)"  
  RES=$?  
  [[ ${RES} -eq 1 ]] && return 1  
  if [[ ${RES} -eq 0 ]]  
  then  
  dialog_setup_hdd_info_simple  
  setup_hdd_partitions_manuell_simple  
  fi  
  fi  
 }  
   
 dialog_setup_hdd_partitions_auto()  
 {  
  local i  
   
  if [[ -z ${installdevs} ]]  
  then  
  dialog \  
  --backtitle "${TITLE}" \  
  --ok-label "Beenden" \  
  --msgbox "Kein geeignetes Laufwerk gefunden.\nDie Installation ist fehlgeschlagen." 6 70  
  exit 1  
  else  
   
  echo "dialog \\" > /tmp/hddtmp.sh  
  echo "--backtitle \"${TITLE}\" \\" >> /tmp/hddtmp.sh  
  echo "--ok-label \"Weiter\" \\" >> /tmp/hddtmp.sh  
  echo "--cancel-label \"Beenden\" \\" >> /tmp/hddtmp.sh  
  echo "--stdout \\" >> /tmp/hddtmp.sh  
  echo "--menu \"Installations Laufwerk auswaehlen:\" 10 70 3 \\" >> /tmp/hddtmp.sh  
   
  for i in ${installdevs}  
  do  
  echo "\"${i}\" \"\" \\" >> /tmp/hddtmp.sh  
  done  
  echo -e "\n" >> /tmp/hddtmp.sh  
   
  chmod a+x /tmp/hddtmp.sh  
  HDD="$(/tmp/hddtmp.sh)"  
  RES=$?  
  [[ ${RES} -eq 1 ]] && return 1  
  if [[ ${RES} -eq 0 ]]  
  then  
  dialog_setup_hdd_info_auto  
  dialog_setup_hdd_create_partitions  
  setup_hdd_partitions_auto  
266   fi   fi
267   fi   fi
268  }  }
# Line 386  dialog_install_meter() Line 308  dialog_install_meter()
308   return 0   return 0
309  }  }
310    
   
311  dialog_install_bootsector()  dialog_install_bootsector()
312  {  {
313   dialog \   dialog \
# Line 443  dialog_main() Line 364  dialog_main()
364  }  }
365    
366  #################################################  #################################################
367  # Install Komandos #  # Install Commands #
368  #################################################  #################################################
369  run_hardware_detection()  run_hardware_detection()
370  {  {
371   local hwinfo   local hwinfo
   
372   hwinfo="$(hwinfo --bios --storage --pci --gfxcard --sys)"   hwinfo="$(hwinfo --bios --storage --pci --gfxcard --sys)"
373    
374   # check for special devices/clients:   # check for special devices/clients:
# Line 520  run_hardware_detection() Line 440  run_hardware_detection()
440   fi   fi
441  }  }
442    
443    run_hardware_detection_disks()
444    {
445     local bootdev
446    
447     # all disks but exclude ramdisks
448     export ALL_DISKS=$(get_hwinfo disk | sed '/\/dev\/ram[0-9].*/d')
449     # remove the boot device from ALL_DISKS if it was an usbstick
450     if [[ $(grep '[[:space:]]/mnt/cdrom[[:space:]]' /proc/mounts | cut -d' ' -f3) != iso9660 ]]
451     then
452     bootdev="$(grep '[[:space:]]/mnt/cdrom[[:space:]]' /proc/mounts | cut -d' ' -f1 | sed 's:[0-9]::g')"
453     export ALL_DISKS=$(echo "${ALL_DISKS}" | grep -v "${bootdev}")
454     fi
455     export ALL_CDROMS="$(get_hwinfo cdrom)"
456    }
457    
458  hdd_size_below_256mb()  hdd_size_below_256mb()
459  {  {
460   local hdd="$1"   local hdd="$1"
# Line 538  hdd_size_below_256mb() Line 473  hdd_size_below_256mb()
473   return "${retval}"   return "${retval}"
474  }  }
475    
476  setup_hdd_partitions_auto()  setup_hdd_partitions()
477  {  {
478   ROOTHDD="${HDD}1"   case "${INSTALL_METHOD}" in
479     normal)
480     BOOTHDD="${HDD}1"
481     SWAPHDD="${HDD}2"
482     ROOTHDD="${HDD}3"
483     ;;
484    
485     single|auto)
486     ROOTHDD="${HDD}1"
487     ;;
488     esac
489    
490   # run this only if FDISKPARTITIONBELOW256MB is not already 1   if [[ ${INSTALL_METHOD} = auto ]]
  if [[ ${FDISKPARTIONBELOW256MB} != 1 ]]  
491   then   then
492   if hdd_size_below_256mb ${HDD}   # run this only if FDISKPARTITIONBELOW256MB is not already 1
493     if [[ ${FDISKPARTIONBELOW256MB} != 1 ]]
494   then   then
495   FDISKPARTIONBELOW256MB=1   if hdd_size_below_256mb ${HDD}
496   else   then
497   FDISKPARTIONBELOW256MB=0   FDISKPARTIONBELOW256MB=1
498     else
499     FDISKPARTIONBELOW256MB=0
500     fi
501   fi   fi
  fi  
502    
503   ## delete disk   ## delete disk
504   dd if=/dev/zero of=${HDD} count=1 &> /dev/null || die   dd if=/dev/zero of=${HDD} count=1 &> /dev/null || die
505    
506   if [[ ${FDISKPARTIONBELOW256MB} = 1 ]]   if [[ ${FDISKPARTIONBELOW256MB} = 1 ]]
507   then   then
508   ## setup one bootable partition   ## setup one bootable partition
509   #1. n= new disk   #1. n= new disk
510   #2. p= primary disk   #2. p= primary disk
511   #3. 1= first partition   #3. 1= first partition
512   #4. 2= default sector start // small disk needs more space for grub2 mbr sector   #4. 2= default sector start // small disk needs more space for grub2 mbr sector
513   #5. ''= defaul sector end   #5. ''= defaul sector end
514   #6. a= bootable flag   #6. a= bootable flag
515   #7. 1= boot flag for partition 1   #7. 1= boot flag for partition 1
516   #8. w= write/quit   #8. w= write/quit
517   fdisk ${HDD} &> /dev/null << EOF   fdisk ${HDD} &> /dev/null << EOF
518  n  n
519  p  p
520  1  1
# Line 577  a Line 524  a
524  1  1
525  w  w
526  EOF  EOF
527   else   else
528   ## setup one bootable partition   ## setup one bootable partition
529   #1. n= new disk   #1. n= new disk
530   #2. p= primary disk   #2. p= primary disk
531   #3. 1= first partition   #3. 1= first partition
532   #4. ''= default sector start   #4. ''= default sector start
533   #5. ''= defaul sector end   #5. ''= defaul sector end
534   #6. a= bootable flag   #6. a= bootable flag
535   #7. 1= boot flag for partition 1   #7. 1= boot flag for partition 1
536   #8. w= write/quit   #8. w= write/quit
537   fdisk ${HDD} &> /dev/null << EOF   fdisk ${HDD} &> /dev/null << EOF
538  n  n
539  p  p
540  1  1
# Line 597  a Line 544  a
544  1  1
545  w  w
546  EOF  EOF
547     fi
548     else
549     ## hdds partitionieren manuell
550     cfdisk ${HDD} || die
551   fi   fi
552  }  }
553    
 setup_hdd_partitions_manuell()  
 {  
  BOOTHDD="${HDD}1"  
  SWAPHDD="${HDD}2"  
  ROOTHDD="${HDD}3"  
   
  ## hdds partitionieren manuell  
  cfdisk ${HDD} || die  
 }  
   
 setup_hdd_partitions_manuell_simple()  
 {  
  ROOTHDD="${HDD}1"  
   
  ## hdds partitionieren manuell  
  cfdisk ${HDD} || die  
 }  
   
554  setup_hdd_format()  setup_hdd_format()
555  {  {
556   mkswap ${SWAPHDD} || die   if [[ -n ${SWAPHDD} ]]
557   mke2fs -j -q ${BOOTHDD} || die   then
558   mke2fs -j -q ${ROOTHDD} || die   mkswap ${SWAPHDD} || die
559  }   fi
560     if [[ -n ${BOOTHDD} ]]
561  setup_hdd_format_simple()   then
562  {   mke2fs -j -q ${BOOTHDD} || die
563   mke2fs -j -q ${ROOTHDD} || die   fi
564     if [[ -n ${ROOTHDD} ]]
565     then
566     mke2fs -j -q ${ROOTHDD} || die
567     fi
568  }  }
569    
570  install_mount_rootfs()  install_mount_rootfs()
571  {  {
572   swapon ${SWAPHDD} || die   if [[ -n ${SWAPHDD} ]]
573   mount ${ROOTHDD} ${INSTALLPATH} || die   then
574   install -d ${INSTALLPATH}/boot || die   swapon ${SWAPHDD} || die
575   mount ${BOOTHDD} ${INSTALLPATH}/boot || die   fi
576   cd ${INSTALLPATH} || die   if [[ -n ${ROOTHDD} ]]
577  }   then
578     mount ${ROOTHDD} ${INSTALLPATH} || die
579     fi
580     if [[ -n ${BOOTHDD} ]]
581     then
582     install -d ${INSTALLPATH}/boot || die
583     mount ${BOOTHDD} ${INSTALLPATH}/boot || die
584     fi
585    
 install_mount_rootfs_simple()  
 {  
  mount ${ROOTHDD} ${INSTALLPATH} || die  
  install -d ${INSTALLPATH}/boot || die  
586   cd ${INSTALLPATH} || die   cd ${INSTALLPATH} || die
587  }  }
588    
# Line 743  install_bootsector_chroot() Line 683  install_bootsector_chroot()
683   echo "initrd /boot/${KRNINITRD}" >> ${grubconf} || die   echo "initrd /boot/${KRNINITRD}" >> ${grubconf} || die
684   fi   fi
685    
686   # bootsector schreiben chrooted schreiben (lfs/magellan)   # write bootsector chrooted (lfs/magellan)
687   cat > ${INSTALLPATH}/root/.installrc << CHROOTEOF   cat > ${INSTALLPATH}/root/.installrc << CHROOTEOF
688  /usr/sbin/grub --no-floppy --batch << "EOF" 1> /dev/null 2> /dev/null  /usr/sbin/grub --no-floppy --batch << "EOF" 1> /dev/null 2> /dev/null
689  root (hd0,0)  root (hd0,0)
# Line 863  install_system_settings() Line 803  install_system_settings()
803   # schreibe fstab   # schreibe fstab
804   if is_uuid_supported   if is_uuid_supported
805   then   then
806   echo -e "UUID=$(get_uuid ${BOOTHDD})\t/boot\t${FORMAT_FILESYSTEM}\tnoatime,noauto\t1 1" > ${INSTALLPATH}/etc/fstab || die   if [[ -n ${BOOTHDD} ]]
807   echo -e "UUID=$(get_uuid ${ROOTHDD})\t/\t${FORMAT_FILESYSTEM}\tnoatime\t0 0" >> ${INSTALLPATH}/etc/fstab || die   then
808     echo -e "UUID=$(get_uuid ${BOOTHDD})\t/boot\t${FORMAT_FILESYSTEM}\tnoatime,noauto\t1 1" > ${INSTALLPATH}/etc/fstab || die
809     fi
810     if [[ -n ${ROOTHDD} ]]
811     then
812     echo -e "UUID=$(get_uuid ${ROOTHDD})\t/\t${FORMAT_FILESYSTEM}\tnoatime\t0 0" >> ${INSTALLPATH}/etc/fstab || die
813     fi
814   else   else
815   echo -e "${BOOTHDD}\t/boot\t${FORMAT_FILESYSTEM}\tnoatime,noauto\t1 1" > ${INSTALLPATH}/etc/fstab || die   if [[ -n ${BOOTHDD} ]]
816   echo -e "${ROOTHDD}\t/\t${FORMAT_FILESYSTEM}\tnoatime\t0 0" >> ${INSTALLPATH}/etc/fstab || die   then
817     echo -e "${BOOTHDD}\t/boot\t${FORMAT_FILESYSTEM}\tnoatime,noauto\t1 1" > ${INSTALLPATH}/etc/fstab || die
818     fi
819     if [[ -n ${ROOTHDD} ]]
820     then
821     echo -e "${ROOTHDD}\t/\t${FORMAT_FILESYSTEM}\tnoatime\t0 0" >> ${INSTALLPATH}/etc/fstab || die
822     fi
823   fi   fi
824   # not needed busybox loads all with swapon -a, even if not mentioned in fstab   # not needed busybox loads all with swapon -a, even if not mentioned in fstab
825   #echo -e "UUID='$(get_uuid ${SWAPHDD})'\tswap\tswap\tpri=1\t0 0" >> ${INSTALLPATH}/etc/fstab || die   #echo -e "UUID='$(get_uuid ${SWAPHDD})'\tswap\tswap\tpri=1\t0 0" >> ${INSTALLPATH}/etc/fstab || die
# Line 891  install_system_settings() Line 843  install_system_settings()
843   fi   fi
844  }  }
845    
 install_system_settings_simple()  
 {  
  # schreibe fstab  
  if is_uuid_supported  
  then  
  echo -e "UUID=$(get_uuid ${ROOTHDD})\t/\t${FORMAT_FILESYSTEM}\tnoatime\t0 0" > ${INSTALLPATH}/etc/fstab || die  
  else  
  echo -e "${ROOTHDD}\t/\t${FORMAT_FILESYSTEM}\tnoatime\t0 0" > ${INSTALLPATH}/etc/fstab || die  
  fi  
  echo -e "proc\t/proc\tproc\tdefaults\t0 0" >> ${INSTALLPATH}/etc/fstab || die  
  echo -e "shm\t/dev/shm\ttmpfs\tdefaults\t0 0" >> ${INSTALLPATH}/etc/fstab || die  
 }  
   
846  install_umount_rootfs()  install_umount_rootfs()
847  {  {
848   cd /   cd /
849   umount ${INSTALLPATH}/boot || die   if [[ -n ${BOOTHDD} ]]
850   umount ${INSTALLPATH} || die   then
851   swapoff ${SWAPHDD} || die   umount ${INSTALLPATH}/boot || die
852  }   fi
853     if [[ -n ${ROOTHDD} ]]
854  install_umount_rootfs_simple()   then
855  {   umount ${INSTALLPATH} || die
856   cd /   fi
857   umount ${INSTALLPATH} || die   if [[ -n ${SWAPHDD} ]]
858     then
859     swapoff ${SWAPHDD} || die
860     fi
861  }  }
862    
863  install_do_reboot()  install_do_reboot()
# Line 924  install_do_reboot() Line 866  install_do_reboot()
866  }  }
867    
868  #################################################  #################################################
869  #     Install Ablauf Scripte #  #     Install Main Scripts #
870  #################################################  #################################################
871    
872  run_install_normal()  run_install()
873  {  {
874     local method="$1"
875    
876     # setup install environment
877     export KERNELOPTS="${DEFAULT_KERNELOPTS}"
878     export GRUBLEGACYOPTS="${GRUBLEGACYOPTS}"
879     export GRUB2OPTS="${GRUB2OPTS}"
880     export GRUB2GFXPAYLOAD="${DEFAULT_GRUB2GFXPAYLOAD}"
881     export FORMFACTOR="${DEFAULT_FORMFACTOR}"
882     export FORMAT_FILESYSTEM="${DEFAULT_FORMAT_FILESYSTEM}"
883    
884     case "${method}" in
885     auto)
886     export INSTALL_METHOD="${method}"
887     ;;
888     normal)
889     export INSTALL_METHOD="${method}"
890     ;;
891     single)
892     export INSTALL_METHOD="${method}"
893     ;;
894     *)
895     echo "Unknown install method '${method}', aborting."
896     exit 1
897     ;;
898     esac
899    
900   dialog_hardware_detection   dialog_hardware_detection
901    
902   dialog_setup_hdd_partitions_manuell   dialog_setup_hdd_partitions
903   dialog_setup_hdd_format   dialog_setup_hdd_format
904   setup_hdd_format > /dev/null   setup_hdd_format > /dev/null
905   install_mount_rootfs   install_mount_rootfs
# Line 949  run_install_normal() Line 917  run_install_normal()
917   dialog_install_successful   dialog_install_successful
918  }  }
919    
 run_install_simple()  
 {  
  dialog_hardware_detection  
   
  dialog_setup_hdd_partitions_manuell_simple  
  dialog_setup_hdd_format  
  setup_hdd_format_simple > /dev/null  
  install_mount_rootfs_simple  
  (install_system_image > /tmp/install.log) 2> /tmp/install_errors.log | dialog_install_meter | dialog_install_system_image  
   
  dialog_install_settings  
  sleep 1  
  install_system_settings_simple  
  install_initrd_chroot  
   
  dialog_install_bootsector  
  install_bootsector_chroot  
   
  install_umount_rootfs_simple  
  dialog_install_successful  
 }  
   
 run_install_auto()  
 {  
  dialog_hardware_detection  
   
  dialog_setup_hdd_partitions_auto  
  dialog_setup_hdd_format  
  setup_hdd_format_simple > /dev/null  
  install_mount_rootfs_simple  
  (install_system_image > /tmp/install.log) 2> /tmp/install_errors.log | dialog_install_meter | dialog_install_system_image  
   
  dialog_install_settings  
  sleep 1  
  install_system_settings_simple  
  install_initrd_chroot  
   
  dialog_install_bootsector  
  install_bootsector_chroot  
   
  install_umount_rootfs_simple  
  dialog_install_successful  
 }  
   
920  dialog_main  dialog_main
921    
922  exit 0  exit 0

Legend:
Removed from v.6799  
changed lines
  Added in v.6826