Project

General

Profile

Actions

Bug #12220

closed

loader multi-console shouldn't override bootenv.rc

Added by John Levon over 3 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:

Description

After #12094, Hans lost his console.

Actions #1

Updated by John Levon over 3 years ago

The problem is that if we have:

root@piano:~# grep console /boot/loader.conf
root@piano:~# grep console /boot/defaults/loader.conf 
console="text,ttya,ttyb,ttyc,ttyd"      # A comma separated list of console(s)
root@piano:~# grep console /boot/solaris/bootenv.rc 
setprop console ttyb

(note: no "os_console") then loader passes in the environment the multi-console value.
We parse that in fakebop, but then over-ride the setting in bootenv.rc.

I don't think the solution to this is to always have bootenv.rc over-ride:
this makes it difficult to fix a mistake there by specifying things in loader.

But, if we see a multi-console setting, it seems reasonable to presume that
the first entry on that list is not necessarily correct, and any bootenv.rc setting
should be preferred.

Actions #2

Updated by John Levon over 3 years ago

I tested this with a bunch of variations:

- no entry in bootenv.rc
- os_console set/unset
- loader console set to "ttyb", "ttya", "text,ttya,ttyb,ttyc,ttyd"

And confirmed that bootenv.rc ONLY over-rides loader if loader supplied
a multi-console value like the above, and when it does so, the console is as
expected.

Actions #3

Updated by Electric Monk over 3 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

git commit 2e6e9b6b9da4e0f480e434e015ff8e9b82300ed1

commit  2e6e9b6b9da4e0f480e434e015ff8e9b82300ed1
Author: John Levon <john.levon@joyent.com>
Date:   2020-01-28T14:14:07.000Z

    12220 loader multi-console shouldn't override bootenv.rc
    Reviewed by: Toomas Soome <tsoome@me.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF