Date: Sat, 12 Mar 2005 21:09:33 +0100 From: "Freek Nossin" <freeknossin@tiscali.nl> To: <freebsd-questions@freebsd.org> Cc: 'Jerry McAllister' <jerrymc@clunix.cl.msu.edu> Subject: RE: format slice Message-ID: <20050312200916.1A053B00067C@smtp-out2.tiscali.nl> In-Reply-To: <20050311173038.464be084@ale.varnet.bsd>
next in thread | previous in thread | raw e-mail | index | archive | help
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: <UNUSED> The data for partition 4 is: <UNUSED> 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" <freeknossin@tiscali.nl> 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 <file> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050312200916.1A053B00067C>