From owner-freebsd-questions@FreeBSD.ORG Thu Sep 4 07:35:12 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7884616A4BF for ; Thu, 4 Sep 2003 07:35:12 -0700 (PDT) Received: from clunix.cl.msu.edu (clunix.cl.msu.edu [35.9.2.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9203043FE0 for ; Thu, 4 Sep 2003 07:35:11 -0700 (PDT) (envelope-from jerrymc@clunix.cl.msu.edu) Received: from clunix.cl.msu.edu (localhost [127.0.0.1]) by clunix.cl.msu.edu (8.12.9/8.12.9) with ESMTP id h84EZ7Og012523; Thu, 4 Sep 2003 10:35:07 -0400 (EDT) Received: (from jerrymc@localhost) by clunix.cl.msu.edu (8.12.9/8.12.9/Submit) id h84EZ3ok012522; Thu, 4 Sep 2003 10:35:03 -0400 (EDT) From: Jerry McAllister Message-Id: <200309041435.h84EZ3ok012522@clunix.cl.msu.edu> To: pnmurphy@cogeco.ca (Paul Murphy) Date: Thu, 4 Sep 2003 10:35:02 -0400 (EDT) In-Reply-To: <20030903181348.5cbfcabb.pnmurphy@cogeco.ca> from "Paul Murphy" at Sep 03, 2003 06:13:48 PM X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: FreeBSD Questions Subject: Re: Undo MBR X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2003 14:35:12 -0000 Hi, > I have just installed FBSD-CURRENT on a test box. During install I > unwittingly installed a BootMgr entry for the second HDD (it will > just be a data disk, no need to boot from it). > > If I do 'dd if=/dev/zero of=/dev/rad2 count=15' will this "erase" the > BootMgr or will I have to redo Fdisk and etcetera. There is no data > on the disk yet so this would be no hardship, but is there a "proper" > way of doing what I want? So, if there is nothing to be lost, just try it out and see what happens. Smoke testing is a tried and true technique. Anyway, you really don't need to bother, but yes, that should wipe it. There are some examples at the bottom of 'man disklabel' that you might want to check out - even though you really are talking about fdisk stuff. The fdisk man page is weak, for example it doesn't even document the -I switch (tho it lists it at the top) which is what you want. You kind of have to read the disklabel man page in conjunction with the fdisk man page to make any sense of things, and then it may still take some experimenting. >From man disklabel: dd if=/dev/zero of=/dev/da0 bs=512 count=32 fdisk -BI da0 dd if=/dev/zero of=/dev/da0s1 bs=512 count=32 disklabel -w -B da0s1 auto disklabel -e da0s1 Completely wipe any prior information on the disk, creating a new bootable disk with a DOS partition table containing one ``whole-disk'' slice. Then initialize the slice, then edit it to your needs. The dd commands are optional, but may be necessary for some BIOSes to properly recognize the disk. Actually, the first dd sometimes fails, if the disk has never had anything put on it. If so, just ignore it and go on with the fdisk. ////jerry