From owner-freebsd-arch@FreeBSD.ORG Sat Nov 29 14:29:52 2008 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 85ED61065675 for ; Sat, 29 Nov 2008 14:29:52 +0000 (UTC) (envelope-from joao.barros@gmail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.157]) by mx1.freebsd.org (Postfix) with ESMTP id 18E708FC13 for ; Sat, 29 Nov 2008 14:29:51 +0000 (UTC) (envelope-from joao.barros@gmail.com) Received: by fg-out-1718.google.com with SMTP id l26so1195111fgb.35 for ; Sat, 29 Nov 2008 06:29:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=6NDEV/cVpxASQyTU0UTaHOF6YOUPy5SvYKQDv4Cpb6c=; b=eyiY+SF7q8w0CbmqSc7Uj6HGDdGDwq7yIsa0zAa+fQH1S9sr0vXppiOGPdkSVHDWDb 6O323BU+5l8A1CoLicsCswwuM5tW6Suc5IGbsFXhHvO/H+qOQaV7+jsUIu62bfUcmyBe ph1UDq7LKnHbHjDXIG5/GLryH6E3UyQPKTBPM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=gTNujrgGiUUxV8DaDsRitKiSZopeKmcY4HBb180AvippG76wlq52Zl6QkXqA4vhu2o evIYJ6gCAf1lWYfM4rOs2cIMXujOtD4Y5uUs1azssJQ0oMFaSVV2tegmm8oF9z5VuiTD cY06Xu7bdbPHbucNGfRNlRxghdmr4NdtTZyCc= Received: by 10.181.149.19 with SMTP id b19mr3161704bko.82.1227967745976; Sat, 29 Nov 2008 06:09:05 -0800 (PST) Received: by 10.180.236.13 with HTTP; Sat, 29 Nov 2008 06:09:05 -0800 (PST) Message-ID: <70e8236f0811290609h2539ede7jc01778edac9c1d5@mail.gmail.com> Date: Sat, 29 Nov 2008 14:09:05 +0000 From: "Joao Barros" To: "Peter Wemm" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <57809A37-B81C-4F50-A418-CD9303F06B72@mac.com> Cc: FreeBSD Arch , Marcel Moolenaar Subject: Re: RFC: making gpart default X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Nov 2008 14:29:52 -0000 On Sat, Nov 29, 2008 at 4:07 AM, Peter Wemm wrote: > On Thu, Sep 25, 2008 at 9:59 AM, Marcel Moolenaar wrote: >> All, >> >> I'd like to switch all architectures to gpart for the reasons given >> below. All current partitioning schemes are supported by gpart and >> work on all platforms. On top of that, ia64 and powerpc are using >> gpart exclusively already. > [..] >> In short: gpart is the first step towards a unified set of >> tools and interfaces and provides the basis for extending >> file system related tools by allowing us to attach real >> meaning to partition types. With the commit and undo feature, >> gpart is ready for use by next generation installers that >> allow us to use any partitioning scheme on any platforms. >> >> Thoughts? > > oh my god. I just tried to use gpart. This needs some SERIOUS help. > > First, the 'gpart create' man page doesn't say what "scheme" is. True. > After guessing, I tried: > > overcee# gpart create -s gpt /dev/twed1 > gpart: 22 scheme 'gpt' > > What does that mean? It turns out that I didn't have GEOM_PART_GPT compiled in. A recent CURRENT has it by default. > > After continuing the guessing game: > > overcee# gpart create -s gpt /dev/twed1 > gpart: 22 provider '/dev/twed1' > > That was useful. Out other tools generally allow /dev prefixes to be optional. > > overcee# gpart create -s gpt twed1 > twed1 created > > Now what? Boot code.. there's no example of this either. I tried: > > overcee# gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 twed1 > gpart: /dev/twed1p1: Invalid argument > > I suppose that beats "22". > > This works though: > overcee# gpart bootcode -b /boot/pmbr twed1 > > This doesn't: > overcee# gpart bootcode -p /boot/gptboot -i 1 twed1 > gpart: /dev/twed1p1: Invalid argument > I haven't figured this out yet. I'm guessing this is because > /boot/gptboot isn't a multiple of 512 bytes. The error message is > obviously giving no help here. > > Let's try padding it: > overcee# dd if=/boot/gptboot of=/tmp/gptboot conv=sync > 14+1 records in > 15+0 records out > 7680 bytes transferred in 0.000098 secs (78375316 bytes/sec) > overcee# gpart bootcode -p /tmp/gptboot -i 1 twed1 > overcee# > > Yep, that worked. Now for a partition... Fixed on Nov 18: http://svn.freebsd.org/viewvc/base?view=revision&revision=185038 > > overcee# gpart add -b 512 -s 512m -t freebsd-ufs twed1 > gpart: 22 size '512m' > Huh? "22"? This would be nice... > > overcee# gpart add -b 512 -s 1048576 -t freebsd-ufs twed1 > twed1p2 added > > But at least I think I'm getting some progress: > overcee# gpart show twed1 > => 34 976771053 twed1 GPT (500.1GB) > 34 478 1 freebsd-boot (244.7KB) > 512 1048576 2 freebsd-ufs (536.9MB) > 1049088 975721999 - free - (499.6GB) > > So I continue.. I figure gpart would pick the first free space: > overcee# gpart add -s 4058062 -t freebsd-ufs twed1 > gpart: Option 'b' not specified. This would be nice too... > > Apparently not... > overcee# gpart add -b 1049088 -s 4058062 -t freebsd-ufs twed1 > twed1p3 added > > Now one has to do a gpart show ; add ; show ; add loop to get the start address. > Yes, it could be smarter and more helpfull. > > This is really, really raw and unfriendly stuff. -- Joao Barros