Deleted Added
full compact
26c26
< # $FreeBSD: head/usr.sbin/pc-sysinstall/backend/functions-disk.sh 217164 2011-01-08 20:25:00Z jpaetzel $
---
> # $FreeBSD: head/usr.sbin/pc-sysinstall/backend/functions-disk.sh 217229 2011-01-10 19:11:25Z jpaetzel $
246c246
< DISK="$1"
---
> local DISK="$1"
262a263,269
> # Destroy the disk geom
> rc_nohalt "gpart destroy ${DISK}"
>
> # Make sure we clear any hidden gpt tables
> clear_backup_gpt_table "${DISK}"
>
> # Wipe out front of disk
555a563,580
>
> # Function to wipe the potential backup gpt table from a disk
> clear_backup_gpt_table()
> {
> # Get the disk block size
> local dSize="`gpart show $1 | grep $1 | tr -s ' ' | cut -d ' ' -f 3`"
>
> # Make sure this is a valid number
> is_num "${dSize}" >/dev/null 2>/dev/null
> if [ "$?" != "0" ] ; then return ; fi
>
> # Die backup label, DIE
> echo_log "Clearing gpt backup table location on disk"
> rc_nohalt "dd if=/dev/zero of=${1} bs=512 seek=${dSize}"
>
> } ;
>
>
570,573d594
< #Erase any existing bootloader
< echo_log "Cleaning up ${_intDISK}"
< rc_halt "dd if=/dev/zero of=/dev/${_intDISK} count=2048"
<
578c599
< rc_halt "gpart add -b 34 -s 128 -t freebsd-boot ${_intDISK}"
---
> rc_halt "gpart add -b 34 -s 64 -t freebsd-boot ${_intDISK}"
591c612
< startblock="63"
---
> startblock="2016"
602,605d622
< #Erase any existing bootloader
< echo_log "Cleaning up ${_intDISK}"
< rc_halt "dd if=/dev/zero of=/dev/${_intDISK} count=2048"
<