Changeset 203213c


Ignore:
Timestamp:
07/20/15 07:03:40 (6 weeks ago)
Author:
Kris Moore <kris@…>
Branches:
master, releng/10.2
Children:
293508c
Parents:
9a71e6d
Message:

When doing install to partition / free space, we don't need to
set partscheme={GPT|MBR}, this will be determined by backend.

In backend if partscheme is not set and doing full-disk install,
switch to GPT as the default layout

Files:
5 edited

Legend:

Unmodified
Added
Removed
  • src-qt5/pc-installgui/installer.cpp

    r9a71e6d r203213c  
    5252 
    5353    // We use GPT by default now 
    54     loadGPT = true; 
     54    sysPartType="GPT"; 
    5555 
    5656    // No optional components by default 
     
    302302  // If over 1.99TB, we should use GPT mode 
    303303  if ( totalSize > 1999900 ) 
    304     loadGPT=true; 
     304    sysPartType="GPT"; 
    305305 
    306306  // Add the main zfs pool with standard partitions 
     
    504504  if ( radioRestore->isChecked() ) 
    505505    wDisk->setRestoreMode(); 
    506   connect(wDisk, SIGNAL(saved(QList<QStringList>, QString, bool, QString, bool, QString)), this, SLOT(slotSaveDiskChanges(QList<QStringList>, QString, bool, QString, bool, QString))); 
     506  connect(wDisk, SIGNAL(saved(QList<QStringList>, QString, QString, QString, bool, QString)), this, SLOT(slotSaveDiskChanges(QList<QStringList>, QString, QString, QString, bool, QString))); 
    507507  wDisk->show(); 
    508508  wDisk->raise(); 
     
    534534} 
    535535 
    536 void Installer::slotSaveDiskChanges(QList<QStringList> newSysDisks, QString BL, bool GPT, QString zName, bool zForce, QString biosMode ) 
     536void Installer::slotSaveDiskChanges(QList<QStringList> newSysDisks, QString BL, QString partType, QString zName, bool zForce, QString biosMode ) 
    537537{ 
    538538 
     
    550550 
    551551  // Save the new disk layout 
    552   loadGPT = GPT; 
     552  sysPartType=partType; 
    553553  sysFinalDiskLayout = newSysDisks; 
    554554  textEditDiskSummary->clear(); 
     
    11801180    if ( tmpSlice.at(0).isNumber() ) { 
    11811181      // If we are installing to a GPT partition, mark it as such 
    1182       loadGPT=true; 
     1182      sysPartType="GPT"; 
    11831183      tmpList << "partition=p" + tmpSlice; 
    11841184    } else { 
     
    11901190 
    11911191    // Set the GPT/MBR options 
    1192     if ( loadGPT )  
     1192    if ( sysPartType == "GPT" )  
    11931193      tmpList << "partscheme=GPT"; 
    1194     else 
     1194    if ( sysPartType == "MBR" ) 
    11951195      tmpList << "partscheme=MBR"; 
    11961196 
  • src-qt5/pc-installgui/installer.h

    rfee3ea8 r203213c  
    4949    // Disk slots 
    5050    void slotDiskCustomizeClicked(); 
    51     void slotSaveDiskChanges(QList<QStringList>, QString, bool, QString, bool, QString); 
     51    void slotSaveDiskChanges(QList<QStringList>, QString, QString, QString, bool, QString); 
    5252 
    5353    // Slots for the installation 
     
    135135    QList<QStringList> sysFinalDiskLayout; // Our lists which contains the final disk layout 
    136136    QString bootLoader; 
    137     bool loadGPT; 
     137    QString sysPartType; 
    138138    int systemMemory; // Ammount of system RAM we have in MB 
    139139    QList<QStringList> listComponents; // QStringList for our available components 
  • src-qt5/pc-installgui/wizardDisk.cpp

    r95f9eb6 r203213c  
    135135{ 
    136136  QString bootLoader; 
    137   bool useGPT = false; 
     137  QString partType="none"; 
    138138  bool force4K = false; 
    139139  QString zpoolName; 
     
    146146 
    147147  if (comboPartition->currentIndex() == 0 ) 
    148     useGPT = radioGPT->isChecked(); 
     148    if ( radioGPT->isChecked() ) 
     149      partType="GPT"; 
     150    else 
     151      partType="MBR"; 
    149152 
    150153  // Get the boot-loader 
     
    153156  // When doing advanced ZFS setups, make sure to use GPT 
    154157  if ( radioAdvanced->isChecked() && groupZFSOpts->isChecked() ) 
    155     useGPT = true; 
     158    partType="GPT"; 
    156159 
    157160  // When doing advanced ZFS setups, check if 4K is enabled 
     
    163166 
    164167  if ( radioExpert->isChecked() ) 
    165     emit saved(sysFinalDiskLayout, QString("NONE"), false, zpoolName, force4K, QString("")); 
     168    emit saved(sysFinalDiskLayout, QString("NONE"), partType, zpoolName, force4K, QString("")); 
    166169  else 
    167     emit saved(sysFinalDiskLayout, bootLoader, useGPT, zpoolName, force4K, biosMode); 
     170    emit saved(sysFinalDiskLayout, bootLoader, partType, zpoolName, force4K, biosMode); 
    168171  close(); 
    169172} 
  • src-qt5/pc-installgui/wizardDisk.h

    r1e77bb0 r203213c  
    9797 
    9898signals: 
    99     void saved(QList<QStringList>, QString, bool, QString, bool, QString); 
     99    void saved(QList<QStringList>, QString, QString, QString, bool, QString); 
    100100 
    101101} ; 
  • src-sh/pcbsd-utils/pc-sysinstall/backend/functions-disk.sh

    r3086e9f r203213c  
    511511            fi 
    512512 
    513             if [ "$PSCHEME" = "MBR" -o -z "$PSCHEME" ] ; then 
    514               PSCHEME="MBR" 
     513            if [ "$PSCHEME" = "GPT" -o -z "$PSCHEME" ] ; then 
     514              PSCHEME="GPT" 
     515              tmpSLICE="${DISK}p1"   
     516            else 
    515517              tmpSLICE="${DISK}s1"   
    516             else 
    517               tmpSLICE="${DISK}p1"   
    518518            fi 
    519519 
Note: See TracChangeset for help on using the changeset viewer.