From owner-freebsd-questions@FreeBSD.ORG Thu Sep 4 08:41:07 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 086C316A4C0 for ; Thu, 4 Sep 2003 08:41:07 -0700 (PDT) Received: from stork.mail.pas.earthlink.net (stork.mail.pas.earthlink.net [207.217.120.188]) by mx1.FreeBSD.org (Postfix) with ESMTP id F0DE243FFB for ; Thu, 4 Sep 2003 08:41:02 -0700 (PDT) (envelope-from algould@datawok.com) Received: from 21-207.lctv-b4.cablelynx.com ([24.204.21.207] helo=yoda.datawok.com) by stork.mail.pas.earthlink.net with asmtp (TLSv1:RC4-MD5:128) (Exim 3.33 #1) id 19uwEE-00016u-00; Thu, 04 Sep 2003 08:40:58 -0700 From: "Andrew L. Gould" To: Jerry McAllister , pnmurphy@cogeco.ca (Paul Murphy) Date: Thu, 4 Sep 2003 10:41:11 -0500 User-Agent: KMail/1.5 References: <200309041435.h84EZ3ok012522@clunix.cl.msu.edu> In-Reply-To: <200309041435.h84EZ3ok012522@clunix.cl.msu.edu> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200309041041.11669.algould@datawok.com> X-ELNK-Trace: ee791d459e3d6817d780f4a490ca69564776905774d2ac4b68c11618e4244a9ca12d328c13287aeb350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c 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 15:41:07 -0000 On Thursday 04 September 2003 09:35 am, Jerry McAllister wrote: > 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 If you have a bootable DOS disk with fdisk, you can clear the MBR without destroying partitions by executing: fdisk /mbr In my pre-FreeBSD days, I used to do this to clear LILO out after removing a Linux installation so that it would boot to Windows. Best of luck, Andrew Gould