Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 8 Oct 2000 13:32:01 +0100
From:      Mark Ovens <marko@freebsd.org>
To:        Siegbert Baude <siegbert.baude@gmx.de>
Cc:        Jon Drukman <jsd@mail.gamespot.com>, freebsd-questions@freebsd.org
Subject:   Re: newfs extended partition
Message-ID:  <20001008133201.B253@parish>
In-Reply-To: <39DFC467.43FDAEFF@gmx.de>; from siegbert.baude@gmx.de on Sun, Oct 08, 2000 at 02:48:39AM %2B0200
References:  <200010072156.OAA23870@mail.gamespot.com> <20001008011820.A252@parish> <39DFC467.43FDAEFF@gmx.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Oct 08, 2000 at 02:48:39AM +0200, Siegbert Baude wrote:
> Hello Mark and Jon,
> 
> > > cluttered# newfs /dev/ad0s7
> > > newfs: ioctl (GDINFO): Invalid argument
> > > newfs: /dev/ad0s7: can't read disk label; disk type must be specified
> > >
> > 
> > You can't create a ffs filesystem in an extended partition. You will have
> > to delete the extended partition and re-create it as a primary.
> 
> That is not true.
> 
> bash-2.04$ mount
> /dev/ad0s3a on / (ufs, local)
> /dev/ad0s3f on /home (ufs, local)
> /dev/ad2s1d on /usr (ufs, local)
> /dev/ad0s3e on /var (ufs, local)
> /dev/ad0s9h on /usr/src (ufs, local)
> procfs on /proc (procfs, local)  
> 
> Watch out /usr/src .
> 

Hmm, interesting. Curious that it is s9 and not s5 though.

>   
> su-2.04# fdisk /dev/ad0s9
> ******* Working on device /dev/ad0s9 *******
> parameters extracted from in-core disklabel are:
> cylinders=65 heads=255 sectors/track=63 (16065 blks/cyl)
> 
> parameters to be used for BIOS calculations are:
> cylinders=65 heads=255 sectors/track=63 (16065 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:
> <UNUSED>
> The data for partition 2 is:
> <UNUSED>
> The data for partition 3 is:
> <UNUSED>
> The data for partition 4 is:
> sysid 165,(FreeBSD/NetBSD/386BSD)
>     start 63, size 1060227 (517 Meg), flag 80 (active)
>         beg: cyl 478/ sector 1/ head 1;
>         end: cyl 543/ sector 63/ head 254
> su-2.04# 
> 
> 
> Watch out the "head 1" (necessary for the boot record, which could live
> in this extended slice) in the second last line as compared to:
> 
> su-2.04# fdisk /dev/ad0s3 
> [...]
> The data for partition 4 is:
> sysid 165,(FreeBSD/NetBSD/386BSD)
>     start 0, size 50000 (24 Meg), flag 80 (active)
>         beg: cyl 0/ sector 1/ head 0;
>         end: cyl 1023/ sector 63/ head 255
> su-2.04#   
> 

That is correct. When I trashed my partition table (don't ask) I rebuilt it
manually and got tripped up by that (the start of the extended partition
being 1 cyl up from the start of the FS) as my NTFS partition is a logical
drive in an extended partition.

> 
> I fiddled at least two weeks with fdisk, disklabel and newfs, until I got
> this working (somewhere I must have done something strange, as I got
> dmesg messages about slice sizes not fitting. Took me the time I
> mentioned, to solve this again. Finally zeroed the first two sectors of
> the strange slices by hand, to get this done.)
> 
> Fdisk is not very useful to do this. My hint: Calculate the exact
> CHS-values by hand and force fdisk to use them (it offers you this as
> special option within the normal procedure).
> 
> Hope this helps
> 

You have proved that it is certainly possible but, AFAIK, FreeBSD still
doesn't "officially" support ffs in an extended partition, and as you had
to do some low-level hacking of the sectors it definitely isn't something
to be undertaken lightly, especially if you can't afford to trash the disk
beyond recovery.

Now, if you will just rewrite fdisk, newfs, and disklabel to do it
automatically....... :)

> Siegbert
> 
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message

-- 
		4.4 - The number of the Beastie
________________________________________________________________
51.44°N  FreeBSD - The Power To Serve http://www.freebsd.org
2.057°W  My Webpage http://ukug.uk.freebsd.org/~mark
mailto:marko@freebsd.org                http://www.radan.com



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001008133201.B253>