svn commit: r222079 - head/usr.sbin/pc-sysinstall/backend
Author: jpaetzel Date: Wed May 18 20:38:28 2011 New Revision: 222079 URL: http://svn.freebsd.org/changeset/base/222079 Log: Wipeout the end of disks, home to things like gmirror metadata, backup GPT tables, and other potential evil. Submitted by: Kris Moore k...@pcbsd.org Approved by: kib (mentor) Sponsored by: iXsystems Modified: head/usr.sbin/pc-sysinstall/backend/functions-disk.sh Modified: head/usr.sbin/pc-sysinstall/backend/functions-disk.sh == --- head/usr.sbin/pc-sysinstall/backend/functions-disk.sh Wed May 18 20:29:07 2011(r222078) +++ head/usr.sbin/pc-sysinstall/backend/functions-disk.sh Wed May 18 20:38:28 2011(r222079) @@ -582,17 +582,9 @@ stop_gjournal() # 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 - [ $? -ne 0 ] return - - # 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} - + rc_nohalt dd if=/dev/zero of=${1} bs=1m count=1 + rc_nohalt dd if=/dev/zero of=${1} bs=1m oseek=`diskinfo ${1} | awk '{print int($3 / (1024*1024)) - 4;}'` } ; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r222079 - head/usr.sbin/pc-sysinstall/backend
On Wed, May 18, 2011 at 08:38:29PM +, Josh Paetzel wrote: Author: jpaetzel Date: Wed May 18 20:38:28 2011 New Revision: 222079 URL: http://svn.freebsd.org/changeset/base/222079 Log: Wipeout the end of disks, home to things like gmirror metadata, backup GPT tables, and other potential evil. If geom_mirror.ko is loaded it won't work, as gmirror keeps its components open for writing. But if this is GENERIC and geom_mirror.ko is not loaded, you should be fine. -- Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://yomoli.com pgp15eZ7lFO6D.pgp Description: PGP signature
Re: svn commit: r222079 - head/usr.sbin/pc-sysinstall/backend
On 05/18/11 17:12, Pawel Jakub Dawidek wrote: On Wed, May 18, 2011 at 08:38:29PM +, Josh Paetzel wrote: Author: jpaetzel Date: Wed May 18 20:38:28 2011 New Revision: 222079 URL: http://svn.freebsd.org/changeset/base/222079 Log: Wipeout the end of disks, home to things like gmirror metadata, backup GPT tables, and other potential evil. If geom_mirror.ko is loaded it won't work, as gmirror keeps its components open for writing. But if this is GENERIC and geom_mirror.ko is not loaded, you should be fine. Before it gets to this point it does a check and stops / clears any gmirrors on the particular disk(s), so hopefully this wont be an issue. -- Kris Moore PC-BSD Software iXsystems ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org