From nobody@FreeBSD.org  Thu May 16 11:43:13 2013
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115])
	by hub.freebsd.org (Postfix) with ESMTP id 2B95D6D0
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 16 May 2013 11:43:13 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from oldred.FreeBSD.org (oldred.freebsd.org [8.8.178.121])
	by mx1.freebsd.org (Postfix) with ESMTP id 047082F
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 16 May 2013 11:43:13 +0000 (UTC)
Received: from oldred.FreeBSD.org ([127.0.1.6])
	by oldred.FreeBSD.org (8.14.5/8.14.5) with ESMTP id r4GBhBpc008722
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 16 May 2013 11:43:11 GMT
	(envelope-from nobody@oldred.FreeBSD.org)
Received: (from nobody@localhost)
	by oldred.FreeBSD.org (8.14.5/8.14.5/Submit) id r4GBhBrC008721;
	Thu, 16 May 2013 11:43:11 GMT
	(envelope-from nobody)
Message-Id: <201305161143.r4GBhBrC008721@oldred.FreeBSD.org>
Date: Thu, 16 May 2013 11:43:11 GMT
From: woodelf <wood_elf@126.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: gpart cannot get my GEOM tree
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         178684
>Category:       kern
>Synopsis:       gpart(8) cannot get my GEOM tree
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-geom
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu May 16 11:50:00 UTC 2013
>Closed-Date:    
>Last-Modified:  Mon May 20 03:13:48 UTC 2013
>Originator:     woodelf
>Release:        9.1-RELEASE-p3
>Organization:
>Environment:
FreeBSD FreeBSD 9.1-RELEASE-p3 FreeBSD 9.1-RELEASE-p3 #0: Mon Apr 29 18:27:25 UTC 2013     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
I have three HDDs on my laptop. And below is my partition schemes:

ada0 (BIOS partition table)
ada0p1:Windows 7 x64 Professional
ada0p2: NTFS data partition

ada1 (GUID partition table)
ada1p1:BIOS boot partition (for grub2)
ada1p2: Gentoo Linux with root on ZFS (from ZFS On Linux project)

I install Gentoo Linux with zpool version 5000 (feature flags support).

Now I want to install FreeBSD 9.1-RELEASE on ada2 with root on ZFS. But when I use gpart to create partitions on ada2 with the command "gpart create -a 4k -s 64k -t freebsd-boot ada2", gpart gave me the output "gpart: Cannot get GEOM tree: Unknown error: -1". If I type "gpart show", I got the same output. And when I try to run bsdintall tool, it told me "there is no disk available".

I also tried latest 9.1-STABLE and 10.0-CURRENT, still the same issue. However, things were a little different. The output of "gpart show" became "gpart: Cannot get GEOM tree: Illegal byte sequence". And also the output of "gaprt add" became "gpart: Autofill: Illegal byte sequence".

It seems FreeBSD partitioning tool cannot detect my HDDs at all. However, if I remove ada1 from my laptop, then I can install FreeBSD successfully.

I asked some of the developers from ZOL project, they said ZOL will not touch GUID partition headers or tables at all, and the problem shall not be with ZFS.

I am not sure if this is gpart bug, because if I try to install Gentoo + ZFS with existing FreeBSD, everything is fine.
>How-To-Repeat:
Not quite sure if this issue is because incompatibility between gpart and ZOL. I think you can also repeat this problem when you try to install FreeBSD with existing Linux + ZOL.
>Fix:
What I can do now is only to remove the disk which has Linux + ZOL to finish installation of FreeBSD.

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-amd64->freebsd-geom 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Mon May 20 03:13:21 UTC 2013 
Responsible-Changed-Why:  
probably not amd64-specific. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=178684 
>Unformatted:
