Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 01 Jul 2000 11:32:05 +0200
From:      Siegbert Baude <siegbert.baude@gmx.de>
To:        "freebsd-questions@freebsd.org" <freebsd-questions@freebsd.org>
Subject:   disklabel and disktab (was: partition)
Message-ID:  <395DBA95.A0595ABF@gmx.de>

next in thread | raw e-mail | index | archive | help
So now, you told me, that it is possible to use a ufs-slice within an
"extended partition". But how to create it? BTW, I'm using 4.0 stable.
/stand/sysinstall only offers me primary slices (the fourth of them
actually my "extended partition"), so no way.
I tried to change the type of this logical disk with Linux fdisk to 0xa5
(how to do this within FreeBSD?), but next FBSD boot time gave me
consistent kernel error messages:

/kernel: ad0s9: cannot find label (no disk label) 

So I switched back to 0x83 (Linux fs).
Next try within FBSD:

bash-2.03# disklabel -w -r ad0s9 auto
disklabel: ioctl DIOCGDINFO: Invalid argument
disklabel: auto: unknown disk type
bash-2.03#                                                                

So man disklabel told me to look in /etc/disktab for the disk type. But
there I find only some stuff related to floppies, Sony MOD, zip100 and
some Stone Age hard disks, but nothing about my IBM IDE disks. Where are
the thousands of other disks? Is there a generic entry for all IDE disks
or am I supposed to enter this by hand? (This would make me think, that
FreeBSD isn' ready for me, or maybe the other way round ;-) ) This disks
actually work, so there should be an entry there yet, but which one is
correct?

Try and error could cost me all information on my disk so I prefer to
ask in advance:

a) How to disklabel a slice within an extended partition?
b) Afterwards how to create a new fs (ufs of course) within this slice?
c) Am I allowed to use partition character "b" and "c" (predefined as
swap and complete disk) for "normal" use? If not there are only 6
partitions per slice allowed?
d) Who maintains the FAQ? Would be nice to have this questions answered
there, because there is nothing about it neither in newbies, nor
handbook, nor tutorials nor FAQ (read them all three(!) times), nor is
an answer in the history of this mailing list (except they would avoid
all of the terms ufs, logical, extended, partition, disklabel, slice as
I searched this group with them and found *nothing*).
e) OT: Does the search engine of www.FreeBSD.org allow to look for the
term `"extended partition"` instead for `extended AND partition`? This
would be very useful, but I did find nothing in search hints how to
achieve this.

For further information:

bash-2.03#fdisk ad0
...
The data for partition 4 is:
sysid 5,(Extended DOS)
    start 3180870, size 9510480 (4643 Meg), flag 0
        beg: cyl 198/ sector 1/ head 0;
        end: cyl 789/ sector 63/ head 254

bash-2.03#fdisk ad0s9
...
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 1, size 0 (0 Meg), flag 80 (active)
        beg: cyl 1/ sector 1/ head 0;
        end: cyl 0/ sector 0/ head 0


Hm, I think the first 3 entries are senseless (is fdisk always assuming
to work on the primary partition table?) and the last one is wrong: type
is 0x83 (Linux, or did the uncomplete disklabel command from above
change this to 0xa5?) and the size is (should be) 520 MB.

bash-2.03# disklabel ad0s3
# /dev/ad0s3c:
type: ESDI
disk: ad0s3
label:
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 255
sectors/cylinder: 16065
cylinders: 66
sectors/unit: 1060290
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0           # milliseconds
track-to-track seek: 0  # milliseconds
drivedata: 0

8 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
  a:   102400        0    4.2BSD        0     0     0   # (Cyl.    0 -
6*)
  b:   524288   143360      swap                        # (Cyl.    8*-
41*)
  c:  1060290        0    unused        0     0         # (Cyl.    0 -
65)
  e:    40960   102400    4.2BSD        0     0     0   # (Cyl.    6*-
8*)
  f:   392642   667648    4.2BSD        0     0     0   # (Cyl.   41*-
65*)



Many thanks in advance.

Siegbert

P.S.: Wouldn't ask all these things, if I didn't like make world so
much. But I'm running out of disk space and all primary partitions are
covered by other OSs. On the other hand: Is this wish really so rare
that there is no answer in today's readmes?


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?395DBA95.A0595ABF>