Re: autoinstall (eg: disklabel -T) doesn't support templates that specify partition sizes in sectors?

2016-10-07 Thread Claus Assmann
On Thu, Oct 06, 2016, Erling Westenvik wrote:

[I'm only replying because I ran into a problem in this area and
posted a patch suggestion to the tech list; a different fix was
applied after some discussion.]

> templates, I was a little surprised to find that disklabel(8) apparently
> does not support specifying partition sizes givin in sectors, only in
...
> or megabytes. But I got curious as to why templates cannot be specified
> in sectors?

Just a guess: maybe because nobody needed it (so far)?

apply_unit() in src/sbin/disklabel/editor.c might be something you
want to look at and provide a patch? If a developer considers it
interesting/important enough, it might get into the tree.



autoinstall (eg: disklabel -T) doesn't support templates that specify partition sizes in sectors?

2016-10-06 Thread Erling Westenvik
Experimenting with autoinstall(8) and predefined partition layout
templates, I was a little surprised to find that disklabel(8) apparently
does not support specifying partition sizes givin in sectors, only in
units (b,c,k,m,g,t) and/or percentages?  Am I missing out on something
obvious here?

My use case is the need to make autoinstallations that would be
installed onto (large) HDD/SSD's but with sector sized boundries such
that the installations could fit *exactly* onto, lets say 4 or 8GB
flash media.

Not the end of the world, of course. I will survive wasting a few kilo-
or megabytes. But I got curious as to why templates cannot be specified
in sectors?

This is OpenBSD 6.0.

Cheers,

Erling