Index | Thread | Search

From:
Nir Lichtman <nir@lichtman.org>
Subject:
boot(8): Fix incorrect timeout logic description
To:
tech@openbsd.org
Date:
Sun, 27 Oct 2024 06:57:15 +0000

Download raw body.

Thread
  • Nir Lichtman:

    boot(8): Fix incorrect timeout logic description

Problem: The boot(8) manpage currently describes the bootloader timeout logic to be
as if upon failure, it continuously attempts to reload the kernel with no upper bound
on the number of attempts. In the source code at sys/stand/boot/boot.c:150 the logic
dictates that only 2 attempts in total are attempted before giving up,
I have tested and verified this failure logic on my i386 system.

Solution: Fix the description on the manpage to emphasize that only a second attempt
is made in case the first attempt fails.


=======


diff --git sys/arch/alpha/stand/nboot/boot.8 sys/arch/alpha/stand/nboot/boot.8
index 9e8e970f5..e261bb264 100644
--- sys/arch/alpha/stand/nboot/boot.8
+++ sys/arch/alpha/stand/nboot/boot.8
@@ -61,7 +61,7 @@ If time expires, the kernel will be loaded according to
 the current variable settings (see the
 .Ic set
 command).
-Each time a kernel load fails, the timeout is increased by one second.
+If the kernel load fails, a second attempt is made with the timeout increased by one second.
 The sequence of
 .Nm
 operations is as follows:
diff --git sys/arch/amd64/stand/boot/boot.8 sys/arch/amd64/stand/boot/boot.8
index cdeb55a3c..c55de65f6 100644
--- sys/arch/amd64/stand/boot/boot.8
+++ sys/arch/amd64/stand/boot/boot.8
@@ -67,7 +67,7 @@ If time expires, the kernel will be loaded according to
 the current variable settings (see the
 .Ic set
 command).
-Each time a kernel load fails, the timeout is increased by one second.
+If the kernel load fails, a second attempt is made with the timeout increased by one second.
 The sequence of
 .Nm
 operations is as follows:
diff --git sys/arch/hppa/stand/boot/boot.8 sys/arch/hppa/stand/boot/boot.8
index 117f7b6cc..dfec16a7f 100644
--- sys/arch/hppa/stand/boot/boot.8
+++ sys/arch/hppa/stand/boot/boot.8
@@ -63,7 +63,7 @@ If time expires, the kernel will be loaded according to
 the current variable settings (see the
 .Nm set
 command).
-Each time a kernel load fails, the timeout is increased by one second.
+If the kernel load fails, a second attempt is made with the timeout increased by one second.
 The sequence of
 .Nm
 operations is as follows:
diff --git sys/arch/i386/stand/boot/boot.8 sys/arch/i386/stand/boot/boot.8
index 6d15b9d58..1838e8869 100644
--- sys/arch/i386/stand/boot/boot.8
+++ sys/arch/i386/stand/boot/boot.8
@@ -67,7 +67,7 @@ If time expires, the kernel will be loaded according to
 the current variable settings (see the
 .Ic set
 command).
-Each time a kernel load fails, the timeout is increased by one second.
+If the kernel load fails, a second attempt is made with the timeout increased by one second.
 The sequence of
 .Nm
 operations is as follows:
diff --git sys/arch/landisk/stand/boot/boot.8 sys/arch/landisk/stand/boot/boot.8
index 4e06cfa84..7f59704ae 100644
--- sys/arch/landisk/stand/boot/boot.8
+++ sys/arch/landisk/stand/boot/boot.8
@@ -61,7 +61,7 @@ If time expires, the kernel will be loaded according to
 the current variable settings (see the
 .Ic set
 command).
-Each time a kernel load fails, the timeout is increased by one second.
+If the kernel load fails, a second attempt is made with the timeout increased by one second.
 The sequence of
 .Nm
 operations is as follows:
diff --git sys/arch/luna88k/stand/boot/boot.8 sys/arch/luna88k/stand/boot/boot.8
index b5c056a59..1502e6eb7 100644
--- sys/arch/luna88k/stand/boot/boot.8
+++ sys/arch/luna88k/stand/boot/boot.8
@@ -62,7 +62,7 @@ If time expires, the kernel will be loaded according to
 the current variable settings (see the
 .Ic set
 command).
-Each time a kernel load fails, the timeout is increased by one second.
+If the kernel load fails, a second attempt is made with the timeout increased by one second.
 The sequence of
 .Nm
 operations is as follows:
diff --git sys/arch/macppc/stand/boot.8 sys/arch/macppc/stand/boot.8
index 5f385f6cf..605233aac 100644
--- sys/arch/macppc/stand/boot.8
+++ sys/arch/macppc/stand/boot.8
@@ -62,7 +62,7 @@ If time expires, the kernel will be loaded according to
 the current variable settings (see the
 .Ic set
 command).
-Each time a kernel load fails, the timeout is increased by one second.
+If the kernel load fails, a second attempt is made with the timeout increased by one second.
 The sequence of
 .Nm
 operations is as follows: