From owner-freebsd-questions@FreeBSD.ORG Mon Apr 21 16:04:19 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 8183537B401 for ; Mon, 21 Apr 2003 16:04:19 -0700 (PDT) Received: from adsl-64-161-78-226.dsl.lsan03.pacbell.net (adsl-64-161-78-226.dsl.lsan03.pacbell.net [64.161.78.226]) by mx1.FreeBSD.org (Postfix) with SMTP id A7BDC43FD7 for ; Mon, 21 Apr 2003 16:04:18 -0700 (PDT) (envelope-from oremanj@adsl-64-161-78-226.dsl.lsan03.pacbell.net) Received: (qmail 71081 invoked by uid 1001); 21 Apr 2003 23:04:36 -0000 Date: Mon, 21 Apr 2003 16:04:36 -0700 From: Joshua Oreman To: James Pancoast Message-ID: <20030421230436.GF70701@webserver.get-linux.org> References: <200304211812.h3LIC3iY015231@tatooine.compnor.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200304211812.h3LIC3iY015231@tatooine.compnor.net> User-Agent: Mutt/1.4i cc: questions@freebsd.org Subject: Re: Problem formatting new hard drive. 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: Mon, 21 Apr 2003 23:04:19 -0000 On Mon, Apr 21, 2003 at 02:11:58PM -0400 or thereabouts, James Pancoast seemed to write: > > > I'm new to FreeBSD (I installed it on a system this weekend). I've been > trying to add a new Hard drive, following the directions at: > http://www.freebsd.org/doc/en_US.ISO8859-1/articles/formatting-media/x66.html > > Going through sysinstall didn't work, so I tried the command line > (dd if=/dev/zero of=/dev/ad2 count=2). However, when I run that command (as > root), I get "Operation not permitted". Anyone have an idea what I'm doing > wrong? Are you running 5.x? The GEOM code in the kernel puts some extra sanity checks in. I bet some partition on the disk is being used for something. Try this: # mount | grep ad2 # swapinfo | grep ad2 If any of those return anything, swapoff/umount the relevant partitions. Also, if you install /usr/ports/graphics/graphviz, you can get a diagram of what GEOM thinks is in use: # sysctl -b kern.geom.confdot > temp.dot # dot -Tgif -o temp.gif temp.dot Then view temp.gif with your favorite gfx program. Look for 'locks' info. If you're running 4.x, or if this fails, check permissions on the device. Hope this helps, -- Josh > > The drive used to be in a Linux system, and an fdisk /dev/ad2 gives this: > ******* Working on device /dev/ad2 ******* > parameters extracted from in-core disklabel are: > cylinders=25232 heads=16 sectors/track=63 (1008 blks/cyl) > > Figures below won't work with BIOS for partitions not in cyl 1 > parameters to be used for BIOS calculations are: > cylinders=25232 heads=16 sectors/track=63 (1008 blks/cyl) > > Media sector size is 512 > Warning: BIOS sector numbering starts with sector 1 > Information from DOS bootblock is: > The data for partition 1 is: > sysid 131 (0x83),(Linux native) > start 63, size 25433793 (12418 Meg), flag 0 > beg: cyl 0/ head 1/ sector 1; > end: cyl 1023/ head 15/ sector 63 > The data for partition 2 is: > > The data for partition 3 is: > > The data for partition 4 is: > > > Thanks. > > > -- > James Pancoast > jamesp@uversa.com > www.uversa.com > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"