From owner-freebsd-questions@FreeBSD.ORG Sat Mar 12 20:09:19 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 D11FA16A4CE for ; Sat, 12 Mar 2005 20:09:19 +0000 (GMT) Received: from smtp-out2.tiscali.nl (smtp-out2.tiscali.nl [195.241.79.177]) by mx1.FreeBSD.org (Postfix) with ESMTP id 05E9343D55 for ; Sat, 12 Mar 2005 20:09:19 +0000 (GMT) (envelope-from freeknossin@tiscali.nl) Received: from edsger (195-241-9-180-mx.xdsl.tiscali.nl [195.241.9.180]) by smtp-out2.tiscali.nl (Postfix) with ESMTP id 1A053B00067C; Sat, 12 Mar 2005 21:09:16 +0100 (CET) From: "Freek Nossin" To: Date: Sat, 12 Mar 2005 21:09:33 +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: <20050311173038.464be084@ale.varnet.bsd> X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 Thread-index: AcUmeWGVJY94rxirQNSqHra56itJsgAxIIkg Message-Id: <20050312200916.1A053B00067C@smtp-out2.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 20:09:20 -0000 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 > -----Original Message----- > From: Alejandro Pulver [mailto:alejandro@varnet.biz] > Sent: vrijdag 11 maart 2005 21:31 > To: Freek Nossin > Cc: 'Jerry McAllister'; freebsd-questions@freebsd.org > Subject: Re: format slice > > On Fri, 11 Mar 2005 21:16:49 +0100 > "Freek Nossin" wrote: > > > > -----Original Message----- > > > From: Jerry McAllister [mailto:jerrymc@clunix.cl.msu.edu] > > > Sent: vrijdag 11 maart 2005 21:00 > > > To: Freek Nossin > > > Cc: freebsd-questions@freebsd.org; alejandro@varnet.biz > > > Subject: Re: format slice > > > > > > > > > > > Thank you for your suggestions, I followed them and this is what > > > happened: > > > > > > > > pcwin451# fdisk -s > > > > /dev/ad0: 39704 cyl 16 hd 63 sec > > > > Part Start Size Type Flags > > > > 1: 63 20820177 0x07 0x00 > > > > 2: 20820240 19201392 0xa5 0x80 > > > > > > > > Part 1 is the one I want to convert to a freebsd slice. > > > > > > > > Now I used fdisk -f with the input > > > > > > > > p 1 0 0 0 > > > > > > > > the operation succeeded. I did again: > > > > > > > > pcwin451# fdisk -s > > > > /dev/ad0: 39704 cyl 16 hd 63 sec > > > > Part Start Size Type Flags > > > > 2: 20820240 19201392 0xa5 0x80 > > > > > > > > And this was indeed the output I expected. So I thought lets see > > > > what sysinstall thinks of all this. Selecting fdisk in the menu > > > > showed me a > > > disk > > > > layout where the NTFS partition still was on the disk. > > > > > > > > Disk name: ad0 FDISK > > > > Partition Editor > > > > DISK Geometry: 39704 cyls/16 heads/63 sectors = 40021632 sectors > > > (19541MB) > > > > > > > > Offset Size(ST) End Name PType Desc > > > > Subtype Flags > > > > > > > > 0 63 62 - 12 unused > > > > 0 > > > > > > > > 63 20820177 20820239 ad0s1 4 NTFS/HPFS/QNX > > > > 7 > > > > 20820240 19201392 40021631 ad0s2 8 freebsd > > > > 165 > > > > > > > > > > > > How can this be? I've always assumed that sysinstall uses the > > > > fdisk > > > tool? > > > > And which one is "correct"? Is it wise to try creating a new slice > > > > with fdisk? > > > > > > Well, is one of them reading only the in-memory label and the other > > > reading the label on the disk? When you did the fdisk, did you > > > make sure it changed on disk. Then, did the in-memory label get > > > updated? > > > > > > ////jerry > > > > > > /stand/sysinstall would be the one that read the in-memory label. The > > other way around seems impossible to me. But then how can these two be > > different? I did close /stand/sysinstall and restarted. The in memory > > one *should* be updated right? If this wasn't the case than it seems > > to me like bug in sysinstall, or more likely, freebsd itself. > > Normally I should simply try rebooting the system and all ambiguities > > should be solved. The problem is I'm working remote and rebooting is > > kind of a risk. > > > > _______________________________________________ > > 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" > > Hello, > > I do not know about that, but I think the best option is to do the > procedure manually, as indicated by Jerry. > > Best Regards, > Ale