Re: Adding a prompt on the installer before overwriting the partition table

2021-06-28 Thread Renzo Fabriek
Just tried the installer to see what the deafult option was. It was the OpenBSD 
partition and can't remember what the deafult option is without a OpenBSD 
partition. If that defaults to Whole you would have a better point. (thinking 
of the keyboard buffer when impaciant) Otherwise pressing W(hole) is a yes.

I always do a install instead of upgrades. I can make the same mistake with 
disklabel on a machine which has a different layout from my most used layout. I 
can really understand your opinion. But when your using OpenBSD it is expected 
that you are know what your dealing with. It is not a "populair" OS which hold 
your hand.

This year is I use it for 20 years and the installer is just simple and 
straight forward. One of the reasons I find OBSD more easy to use then other 
OSes.


Van: owner-m...@openbsd.org  namens Parodper 

Verzonden: maandag 28 juni 2021 18:21
Aan: misc@openbsd.org 
CC: dera...@openbsd.org 
Onderwerp: Re: Adding a prompt on the installer before overwriting the 
partition table

O 28/06/21 ás 16:53, Theo de Raadt escribiu:
> Parodper  wrote:
>
>> I think there should be a prompt in the installer before
>> overwriting the partition tables. The current behavior is, when
>> selecting the whole disk, to overwrite the partition table
>> directly.
>
> Isn't it kind of obvious that selecting the whole disk requires
> overwriting the partition table?

That assumes that people don't make mistakes, like I did. Having the
default option be «delete everything **without asking**» seems to me as
good place to make mistakes. At least the edit option requires more than
just one key press to delete your data

> The installer has acted this way for more than 20 years.  It is well
> documented.  Haven't heard a complaint in a decade.  Did you read the
> installation docs?

There have been multiple complains:

https://marc.info/?t=14720374222=1=2
https://marc.info/?t=13311235202=1=2
https://marc.info/?t=9437909741=1=2

I decided to start a new thread because those old threads usually end
with a «diff please» or centering too much on how the first user wrote
the mail.

> I doubt other major operating system installers ask you again if you
>  are sure you want this hidden but obvious step, so why should our
> installer?

Off the top of my head I couldn't tell you how other OS do it, but the
Debian installer puts the template into the partitioning program, and
the program asks no matter the option chosen. I would have suggested
something like that, but I preferred to start with something more simple.

> Meanwhile, your change probably breaks including auto and templated
> installs -- because a newly introduced question which isn't answered
> will receive \n, and without y\n it fails.

That is a good complain. I have no experience with automated installs,
so I don't know how they do it. But if the defaults have to be explicit
then, instead of changing the fdisk option, I propose changing the
default to the «(E)dit» option.

On the other hand, if you don't want to change the installer interface
in any way there is nothing more to discuss.

> Furthermore I think the whole concept of installing multiple
> operating systems on one disk and multiple-booting is increasingly
> complex to the point of being a waste of time.

Multiple partitions are not only used for having multiple operating
systems. I usually have a data partition on my machines.

> Major operating systems don't make it trivial.

Depending on your definition of «trivial», yes they do.

> Why should the smaller systems be held to the standard of making it
> easy?

I am not suggesting that OpenBSD should change the install process for a
tablet-based interface. It is a small change for which I have suggested
a diff.

> Sorry to break the news, but as a rule the most fragile
> configurations of any software are the ones unused by the developers.
> This is definitely one.  None of us use multiboot.

True, but this is only tangentially related to multiboot.



Re: Adding a prompt on the installer before overwriting the partition table

2021-06-28 Thread Theo de Raadt
Parodper  wrote:

> O 28/06/21 ás 16:53, Theo de Raadt escribiu:
> > Parodper  wrote:
> > 
> >> I think there should be a prompt in the installer before
> >> overwriting the partition tables. The current behavior is, when 
> >> selecting the whole disk, to overwrite the partition table
> >> directly.
> > Isn't it kind of obvious that selecting the whole disk requires 
> > overwriting the partition table?
> 
> That assumes that people don't make mistakes, like I did.

You did not make a mistake.

It asked if you wanted to use the whole disk, and you said yes.

The install script will not ask the same question in a different way.



Re: Adding a prompt on the installer before overwriting the partition table

2021-06-28 Thread Parodper

O 28/06/21 ás 16:53, Theo de Raadt escribiu:

Parodper  wrote:

I think there should be a prompt in the installer before 
overwriting the partition tables. The current behavior is, when 
selecting the whole disk, to overwrite the partition table 
directly.


Isn't it kind of obvious that selecting the whole disk requires 
overwriting the partition table?


That assumes that people don't make mistakes, like I did. Having the
default option be «delete everything **without asking**» seems to me as
good place to make mistakes. At least the edit option requires more than
just one key press to delete your data

The installer has acted this way for more than 20 years.  It is well 
documented.  Haven't heard a complaint in a decade.  Did you read the

installation docs?


There have been multiple complains:

https://marc.info/?t=14720374222=1=2
https://marc.info/?t=13311235202=1=2
https://marc.info/?t=9437909741=1=2

I decided to start a new thread because those old threads usually end
with a «diff please» or centering too much on how the first user wrote
the mail.


I doubt other major operating system installers ask you again if you
 are sure you want this hidden but obvious step, so why should our 
installer?


Off the top of my head I couldn't tell you how other OS do it, but the
Debian installer puts the template into the partitioning program, and
the program asks no matter the option chosen. I would have suggested
something like that, but I preferred to start with something more simple.

Meanwhile, your change probably breaks including auto and templated 
installs -- because a newly introduced question which isn't answered 
will receive \n, and without y\n it fails.


That is a good complain. I have no experience with automated installs,
so I don't know how they do it. But if the defaults have to be explicit
then, instead of changing the fdisk option, I propose changing the
default to the «(E)dit» option.

On the other hand, if you don't want to change the installer interface
in any way there is nothing more to discuss.

Furthermore I think the whole concept of installing multiple 
operating systems on one disk and multiple-booting is increasingly 
complex to the point of being a waste of time.


Multiple partitions are not only used for having multiple operating
systems. I usually have a data partition on my machines.


Major operating systems don't make it trivial.


Depending on your definition of «trivial», yes they do.

Why should the smaller systems be held to the standard of making it 
easy?


I am not suggesting that OpenBSD should change the install process for a
tablet-based interface. It is a small change for which I have suggested
a diff.

Sorry to break the news, but as a rule the most fragile 
configurations of any software are the ones unused by the developers.

This is definitely one.  None of us use multiboot.


True, but this is only tangentially related to multiboot.



Re: Adding a prompt on the installer before overwriting the partition table

2021-06-28 Thread Renzo Fabriek
Most PC's have a BIOS boot menu which make it easy to use multiple OSes on 
seperate disks. Disks are cheap. Not worth the trouble of bootmanagers.



Van: owner-m...@openbsd.org  namens Theo de Raadt 

Verzonden: maandag 28 juni 2021 16:53
Aan: Parodper 
CC: misc@openbsd.org 
Onderwerp: Re: Adding a prompt on the installer before overwriting the 
partition table

Parodper  wrote:

> I think there should be a prompt in the installer before overwriting the
> partition tables. The current behavior is, when selecting the whole
> disk, to overwrite the partition table directly.

Isn't it kind of obvious that selecting the whole disk requires
overwriting the partition table?

The installer has acted this way for more than 20 years.  It is well
documented.  Haven't heard a complaint in a decade.  Did you read the
installation docs?

I doubt other major operating system installers ask you again if you are
sure you want this hidden but obvious step, so why should our installer?
Meanwhile, your change probably breaks including auto and templated
installs -- because a newly introduced question which isn't answered
will receive \n, and without y\n it fails.

Furthermore I think the whole concept of installing multiple operating
systems on one disk and multiple-booting is increasingly complex to the
point of being a waste of time.  Major operating systems don't make it
trivial.  Why should the smaller systems be held to the standard of
making it easy?  It is easy to get another machine, or use a virtual
machine.  Sorry to break the news, but as a rule the most fragile
configurations of any software are the ones unused by the developers.
This is definately one.  None of us use multiboot.



Re: Adding a prompt on the installer before overwriting the partition table

2021-06-28 Thread Sven F.
On Mon, Jun 28, 2021 at 10:55 AM Theo de Raadt  wrote:
>
> Parodper  wrote:
>
> > I think there should be a prompt in the installer before overwriting the
> > partition tables. The current behavior is, when selecting the whole
> > disk, to overwrite the partition table directly.
>
> Isn't it kind of obvious that selecting the whole disk requires
> overwriting the partition table?
>
> The installer has acted this way for more than 20 years.  It is well
> documented.  Haven't heard a complaint in a decade.  Did you read the
> installation docs?
>
> I doubt other major operating system installers ask you again if you are
> sure you want this hidden but obvious step, so why should our installer?
> Meanwhile, your change probably breaks including auto and templated
> installs -- because a newly introduced question which isn't answered
> will receive \n, and without y\n it fails.
>
> Furthermore I think the whole concept of installing multiple operating
> systems on one disk and multiple-booting is increasingly complex to the
> point of being a waste of time.  Major operating systems don't make it
> trivial.  Why should the smaller systems be held to the standard of
> making it easy?  It is easy to get another machine, or use a virtual
> machine.  Sorry to break the news, but as a rule the most fragile
> configurations of any software are the ones unused by the developers.
> This is definately one.  None of us use multiboot.
>

my 2 cents here,

I multi booted in 1999 , it's mostly useless this days, as stated above,
if i were in a hurry i would have a usb key with openBSD boolader and
MAYBE a boot.conf
so i ask the BIOS to go boot that ( with f8 or f12 or whatever the
bios provides )

This key can also be used as an emergency tool in case of hard drive failures.

(W)hole disk is quite clear

I wonder if anyone is using XEN this days to have multiple OS

-- 
--
-
Knowing is not enough; we must apply. Willing is not enough; we must do



Re: Adding a prompt on the installer before overwriting the partition table

2021-06-28 Thread Theo de Raadt
Parodper  wrote:

> I think there should be a prompt in the installer before overwriting the
> partition tables. The current behavior is, when selecting the whole
> disk, to overwrite the partition table directly.

Isn't it kind of obvious that selecting the whole disk requires
overwriting the partition table?

The installer has acted this way for more than 20 years.  It is well
documented.  Haven't heard a complaint in a decade.  Did you read the
installation docs?

I doubt other major operating system installers ask you again if you are
sure you want this hidden but obvious step, so why should our installer?
Meanwhile, your change probably breaks including auto and templated
installs -- because a newly introduced question which isn't answered
will receive \n, and without y\n it fails.

Furthermore I think the whole concept of installing multiple operating
systems on one disk and multiple-booting is increasingly complex to the
point of being a waste of time.  Major operating systems don't make it
trivial.  Why should the smaller systems be held to the standard of
making it easy?  It is easy to get another machine, or use a virtual
machine.  Sorry to break the news, but as a rule the most fragile
configurations of any software are the ones unused by the developers.
This is definately one.  None of us use multiboot.



Adding a prompt on the installer before overwriting the partition table

2021-06-28 Thread Parodper

I think there should be a prompt in the installer before overwriting the
partition tables. The current behavior is, when selecting the whole
disk, to overwrite the partition table directly.

I am suggesting this because I once by mistake double pressed enter at
the «Partitioning Disks» stage, selecting my main drive but also
selecting the default partitioning option. I quickly canceled the
operation, but it had already deleted my GPT table. I was able to
recover it, but it should have asked, like it does on the «(E)dit»
option.

I would suggest modifying install.md like this (example from the amd64
version):

--- install.md2021-06-28 15:07:22.28218 +0200
+++ install.md.ask2021-06-28 15:08:44.776914131 +0200
@@ -71,7 +71,7 @@
 case $resp in
 [wW]*)
 echo -n "Setting OpenBSD MBR partition to whole $_disk..."
-fdisk -iy $_disk >/dev/null
+fdisk -i $_disk
 echo "done."
 return ;;
 [gG]*)
@@ -81,7 +81,7 @@
 fi

 echo -n "Setting OpenBSD GPT partition to whole $_disk..."
-fdisk -iy -g -b 960 $_disk >/dev/null
+fdisk -i -g -b 960 $_disk
 echo "done."
 return ;;
 [eE]*)