Fri, 10 Sep 2021 01:19:23 +0000 ha...@sdf.org
> > The hibernate check does:
> > 
> > bootdev_has_hibernate(void)
> > {
> >         return ((bootdev_dip->bios_info.flags & BDI_HIBVALID)? 1 : 0);
> > 
> > 
> > Someone could have a boot.conf that changes their default disk because
> > they want to boot from a non-standard disk.  Hibernate store will occur
> > to swap on the non-standard disk.  They want to resume from that same
> > non-standard disk.  I have not tested this configuration, but it is
> > plausible.
> > 
> > However by checking for BDI_HIBVALID against the wrong disk, the hibernate
> > will fail for them.
> > 
> > So you've fixed something you don't like, and broken a different
> > configuration.  
> 
> Ah, I missed that possibility.

Not surprising at all, with these kind of local changes guesswork submissions.

> Then the saner configuration would be "set timeout 1", even more so
> since interrupting "boot" by holding ctrl skips the rest of boot.conf.

Why, what is the reasoning and rationale for this prosposal?  How does it meet
the criteria for all systems changed on your use case, what are the results..?

> Should the manual be changed to "set timeout" to not mislead others
> into shooting themselves in foot when unhibernating? There's already an
> example of what the "boot" command does by itself so it has no other
> purpose.

No, there is no proof this is needed.  It's not justified, and not reasonable.

> Index: amd64/stand/boot/boot.8
> ===================================================================
> RCS file: /cvs/src/sys/arch/amd64/stand/boot/boot.8,v
> retrieving revision 1.32
> diff -u -p -r1.32 boot.8
> --- amd64/stand/boot/boot.8   23 Dec 2019 12:44:34 -0000      1.32
> +++ amd64/stand/boot/boot.8   10 Sep 2021 01:09:44 -0000
> @@ -395,9 +395,9 @@ Boot the default kernel:
>  .Pp
>  Remove the 5 second pause at boot-time permanently, causing
>  .Nm
> -to load the kernel immediately without prompting:
> +to load the kernel after 1 second:
>  .Pp
> -.Dl # echo \&"boot\&" > /etc/boot.conf
> +.Dl # echo \&"set timeout 1\&" > /etc/boot.conf
>  .Pp
>  Use serial console.
>  A null modem cable should connect the specified serial port to a terminal.
> Index: hppa/stand/boot/boot.8
> ===================================================================
> RCS file: /cvs/src/sys/arch/hppa/stand/boot/boot.8,v
> retrieving revision 1.26
> diff -u -p -r1.26 boot.8
> --- hppa/stand/boot/boot.8    23 Dec 2019 12:44:34 -0000      1.26
> +++ hppa/stand/boot/boot.8    10 Sep 2021 01:09:44 -0000
> @@ -297,9 +297,9 @@ Boot the default kernel:
>  .Pp
>  Remove the 5 second pause at boot-time permanently, causing
>  .Nm
> -to load the kernel immediately without prompting:
> +to load the kernel after 1 second:
>  .Pp
> -.Dl # echo \&"boot\&" > /etc/boot.conf
> +.Dl # echo \&"set timeout 1\&" > /etc/boot.conf
>  .Pp
>  Use serial console on the first serial port, with the usual 9600 8N1 
> settings.
>  A null modem cable should connect the specified serial port to a terminal.
> Index: i386/stand/boot/boot.8
> ===================================================================
> RCS file: /cvs/src/sys/arch/i386/stand/boot/boot.8,v
> retrieving revision 1.67
> diff -u -p -r1.67 boot.8
> --- i386/stand/boot/boot.8    23 Dec 2019 12:44:34 -0000      1.67
> +++ i386/stand/boot/boot.8    10 Sep 2021 01:09:44 -0000
> @@ -380,9 +380,9 @@ Boot the default kernel:
>  .Pp
>  Remove the 5 second pause at boot-time permanently, causing
>  .Nm
> -to load the kernel immediately without prompting:
> +to load the kernel after 1 second:
>  .Pp
> -.Dl # echo \&"boot\&" > /etc/boot.conf
> +.Dl # echo \&"set timeout 1\&" > /etc/boot.conf
>  .Pp
>  Use serial console.
>  A null modem cable should connect the specified serial port to a terminal.
> Index: landisk/stand/boot/boot.8
> ===================================================================
> RCS file: /cvs/src/sys/arch/landisk/stand/boot/boot.8,v
> retrieving revision 1.12
> diff -u -p -r1.12 boot.8
> --- landisk/stand/boot/boot.8 23 Dec 2019 12:44:34 -0000      1.12
> +++ landisk/stand/boot/boot.8 10 Sep 2021 01:09:44 -0000
> @@ -255,9 +255,9 @@ Boot the default kernel:
>  .Pp
>  Remove the 5 second pause at boot-time permanently, causing
>  .Nm
> -to load the kernel immediately without prompting:
> +to load the kernel after 1 second:
>  .Pp
> -.Dl # echo \&"boot\&" > /etc/boot.conf
> +.Dl # echo \&"set timeout 1\&" > /etc/boot.conf
>  .Pp
>  Boot the kernel named
>  .Pa /bsd.rd
> Index: macppc/stand/boot.8
> ===================================================================
> RCS file: /cvs/src/sys/arch/macppc/stand/boot.8,v
> retrieving revision 1.4
> diff -u -p -r1.4 boot.8
> --- macppc/stand/boot.8       23 Dec 2019 12:44:34 -0000      1.4
> +++ macppc/stand/boot.8       10 Sep 2021 01:09:45 -0000
> @@ -259,9 +259,9 @@ Boot the default kernel:
>  .Pp
>  Remove the 5 second pause at boot-time permanently, causing
>  .Nm
> -to load the kernel immediately without prompting:
> +to load the kernel after 1 second:
>  .Pp
> -.Dl # echo \&"boot\&" > /etc/boot.conf
> +.Dl # echo \&"set timeout 1\&" > /etc/boot.conf
>  .Pp
>  Boot the kernel named
>  .Pa /bsd
> 

Hello Hagen,

This looks like a local testing, proof-reading session instead of development.
Start by enumerating all variants of boot, including network and diskless, and
don't forget other platform hibernation support, not just your own one laptop.
Test and make valid reasoning what will happen with the boot process to cope..

--
Kind regards,
Anton Lazarov
MScEng EECSIT

Reply via email to