From owner-freebsd-current@FreeBSD.ORG Fri Jul 10 11:33:12 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 87C821065673 for ; Fri, 10 Jul 2009 11:33:12 +0000 (UTC) (envelope-from onemda@gmail.com) Received: from mail-bw0-f221.google.com (mail-bw0-f221.google.com [209.85.218.221]) by mx1.freebsd.org (Postfix) with ESMTP id 020C68FC17 for ; Fri, 10 Jul 2009 11:33:11 +0000 (UTC) (envelope-from onemda@gmail.com) Received: by bwz21 with SMTP id 21so648733bwz.43 for ; Fri, 10 Jul 2009 04:33:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=9ghoLwQqjBTa6I0vetKyrsyp40pQ1j3K+01B03qW6qU=; b=RlgOyzGxLlHsNsKpN/P20mW0bjAcKJDOdzBIsSui+GIEpADeqo6JFAMoEQr129Rk6E dctBRIX9OaOFGGlp9v73WNZT1NY8q0OIiqsBLFImDi7mllpyTIpPU83w1FMbrTJRED3j WG/v9LAVtd3aweiASSkMvejX688UmRhqETg/s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=QZd0+e7a35URx55PByT47OeJxdnU3a14wPHGrhEHUXnYLNO9r+FpbDiFipB9gcAB3A w6GNuZAKlYKFQfcPs9lDxo3G2D76IgiXC3H/hwe9hCv+m25rTeYRdfhpuofultj69Kp0 5eWuvT6pZXv89lJ6zF6k8wowog+ckn+/39F6Q= MIME-Version: 1.0 Received: by 10.204.117.141 with SMTP id r13mr1778717bkq.207.1247225590777; Fri, 10 Jul 2009 04:33:10 -0700 (PDT) In-Reply-To: <20090710112631.GE32316@rwpc12.mby.riverwillow.net.au> References: <20090710042106.GC31950@rwpc12.mby.riverwillow.net.au> <20090710071023.GB32316@rwpc12.mby.riverwillow.net.au> <20090710112631.GE32316@rwpc12.mby.riverwillow.net.au> Date: Fri, 10 Jul 2009 13:33:10 +0200 Message-ID: <3a142e750907100433y307f9b2bya1dc54953bdf5de2@mail.gmail.com> From: "Paul B. Mahol" To: freebsd-current@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: 8.0-BETA1 bsdlabel broken? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2009 11:33:12 -0000 On 7/10/09, John Marshall wrote: > On Fri, 10 Jul 2009, 17:10 +1000, John Marshall wrote: >> On Fri, 10 Jul 2009, 10:14 +0400, Eygene Ryabinkin wrote: >> > Fri, Jul 10, 2009 at 02:21:06PM +1000, John Marshall wrote: >> > > This system was source-upgrade from 7.2-RELEASE to 8.0-BETA1 a couple >> > > of >> > > days ago. >> > > >> > > Today I had a nasty surprise when I fired up bsdlabel to increase the >> > > size of a swap partition. I booted the system off the 7.2-RELEASE >> > > live >> > > filesystem CD and its bsdlabel displayed "normal" labels. I used the >> > > bsdlabel off the 7.2 livefs CD to edit the label. >> > > >> > > Here's what I see from 8.0-BETA1. Scary stuff! >> > > >> > > rwsrv05# bsdlabel da0s1 >> > > # /dev/da0s1: >> > > 8 partitions: >> > > # size offset fstype [fsize bsize bps/cpg] >> > > a: 1048576 16065 4.2BSD 2048 16384 8 >> > > b: 8388608 1064641 swap >> > > c: 33543720 16065 unused 0 0 # "raw" part, >> > > don't edit >> > > e: 4194304 9453249 4.2BSD 2048 16384 28552 >> > > f: 19912232 13647553 4.2BSD 2048 16384 28552 >> > > partition c: partition extends past end of unit >> > > bsdlabel: partition c doesn't start at 0! >> > > bsdlabel: An incorrect partition c may cause problems for standard >> > > system utilities >> > > partition f: partition extends past end of unit >> > >> > And if you'll invoke 'bsdlabel -A da0s1' then it will whine only about >> > 'c' that doesn't start at 0, but no stuff will be marked as 'extends >> > past >> > end of unit' ;)) >> > >> > The problem is that your 8.x kernel is likely misses GEOM_BSD, so >> > gctl_issue() inside readlabel() of bsdlabel.c will choke on it. >> > Mine problems on one of the hosts were solved by adding GEOM_BSD and >> > recompiling the kernel, though it has the only slice that started at >> > 63 (MBR offset). >> > >> > > rwsrv05# bsdlabel da0s2 >> > > # /dev/da0s2: >> > > 8 partitions: >> > > # size offset fstype [fsize bsize bps/cpg] >> > > c: 67103505 33559785 unused 0 0 # "raw" part, >> > > don't edit >> > > d: 33554432 33559785 4.2BSD 2048 16384 28552 >> > > e: 33549073 67114217 4.2BSD 2048 16384 28552 >> > > partition c: partition extends past end of unit >> > > bsdlabel: partition c doesn't start at 0! >> > > bsdlabel: An incorrect partition c may cause problems for standard >> > > system utilities >> > > partition d: partition extends past end of unit >> > > partition e: offset past end of unit >> > > partition e: partition extends past end of unit >> > >> > This part gets trickier, because partition 'c' reports strange offset. >> > I had reproduced this problem at my notebook, so I'll try to debug it >> > further. >> >> Thank you Eygene, >> >> Rebuilding the kernel with the GEOM_BSD option configured didn't make >> any difference for me. I notice that the offset for the start of the >> slice 2 c partition seems to include the size of the entire s1 slice. > > I don't think it's just bsdlabel. I just noticed this in DMESG... > > WARNING: da0s1 expected rawoffset 0, found 16065 > WARNING: da0s2 expected rawoffset 0, found 33559785 > WARNING: da0s4 expected rawoffset 0, found 100663290 > WARNING: da1s1 expected rawoffset 0, found 16065 > WARNING: da1s2 expected rawoffset 0, found 33559785 > WARNING: da1s4 expected rawoffset 0, found 67103505 > WARNING: da0s1a expected rawoffset 0, found 16065 > WARNING: da0s2d expected rawoffset 0, found 33559785 > WARNING: da0s4d expected rawoffset 0, found 100663290 > WARNING: ufsid/44cab1426f1a14df expected rawoffset 0, found 100663290 > WARNING: da1s1d expected rawoffset 0, found 16065 > WARNING: ufsid/44c73ece4c594eee expected rawoffset 0, found 16065 > WARNING: da1s2d expected rawoffset 0, found 33559785 > WARNING: ufsid/44ca989c1c946f80 expected rawoffset 0, found 33559785 > WARNING: da1s4d expected rawoffset 0, found 67103505 > WARNING: ufsid/44caacedfa48b1aa expected rawoffset 0, found 67103505 > WARNING: ufsid/454bbd55fb8748ad expected rawoffset 0, found 16065 > WARNING: ufsid/44cab13667346452 expected rawoffset 0, found 33559785 > WARNING: ufsid/44cab1426f1a14dfd expected rawoffset 0, found 100663290 > WARNING: ufsid/44c73ece4c594eeed expected rawoffset 0, found 16065 > WARNING: ufsid/44ca989c1c946f80d expected rawoffset 0, found 33559785 > WARNING: ufsid/44caacedfa48b1aad expected rawoffset 0, found 67103505 > Trying to mount root from ufs:/dev/da0s1a > WARNING: da0s1a expected rawoffset 0, found 16065 > WARNING: ufsid/454bbd55fb8748ad expected rawoffset 0, found 16065 > WARNING: ad0s1 expected rawoffset 0, found 63 > WARNING: da1s1 expected rawoffset 0, found 16065 > WARNING: da1s1d expected rawoffset 0, found 16065 > WARNING: ufsid/44c73ece4c594eee expected rawoffset 0, found 16065 > WARNING: ufsid/44c73ece4c594eeed expected rawoffset 0, found 16065 > WARNING: da1s2 expected rawoffset 0, found 33559785 > WARNING: da1s2d expected rawoffset 0, found 33559785 > WARNING: ufsid/44ca989c1c946f80 expected rawoffset 0, found 33559785 > WARNING: ufsid/44ca989c1c946f80d expected rawoffset 0, found 33559785 > WARNING: da1s4 expected rawoffset 0, found 67103505 > WARNING: da1s4d expected rawoffset 0, found 67103505 > WARNING: da0s2 expected rawoffset 0, found 33559785 > WARNING: da0s2d expected rawoffset 0, found 33559785 > WARNING: ufsid/44caacedfa48b1aa expected rawoffset 0, found 67103505 > WARNING: ufsid/44cab13667346452 expected rawoffset 0, found 33559785 > WARNING: ufsid/44caacedfa48b1aad expected rawoffset 0, found 67103505 > WARNING: da0s2 expected rawoffset 0, found 33559785 > WARNING: da0s4 expected rawoffset 0, found 100663290 > WARNING: da0s4d expected rawoffset 0, found 100663290 > WARNING: ufsid/44cab1426f1a14df expected rawoffset 0, found 100663290 > WARNING: ufsid/44cab1426f1a14dfd expected rawoffset 0, found 100663290 > > -- > John Marshall > There is one not so trivial solution. Recreating labels with gpart(8) -- Paul