From owner-freebsd-questions Thu Dec 25 11:00:25 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id LAA25484 for questions-outgoing; Thu, 25 Dec 1997 11:00:25 -0800 (PST) (envelope-from owner-freebsd-questions) Received: from alpo.whistle.com (alpo.whistle.com [207.76.204.38]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id LAA25473 for ; Thu, 25 Dec 1997 11:00:22 -0800 (PST) (envelope-from julian@whistle.com) Received: (from daemon@localhost) by alpo.whistle.com (8.8.5/8.8.5) id KAA07221; Thu, 25 Dec 1997 10:57:17 -0800 (PST) Received: from UNKNOWN(), claiming to be "current1.whistle.com" via SMTP by alpo.whistle.com, id smtpd007219; Thu Dec 25 10:57:17 1997 Date: Thu, 25 Dec 1997 10:54:23 -0800 (PST) From: Julian Elischer To: Dick van den Burg cc: Doug White , Dick van den Burg , freebsd-questions@freebsd.org Subject: Re: How to add slice to existing FS In-Reply-To: <199712251102.MAA27710@burg.is.ge.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Probably you shouldn't use partition 'c' as it's special. do the folowing: disklabel -e -r /dev/rsd0s4 (or whatever the device is called) and add an 'a' entry that is exactly like the 'c' entry, but give it a blocksize and fragsize (use disklabel to look at your existing partitions for examples) (disklabel -e will put you in whatever editor is in your $EDITOR variable) then change fstab to match, and you will be 'safer' you will not need to move any data or re-newfs.. 'c' is special and in my new slice code is 'left out' for various reasons anyhow. This proceedure is very low risk (assuming you get he correct disk :-) julian On Thu, 25 Dec 1997, Dick van den Burg wrote: > Doug, > > Thanks very much. I used /stand/sysinstall to delete slice 4 and > created the slice again as a freebsd partition. I then used the > disklabel editor to create a new partition in the slice. When I tried > to write the disklable sysinstall died with a segmentation > fault. However I was able to newfs /dev/rsd0s4c. It probably is using > the default disklabel, as I specified sd0s4e in the sysinstall > disklabel. > > In retrospect I probably could have used fdisk to change the type of > the slice to FBSD and the just do a newfs. In my case the FBSD slice > that contains the root filesystem is before the new fs in slice 3. If > this was not the case, would I be able to boot from the second slice > of type 165? The boot prompt only allows a drive and a partition, not > a slice. > > Thanks again ... Dick > > Doug White wrote: > > On Tue, 23 Dec 1997, Dick van den Burg wrote: > > > > > I have the following slices: > > > > > > burg@vdb:~$ /sbin/fdisk sd0 > > > ******* Working on device /dev/rsd0 ******* > > > parameters extracted from in-core disklabel are: > > > cylinders=1048 heads=127 sectors/track=63 (8001 blks/cyl) > > > > > > Figures below won't work with BIOS for partitions not in cyl 1 > > > parameters to be used for BIOS calculations are: > > > cylinders=1048 heads=127 sectors/track=63 (8001 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 6,(Primary 'big' DOS (> 32MB)) > > > start 63, size 1031562 (503 Meg), flag 80 > > > beg: cyl 0/ sector 1/ head 1; > > > end: cyl 128/ sector 63/ head 118 > > > The data for partition 2 is: > > > sysid 5,(Extended DOS) > > > start 1032129, size 1024128 (500 Meg), flag 0 > > > beg: cyl 129/ sector 1/ head 0; > > > end: cyl 256/ sector 63/ head 126 > > > The data for partition 3 is: > > > sysid 165,(FreeBSD/NetBSD/386BSD) > > > start 2056257, size 4800600 (2344 Meg), flag 0 > > > beg: cyl 257/ sector 1/ head 0; > > > end: cyl 856/ sector 63/ head 126 > > > The data for partition 4 is: > > > sysid 6,(Primary 'big' DOS (> 32MB)) > > > start 6856857, size 1528191 (746 Meg), flag 0 > > > beg: cyl 857/ sector 1/ head 0; > > > end: cyl 1023/ sector 63/ head 126 > > > > > > I just reclaimed partition (=slice) 4 from a windows installation and > > > I want to use the 746 Mb for a FreeBSD file system. As slice 3 already > > > contains a FBSD installation I am at a loss on how to set up a > > > disklabel such that newfs can set up a filesystem on partition 4. > > > > Very tricky. The bootloader can get confused in this instance. > > > > Basically: > > > > 1. Use DOS FDISK and delete the Primary DOS partition on slice 4. > > 2. Use sysinstall to create a FreeBSD slice on slice 4. Partition as > > desired. > > 3. Newfs with care. > > > > > > > > /usr/home/burg# /sbin/newfs /dev/rsd0s4c > > > newfs: ioctl (GDINFO): Invalid argument > > > newfs: /dev/rsd0s4c: can't read disk label; disk type must be specified > > > > See http://www.freebsd.org/tutorials/diskformat/ for a guide. I don't > > detail how to do this specifically, but if you get a procedure that works > > I'd like to add it. > > > > Doug White | University of Oregon > > Internet: dwhite@resnet.uoregon.edu | Residence Networking Assistant > > http://gladstone.uoregon.edu/~dwhite | Computer Science Major > > >