* Bootchooser - remaining_attempts
@ 2017-07-05 12:36 Çağlar Kilimci
2017-07-10 6:48 ` Çağlar Kilimci
2017-07-11 10:48 ` B Gol
0 siblings, 2 replies; 5+ messages in thread
From: Çağlar Kilimci @ 2017-07-05 12:36 UTC (permalink / raw)
To: barebox
Hi all,
I am using barebox 2017.03.0 and my bootchooser variables are:
bootchooser.last_chosen: 2
bootchooser.retry: true
bootchooser.system1.boot: system1
bootchooser.system1.default_attempts: 99
bootchooser.system1.default_priority: 16
bootchooser.system1.priority: 20
bootchooser.system1.remaining_attempts: 5
bootchooser.system2.boot: system2
bootchooser.system2.default_attempts: 9
bootchooser.system2.default_priority: 15
bootchooser.system2.priority: 10
bootchooser.system2.remaining_attempts: 3
bootchooser.targets: system1 system2
And "global.bootchooser.reset_attempts" is empty. I assume counters
will never be reset as written in [1].
So, here is the case that I think it has a problem. system1 has a
problem that does not boot. Bootchooser tries system1 and fails a few
times and then chooses system2. After successful boot of system2,
"bootchooser.system1.remaining_attempts" is still 5. Every boot
sequence bootchooser tries system1 and fails and then system2 is
chosen. If I understand correctly from the documentation, it should be
0 and disabled and will never try at all. Right?
Secondly, There is a bug: if bootchooser.system1.remaining_attempts is
big enough like 10, bootchooser tries to boot system1 as usual and
fails as usual again but it could not boot system2. I am sending the
log below, as a summary "could not open /boot/barebox.env: error 24":
booting 'system1'
sorry, no nested mounts
mount: Device or resource busy
could not open /mnt/rootfs1/boot/zImage: No such file or directory
Booting 'system1' failed: No such file or directory
booting 'system1' failed: No such file or directory
could not open /boot/barebox.env: error 24
Nothing bootable found on 'system2'
Nothing bootable found on 'system2'
Nothing bootable found on 'system2'
bootchooser: No valid targets found:
system1
id: 1
priority: 20
default_priority: 16
remaining attempts: 0
default attempts: 99
boot: 'system1'
disabled due to remaining attempts = 0
system2
id: 2
priority: 10
default_priority: 15
remaining attempts: 0
default attempts: 9
boot: 'system2'
disabled due to remaining attempts = 0
booting 'bootchooser' failed: No such file or directory
[1] http://barebox.org/doc/latest/user/bootchooser.html?highlight=reset_attempts
Sincerely,
--
Çağlar Kilimci
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Bootchooser - remaining_attempts
2017-07-05 12:36 Bootchooser - remaining_attempts Çağlar Kilimci
@ 2017-07-10 6:48 ` Çağlar Kilimci
2017-07-11 9:45 ` AW: " Martin Hollingsworth
2017-07-11 10:48 ` B Gol
1 sibling, 1 reply; 5+ messages in thread
From: Çağlar Kilimci @ 2017-07-10 6:48 UTC (permalink / raw)
To: barebox
Hello everyone,
I am still producing the same problem with
"global.bootchooser.reset_attempts". I would appreciate any ideas.
Sincerely,
2017-07-05 15:36 GMT+03:00 Çağlar Kilimci <ckilimci@gmail.com>:
> Hi all,
>
> I am using barebox 2017.03.0 and my bootchooser variables are:
> bootchooser.last_chosen: 2
> bootchooser.retry: true
> bootchooser.system1.boot: system1
> bootchooser.system1.default_attempts: 99
> bootchooser.system1.default_priority: 16
> bootchooser.system1.priority: 20
> bootchooser.system1.remaining_attempts: 5
> bootchooser.system2.boot: system2
> bootchooser.system2.default_attempts: 9
> bootchooser.system2.default_priority: 15
> bootchooser.system2.priority: 10
> bootchooser.system2.remaining_attempts: 3
> bootchooser.targets: system1 system2
>
> And "global.bootchooser.reset_attempts" is empty. I assume counters
> will never be reset as written in [1].
>
> So, here is the case that I think it has a problem. system1 has a
> problem that does not boot. Bootchooser tries system1 and fails a few
> times and then chooses system2. After successful boot of system2,
> "bootchooser.system1.remaining_attempts" is still 5. Every boot
> sequence bootchooser tries system1 and fails and then system2 is
> chosen. If I understand correctly from the documentation, it should be
> 0 and disabled and will never try at all. Right?
>
> Secondly, There is a bug: if bootchooser.system1.remaining_attempts is
> big enough like 10, bootchooser tries to boot system1 as usual and
> fails as usual again but it could not boot system2. I am sending the
> log below, as a summary "could not open /boot/barebox.env: error 24":
> booting 'system1'
> sorry, no nested mounts
> mount: Device or resource busy
> could not open /mnt/rootfs1/boot/zImage: No such file or directory
> Booting 'system1' failed: No such file or directory
> booting 'system1' failed: No such file or directory
> could not open /boot/barebox.env: error 24
> Nothing bootable found on 'system2'
> Nothing bootable found on 'system2'
> Nothing bootable found on 'system2'
> bootchooser: No valid targets found:
> system1
> id: 1
> priority: 20
> default_priority: 16
> remaining attempts: 0
> default attempts: 99
> boot: 'system1'
> disabled due to remaining attempts = 0
> system2
> id: 2
> priority: 10
> default_priority: 15
> remaining attempts: 0
> default attempts: 9
> boot: 'system2'
> disabled due to remaining attempts = 0
> booting 'bootchooser' failed: No such file or directory
>
>
> [1] http://barebox.org/doc/latest/user/bootchooser.html?highlight=reset_attempts
>
> Sincerely,
> --
> Çağlar Kilimci
--
Çağlar Kilimci
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 5+ messages in thread
* AW: Bootchooser - remaining_attempts
2017-07-10 6:48 ` Çağlar Kilimci
@ 2017-07-11 9:45 ` Martin Hollingsworth
2017-07-12 7:08 ` Çağlar Kilimci
0 siblings, 1 reply; 5+ messages in thread
From: Martin Hollingsworth @ 2017-07-11 9:45 UTC (permalink / raw)
To: Çağlar Kilimci, barebox
Hello Caglar,
I am no expert in bootchooser, but I am currently implementing it on an imx6 board using barebox 2017-3.
Regarding the first issue. These are my settings, with them target A is successfully disabled after 5 attempts and never automatically enabled again.
I set the "default_xxx" values within the config-board script of my barebox default-environment. I do not set the current values (like "A.remaining_attempts") within the environment. They are generated on the first execution of bootchooser and stored within the nv variables. Do you maybe accidentally overwrite the current values on startup with some script from the environment? (happened to me ^^^).
Have you tried explicitly configuring global.bootchooser.reset_attempts='' as empty, instead of not defining it?
<<< from: config-board <<<<<<
# General bootchooser settings
global.bootchooser.disable_on_zero_attempts=0
global.bootchooser.default_attempts=5
global.bootchooser.default_priority=1
global.bootchooser.reset_attempts=''
global.bootchooser.reset_priorities=''
global.bootchooser.retry=1
global.bootchooser.targets="A B"
# Slot "A" default configuration
nv bootchooser.A.boot=A
nv bootchooser.A.default_attempts=5
nv bootchooser.A.default_priority=10
# Slot "B" default configuration
nv bootchooser.B.boot=B
nv bootchooser.B.default_attempts=1
nv bootchooser.B.default_priority=5
<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Regards,
Martin Hollingsworth
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Bootchooser - remaining_attempts
2017-07-05 12:36 Bootchooser - remaining_attempts Çağlar Kilimci
2017-07-10 6:48 ` Çağlar Kilimci
@ 2017-07-11 10:48 ` B Gol
1 sibling, 0 replies; 5+ messages in thread
From: B Gol @ 2017-07-11 10:48 UTC (permalink / raw)
To: Barebox List
According to the following passage of the documentation, I suggest you check and see if the "global.system.reset" is causing the problem.
power-on: The remaining_attempts counters of all enabled targets are reset after a power-on reset ($global.system.reset="POR"). This means after a power cycle all targets will be tried again for the configured number of retries
all-zero: The remaining_attempts counters of all enabled targets are reset when none of them has any remaining_attempts left.
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Bootchooser - remaining_attempts
2017-07-11 9:45 ` AW: " Martin Hollingsworth
@ 2017-07-12 7:08 ` Çağlar Kilimci
0 siblings, 0 replies; 5+ messages in thread
From: Çağlar Kilimci @ 2017-07-12 7:08 UTC (permalink / raw)
To: Martin Hollingsworth; +Cc: barebox
Hello Martin,
Firstly, thank you for your reply.
2017-07-11 12:45 GMT+03:00 Martin Hollingsworth
<Martin.Hollingsworth@itk-engineering.de>:
> Hello Caglar,
> I am no expert in bootchooser, but I am currently implementing it on an imx6 board using barebox 2017-3.
>
> Regarding the first issue. These are my settings, with them target A is successfully disabled after 5 attempts and never automatically enabled again.
> I set the "default_xxx" values within the config-board script of my barebox default-environment. I do not set the current values (like "A.remaining_attempts") within the environment. They are generated on the first execution of bootchooser and stored within the nv variables. Do you maybe accidentally overwrite the current values on startup with some script from the environment? (happened to me ^^^).
> Have you tried explicitly configuring global.bootchooser.reset_attempts='' as empty, instead of not defining it?
Actually, no. I did not intentionally set reset_attempts as an empty
string. As your recommend, while setting it as an empty string, I saw
that each boot time I am setting bootchooser variable from the state
framework:
nv bootchooser.system1.boot=$state.bootchooser.system1.boot
nv bootchooser.system1.default_attempts=$state.bootchooser.system1.default_attempts
nv bootchooser.system1.remaining_attempts=$state.bootchooser.system1.remaining_attempts
nv bootchooser.system1.default_priority=$state.bootchooser.system1.default_priority
nv bootchooser.system1.priority=$state.bootchooser.system1.priority
nv bootchooser.system2.boot=$state.bootchooser.system2.boot
nv bootchooser.system2.default_attempts=$state.bootchooser.system2.default_attempts
nv bootchooser.system2.remaining_attempts=$state.bootchooser.system2.remaining_attempts
nv bootchooser.system2.default_priority=$state.bootchooser.system2.default_priority
nv bootchooser.system2.priority=$state.bootchooser.system2.priority
I am now decreasing 1 from the state each boot time. After enough
unsuccessful attempts, it is disabled and never enabled again.
Thanks again.
Best Regards,
--
Çağlar Kilimci
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-07-12 7:08 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-05 12:36 Bootchooser - remaining_attempts Çağlar Kilimci
2017-07-10 6:48 ` Çağlar Kilimci
2017-07-11 9:45 ` AW: " Martin Hollingsworth
2017-07-12 7:08 ` Çağlar Kilimci
2017-07-11 10:48 ` B Gol
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox