AnarchyLinux / installer

Anarchy Linux - A simple and intuitive Arch Linux installer. https://anarchyinstaller.org/
GNU General Public License v2.0
1.23k stars 157 forks source link

Keymap not functional for encryption #313

Open Sp3r4z opened 7 years ago

Sp3r4z commented 7 years ago

Keymap hook should be adding before "keyboard hook" not after. To load other keyboard mapping then QWERTY

pnedkov commented 7 years ago

315

Could you please test it with us and non-us keymap before it gets merged?

Sp3r4z commented 7 years ago

What do you want exactly? What I've to do?

pnedkov commented 7 years ago

Check if your issue is fixed with the code change I have made.

Sp3r4z commented 7 years ago

I've tried it on ArchLinux few month ago in VM + full-encryption + FR-keyboard so yes, definitely

FredBezies commented 7 years ago

Looking at archlinux wiki, the right version was available before patch was added : https://wiki.archlinux.org/index.php/Dm-crypt/System_configuration#mkinitcpio

HOOKS="base udev autodetect **keyboard keymap** consolefont modconf block encrypt lvm2 filesystems fsck"

I tried with arch-anywhere installer updated and of course, keyboard layout was wrong. Modifying /etc/mkinitcpio.conf and running it again gives the right behaviour.

So, please revert this patch.

Sp3r4z commented 7 years ago

I've just finished to test in VirtualBox, no-UEFI mode, with Arch-Anywhere 2.2.7-1-dual (I've not done the upgrades of the installer, so it's the released version: keyboard keymap, in this order), LVM + full encription automatised choice, linux base choice (just for a minimal installation) no additional softwares and no graphical environment.

Again and again the same problem: when TTY ask for the encryption passphrase, keyboard is always in QWERTY mode. I've done the modifications in /etc/mkinitcpio.conf (I mean: keymap keyboard, in this order), and: mkinitcpio -p linux reboot

Now the keyboard (and keymap) is now in french (the keymap I've choice during installation)

BUT BUT BUT I've tryed, after rebooting, to switch again (keymap keyboard → keyboard keymap) and mkinitcpio -p linux, now in TTY keymap is respected, even if it's after keyboard hook.

So problem "unblock" with the solution (putting keymap before keyboard hook), but the explanation it's quite curious, and don't give a satisfaying result/solution.

FredBezies commented 7 years ago

Seeing the same using a bare bone installation like @Sp3r4z one with an up-to-date git based ISO. Will try a classic install.

Edit : it happens again :(

Weird. Really weird :(

Sp3r4z commented 7 years ago

I've done another test, really simple: fresh install, same configuration than my first test (Arch-anywhere 2.2.7-1-dual + no-upgrade of installer + LVM/Encrypt + French + keymap fr, same config no UEFI)

I've install like normal (linux base, no DE no additional softwares), and after the first reboot: keymap always QWERTY But but but, I've just connect as root + "mkinitcpio -p linux" (no other command) + "reboot". And what's happened? A miracle, it works like normal, keymap seems to be consider…

It's really crazy, it just needs to be done-again to function…

FredBezies commented 7 years ago

Crazy indeed. Could it be related to kernel used? Will try with linux-lts to see if keymap is correctly working from start.

Sp3r4z commented 7 years ago

Maybe, just an idea, keymap isn't correctly "laod" as initramfs image (I mean, keymap hook). @FredBezies, if you try with linux(-lts), just check at boot if keymap is load (before TTY ask for passphrase). It seems to be something simple as that, the first "mkinitcpio -p linux" (on install) it doesn't do the right thing… I don't really know and see why just doing a new mkinitcpio -p, can change that…

FredBezies commented 7 years ago

Test protocol applied with an up-to-date git based ISO.

1) setting language and keyboard to french 2) automatic disk setup for encrypted devices with azerty as password. Useful to verify loaded layout. 3) kernel with devel package 4) no X, no added user

Kernels tested :

1) linux 4.10.13 : busted, keyboard is set as Qwerty on start 2) linux LTS 4.9.26 : busted, keyboard is set as Qwerty on start 3) linux hardened 4.11.0 : busted, keyboard is set as Qwerty on start 4) linux Zen 4.10.13 : busted, keyboard is set as Qwerty on start

Every single time, I can see keymap hook is run and loaded. Of course, running again mkinitcpio -p makes everything work flawlessly!

Sp3r4z commented 7 years ago

So in fact it's never fine then…

Have you ever try on arch linux "vanilla"? I don't remember (for my tuto you've use on your video), if it's the same or not. I think it's the same issue, because I had to do the permutation between keyboard and keymap It can be an Arch issue, that Arch-Anywhere can't fix because of the nature of the project.

FredBezies commented 7 years ago

@Sp3r4z : some packages I added forced another mkinitcpio process at installation time, so it made everything go right. Can't remember which package. Maybe git?

Sp3r4z commented 7 years ago

@FredBezies Have you try with a vanilla instalaltion of ArchLinux? I think it's the same issue, there is something that bug the keymap hook process…

FredBezies commented 7 years ago

Did not notice this bug easily. I had a package who need to run another mkinitcpio -p process on post-installation before first boot on a freshly installed archlinux.

Don't know which package anyway. Weird :(

deadhead420 commented 6 years ago

Is this still an issue?

erazemk commented 5 years ago

Same as #579.