Re: disklabel template on miniroot

2017-03-11 Thread Rivo Nurges
Hi!

It looks a bit silly to copy the template from one folder to another with ftp, 
but yeah, it works. Thanks for the hint.

Rivo

On 12/03/2017, 00:13, "owner-t...@openbsd.org on behalf of Theo Buehler" 
<owner-t...@openbsd.org on behalf of t...@math.ethz.ch> wrote:

On Sat, Mar 11, 2017 at 09:59:09PM +, Rivo Nurges wrote:
> Hi!
> 
> Following will add support for disklabel template on miniroot.

Can't you achieve the same by adding

URL to autopartitioning template for disklabel = file:///disklabel.auto

to your auto_{install,upgrade}.conf ?

> 
> Rivo
> 
> Index: distrib/miniroot/install.sub
> ===
> RCS file: /cvs/src/distrib/miniroot/install.sub,v
> retrieving revision 1.987
> diff -u -p -r1.987 install.sub
> --- distrib/miniroot/install.sub  10 Mar 2017 22:34:09 -  1.987
> +++ distrib/miniroot/install.sub  11 Mar 2017 21:56:42 -
> @@ -396,6 +396,11 @@ disklabel_autolayout() {
>   [[ $_disk != $ROOTDISK ]] && return
>  
>   while $AUTO; do
> + if [[ -f /disklabel.auto ]]; then
> + disklabel -T /disklabel.auto -F $_f -w -A $_disk && 
return
> + echo "Autopartitioning failed"
> + exit 1
> + fi
>   ask "URL to autopartitioning template for disklabel?" none
>   [[ $resp == none ]] && break
>   if ! $FTP_TLS && [[ $resp == https://* ]]; then
> Index: share/man/man8/autoinstall.8
> ===
> RCS file: /cvs/src/share/man/man8/autoinstall.8,v
> retrieving revision 1.21
> diff -u -p -r1.21 autoinstall.8
> --- share/man/man8/autoinstall.8  21 Jan 2017 06:00:38 -  1.21
> +++ share/man/man8/autoinstall.8  11 Mar 2017 21:56:42 -
> @@ -58,6 +58,11 @@ behaves as if the machine is netbooted, 
>  In case both files exist,
>  .Pa /auto_install.conf
>  takes precedence.
> +If
> +.Pa /disklabel.auto
> +is found
> +.Nm
> +will use it as the autopartitioning template.
>  .Pp
>  .Nm
>  uses HTTP to fetch one of the files
> @@ -204,6 +209,8 @@ configuration file
>  response file for unattended installation
>  .It Pa upgrade.conf
>  response file for unattended upgrade
> +.It Pa disklabel.auto
> +autopartitioning template for unattended installation
>  .El
>  .Sh EXAMPLES
>  A typical





Re: disklabel template on miniroot

2017-03-11 Thread Theo Buehler
On Sat, Mar 11, 2017 at 09:59:09PM +, Rivo Nurges wrote:
> Hi!
> 
> Following will add support for disklabel template on miniroot.

Can't you achieve the same by adding

URL to autopartitioning template for disklabel = file:///disklabel.auto

to your auto_{install,upgrade}.conf ?

> 
> Rivo
> 
> Index: distrib/miniroot/install.sub
> ===
> RCS file: /cvs/src/distrib/miniroot/install.sub,v
> retrieving revision 1.987
> diff -u -p -r1.987 install.sub
> --- distrib/miniroot/install.sub  10 Mar 2017 22:34:09 -  1.987
> +++ distrib/miniroot/install.sub  11 Mar 2017 21:56:42 -
> @@ -396,6 +396,11 @@ disklabel_autolayout() {
>   [[ $_disk != $ROOTDISK ]] && return
>  
>   while $AUTO; do
> + if [[ -f /disklabel.auto ]]; then
> + disklabel -T /disklabel.auto -F $_f -w -A $_disk && 
> return
> + echo "Autopartitioning failed"
> + exit 1
> + fi
>   ask "URL to autopartitioning template for disklabel?" none
>   [[ $resp == none ]] && break
>   if ! $FTP_TLS && [[ $resp == https://* ]]; then
> Index: share/man/man8/autoinstall.8
> ===
> RCS file: /cvs/src/share/man/man8/autoinstall.8,v
> retrieving revision 1.21
> diff -u -p -r1.21 autoinstall.8
> --- share/man/man8/autoinstall.8  21 Jan 2017 06:00:38 -  1.21
> +++ share/man/man8/autoinstall.8  11 Mar 2017 21:56:42 -
> @@ -58,6 +58,11 @@ behaves as if the machine is netbooted, 
>  In case both files exist,
>  .Pa /auto_install.conf
>  takes precedence.
> +If
> +.Pa /disklabel.auto
> +is found
> +.Nm
> +will use it as the autopartitioning template.
>  .Pp
>  .Nm
>  uses HTTP to fetch one of the files
> @@ -204,6 +209,8 @@ configuration file
>  response file for unattended installation
>  .It Pa upgrade.conf
>  response file for unattended upgrade
> +.It Pa disklabel.auto
> +autopartitioning template for unattended installation
>  .El
>  .Sh EXAMPLES
>  A typical



disklabel template on miniroot

2017-03-11 Thread Rivo Nurges
Hi!

Following will add support for disklabel template on miniroot.

Rivo

Index: distrib/miniroot/install.sub
===
RCS file: /cvs/src/distrib/miniroot/install.sub,v
retrieving revision 1.987
diff -u -p -r1.987 install.sub
--- distrib/miniroot/install.sub10 Mar 2017 22:34:09 -  1.987
+++ distrib/miniroot/install.sub11 Mar 2017 21:56:42 -
@@ -396,6 +396,11 @@ disklabel_autolayout() {
[[ $_disk != $ROOTDISK ]] && return
 
while $AUTO; do
+   if [[ -f /disklabel.auto ]]; then
+   disklabel -T /disklabel.auto -F $_f -w -A $_disk && 
return
+   echo "Autopartitioning failed"
+   exit 1
+   fi
ask "URL to autopartitioning template for disklabel?" none
[[ $resp == none ]] && break
if ! $FTP_TLS && [[ $resp == https://* ]]; then
Index: share/man/man8/autoinstall.8
===
RCS file: /cvs/src/share/man/man8/autoinstall.8,v
retrieving revision 1.21
diff -u -p -r1.21 autoinstall.8
--- share/man/man8/autoinstall.821 Jan 2017 06:00:38 -  1.21
+++ share/man/man8/autoinstall.811 Mar 2017 21:56:42 -
@@ -58,6 +58,11 @@ behaves as if the machine is netbooted, 
 In case both files exist,
 .Pa /auto_install.conf
 takes precedence.
+If
+.Pa /disklabel.auto
+is found
+.Nm
+will use it as the autopartitioning template.
 .Pp
 .Nm
 uses HTTP to fetch one of the files
@@ -204,6 +209,8 @@ configuration file
 response file for unattended installation
 .It Pa upgrade.conf
 response file for unattended upgrade
+.It Pa disklabel.auto
+autopartitioning template for unattended installation
 .El
 .Sh EXAMPLES
 A typical


begin-base64 644 install_autolabel.diff
SW5kZXg6IGRpc3RyaWIvbWluaXJvb3QvaW5zdGFsbC5zdWIKPT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQpSQ1MgZmlsZTog
L2N2cy9zcmMvZGlzdHJpYi9taW5pcm9vdC9pbnN0YWxsLnN1Yix2Cn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