Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Oct 2002 00:24:54 +0200 (CEST)
From:      BOUWSMA Beery <freebsd-misuser@ipv6.netscum.dyndns.dk>
To:        walt <wa1ter@hotmail.com>
Cc:        freebsd-current@freebsd.org
Subject:   Re: GEOM and NetBSD partitions/disklabels
Message-ID:  <200210132224.g9DMOsi02766@MAIL.NetScum.DynDNS.dK>
References:  <aoc2vv$1d1f$1@FreeBSD.csie.NCTU.edu.tw> <3DA9D43E.2080203@hotmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
[IPv6-only address above; strip the obvious for IPv4-only mail]

> > We never had to ability to do this before.  GEOM can probably do it for
> > you, with something like this patch:
> <snip>

> Oops. Now I get the same error with both kinds of partitions:
> 
> disklabel: ioctl DIOCGDINFO: Operation not supported by device
> (However, it compiled just fine ;-)
> 
> I have a NetBSD partition I'd like to read also.  Is there something simple,
> or preferably even braindead, that I can do to debug this?

Actually, I've had no problem for about a year or so mounting NetBSD
partitions under FreeBSD-stable and -current, once I got it working.

Do you get the above error from the disklabel command?  If so, have
you rebuilt both `disklabel' and the kernel?  (I think there's another
thing or two you may need to rebuild, until you go through with
rebuilding the whole world)

That is, your kernel can mount the NetBSD partitions with their 16
partitions within, even if `disklabel' doesn't work yet...

I'm probably not recalling everything right, since for the last year
all I've needed to do has been to keep my patches (which is mostly a
make.conf -DMAXPARTITIONS=16 applied to the whole world and kernel,
where possible) in sync, like with the assert noted...

But the last time I built and used a new world was a couple weeks
ago, so I haven't tried GEOM.


If you still have no luck, when I wake up I can review my patchset
for both -current and -stable to see exactly what changes I made to
get my NetBSD partitions mounted:
The data for partition 3 is:
sysid 169,(NetBSD)
    start 1028160, size 118768545 (57992 Meg), flag 0
        beg: cyl 1020/ head 0/ sector 1;
        end: cyl 1023/ head 15/ sector 63
bash-2.05a# disklabel ad0s3
# /dev/ad0s3c:
type: unknown
disk: NetBSD1.5
label:
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 16
sectors/cylinder: 1008
cylinders: 117825
sectors/unit: 118768545
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0           # milliseconds
track-to-track seek: 0  # milliseconds
drivedata: 0
16 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
  a:   262080        0    4.2BSD     1024  8192   101   # (Cyl.    0 - 259)
  b:   787248   262080      swap                        # (Cyl.  260 - 1040)
  c: 118768545        0    unused        0     0        # (Cyl.    0 - 117825*)
  e: 20971440  1049328    4.2BSD     2048 16384   102   # (Cyl. 1041 - 21845)
  f:   262080 22020768    4.2BSD     2048 16384   104   # (Cyl. 21846 - 22105)
  g:  6290928 22282848    4.2BSD     2048 16384    89   # (Cyl. 22106 - 28346)
  h: 90194769 28573776    4.2BSD    16384 65536  2968   # (Cyl. 28347 - 117825*)

/dev/ad0s3g on /usr/obj (ufs, local, soft-updates)
/dev/ad0s3h on /usr/home (ufs, local, soft-updates)
/dev/ad0s3a on /NetBSD (ufs, local, read-only)
/dev/ad0s3e on /NetBSD/usr (ufs, local, read-only)
/dev/ad0s3f on /NetBSD/var (ufs, local, read-only)

(I have no problem mounting rw when needed; note that you also will need
to modify NetBSD's fsck as needed to be done in FreeBSD-stable or use an
alternate superblock under NetBSD after a FreeBSD rw mount; and also the
above output is from FreeBSD-stable that I'm running now)


barry bouwsma


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




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