Changeset 2809

Show
Ignore:
Timestamp:
09/23/08 07:57:22 (18 months ago)
Author:
kris
Message:

Updated our code which does the fdisk of a particular partition, this should fix a reported
error of partition alignment getting thrown off during install. Now values will not be
caculated, rather they will be pulled directly from fdisk, and allow fdisk to set the start / end blocks properly

Location:
pcbsd
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • pcbsd/branches/7.0/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.FormatPartition.sh

    r2560 r2809  
    1616rawslice="`echo ${2} | cut -d '/' -f 3`" 
    1717 
     18# Get the number of the slice we are working on 
     19slicenum="`echo ${2} | awk '{print substr($0,length,1)}'`" 
     20 
     21 
    1822# Check if we need to shutdown any journals on this partition 
    1923ls ${slice}*.journal* >/dev/null 2>/dev/null 
     
    3135 
    3236# Make sure we have disabled swap on this drive 
    33 swapoff ${slice}b 
     37if [ -e "${slice}b" ] 
     38then 
     39  swapoff ${slice}b 
     40fi 
     41 
     42# Get the fdisk -s output of this device 
     43fdisk -s /dev/${device} | grep -v "${device}:" | grep "${slicenum}:" | tr -s " " > /tmp/fdiskblk 
     44startblock="`cat /tmp/fdiskblk | cut -d ' ' -f 3`" 
     45endblock="`cat /tmp/fdiskblk | cut -d ' ' -f 4`" 
     46 
     47# Create the new fdiskconfig file now to set this partition to type 165 
     48echo "p ${slicenum}     165     ${startblock}   ${endblock}" > /tmp/fdiskconfig 
    3449 
    3550sleep 4 
  • pcbsd/trunk/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.FormatPartition.sh

    r2560 r2809  
    1616rawslice="`echo ${2} | cut -d '/' -f 3`" 
    1717 
     18# Get the number of the slice we are working on 
     19slicenum="`echo ${2} | awk '{print substr($0,length,1)}'`" 
     20 
     21 
    1822# Check if we need to shutdown any journals on this partition 
    1923ls ${slice}*.journal* >/dev/null 2>/dev/null 
     
    3135 
    3236# Make sure we have disabled swap on this drive 
    33 swapoff ${slice}b 
     37if [ -e "${slice}b" ] 
     38then 
     39  swapoff ${slice}b 
     40fi 
     41 
     42# Get the fdisk -s output of this device 
     43fdisk -s /dev/${device} | grep -v "${device}:" | grep "${slicenum}:" | tr -s " " > /tmp/fdiskblk 
     44startblock="`cat /tmp/fdiskblk | cut -d ' ' -f 3`" 
     45endblock="`cat /tmp/fdiskblk | cut -d ' ' -f 4`" 
     46 
     47# Create the new fdiskconfig file now to set this partition to type 165 
     48echo "p ${slicenum}     165     ${startblock}   ${endblock}" > /tmp/fdiskconfig 
    3449 
    3550sleep 4