Commits

Keshav Amburay committed 39d1ba8 Merge

Merge remote-tracking branch 'remotes/origin/master' into Keshav

Comments (0)

Files changed (3)

usr/share/archboot/installer/setup

     ## Lenovo BIOS-GPT issues - Arch Forum - https://bbs.archlinux.org/viewtopic.php?id=131149 , https://bbs.archlinux.org/viewtopic.php?id=133330 , https://bbs.archlinux.org/viewtopic.php?id=138958
     ## Lenovo BIOS-GPT issues - in Fedora - https://bugzilla.redhat.com/show_bug.cgi?id=735733, https://bugzilla.redhat.com/show_bug.cgi?id=749325 , http://git.fedorahosted.org/git/?p=anaconda.git;a=commit;h=ae74cebff312327ce2d9b5ac3be5dbe22e791f09
     GUIDPARAMETER=""
-    DIALOG --defaultno --yesno "Do you want to use GUID Partition Table (GPT)?\n\nIt is a standard for the layout of the partition table on a physical storage disk. Although it forms a part of the Unified Extensible Firmware Interface (UEFI) standard (replacement for the PC BIOS firmware), it is also used on some BIOS systems because of the limitations of MBR aka msdos partition tables, which restrict maximum disk size to 2 TiB.\n\nWindows XP and earlier Windows systems cannot (without hacks) read or write to drives formatted with a GUID partition table, however, Vista and Windows 7 and later versions include the capability to use GPT for non-boot aka data disks (only UEFI systems can boot Windows from GPT disks).\n\nAttention:\n- Please check if your other operating systems have GPT support!\n- Use this option for a GRUB(2) setup, which should support LVM, RAID\n  etc., which doesn't fit into the usual 30k MS-DOS post-MBR gap.\n- BIOS-GPT boot may not work in some Lenovo systems (irrespective of the\n 
+    DIALOG --defaultno --yesno "Do you want to use GUID Partition Table (GPT)?\n\nIt is a standard for the layout of the partition table on a physical storage disk. Although it forms a part of the Unified Extensible Firmware Interface (UEFI) standard, it is also used on some BIOS systems because of the limitations of MBR aka msdos partition tables, which restrict maximum disk size to 2 TiB.\n\nWindows Vista and later versions include the capability to use GPT for non-boot aka data disks (only UEFI systems can boot Windows Vista and later from GPT disks).\n\nAttention:\n- Please check if your other operating systems have GPT support!\n- Use this option for a GRUB(2) setup, which should support LVM, RAID\n  etc., which doesn't fit into the usual 30k MS-DOS post-MBR gap.\n- BIOS-GPT boot may not work in some Lenovo systems (irrespective of the\n 
   bootloader used). " 0 0 && GUIDPARAMETER="yes"
 }
 
         fi
     fi
     DEFAULTFS=""
+    _UEFISYS_BOOTPART=""
     BOOT_PART_SET=""
     SWAP_PART_SET=""
     ROOT_PART_SET=""
     
     detect_uefi_boot
     
-    if [[ "${_DETECTED_UEFI_BOOT}" == "1" ]]; then
+    if [[ "${_DETECTED_UEFI_BOOT}" == "1"  ||  "${GUIDPARAMETER}" = "yes" ]]; then
         DIALOG --inputbox "Enter the mountpoint of your UEFI SYSTEM PARTITION (Default is /boot) : " 0 0 "/boot" 2>"${ANSWER}" || return 1
         UEFISYS_MOUNTPOINT="$(cat ${ANSWER})"
     fi
     
     if [[ "${UEFISYS_MOUNTPOINT}" == "/boot" ]]; then
-        DIALOG --msgbox "You have chosen to use /boot as the UEFISYS Mountpoint. The minimum parition size is 512 MiB and only FAT32 FS is supported" 0 0
+        DIALOG --msgbox "You have chosen to use /boot as the UEFISYS Mountpoint. The minimum partition size is 512 MiB and only FAT32 FS is supported" 0 0
         _UEFISYS_BOOTPART="1"
     fi
     
         
         if [[ "${_UEFISYS_BOOTPART}" == "1" ]]; then
             DISC_SIZE="$((${DISC_SIZE}-${GUID_PART_SIZE}))"
-            
-            BOOT_PART_SIZE="${UEFISYS_PART_SIZE}"
-            
-            if [[ "${BOOT_PART_SIZE}" -ge "${DISC_SIZE}" || "${BOOT_PART_SIZE}" -lt "16" || "${SBOOT_PART_SIZE}" = "${DISC_SIZE}" ]]; then
-                DIALOG --msgbox "ERROR: No space left on disk." 0 0
-            else
-                BOOT_PART_SET=1
+            while [[ "${BOOT_PART_SET}" = "" ]]; do
+                DIALOG --inputbox "Enter the size (MB) of your /boot partition,\nMinimum value is 512.\n\nDisk space left: ${DISC_SIZE} MB" 10 65 "1024" 2>${ANSWER} || return 1
+                BOOT_PART_SIZE="$(cat ${ANSWER})"
+                if [[ "${BOOT_PART_SIZE}" = "" ]]; then
+                    DIALOG --msgbox "ERROR: You have entered a invalid size, please enter again." 0 0
+                else
+                    if [[ "${BOOT_PART_SIZE}" -ge "${DISC_SIZE}" || "${BOOT_PART_SIZE}" -lt "512" || "${SBOOT_PART_SIZE}" = "${DISC_SIZE}" ]]; then
+                         DIALOG --msgbox "ERROR: You have entered an invalid size, please enter again." 0 0
+                    else
+                        BOOT_PART_SET=1
                 
-                _PART_NUM="${_UEFISYS_PART_NUM}"
-                _BOOT_PART_NUM="${_PART_NUM}"
-            fi
+                        _PART_NUM="${_UEFISYS_PART_NUM}"
+                        _BOOT_PART_NUM="${_PART_NUM}"
+                    fi
+                fi
+            done
         else
             DISC_SIZE="$((${DISC_SIZE}-${GUID_PART_SIZE}-${UEFISYS_PART_SIZE}))"
             while [[ "${BOOT_PART_SET}" = "" ]]; do
     [[ "$(${_BLKID} -p -i -o value -s PTTYPE ${DISC})" == "gpt" ]] && GUID_DETECTED="1"
     
     if [[ "${GUID_DETECTED}" == "" ]]; then
-        DIALOG --defaultno --yesno "Setup detected no GUID (gpt) partition table on ${DISC}.\n\nDo you want to convert the existing MBR table in ${DISC} to a GUID (gpt) partition table?\n\nNOTE:\nBIOS-GPT boot may not work in some Lenovo systems (irrespective of the bootloader used). " 0 0 || return 1
+        DIALOG --defaultno --yesno "Setup detected no GUID (gpt) partition table on ${DISC}.\n\nDo you want to convert the existing MBR table in ${DISC} to a GUID (gpt) partition table?" 0 0 || return 1
         sgdisk --mbrtogpt ${DISC} > ${LOG} && GUID_DETECTED="1"
     fi
     
             sort /tmp/.device-names >>${DESTDIR}/etc/fstab
         fi
         if [[ -f /tmp/.fstab ]]; then
-            # clean fstab first from /dev entries
-            sed -i -e '/^\/dev/d' ${DESTDIR}/etc/fstab
+            # clean fstab first from entries
+            sed -i -e '/^\#/!d' ${DESTDIR}/etc/fstab
             sort /tmp/.fstab >>${DESTDIR}/etc/fstab
         fi
     fi

usr/share/archboot/pacman/etc/makepkg.conf.i686

 #   These are default values for the options=() settings
 #########################################################################
 #
-# Default: OPTIONS=(strip docs libtool staticlibs emptydirs zipman purge !upx !debug)
+# Default: OPTIONS=(strip docs libtool !staticlibs emptydirs zipman purge !upx !debug)
 #  A negated option will do the opposite of the comments below.
 #
 #-- strip:      Strip symbols from binaries/libraries
 #-- upx:        Compress binary executable files using UPX
 #-- debug:      Add debugging flags as specified in DEBUG_* variables
 #
-OPTIONS=(strip docs libtool staticlibs emptydirs zipman purge !upx !debug)
+OPTIONS=(strip docs libtool !staticlibs emptydirs zipman purge !upx !debug)
 
 #-- File integrity checks to use. Valid: md5, sha1, sha256, sha384, sha512
 INTEGRITY_CHECK=(md5)

usr/share/archboot/pacman/etc/makepkg.conf.x86_64

 #   These are default values for the options=() settings
 #########################################################################
 #
-# Default: OPTIONS=(strip docs libtool staticlibs emptydirs zipman purge !upx !debug)
+# Default: OPTIONS=(strip docs libtool !staticlibs emptydirs zipman purge !upx !debug)
 #  A negated option will do the opposite of the comments below.
 #
 #-- strip:      Strip symbols from binaries/libraries
 #-- upx:        Compress binary executable files using UPX
 #-- debug:      Add debugging flags as specified in DEBUG_* variables
 #
-OPTIONS=(strip docs libtool staticlibs emptydirs zipman purge !upx !debug)
+OPTIONS=(strip docs libtool !staticlibs emptydirs zipman purge !upx !debug)
 
 #-- File integrity checks to use. Valid: md5, sha1, sha256, sha384, sha512
 INTEGRITY_CHECK=(md5)