Bug#818065: console-setup is not read correctly at boottime and must be started manually

2018-02-16 Thread Jean-Christian de Rivaz
Hi all,

I have this problem on 8 embedded systems running armbian stretch that all
reports error like this on the systemd journal:

Feb 16 14:17:10 rod-ba82a8 console-setup.sh[293]: /bin/setupcon: 866:
/bin/setupcon: cannot open /tmp/tmpkbd.BccRnI: No such file
Feb 16 14:17:10 rod-ba82a8 systemd[1]: console-setup.service: Main process
exited, code=exited, status=1/FAILURE
Feb 16 14:17:10 rod-ba82a8 systemd[1]: Failed to start Set console font and
keymap.
Feb 16 14:17:10 rod-ba82a8 systemd[1]: console-setup.service: Unit entered
failed state.
Feb 16 14:17:10 rod-ba82a8 systemd[1]: console-setup.service: Failed with
result 'exit-code'

So it look like the /tmp mount is required. I added it into
the RequiresMountsFor line of the service file, run systemctl
daemon-reload, but this make no change on the boot: console-setup failed
with exactly the same error message.

Then I tryed to run 'setupcon' and 'reboot', no change.

Then I tryed to run 'systemctl start console-setup.service' and 'reboot':
it worked !.

So my conclusion so far are:

1) Yes setupcon and  console-setup.service require /tmp mount but this is
not the rot cause of the problem, even if the error message let you think
so.

2) Simply running 'systemctl start console-setup.service' manually solved
the problem on those 8 systems that also have /tmp added
into RequiresMountsFor.

Look like a timing and probably a dependency issue that make early
console-setup to fail because it didn't find a expected file into /tmp. I
don't know how this file is supposed to be there at bot time.

Best regards.
Jean-Christian


Bug#818065: console-setup is not read correctly at boottime and must be started manually

2017-10-23 Thread Rupert Perry
Hi Anton,

> > > This happened to me as well, check if a slight change to the systemd
> > > unit file helps:
> > > /lib/systemd/system/console-setup.service
> > > RequiresMountsFor=/usr /tmp
> > 
> > I have this same problem and I tried this solution and it didn't fix 
> > the problem for me.
> 
> I suppose this fixes the problem with the upgrades of console-setup. But I
> don't like this solution because even if it fixes the problem (does it?),
> it is not the right solution.  I don't think console-setup 
> needs /tmp for its work.  This solution works only because requiring 
> /tmp to be mounted means some other dependency will be satisfied as 
> well.  But who knows what this other dependency is...

Just to be clear - I tried adding /tmp to the unit file and it did NOT fix the 
problem.  I had to re-generate the cache files to resolve the issue and I 
restored the system unit file to not require a mount for /tmp as before.  

The bug is that there was a reference to a non-existent file in /tmp in the 
previous version of /etc/console-setup/cached_setup_keyboard.sh which 
disappeared when it was re-generated.  I imagine the /tmp file was there when 
it was originally generated, but it was of course not there on a subsequent 
reboot.  When I regenerated the cache files 
/etc/console-setup/cached_setup_keyboard.sh changed as follows:

-loadkeys '/tmp/tmpkbd.iDWdSi' > '/dev/null'
+loadkeys '/etc/console-setup/cached_UTF-8_del.kmap.gz' > '/dev/null'

Rupert.



Bug#818065: console-setup is not read correctly at boottime and must be started manually

2017-10-23 Thread Anton Zinoviev
On Mon, Oct 23, 2017 at 02:55:58PM +, Rupert Perry wrote:
> 
> > This happened to me as well, check if a slight change to the systemd
> > unit file helps:
> > /lib/systemd/system/console-setup.service
> > RequiresMountsFor=/usr /tmp
> 
> I have this same problem and I tried this solution and it didn't fix 
> the problem for me.

I suppose this fixes the problem with the upgrades of console-setup. But I
don't like this solution because even if it fixes the problem (does it?),
it is not the right solution.  I don't think console-setup 
needs /tmp for its work.  This solution works only because requiring 
/tmp to be mounted means some other dependency will be satisfied as 
well.  But who knows what this other dependency is...

Anton Zinoviev



Bug#818065: console-setup is not read correctly at boottime and must be started manually

2017-10-23 Thread Rupert Perry
Hi

> This happened to me as well, check if a slight change to the systemd
> unit file helps:
> /lib/systemd/system/console-setup.service
> RequiresMountsFor=/usr /tmp
>
> i.e. add /tmp
> My /tmp is mounted as tmpfs so that could pose a problem. After changing
> this line console-setup seems to start normally during the boot up.


I have this same problem and I tried this solution and it didn't fix the 
problem for me.  However, when I then ran 'rm /etc/console-setup/cached_*' and 
then 'setupcon --save-only' and this fixed the problem.



As I am running etckeeper, I checked to see the difference in the newly 
generated files and noticed that the old loadkeys in 
/etc/console-setup/cached_setup_keyboard.sh refers to a temporary file in /tmp 
whereas the new version refers to /etc/console-setup/cached_UTF-8_del.kmap.gz 
instead.  See here:



root@duck:/etc# git diff

diff --git a/console-setup/cached_setup_keyboard.sh 
b/console-setup/cached_setup_keyboard.sh

index bdc822d..30b46c1 100755

--- a/console-setup/cached_setup_keyboard.sh

+++ b/console-setup/cached_setup_keyboard.sh

@@ -10,4 +10,4 @@ kbd_mode '-u' < '/dev/tty3'

 kbd_mode '-u' < '/dev/tty4'

 kbd_mode '-u' < '/dev/tty5'

 kbd_mode '-u' < '/dev/tty6'

-loadkeys '/tmp/tmpkbd.iDWdSi' > '/dev/null'

+loadkeys '/etc/console-setup/cached_UTF-8_del.kmap.gz' > '/dev/null'

root@duck:/etc#



It would seem to me that when the original cached_setup_keyboard.sh was 
generated previously, the temporary file was incorrectly put into /etc/ 
console-setup/cached_setup_keyboard.sh instead of the correct file.



Best wishes,



Rupert.






Bug#818065: console-setup is not read correctly at boottime and must be started manually

2017-10-19 Thread Sergey Shpikin
This happened to me as well, check if a slight change to the systemd 
unit file helps:

/lib/systemd/system/console-setup.service
RequiresMountsFor=/usr /tmp

i.e. add /tmp
My /tmp is mounted as tmpfs so that could pose a problem. After changing 
this line console-setup seems to start normally during the boot up.


On Sat, 26 Nov 2016 18:55:59 +0100 Nicolas LE CAM wrote:
> Package: console-setup
> Version: 1.153
> Followup-For: Bug #818065
>
> Dear Maintainer,
>
> *** Reporter, please consider answering these questions, where 
appropriate ***

>
> * What led up to the situation?
> * What exactly did you do (or not do) that was effective (or
> ineffective)?
> * What was the outcome of this action?
> * What outcome did you expect instead?
>
> *** End of the template - remove these template lines ***
>
> MIME-Version: 1.0
> Content-Transfer-Encoding: 8bit
> Content-Type: text/plain; charset="UTF-8"
> From: Nicolas LE CAM
> To: Debian Bug Tracking System <818...@bugs.debian.org>
> Subject: Re: console-setup is not read correctly at boottime and must 
be started

> manually
> Bcc: Nicolas LE CAM
>
> Package: console-setup
> Version: 1.153
> Followup-For: Bug #818065
>
> Dear Maintainer,
>
> Same problem here, I'm not sure if it's exactly the same cause though.
>
> In my case it seems to be a problem with /tmp availability or 
writability so also related to bug #620491 except this one was happening 
with sysvinit and is marked fixed.

>
> $ systemctl status console-setup.service
> ● console-setup.service - Set console font and keymap
> Loaded: loaded (/lib/systemd/system/console-setup.service; enabled; 
vendor preset: enabled)
> Active: failed (Result: exit-code) since Sat 2016-11-26 18:17:30 CET; 
14min ago
> Process: 386 ExecStart=/lib/console-setup/console-setup.sh 
(code=exited, status=1/FAILURE)

> Main PID: 386 (code=exited, status=1/FAILURE)
> CPU: 393ms
>
> nov. 26 18:17:30 rio systemd[1]: Starting Set console font and keymap...
> nov. 26 18:17:30 rio console-setup.sh[386]: /bin/setupcon: 866: 
/bin/setupcon: cannot open /tmp/tmpkbd.LsV4Kk: No such file
> nov. 26 18:17:30 rio systemd[1]: console-setup.service: Main process 
exited, code=exited, status=1/FAILURE
> nov. 26 18:17:30 rio systemd[1]: Failed to start Set console font and 
keymap.
> nov. 26 18:17:30 rio systemd[1]: console-setup.service: Unit entered 
failed state.
> nov. 26 18:17:30 rio systemd[1]: console-setup.service: Failed with 
result 'exit-code'.

>
> Executing /lib/console-setup/console-setup.sh in the console seems to 
fix the problem, no more errors reported afterwards :

>
> $ systemctl status console-setup.service
> ● console-setup.service - Set console font and keymap
> Loaded: loaded (/lib/systemd/system/console-setup.service; enabled; 
vendor preset: enabled)

> Active: active (exited) since Sat 2016-11-26 18:32:54 CET; 14min ago
> Process: 340 ExecStart=/lib/console-setup/console-setup.sh 
(code=exited, status=0/SUCCESS)

> Main PID: 340 (code=exited, status=0/SUCCESS)
> Tasks: 0 (limit: 4915)
> Memory: 0B



Bug#818065: Sv: Bug#818065: console-setup is not read correctly at boottime and must be started manually

2017-01-06 Thread Kristian Klausen
Hello Anton

> Yes, in this case setupcon is never run from console-setup.sh.  However 
> there is no need to use setupcon in order to configure the font because 
> this is done by /lib/udev/rules.d/90-console-setup.rules and the 
> keyboard is configured by /lib/systemd/system/keyboard-setup.service.
keyboard-setup.service doesn't seems to configure the layout, rerunning it 
change nothing but as soon I rerun console-setup.service the layout is fixed.

> How big is is this image?  Will it be possible to send it to me so I can 
> test?
Around ~ 700MB, but I need to strip a few thing out before I can share it. I'm 
properly just gonna upload it to my webserver.

Regards Kristian Klausen 


Bug#818065: console-setup is not read correctly at boottime and must be started manually

2017-01-04 Thread Anton Zinoviev
On Tue, Jan 03, 2017 at 11:27:26PM +, Kristian Klausen wrote:
> 
> So I looked a bit on the code, and I think the issue is caused by line 
> 11 in console-setup (*), the line make so console-setup.sh does 
> nothing at first run after boot, and as console-setup.service is only 
> run once per boot, setupcon (which configure keyboard layout) is never 
> run.

Yes, in this case setupcon is never run from console-setup.sh.  However 
there is no need to use setupcon in order to configure the font because 
this is done by /lib/udev/rules.d/90-console-setup.rules and the 
keyboard is configured by /lib/systemd/system/keyboard-setup.service.

> As it is a live-image, every boot is "first boot" as Anton said could 
> give issue.

How big is is this image?  Will it be possible to send it to me so I can 
test?

Anton Zinoviev



Bug#818065: console-setup is not read correctly at boottime and must be started manually

2017-01-03 Thread Kristian Klausen
Hello


I have just experienced this issue after "upgrading" (rebuilding) my live image 
to stretch from jessie.


As it is a live-image, every boot is "first boot" as Anton said could give 
issue.


So I looked a bit on the code, and I think the issue is caused by line 11 in 
console-setup (*), the line make so console-setup.sh does nothing at first run 
after boot, and as console-setup.service is only run once per boot, setupcon 
(which configure keyboard layout) is never run.


How did this ever get into testing? :)


* 
https://anonscm.debian.org/cgit/d-i/console-setup.git/tree/init/console-setup.sh?id=85d541bcfe7557caee0e544ac6c547f97174db32#n11



Regards Kristian Klausen


Bug#818065: console-setup is not read correctly at boottime and must be started manually

2016-11-26 Thread Nicolas LE CAM
Package: console-setup
Version: 1.153
Followup-For: Bug #818065

Dear Maintainer,

*** Reporter, please consider answering these questions, where appropriate ***

   * What led up to the situation?
   * What exactly did you do (or not do) that was effective (or
 ineffective)?
   * What was the outcome of this action?
   * What outcome did you expect instead?

*** End of the template - remove these template lines ***

MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset="UTF-8"
From: Nicolas LE CAM 
To: Debian Bug Tracking System <818...@bugs.debian.org>
Subject: Re: console-setup is not read correctly at boottime and must be started
 manually
Bcc: Nicolas LE CAM 

Package: console-setup
Version: 1.153
Followup-For: Bug #818065

Dear Maintainer,

Same problem here, I'm not sure if it's exactly the same cause though.

In my case it seems to be a problem with /tmp availability or writability so 
also related to bug #620491 except this one was happening with sysvinit and is 
marked fixed.

$ systemctl status console-setup.service
● console-setup.service - Set console font and keymap
   Loaded: loaded (/lib/systemd/system/console-setup.service; enabled; vendor 
preset: enabled)
   Active: failed (Result: exit-code) since Sat 2016-11-26 18:17:30 CET; 14min 
ago
  Process: 386 ExecStart=/lib/console-setup/console-setup.sh (code=exited, 
status=1/FAILURE)
 Main PID: 386 (code=exited, status=1/FAILURE)
  CPU: 393ms

nov. 26 18:17:30 rio systemd[1]: Starting Set console font and keymap...
nov. 26 18:17:30 rio console-setup.sh[386]: /bin/setupcon: 866: /bin/setupcon: 
cannot open /tmp/tmpkbd.LsV4Kk: No such file
nov. 26 18:17:30 rio systemd[1]: console-setup.service: Main process exited, 
code=exited, status=1/FAILURE
nov. 26 18:17:30 rio systemd[1]: Failed to start Set console font and keymap.
nov. 26 18:17:30 rio systemd[1]: console-setup.service: Unit entered failed 
state.
nov. 26 18:17:30 rio systemd[1]: console-setup.service: Failed with result 
'exit-code'.

Executing /lib/console-setup/console-setup.sh in the console seems to fix the 
problem, no more errors reported afterwards :

$ systemctl status console-setup.service 
● console-setup.service - Set console font and keymap
   Loaded: loaded (/lib/systemd/system/console-setup.service; enabled; vendor 
preset: enabled)
   Active: active (exited) since Sat 2016-11-26 18:32:54 CET; 14min ago
  Process: 340 ExecStart=/lib/console-setup/console-setup.sh (code=exited, 
status=0/SUCCESS)
 Main PID: 340 (code=exited, status=0/SUCCESS)
Tasks: 0 (limit: 4915)
   Memory: 0B
  CPU: 0
   CGroup: /system.slice/console-setup.service

nov. 26 18:32:54 rio systemd[1]: Starting Set console font and keymap...
nov. 26 18:32:54 rio systemd[1]: Started Set console font and keymap.

regards,
Nicolas

-- System Information:
Debian Release: stretch/sid
  APT prefers testing
  APT policy: (900, 'testing'), (50, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 4.9.0-rc5-amd64 (SMP w/4 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages console-setup depends on:
ii  console-setup-linux 1.153
ii  debconf 1.5.59
ii  keyboard-configuration  1.153
ii  xkb-data2.18-1

console-setup recommends no packages.

Versions of packages console-setup suggests:
ii  locales   2.24-5
ii  lsb-base  9.20161101

Versions of packages keyboard-configuration depends on:
ii  debconf 1.5.59
ii  liblocale-gettext-perl  1.07-3+b1

Versions of packages console-setup-linux depends on:
ii  init-system-helpers 1.46
ii  initscripts 2.88dsf-59.8
ii  kbd 2.0.3-2
ii  keyboard-configuration  1.153

console-setup-linux suggests no packages.

Versions of packages console-setup is related to:
pn  console-common
pn  console-data  
pn  console-tools 
ii  gnome-control-center  1:3.22.1-1
ii  kbd   2.0.3-2
ii  systemd   232-3

-- debconf information:
  console-setup/codeset47: # Latin1 and Latin5 - western Europe and Turkic 
languages
  console-setup/store_defaults_in_debconf_db: true
  console-setup/fontface47: Fixed
* keyboard-configuration/toggle: Alt+Shift
  debian-installer/console-setup-udeb/title:
  keyboard-configuration/unsupported_layout: true
* keyboard-configuration/variant: Français - Français (variante obsolète)
* keyboard-configuration/xkb-keymap: us
* keyboard-configuration/altgr: The default for the keyboard layout
  console-setup/use_system_font:
  console-setup/fontsize-fb47: 8x16
  console-setup/guess_font:
* keyboard-configuration/switch: No temporary switch
* keyboard-configuration/other:
  keyboard-configuration/ctrl_alt_bksp: false
* keyboard-configuration/variantcode: ,
* keyboard-configuration/layout:
  

Bug#818065: console-setup is not read correctly at boottime and must be started manually

2016-03-14 Thread Anton Zinoviev
On Sun, Mar 13, 2016 at 10:08:23AM +0100, Thomas Schmidt wrote:
> 
>* What led up to the situation?
> 
> Not reproduceable

There is a slight possibility for the current console-setup to leave the 
console unconfigured during the first boot. Have you observed 
misconfigured console more than once?

Anton Zinoviev



Bug#818065: console-setup is not read correctly at boottime and must be started manually

2016-03-13 Thread Thomas Schmidt
Package: console-setup
Version: 1.138
Severity: normal

Dear Maintainer,

*** Reporter, please consider answering these questions, where appropriate ***

   * What led up to the situation?

Not reproduceable

   * What exactly did you do (or not do) that was effective (or
 ineffective)?

Restarting /etc/init.d/console-setup.sh helps, renaming console-setup.sh to
console-setup doesn't. 

   * What was the outcome of this action?

After /etc/init.d/console-setup.sh restart, everything is fine.

   * What outcome did you expect instead?

Not to do the restart.

*** End of the template - remove these template lines ***


-- System Information:
Debian Release: stretch/sid
  APT prefers testing
  APT policy: (650, 'testing'), (600, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 4.3.0-1-686-pae (SMP w/2 CPU cores)
Locale: LANG=de_AT.UTF-8, LC_CTYPE=de_AT.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages console-setup depends on:
ii  console-setup-linux 1.138
ii  debconf 1.5.58
ii  keyboard-configuration  1.138
ii  xkb-data2.17-1

console-setup recommends no packages.

Versions of packages console-setup suggests:
ii  locales   2.21-9
ii  lsb-base  9.20160110

Versions of packages keyboard-configuration depends on:
ii  debconf 1.5.58
ii  liblocale-gettext-perl  1.07-1+b1

Versions of packages console-setup-linux depends on:
ii  console-tools   1:0.2.3dbs-70
ii  initscripts 2.88dsf-59.3
ii  kbd-compat [kbd]1:0.2.3dbs-70
ii  keyboard-configuration  1.138

console-setup-linux suggests no packages.

Versions of packages console-setup is related to:
ii  console-common0.7.89
ii  console-data  2:1.12-5
ii  console-tools 1:0.2.3dbs-70
pn  gnome-control-center  
ii  kbd-compat [kbd]  1:0.2.3dbs-70
ii  systemd   229-2

-- debconf information:
* keyboard-configuration/other:
  console-setup/fontsize: 8x16
  console-setup/charmap47: UTF-8
  keyboard-configuration/unsupported_layout: true
  console-setup/guess_font:
* keyboard-configuration/variantcode:
* keyboard-configuration/xkb-keymap: de
  keyboard-configuration/unsupported_options: true
* keyboard-configuration/optionscode:
  keyboard-configuration/unsupported_config_layout: true
  console-setup/store_defaults_in_debconf_db: true
  console-setup/fontsize-fb47: 8x16
  console-setup/fontface47: Terminus
  debian-installer/console-setup-udeb/title:
  console-setup/codesetcode: Lat15
* keyboard-configuration/toggle: No toggling
* keyboard-configuration/compose: No compose key
* keyboard-configuration/store_defaults_in_debconf_db: true
  console-setup/codeset47: # Latin1 and Latin5 - western Europe and Turkic 
languages
* keyboard-configuration/modelcode: pc105
* keyboard-configuration/switch: No temporary switch
* keyboard-configuration/layout:
  console-setup/fontsize-text47: 8x16
* keyboard-configuration/altgr: The default for the keyboard layout
  console-setup/framebuffer_only:
  keyboard-configuration/ctrl_alt_bksp: false
* keyboard-configuration/layoutcode: de
  keyboard-configuration/unsupported_config_options: true
* keyboard-configuration/variant: Deutsch
* keyboard-configuration/model: Generische PC-Tastatur mit 105 Tasten (Intl)
  console-setup/use_system_font: