-
Notifications
You must be signed in to change notification settings - Fork 669
Vconsole.conf KEYMAP= FONT= _base mkinitcpio.conf v40 error #3928
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| # Corrects another warning | ||
| vconsole_content += f'FONT={font_vconsole}\n' | ||
|
|
||
| vconsole_path.write_text(vconsole_content) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it certain that this file does not exist at this point? If so then this iwll override any existing content
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In addition, shouldn't we use localectl to update the file?
Running a localectrl set-keymap XXX will update this file for me, so I don't understand why we would want to do this manually?
For convenience, localectl may be used to set the console keymap. It will change the KEYMAP variable in /etc/vconsole.conf and also set the keymap for the current session:
We may have to update the call here https://github.com/svartkanin/archinstall/blob/275259928c34d59cd166055e675938719b2b7276/archinstall/lib/installer.py?plain=1#L1779 to also call localectl on target
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Basically without it the first base hook fails hence why i needed to place it before_base
And calling localectl before base well this was more straightforward and uses already existing content of config.
https://www.reddit.com/r/archlinux/comments/1otgoas/issue_with_mkinitcpio/
This also makes encryption layouts possible i guess ? I was using ckbcomp with grub manually before to generate layout files for French keyboard from AUR 😩
These need to be latin compatible to my understanding at least with grub which why I had added all the docs comments lmao but since you validate ASCII for passwords and such
And i think these are different things needs specifically
KEYMAP= and FONT=
Maybe we could detect screen size to set font to larger alternative dynamically
Sorry for bad img from reddit
Currently same happens with archinstall but keeps going (non-fatal) with vconsole.conf being set:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also since it's called before it doesn't get overwritten in the subsequent calls
Continuation of #1187 with a earlier approach @svartkanin would be great to get some feedback as this could help many users using different kb than US (altho I'm unsure about limitation outside of latin range). Or update instructions: https://github.com/archlinux/archinstall/blob/master/archinstall/locales/README.md
You test on branch: testing in https://github.com/h8d13/archinstall-patch
Which also includes my hardware draft for laptops
|
Hey! Any ETA/modifications on this @svartkanin I keep seeing reddit logs referecing this error. Also again enables latin layouts to work with disk encryption (laptops). Currently you'd get US layout at grub and unable to login. Perhaps this needs extra logic for non latin layouts |
|
This issue #3160 and #3155 were issues in the UI, where Your PR talks about updating the vconsole.conf configuration. I run an installation from master with the local configuration set to and this is the resulting The |
|
Hmmm I have to say I'm a bit lost now. So how did this end up there (from localectl ?) called later? Also did it pull from My issue is that first |
|
@Torxed any thought about this? I discussed it a bit with you over on reddit but I couldn't find more definitive answers from anyone really... And first _base strap still screaming :( |
I'll have a look after this weekend, where in the log does it screan before _base? Just to speed up my looking ^^ |
|
Very first _base mkinitcpio call would say: Non-fatal since its set later on but not a good look if/when you start an install. |
|
The initial description of the issue is somewhat cryptic and referencing the issues that aren't really related to this PR weren't helpful either. This is the output during the installation BUT despite this showing the error the actual This means that at the point of bootstrapping https://github.com/svartkanin/archinstall/blob/601e03318854a26c454871296b2e70ed85ce2231/archinstall/lib/installer.py?plain=1#L871 the The questions I have around this are:
|
|
Thanks for the follow-up @svartkanin : The main thing I found in wiki: https://wiki.archlinux.org/title/Linux_console/Keyboard_configuration#Persistent_configuration I believe that I've also observed when doing host-to-target installs that that would change the layout of host (which isn't great considering I could be installing for another laptop, which is a bit annoying to change again). Why I mentioned the issues is personal experience (Grub Luks2 password needing to be typed like if my keyboard was US, when it's FR layout). Hope this clarifies a little, and of course there might be caveats I haven't been able to test like layouts outside latin range. |
Yes I get the intention of this PR to do that, but as the wiki states For convenience, localectl may be used to set the console keymap. It will change the KEYMAP variable in /etc/vconsole.conf and also set the keymap for the current session
That is probably correct and I don't disagree with you on that and I can see how the PR is intended to solve this. My questions from above however still stand, why is this error happening in the first place and is either a) a user also seeing this error simply doing a manual install via the manual wiki steps
Could you elaborate on this one? |
|
The error happens because of order of operations, you're doing it correctly just not in time. So my solution was hacky in that sense. When wizards changed the hooks in v40.x keymap/consolefont are now considered essential (again makes sense for encryption)(they might also have changed other things? is why I had added the commit info from mkinitcpio changes and wiki/grub docs). It used to be only the warning and a successful image build. Yes this would also happen on manual but since we have the layout info for us it should be easier to fix.
Say I'm installing from my Desktop that uses US layout, but my target needs FR (laptop). Archinstall will over-write my current keymap (host polluted). Because we do not have a safeguard of difference between a from ISO (where the env is temporary doesn't matter, versus from an actual install, one I don't want any changes to happen on). For this I would add an entry def that checks for This would also allow us to check for subdeps needed for archinstall, if running from a live system (since the ISO has many tools that a regular arch installation might be missing and will cause FATAL errors). The official readme says: (Usually from a live medium). But I think it's a good tool to not have to use ISOs. For that we probably need some work |
|
Here's a related discussion around the same https://bbs.archlinux.org/viewtopic.php?id=310236. The easy way to avoid this is probably to have an empty vconsole.conf dummy. If this is caused by a new change I'm still convinced that this is not the behaviour that should happen from |

We need to set vconsole before the first hook in accordance to
Also fixes #3160
Since we already validate ASCII only this should not cause any issue or need more changes