Creating a disklabel for NetBSD slice

Rakhesh Sasidharan rakheshster at gmail.com
Tue Jun 13 06:43:50 UTC 2006


Hi,

I have FreeBSD 6.1 and NetBSD 3.0 on my machine. I can make disklabel
entries (in NetBSD) for the FreeBSD partitions, and that way mount
them in NetBSD. Just a matter of giving the absolute offset values of
the partitions. But I cant find any straight forward way of mounting
NetBSD partitions under FreeBSD.

Doing "disklabel /dev/ad0s2" (my NetBSD slice) gives an error message
that there's no valid label to be found.

So I make up a disklabel for ad0s2. I get the NetBSD disklabel into a
file, edit it to make the number of partitions less than 8, remove all
the miscellaneous info, change all the offsets to relative values, and
then make a disklabel thus: "disklabel -R ad0s2 nbsd.txt" ("nbsd.txt"
being the file which contains the disklabels). After this the
disklabel is created fine, but when I boot into NetBSD, the disklabel
there is messed up and so NetBSD can't load.

I had a backup of the disklabels anyways (was expecting something like
this), so I managed to get it fixed. Booted into a NetBSD install CD
and restored the disklabel. And now when I boot into FreeBSD I see
that its lost whatever disklabel I had written.

So my question is this: is there any way I can get FreeBSD to create a
disklabel for ad0s2, but *not overwrite* the NetBSD one? I mean, I see
frequent references to "on-disk" label and "in-core" label in the
manpage, and I was wondering  maybe its possible to create a disklabel
that's internal to FreeBSD and doesn't really overwrite the NetBSD
one. Is that possible? What are these "in-core" and "on-disk" labels
anyways?

Thanks,
Rakhesh


-- 
	NetBSD/i386 3.0 + pkgsrc-current | OpenBSD/i386 3.9
	Toshiba Satellite L10-102


More information about the freebsd-questions mailing list