Changeset 29e7001


Ignore:
Timestamp:
01/25/14 18:19:21 (7 months ago)
Author:
Eric Turgeon <ericturgeon.bsd@…>
Branches:
master, releng/10.0.1, releng/10.0.2, releng/10.0.3
Children:
6340689
Parents:
63b9307
Message:

Adding gpt partitioning the GhostBSD way.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src-sh/pc-sysinstall/backend/functions-disk.sh

    r63b9307 r29e7001  
    775775  stop_gjournal "${slice}" 
    776776 
    777   # Make sure we have disabled swap on this drive 
    778   if [ -e "${slice}b" ] 
     777  if [ "${INSTALLTYPE}" = "GhostBSD" ] 
    779778  then 
    780    swapoff ${slice}b >/dev/null 2>/dev/null 
    781    swapoff ${slice}b.eli >/dev/null 2>/dev/null 
    782   fi 
    783  
    784   # Modify partition type 
    785   echo_log "Running gpart modify on ${DISK}" 
    786   rc_halt "gpart modify -t freebsd -i ${slicenum} ${DISK}" 
    787   sleep 2 
    788  
    789   # Clean up old partition 
    790   echo_log "Cleaning up $slice" 
    791   rc_halt "dd if=/dev/zero of=${DISK}p${slicenum} count=1024" 
    792  
    793   sleep 4 
    794  
    795   # Init the MBR partition 
    796   rc_halt "gpart create -s BSD ${DISK}p${slicenum}" 
    797  
    798   # Stamp the bootloader 
    799   sleep 4 
    800   rc_halt "gpart bootcode -b /boot/boot ${DISK}p${slicenum}" 
    801  
    802   # Set the slice to the format we'll be using for gpart later 
    803   if [ -a "${INSTALLTYPE}" = "GhostBSD" ] 
    804   then 
     779    if [ "${_intBOOT}" = "GRUB" ] ; then 
     780      rc_halt "gpart modify -t bios-boot ${DISK}" 
     781      # Doing a GRUB stamp? Lets save it for post-install 
     782      echo "${DISK}" >> ${TMPDIR}/.grub-install 
     783    else 
     784      rc_halt "gpart modify -t freebsd-boot -i ${slicenum} ${DISK}" 
     785      echo_log "Stamping boot sector on ${DISK}" 
     786      rc_halt "gpart bootcode -b /boot/pmbr ${DISK}" 
     787    fi 
    805788    slice=`echo "${1}:${3}:gpt" | sed 's|/|-|g'` 
    806789  else 
     790    # Make sure we have disabled swap on this drive 
     791    if [ -e "${slice}b" ] 
     792    then 
     793     swapoff ${slice}b >/dev/null 2>/dev/null 
     794     swapoff ${slice}b.eli >/dev/null 2>/dev/null 
     795    fi 
     796    # Modify partition type 
     797    echo_log "Running gpart modify on ${DISK}" 
     798    rc_halt "gpart modify -t freebsd -i ${slicenum} ${DISK}" 
     799    sleep 2 
     800    # Clean up old partition 
     801    echo_log "Cleaning up $slice" 
     802    rc_halt "dd if=/dev/zero of=${DISK}p${slicenum} count=1024" 
     803    sleep 4 
     804    # Init the MBR partition 
     805    rc_halt "gpart create -s BSD ${DISK}p${slicenum}" 
     806    # Stamp the bootloader 
     807    sleep 4 
     808    rc_halt "gpart bootcode -b /boot/boot ${DISK}p${slicenum}" 
     809    # Set the slice to the format we'll be using for gpart later 
    807810    slice=`echo "${1}:${3}:gptslice" | sed 's|/|-|g'` 
    808811  fi 
    809  
    810812  # Lets save our slice, so we know what to look for in the config file later on 
    811813  if [ -z "$WORKINGSLICES" ] 
Note: See TracChangeset for help on using the changeset viewer.