Date: Thu, 4 Sep 2003 10:35:02 -0400 (EDT) From: Jerry McAllister <jerrymc@clunix.cl.msu.edu> To: pnmurphy@cogeco.ca (Paul Murphy) Cc: FreeBSD Questions <freebsd-questions@freebsd.org> Subject: Re: Undo MBR Message-ID: <200309041435.h84EZ3ok012522@clunix.cl.msu.edu> In-Reply-To: <20030903181348.5cbfcabb.pnmurphy@cogeco.ca> from "Paul Murphy" at Sep 03, 2003 06:13:48 PM
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200309041435.h84EZ3ok012522>