Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 29 Nov 2008 14:09:05 +0000
From:      "Joao Barros" <joao.barros@gmail.com>
To:        "Peter Wemm" <peter@wemm.org>
Cc:        FreeBSD Arch <arch@freebsd.org>, Marcel Moolenaar <xcllnt@mac.com>
Subject:   Re: RFC: making gpart default
Message-ID:  <70e8236f0811290609h2539ede7jc01778edac9c1d5@mail.gmail.com>
In-Reply-To: <e7db6d980811282007j48903cdas289c302e1811a0b9@mail.gmail.com>
References:  <57809A37-B81C-4F50-A418-CD9303F06B72@mac.com> <e7db6d980811282007j48903cdas289c302e1811a0b9@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Nov 29, 2008 at 4:07 AM, Peter Wemm <peter@wemm.org> wrote:
> On Thu, Sep 25, 2008 at 9:59 AM, Marcel Moolenaar <xcllnt@mac.com> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?70e8236f0811290609h2539ede7jc01778edac9c1d5>