Ignore:
Timestamp:
10/18/13 08:48:18 (9 months ago)
Author:
Kris Moore <kris@…>
Branches:
master, 9.2-release, releng/10.0, releng/10.0.1, releng/10.0.2
Children:
01ffd8dd
Parents:
04421bd
Message:

Add option to enable installing to a SSD, which will disable SWAP / atime

Trac Ticket: https://trac.pcbsd.org/ticket/740

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src-qt4/pc-installgui/wizardDisk.cpp

    rb1a3938 r4fb8829  
    153153        break; 
    154154     case Page_BasicDisk: 
     155       if (checkSSD->isChecked()) 
     156         pushSwapSize->setVisible(false); 
     157       else 
     158         pushSwapSize->setVisible(true); 
     159 
    155160       if (radioBasic->isChecked()) 
    156161         return Page_Confirmation; 
     
    414419     fsType= "ZFS"; 
    415420 
     421    QString rootOpts=""; 
     422    if ( checkSSD->isChecked() ) 
     423        rootOpts="(atime=off)"; 
     424 
    416425     // This lets the user do nifty stuff like a mirror/raid post-install with a single zpool command 
    417     fileSystem << targetDisk << targetSlice << "/,/tmp(compress=lz4),/usr(canmount=off),/usr/home,/usr/jails,/usr/obj(compress=lz4),/usr/pbi,/usr/ports(compress=lz4),/usr/ports/distfiles(compress=lz4),/usr/src(compress=lz4),/var(canmount=off),/var/audit(compress=lz4),/var/log(compress=lz4),/var/tmp(compress=lz4)" << fsType << tmp.setNum(totalSize) << "" << tmpPass; 
     426    fileSystem << targetDisk << targetSlice << "/" + rootOpts + ",/tmp(compress=lz4),/usr(canmount=off),/usr/home,/usr/jails,/usr/obj(compress=lz4),/usr/pbi,/usr/ports(compress=lz4),/usr/ports/distfiles(compress=lz4),/usr/src(compress=lz4),/var(canmount=off),/var/audit(compress=lz4),/var/log(compress=lz4),/var/tmp(compress=lz4)" << fsType << tmp.setNum(totalSize) << "" << tmpPass; 
    418427    sysFinalDiskLayout << fileSystem; 
    419428    fileSystem.clear(); 
    420429 
    421     // Now add swap space 
    422     fileSystem << targetDisk << targetSlice << "SWAP" << "SWAP" << tmp.setNum(swapsize) << "" << ""; 
    423     sysFinalDiskLayout << fileSystem; 
    424     fileSystem.clear(); 
     430    // Now add swap space if NOT on a SSD 
     431    if ( ! checkSSD->isChecked() ) { 
     432      fileSystem << targetDisk << targetSlice << "SWAP" << "SWAP" << tmp.setNum(swapsize) << "" << ""; 
     433      sysFinalDiskLayout << fileSystem; 
     434      fileSystem.clear(); 
     435    } 
    425436 
    426437    //qDebug() << "Auto-Gen FS:" <<  fileSystem; 
     
    900911 
    901912  fileSystem.clear(); 
    902   fileSystem << targetDisk << targetSlice << "SWAP" << "SWAP" << tmp.setNum(swapsize) << "" << ""; 
    903   sysFinalDiskLayout << fileSystem; 
     913  if ( ! checkSSD->isChecked() ) { 
     914    fileSystem << targetDisk << targetSlice << "SWAP" << "SWAP" << tmp.setNum(swapsize) << "" << ""; 
     915    sysFinalDiskLayout << fileSystem; 
     916  } 
    904917 
    905918  qDebug() <<"AutoLayout:" << sysFinalDiskLayout; 
Note: See TracChangeset for help on using the changeset viewer.