Endian issues, LE write to BE partitions

Sean Bruno sean_bruno at yahoo.com
Wed Oct 2 16:15:55 UTC 2013


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.  

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:

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

	dd to md0a from dev zero for just a bit
		dd if=/dev/zero of=/dev/md0a bs=64k count=100

	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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freebsd.org/pipermail/freebsd-fs/attachments/20131002/1b68ea4a/attachment.sig>


More information about the freebsd-fs mailing list