From owner-freebsd-questions@FreeBSD.ORG Sat Mar 12 22:42:51 2005 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 BE2DD16A4CE for ; Sat, 12 Mar 2005 22:42:51 +0000 (GMT) Received: from relay01.pair.com (relay01.pair.com [209.68.5.15]) by mx1.FreeBSD.org (Postfix) with SMTP id 07F0243D2F for ; Sat, 12 Mar 2005 22:42:49 +0000 (GMT) (envelope-from alejandro@varnet.biz) Received: (qmail 67819 invoked from network); 12 Mar 2005 22:42:47 -0000 Received: from unknown (HELO ale.varnet.bsd) (unknown) by unknown with SMTP; 12 Mar 2005 22:42:47 -0000 X-pair-Authenticated: 200.115.214.28 Date: Sat, 12 Mar 2005 19:43:30 -0300 From: Alejandro Pulver To: "Freek Nossin" Message-ID: <20050312194330.30b24cab@ale.varnet.bsd> In-Reply-To: <20050312200916.1A053B00067C@smtp-out2.tiscali.nl> References: <20050311173038.464be084@ale.varnet.bsd> <20050312200916.1A053B00067C@smtp-out2.tiscali.nl> X-Mailer: Sylpheed-Claws 0.9.12b (GTK+ 1.2.10; i386-portbld-freebsd5.3) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit cc: 'Jerry McAllister' cc: freebsd-questions@freebsd.org Subject: Re: format slice 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: Sat, 12 Mar 2005 22:42:52 -0000 On Sat, 12 Mar 2005 21:09:33 +0100 "Freek Nossin" wrote: > Hello, formatting is almost complete... > > My new problem is that bsdlabel didn't create a new partition after > bsdlabel-e ad0s1. Below is an extensive output of some commands, but > you might want to skip to the last alinea ;). > > I used fdisk to create a new slice. I copied the exact format of the > previous slice (on which the windows installation resided), so I > didn't have to worry about the "overlapping slices". I got this nice > output: > > pcwin451# fdisk > ******* Working on device /dev/ad0 ******* > parameters extracted from in-core disklabel are: > cylinders=39704 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=39704 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 0 (0000),(unused) > start 63, size 20820177 (10166 Meg), flag 0 > beg: cyl 0/ head 1/ sector 1; > end: cyl 174/ head 15/ sector 63 > The data for partition 2 is: > sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) > start 20820240, size 19201392 (9375 Meg), flag 80 (active) > beg: cyl 1023/ head 255/ sector 63; > end: cyl 1023/ head 15/ sector 63 > The data for partition 3 is: > > The data for partition 4 is: > > > Part 1 is the new slice which I want to use. > Then I used bsdlabel to create a label on ad0s1 by typing: > > #bsdlabel -w ad0s1 > > And following the handbook, my next command was: > > #bsdlabel -e ad0s1 > > Now I wrote in the text editor (I admit, after 4 tries and a lot of > reading...): > > # /dev/ad0s1: > 8 partitions: > # size offset fstype [fsize bsize bps/cpg] > c: 20820177 0 unused 0 0 # "raw" part, > don't e: 20820177 0 4.2BSD 2048 16384 32776 > > > now I wanted to use newfs to create a file system on ad0s1e, but it > could not. My problem is illustrated by my ls output: > > pcwin451# ls /dev/ad* > /dev/ad0 /dev/ad0s2 /dev/ad0s2b /dev/ad0s2d > /dev/ad0s1 /dev/ad0s2a /dev/ad0s2c /dev/ad0s2e > > bsdlabel -e didn't create a new partition, although the output of > bsdlabel ad0s1 is: > > pcwin451# disklabel ad0s1 > # /dev/ad0s1: > 8 partitions: > # size offset fstype [fsize bsize bps/cpg] > c: 20820177 0 unused 0 0 # "raw" part, > don't > edit > e: 20820161 16 4.2BSD 2048 16384 32776 > > How can this be? (and how do I fix it...?) > > Thanks for your help already so far > > Freek > Hello, In my second disk I have free space between two slices so I tried the procedure by myself. When I did a 'bsdlabel -w /dev/adXsY' (without editing them) I ended with a partition labeled 'a', and it instantly appeared in '/dev/'. Then I did what you have done ('bsdlabel -e ') and it also appeared in '/dev'. I do not know about this, but maybe this helps: 1) Try with only 'bsdlabel -w '. The partition should appear as 'a'. 2) If the partition does not appear in '/dev/' then you can reinitialize the ATA channel (0 or 1, I think your disk is in 0) your disk is in, with 'atacontrol reinit '. For a list of ATA channels with the devices do 'atacontrol list'. ***WARNING***: do ***NOT*** 'detach' and 'attach' the channel your device your running hard disk (that contain the FreeBSD you are running) is connected to (but you can safely 'reinit' it). A 'detach' removes the disk and slices/partitions from the kernel and powers down the devices in that channel, so FreeBSD will stall when it tries to read/write on its partitions ('/', '/usr', etc.). I could detach and atach it once (in less than 5 seconds), but the other time it crashed my machine (I had to rewrite this mail three times, because I was experimenting with 'atacontrol'). It is more safe to reboot the machine. Best Regards, Ale