You are not logged in.
If on Arch Linux emergency mode:
systemd.unit=emergency.targetI change US keyboard layout to Spanish:
# loadkeys esspecial characters fail.
For example: if I type "ñ" shell shows "A±". If I type "¿" shell shows "A¿". If I type "ç" shell shows "A∮".
Last edited by grimor (2023-11-30 17:12:35)
Offline
That's not the keyboard layout but the locale.
Offline
That's not the keyboard layout but the locale.
OK. But works fine on Recovery (init=/bin/sh) and Rescue (systemd.unit=rescue.target) Modes. Not in Emergency
.
Offline
So fix the locale?
Is this btw. some sort of https://en.wikipedia.org/wiki/XY_problem
Why do you want to enter anything spanish/utf-8 in the emergency shell. It's for emergency to fix the system.
Offline
So fix the locale?
Is this btw. some sort of https://en.wikipedia.org/wiki/XY_problem
Why do you want to enter anything spanish/utf-8 in the emergency shell. It's for emergency to fix the system.
I run
locales=es_ES.UTF-8on Emergency shell but doesn't work. Also, I add
locales=es_ES.UTF-8 systemd.unit=emergency.targetlike kernel parameter on GRUB screen but doesn't work.
Last edited by grimor (2023-11-29 15:47:25)
Offline
Where did you pick up that nonsense?
https://wiki.archlinux.org/title/Locale
Also you didn't explain why you think you want to enter UTF-8 text in an emergency shell.
What kind of problem are you actually trying to fix here?
Offline
Where did you pick up that nonsense?
https://wiki.archlinux.org/title/Locale
On Debian-based systems it works like this. I thought it was the same in Arch Linux. My apologies.
Also you didn't explain why you think you want to enter UTF-8 text in an emergency shell.
What kind of problem are you actually trying to fix here?
I don't have any problems currently. It's only for test purposes. It's to add it on my own user manual for Arch. Sorry again.
If the moderators want to close this thread, that's no problem for me.
Offline
You'd need to interpret the parameter w/ some userspace process, in doubt the shellrc. Otherwise it won't do anything.
There's no reason to close this, but if you managed to fix your locale and understand and "solved" your original problem, please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.
Also please be aware that you'll unlikely be in the position where you want to enter some non-ascii text from the emergency shell specifically.
Offline
please be aware that you'll unlikely be in the position where you want to enter some non-ascii text from the emergency shell specifically.
Well. I usually use cryptsetup and eCryptfs. My passwords use special characters. I am used to using the keyboard with Spanish configuration. I don't know the key layout of the English keyboard well. If one day I have to rescue my encrypted volumes, a keyboard layout in "Spaniard" will come in handy.
Offline
The question would however not about the layout (you set that) but the locale.
https://wiki.archlinux.org/title/Dm-cry … mkinitcpio
Offline
Bingo!
In Emergency Mode or Normal Mode:
- Edit '/etc/locale.gen' and uncomment "#es_ES.UTF-8 UTF-8":
# nano /etc/locale.gen* Before:
#es_ES.UTF-8 UTF-8* After:
es_ES.UTF-8 UTF-8- Generate the locales:
# locale-gen- Add LANG variable:
# echo LANG=es_ES.UTF-8 > /etc/locale.conf- Define keyboard layout:
# echo KEYMAP=es > /etc/vconsole.conf- Edit '/etc/mkinitcpio.conf' file and move keyboard word before autodetect word in HOOK parameters:
# nano /etc/mkinitcpio.conf*Before:
HOOKS=(base udev autodetect modconf kms keyboard keymap consolefont block encrypt lvm2 filesystems fsck)*After:
HOOKS=(base udev keyboard autodetect modconf kms keymap consolefont block encrypt lvm2 filesystems fsck)- Regenerate initramfs image:
# mkinitcpio -p linux- Reboot system and return to Emergency Mode
Now Emergency, Recovery and Rescue Modes have Spanish keyboard by default correctly without errors in special characters.
Thanks once again, seth.
Offline