From owner-freebsd-current@FreeBSD.ORG Fri Jul 10 06:14:19 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 0D08E1065673 for ; Fri, 10 Jul 2009 06:14:19 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) Received: from 0.mx.codelabs.ru (0.mx.codelabs.ru [144.206.177.45]) by mx1.freebsd.org (Postfix) with ESMTP id 9AFB68FC1D for ; Fri, 10 Jul 2009 06:14:18 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) DomainKey-Signature: a=rsa-sha1; q=dns; c=simple; s=one; d=codelabs.ru; h=Received:Date:From:To:Subject:Message-ID:Reply-To:References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To:Sender; b=JkWhZbFNKwblSK/Ftyt0+nN4hf/+yZDIYAm56g2lv2NQsmbdDIH7LIbkMiPElmlpzetW3BTsmApavXh/EuhSQ1FJnoZhVKHQA/AaWLDvE1AIyKR1dvDCFfpgFyPzYBDep1QTRlM+uN5XffOpnGQlX788+lYX9KXg6yvKJFVJQ2Q=; Received: from void.codelabs.ru (void.codelabs.ru [144.206.177.25]) by 0.mx.codelabs.ru with esmtpsa (TLSv1:AES256-SHA:256) id 1MP9NB-0004yW-Ms for freebsd-current@freebsd.org; Fri, 10 Jul 2009 10:14:17 +0400 Date: Fri, 10 Jul 2009 10:14:15 +0400 From: Eygene Ryabinkin To: freebsd-current@freebsd.org Message-ID: References: <20090710042106.GC31950@rwpc12.mby.riverwillow.net.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090710042106.GC31950@rwpc12.mby.riverwillow.net.au> Sender: rea-fbsd@codelabs.ru Subject: Re: 8.0-BETA1 bsdlabel broken? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: rea-fbsd@codelabs.ru 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 06:14:19 -0000 Jogh, good day. 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. -- Eygene _ ___ _.--. # \`.|\..----...-'` `-._.-'_.-'` # Remember that it is hard / ' ` , __.--' # to read the on-line manual )/' _/ \ `-_, / # while single-stepping the kernel. `-'" `"\_ ,_.-;_.-\_ ', fsc/as # _.-'_./ {_.' ; / # -- FreeBSD Developers handbook {_.-``-' {_/ #