From owner-freebsd-questions@FreeBSD.ORG Sat Mar 12 23:03:52 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 7635F16A4CE for ; Sat, 12 Mar 2005 23:03:52 +0000 (GMT) Received: from smtp-out3.tiscali.nl (smtp-out3.tiscali.nl [195.241.79.178]) by mx1.FreeBSD.org (Postfix) with ESMTP id AAF3143D2D for ; Sat, 12 Mar 2005 23:03:51 +0000 (GMT) (envelope-from freeknossin@tiscali.nl) Received: from edsger (195-241-9-180-mx.xdsl.tiscali.nl [195.241.9.180]) by smtp-out3.tiscali.nl (Postfix) with ESMTP id 1C39F801175C; Sun, 13 Mar 2005 00:03:49 +0100 (CET) From: "Freek Nossin" To: Date: Sun, 13 Mar 2005 00:04:06 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.6353 In-Reply-To: <20050312194330.30b24cab@ale.varnet.bsd> Thread-Index: AcUnVNJd5vKabQMvQnup9w8lIUQfFwAAtfiA X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 Message-Id: <20050312230349.1C39F801175C@smtp-out3.tiscali.nl> cc: 'Alejandro Pulver' cc: 'Jerry McAllister' 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 23:03:52 -0000 > -----Original Message----- > From: Alejandro Pulver [mailto:alejandro@varnet.biz] > Sent: zaterdag 12 maart 2005 23:44 > To: Freek Nossin > Cc: freebsd-questions@freebsd.org; 'Jerry McAllister' > Subject: Re: format slice > > 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 Thank, but unfortunately it dit not help pcwin451# atacontrol reinit 0 Master: ad0 ATA/ATAPI revision 6 Slave: no device present pcwin451# bsdlabel -w ad0s1 pcwin451# ls /dev/ad* /dev/ad0 /dev/ad0s2 /dev/ad0s2b /dev/ad0s2d /dev/ad0s1 /dev/ad0s2a /dev/ad0s2c /dev/ad0s2e