Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

bsdlabel (can't create ad0s9[a-f])

10 views
Skip to first unread message

run10...@directvinternet.com

unread,
Dec 27, 2004, 11:58:36 PM12/27/04
to
Dual Boot Machine (Win2K and FreeBSD-Release-5.1)
Slice 1: FreeBSD
Slice 2: Win2K (NTFS)
Slice 3: Extended Dos
Slice 4: vacant

i am trying (unsuccessfully) to create freebsd partitions within an
extended dos partition (Disk Slice #3). that is, although my FB-5.1
correctly recognizes this (Win2K) logical drive as 'ad0s9', i am unable
to create ad0s9a/b/d/etc.

<bsdlabel> seems to write o.k. when i restart my PC and submit a

# bsdlabel -A ad0s9

command the output looks fine, but none of my 'new' partitions ever
show up in the /dev directory.

1) what do i have to do create the devices ad0s9a, ad0s9b ...?
as i understand 'devfs', it should create the devices automatically.
yes, but how? do i need to build/add some sort of loadable (.ko)
module to my kernel?

2) why does 'sysinstall' create numerous (a-f) partitions but
'bsdlabel' alone does not?
should i be using bsdlabel's <-b> (boot) option? i don't really need a
bootable partition

thanks.

- kenneth harwood

private responses accepted. the e-mail address above is no longer
valid. send to <same user name> at comcast.net

Michel Talon

unread,
Dec 28, 2004, 4:52:51 AM12/28/04
to
run10...@directvinternet.com wrote:
>
>
> # bsdlabel -A ad0s9
>
> command the output looks fine, but none of my 'new' partitions ever
> show up in the /dev directory.
>

Let me hasard a guess. In fact it is the GEOM layer which creates the
appropriate devices under /dev after having read the master boot record.
The author phk is well known for implementing stuff that works well but
not caring a bit for compatibility with exotic configurations. Since
freebsd is not supposed to be installed in extended partitions it is
very plausible he has not implemented what is necessary to recursively
find such partitions, but i have not looked at the source code to
confirm that. This being said, let me repeat that FreeBSD is not
supposed to be installed in extended partitions, period. Go look at
Linux if you want to do that.


--
Michel Talon

Per Hedeland

unread,
Dec 28, 2004, 6:56:59 AM12/28/04
to
In article <1104209916.1...@z14g2000cwz.googlegroups.com>

run10...@directvinternet.com writes:
>Dual Boot Machine (Win2K and FreeBSD-Release-5.1)
>Slice 1: FreeBSD
>Slice 2: Win2K (NTFS)
>Slice 3: Extended Dos
>Slice 4: vacant
>
>i am trying (unsuccessfully) to create freebsd partitions within an
>extended dos partition (Disk Slice #3). that is, although my FB-5.1
>correctly recognizes this (Win2K) logical drive as 'ad0s9', i am unable
>to create ad0s9a/b/d/etc.

I've never actually tried creating FreeBSD partitions inside a logical
slice, but I assume it should work - however I'm pretty sure that you
need to make it a FreeBSD slice before anything will actually look for
partitions inside. I.e. the type should be set to 165 (hex A5), not NTFS
(7?).

><bsdlabel> seems to write o.k. when i restart my PC and submit a
>
># bsdlabel -A ad0s9
>
>command the output looks fine, but none of my 'new' partitions ever
>show up in the /dev directory.

I guess maybe bsdlabel should warn that the slice type is "wrong", but
perhaps it's just following the good Unix tradition of "do what the user
says and shut up".:-)

>1) what do i have to do create the devices ad0s9a, ad0s9b ...?
>as i understand 'devfs', it should create the devices automatically.
>yes, but how? do i need to build/add some sort of loadable (.ko)
>module to my kernel?

They should be created automatically - but this happens due to the
kernel/driver scanning the disks for FreeBSD slices, and for partitions
therein. I assume you do get a /dev/ad0s9 for the slice, but nothing
will look for partitions inside.

>2) why does 'sysinstall' create numerous (a-f) partitions but
>'bsdlabel' alone does not?

"Do what the user says...":-) The man page says that "a default layout"
is used unless a disktab(5) entry is specified with -w - that default
seems to be to give all space to the 'a' partition, makes sense as a
default I think... If you want something else, "just" use -e after -w
(sysinstall is probably a safer route).

>should i be using bsdlabel's <-b> (boot) option? i don't really need a
>bootable partition

It shouldn't be relevant.

--Per Hedeland
p...@hedeland.org

run10...@directvinternet.com

unread,
Dec 28, 2004, 12:43:00 PM12/28/04
to
Michel Talon wrote:

>> The author phk is well known for implementing
>> stuff that works well but not caring a bit for
>> compatibility with exotic configurations.

Hang the DJ.

>> Since freebsd is not supposed to be installed
>> in extended partitions it is very plausible he has
>> not implemented what is necessary to recursively

>> find such partitions,...

semantics? i'm not really trying to *install FreeBSD* there.
that is, i have no desire to load a full-blown FB OS there
complete with root/swap/tmp/usr/var/etc. partitions. i only
want to create two new filesystems. i plan to use the extra
5G of space to hold my existing (90% full) /usr and /var
partitions. you know, to move my data over to the new
partitions and then mount those new paritions back
beneath the /.

>> This being said, let me repeat that FreeBSD is not
>> supposed to be installed in extended partitions, period.

sounds like you have the last word.

>> Go look at Linux if you want to do that.

someone has called Linux: "a benign dictatorship". i might
prefer to live under that as a political system but not as
an end-user.


thanks for your assistance, MT.

- ken h.

run10...@directvinternet.com

unread,
Dec 28, 2004, 12:52:20 PM12/28/04
to
>> make it a FreeBSE slice ...

i'd rather not modify the Slice type to 165.
i just have too much Win2K stuff stored on
my logical drives to risk corrupting the Slice.

>> I assume you do get a /dev/ad0s9 for the slice

>> but nothing will look for partitions inside...

that is correct.

>> just use -c after -w ...

i'll probably just end up getting a second HD.
happy new year to all.

- ken h.

Per Hedeland

unread,
Dec 28, 2004, 1:30:17 PM12/28/04
to
In article <1104256340.4...@z14g2000cwz.googlegroups.com>

run10...@directvinternet.com writes:
>>> make it a FreeBSE slice ...
>
>i'd rather not modify the Slice type to 165.
>i just have too much Win2K stuff stored on
>my logical drives to risk corrupting the Slice.

I think you misunderstand... Hopefully you already know that a slice in
FreeBSD terminology is a partition in OtherOS terminology, hence what I
referred to was making the logical partition (slice) that you were


trying to use into a FreeBSD one, since you said:

>>>extended dos partition (Disk Slice #3). that is, although my FB-5.1
>>>correctly recognizes this (Win2K) logical drive as 'ad0s9', i am unable

^^^^^^^^^^^^^^^^^^^^^^^^^^
>>>to create ad0s9a/b/d/etc.

I.e. it's just ad0s9 I'm talking about, not the extended partition
(slice) nor the four logicals (ad0s5-ad0s8) that precede ad0s9 within
that extended partition (slice). If you have "Win2K stuff" in ad0s9
you're in trouble already with the bsdlabel writing.

You can't change the type of ad0s9 with FreeBSD fdisk since it doesn't
deal with logical partitions (slices) at all, but maybe sysinstall can
do it - or linux fdisk from the ports, as I mentioned in another thread
the other day.

--Per Hedeland
p...@hedeland.org

run10...@directvinternet.com

unread,
Dec 28, 2004, 11:57:45 PM12/28/04
to
Per Hedeland wrote:
> In article <1104256340.4...@z14g2000cwz.googlegroups.com>

>> Hopefully you already know that a slice in
>> FreeBSD terminology is a partition in OtherOS
>> terminology,

yes, i understand the terminology

>> referred to was making the logical partition (slice)
>> that you were trying to use into a FreeBSD one,

yes, that is essentially what i want to do.

>> I.e. it's just ad0s9 I'm talking about, not the
>> extended partition

you understand my dilemma perfectly

>> You can't change the type of ad0s9 with FreeBSD
>> fdisk since it doesn't deal with logical partitions (slices)

>> at all, but maybe ... linux fdisk from the ports ..

now there's something i never heard of before!

after much anguish i was finally able to get the
ports of c/fdisk-linux up and running on my FB.
with 'cfdisk-linux' i could drill into my extended
dos partition and see/change the type. of course,
i'm terrified that if/when i Write it, my partition
table is going to get totally clobbered.

assuming i can figure out what my disk geometry
really is, and that by providing it to cfdisk-linux i'll
be permitted to actually WRITE the toggled value,
what are the chances that my manual intervention
will destroy my partition table and leave me dead
in the H20 like so many unfortunate victims of that
asian tsunami?

thx.

- ken harwood

Per Hedeland

unread,
Dec 29, 2004, 9:04:41 AM12/29/04
to
In article <1104296265.0...@f14g2000cwb.googlegroups.com>
run10...@directvinternet.com writes:

>Per Hedeland wrote:
>
>>> You can't change the type of ad0s9 with FreeBSD
>>> fdisk since it doesn't deal with logical partitions (slices)
>>> at all, but maybe ... linux fdisk from the ports ..
>
>now there's something i never heard of before!
>
>after much anguish i was finally able to get the
>ports of c/fdisk-linux up and running on my FB.
>with 'cfdisk-linux' i could drill into my extended
>dos partition and see/change the type. of course,
>i'm terrified that if/when i Write it, my partition
>table is going to get totally clobbered.

Well, some paranoia is probably healthy here...

>assuming i can figure out what my disk geometry
>really is, and that by providing it to cfdisk-linux i'll
>be permitted to actually WRITE the toggled value,
>what are the chances that my manual intervention
>will destroy my partition table and leave me dead
>in the H20 like so many unfortunate victims of that
>asian tsunami?

I won't presume to actually advise you on that, as I've never used the
Linux fdisk on FreeBSD myself - but my hunch is that if it actually
manages to read all the partition/slice info correctly and without
complaints, chances are that it won't mess up the write.

Also note that with an extended partition/slice, you have (according to
LILO docs:-) multiple, different partition tables - the table that has
the type for your logical is actually sitting inside the extended, and
isn't the "main" one at the start of the disk (that one only has the
info about the upto 4 primary/extended). I.e. the risk of total disaster
should be somewhat reduced.:-)

Either way, printing (on paper!) all the partition info before you write
anything to the disk is a good idea of course...

--Per Hedeland
p...@hedeland.org

run10...@directvinternet.com

unread,
Dec 30, 2004, 6:13:09 PM12/30/04
to
0 new messages