From owner-freebsd-geom@FreeBSD.ORG Wed Oct 22 22:58:53 2008 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 136FE1065671; Wed, 22 Oct 2008 22:58:53 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from hosted.kievnet.com (hosted.kievnet.com [193.138.144.10]) by mx1.freebsd.org (Postfix) with ESMTP id B8FD68FC2B; Wed, 22 Oct 2008 22:58:52 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from localhost ([127.0.0.1] helo=edge.pp.kiev.ua) by hosted.kievnet.com with esmtpa (Exim 4.62) (envelope-from ) id 1KsmfC-0009bj-JS; Thu, 23 Oct 2008 01:58:50 +0300 Message-ID: <48FFB025.2060100@icyb.net.ua> Date: Thu, 23 Oct 2008 01:58:45 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.17 (X11/20081005) MIME-Version: 1.0 To: Marcel Moolenaar References: <48FF2607.10807@icyb.net.ua> <63F8346D-0116-4F41-BCAA-C235E9657BD8@mac.com> <48FF82BA.3020309@icyb.net.ua> <48FF913A.9070700@icyb.net.ua> <7334715F-FAE1-40EE-92EB-468041587410@mac.com> <48FFA1F8.40709@icyb.net.ua> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Marcel Moolenaar , freebsd-geom@freebsd.org Subject: Re: gpart oddity X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Oct 2008 22:58:53 -0000 on 23/10/2008 01:09 Marcel Moolenaar said the following: > > On Oct 22, 2008, at 2:58 PM, Andriy Gapon wrote: > >> on 23/10/2008 00:03 Marcel Moolenaar said the following: >>> On Oct 22, 2008, at 1:46 PM, Andriy Gapon wrote: >>>> I'll try to boot into a new kernel now (the one without GEOM_MBR and >>>> GEOM_BSD). >>> Could you send a quick "it works" message if this was the >>> problem? >> >> Unfortunately, no. But I can't really tell what's going wrong. >> >> I do a verbose boot, but I don't see any GEOM message whatsoever after >> GEOM: new disk ad4 >> And then kernel can not find root filesystem and at the prompt it >> reports that it sees only slice devices, ad4s1 and ad4s2, but not >> ad4s1a or any other partition. >> So I can not complete booting and I don't know how to debug that. > > It's possible that I haven't merged all the changes from > HEAD to 7-stable. Try the following patch: > > Index: g_part_bsd.c > =================================================================== > --- g_part_bsd.c (revision 183454) > +++ g_part_bsd.c (revision 183455) > @@ -293,7 +293,7 @@ > magic2 = le32dec(buf + 132); > g_free(buf); > return ((magic1 == DISKMAGIC && magic2 == DISKMAGIC) > - ? G_PART_PROBE_PRI_NORM : ENXIO); > + ? G_PART_PROBE_PRI_HIGH : ENXIO); > } > > static int Yes, that was it, thank you again! Now I can successfully boot and 'gpart show' reports properly-looking information. One hopefully last question: is disklabel supposed to keep working in this new world or should I switch to gpart command exclusively? $ gpart show ad4s1 => 0 587191752 ad4s1 BSD (300.6GB) 0 2097152 2 freebsd-swap (1073.7MB) 2097152 2097152 1 freebsd-ufs (1073.7MB) 4194304 52428800 4 freebsd-ufs (26.8GB) 56623104 530568648 5 freebsd-ufs (271.7GB) $ disklabel ad4s1 # /dev/ad4s1: 8 partitions: # size offset fstype [fsize bsize bps/cpg] a: 2097152 2097215 4.2BSD 0 0 0 b: 2097152 63 swap c: 587191752 63 unused 0 0 # "raw" part, don't edit d: 52428800 4194367 4.2BSD 0 0 0 e: 530568648 56623167 4.2BSD 0 0 0 partition c: partition extends past end of unit disklabel: partition c doesn't start at 0! disklabel: An incorrect partition c may cause problems for standard system utilities partition e: partition extends past end of unit It seems like offsets in disklabel output are now absolute (from start of ad4), but previously they were relative to ad4s1 start: > $ disklabel ad4s1 > # /dev/ad4s1: > 8 partitions: > # size offset fstype [fsize bsize bps/cpg] > a: 2097152 2097152 4.2BSD 0 0 0 > b: 2097152 0 swap > c: 587191752 0 unused 0 0 # "raw" part, > don't edit > d: 52428800 4194304 4.2BSD 0 0 0 > e: 530568648 56623104 4.2BSD 0 0 0 -- Andriy Gapon