Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 02 Oct 2013 09:15:46 -0700
From:      Sean Bruno <sean_bruno@yahoo.com>
To:        freebsd-fs@freebsd.org
Subject:   Endian issues, LE write to BE partitions
Message-ID:  <1380730546.1619.47.camel@localhost>

next in thread | raw e-mail | index | archive | help

--=-SrhZVfgFxlg3k0ahEVKb
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Using makefs from an amd64 host to build a f/s in a VTOC8 partition will
destroy the entire partition table.  I simplified the test to simple dd
to an existing partition and got the same result, exonerating mkfs

I suspect a lack of endian knowledge in geom itself, not
geom_part_vtoc8. =20

test case:
	using amd64 host (10.0 current) create monolothic image
		truncate -s+5G /var/tmp/myfile.img
		mdconfig -f /var/tmp/myfile.img
        build and load geom_part_vtoc8 kernel module
	use gpart to create VTOC8 part table
	add partition to part table to yeild the following:

=3D>       0  10442250  md0  VTOC8  (5.0G)
         0  10442250    1  freebsd-ufs  (5G) =20

	dd to md0a from dev zero for just a bit
		dd if=3D/dev/zero of=3D/dev/md0a bs=3D64k count=3D100

	destroy md0 via mdconfig -d -u 0
	recreate it with mdconfig -f /var/tmp/myfile.img

	gpart displays no partions for the image any more:
		gpart: No such geom: md0.

bcc freebsd-geom

--=-SrhZVfgFxlg3k0ahEVKb
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.14 (FreeBSD)

iQEcBAABAgAGBQJSTEayAAoJEBkJRdwI6BaHOy8H/Aimwsjhet3TOKfv4rwRTVFo
bYVoFdP8EvN9XXox6+aKxXjHrKJBhmCsCUpwWTUlrp6iNenMPTbxa+QHrgldO6wv
a3gUXbU++WOc98elcFHb9fwN+Ks4lfp+ph45EFkz4w8ptmFdG5fKRZXsiNFCgzYv
eerizZSK4S7FM4XtM0BH0K9ps8upLa+bQRw0sARwU8GTPB3Do+VlKWVU3f0svFPa
QXpmEx1sc4SCiPZd7mO91niZ/+NMmmtGJ0k4X8LEvx1XVujxqWtlJxJ29sMEWZ5H
2GQligqDnjpmJXl4Y6tKisNFASJzMyG2TtcjiRV4AEwefgQ1UNJ/ASkZCGPTwCo=
=6c4g
-----END PGP SIGNATURE-----

--=-SrhZVfgFxlg3k0ahEVKb--




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