disklabel differences FreeBSD, DragonFly



Hi,

DragonFly uses another disklabel as FreeBSD I discovered.

Made a test installation of their 1.6 yesterday.

Later I wanted to mount the dfly filesystems on FreeBSD 6.1,
of course still my main Unix ;-) But it wasn't possible.

The disklabel couldn't be read and as a result devfs didn't
create the devices under /dev.

So I compared sys/disklabel.h on the 2 BSDs and
discovered a difference at the very beginning of the struct.

I'm not sure for what exact purpose Matt uses his new
pack identifier. Does somebody have a clue ???

Is this perhaps something useful that FreeBSD could also use/need ?
Or at least adopt, to be compatible if it doesn't hurt too much ???

Would be cool to be able to mount fs's across BSDs.

Our FreeBSD 6.1 one:
struct disklabel {
u_int32_t d_magic; /* the magic number */
u_int16_t d_type; /* drive type */
u_int16_t d_subtype; /* controller/d_type specific */
char d_typename[16]; /* type name, e.g. "eagle" */

char d_packname[16]; /* pack identifier */

/* disk geometry: */

DragonFly:
struct disklabel {
u_int32_t d_magic; /* the magic number */
u_int16_t d_type; /* drive type */
u_int16_t d_subtype; /* controller/d_type specific */
char d_typename[16]; /* type name, e.g. "eagle" */

/*
* d_packname contains the pack identifier and is returned when
* the disklabel is read off the disk or in-core copy.
* d_boot0 and d_boot1 are the (optional) names of the
* primary (block 0) and secondary (block 1-15) bootstraps
* as found in /boot. These are returned when using
* getdiskbyname(3) to retrieve the values from /etc/disktab.
*/
union {
char un_d_packname[16]; /* pack identifier */
struct {
char *un_d_boot0; /* primary bootstrap name */
char *un_d_boot1; /* secondary bootstrap name */
} un_b;
} d_un;
#define d_packname d_un.un_d_packname
#define d_boot0 d_un.un_b.un_d_boot0
#define d_boot1 d_un.un_b.un_d_boot1

/* disk geometry: */


Andreas ///

--
Andreas Klemm - Powered by FreeBSD 6
Need a magic printfilter today ? -> http://www.apsfilter.org/
_______________________________________________
freebsd-hackers@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • UDMA ICRC error
    ... OS version: FreeBSD 4.7-Stable FreeBSD #3 ... I just added a disk to my box and after playing with ... fdisk and disklabel with this configuration: ...
    (freebsd-stable)
  • Re: Help deriving a corrupted disklabel
    ... For those who encounter a similar problem (damaged disklabel on a FreeBSD ... 'pkg_add -r' doesn't work in a Fixit shell). ... >> cannot find a written copy of my disklabel for that disk (a good ...
    (freebsd-questions)
  • Creating a disklabel for NetBSD slice
    ... I have FreeBSD 6.1 and NetBSD 3.0 on my machine. ... entries for the FreeBSD partitions, ... So I make up a disklabel for ad0s2. ...
    (freebsd-questions)
  • Re: Mount NetBSD partition
    ... >> On my IDE disk, I have two disk labels, one of FreeBSD and one from ... > Are they device nodes for each partition in your disklabel under FreeBSD? ... these partitions using FreeBSD? ...
    (freebsd-questions)