Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Aug 2014 11:48:01 +0400
From:      "Andrey V. Elsukov" <bu7cher@yandex.ru>
To:        Marcel Moolenaar <marcel@xcllnt.net>, John-Mark Gurney <jmg@funkthat.com>
Cc:        Craig Rodrigues <rodrigc@freebsd.org>, freebsd-current Current <freebsd-current@freebsd.org>
Subject:   Re: mkimg used to create gpt image, problem booting
Message-ID:  <53FAEA31.1070108@yandex.ru>
In-Reply-To: <3AC10D0D-2BD8-4D30-A033-7EE9D923F408@xcllnt.net>
References:  <CAG=rPVeucq%2BsMxe_NPe3Og939o=Sg4WGfYL7PjA1uXGU8uL=8g@mail.gmail.com> <853B0396-2C19-49DF-A8E8-8EB43D107597@xcllnt.net> <CAG=rPVes3Eq87hOE6W135yGvzRiAzHTbCGSxiyd0JBAs2ufqmA@mail.gmail.com> <7CE168C1-6AF3-4AD2-80DB-192AEC49FD2B@xcllnt.net> <CAG=rPVfe6pP08WWaYQ6enk7A6AkT3dBXVxNfK0JgJPaN_rJ_Uw@mail.gmail.com> <CAG=rPVe8Lh=P2MUdycM7%2B2mpSBPhe%2BkTvxR_bjnZfB1EkvK92Q@mail.gmail.com> <53F9AC50.1000000@yandex.ru> <CAG=rPVctN4-UBxRzWhEoEt5e_4d8UXCa0O40LZUHnS5Qj9hFeA@mail.gmail.com> <82000B55-10E5-4348-9F35-38962965A63C@xcllnt.net> <CAG=rPVeLgOGXx8=S18u03JuNGB9PzYk3uYZS8r=sgu3b_UHOmQ@mail.gmail.com> <20140824233143.GQ71691@funkthat.com> <3AC10D0D-2BD8-4D30-A033-7EE9D923F408@xcllnt.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On 25.08.2014 03:55, Marcel Moolenaar wrote:
>> Though, w/ people dd'ing images onto disks, and using growfs to grow
>> as necessary, we might want to allocate a few more more than the
>> minimum...  I do agree that we want to keep sizes to a minimum...
> 
> One thing I can maybe do is simply fill the empty sectors
> that are there because of alignment. If you add -P 4K to
> mkimg, then the first partition will by 4K aligned and you
> have about 5 sectors unused between the end of the GPT
> table and the first sector of the first partition. I may
> as well extend the table to cover those unued sectors.

IMHO, mkimg should behave like gpart and create images in
gpart-compatible way. Some users may want to copy the partition layout
from the image to real hardware and they will not be able to do it.

Also, now FreeBSD 11.0 uses different first usable LBA. By default it is
4k aligned. And this creates some incompatibility with older versions.
You can't do `gpart restore` and get the same table, as you had on older
system.

> However, this is a pretty side-ways way to end up with a
> GPT table that has some extra room. Maybe having scheme-
> specific options for this kind of thing is not bad. At
> least EBR and APM have the same "problem" and the BSD
> disk label can also be created with more than just 8
> partitions.

I thought about implementing `gpart modify` or `gpart set` -n entries to
change number of entries when it is possible (i.e. disklabel(8) can do
it, but gpart doesn't).
Also in r228076 I changed APM code to calculate maximum number of
entries depending from available free space.

-- 
WBR, Andrey V. Elsukov



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