How do I change the keyboard layout used when entering in my sda_crypt password?












2















I am currently using Ubuntu MATE 15.10. While setting up Ubuntu, I accidentally selected the Colemak layout when I wanted the QWERTY layout. Now, when I am entering my password for sda_crypt at startup (which I believe is my LUKS encryption key?), it types in Colemak.



I've tried changing my default layout from System Settings, but this does not affect the layout I use at sda_crypt.










share|improve this question



























    2















    I am currently using Ubuntu MATE 15.10. While setting up Ubuntu, I accidentally selected the Colemak layout when I wanted the QWERTY layout. Now, when I am entering my password for sda_crypt at startup (which I believe is my LUKS encryption key?), it types in Colemak.



    I've tried changing my default layout from System Settings, but this does not affect the layout I use at sda_crypt.










    share|improve this question

























      2












      2








      2








      I am currently using Ubuntu MATE 15.10. While setting up Ubuntu, I accidentally selected the Colemak layout when I wanted the QWERTY layout. Now, when I am entering my password for sda_crypt at startup (which I believe is my LUKS encryption key?), it types in Colemak.



      I've tried changing my default layout from System Settings, but this does not affect the layout I use at sda_crypt.










      share|improve this question














      I am currently using Ubuntu MATE 15.10. While setting up Ubuntu, I accidentally selected the Colemak layout when I wanted the QWERTY layout. Now, when I am entering my password for sda_crypt at startup (which I believe is my LUKS encryption key?), it types in Colemak.



      I've tried changing my default layout from System Settings, but this does not affect the layout I use at sda_crypt.







      keyboard encryption keyboard-layout






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Dec 29 '15 at 22:02









      LotSXLotSX

      111




      111






















          2 Answers
          2






          active

          oldest

          votes


















          1














          I think I've mostly solved this (except the other way round, trying to escape QWERTY), on a 16.04 LTS install.



          Since the prompt is after GRUB, but before the encrypted root partition is accessible, we know the layout choice is embedded in the initramfs (mini file system loaded into memory before the real root filesystem, containing everything necessary to load the real one).



          The initramfs is built by initramfs-tools, which is a giant list of scripts for copying stuff into there. It looks like the specific one affecting this is /usr/share/initramfs-tools/hooks/console_setup, which re-uses the same /etc/console-setup/cached.kmap.gz that's used (I think?) for the normal serial/tty consoles.



          (I would appreciate some clarity on this if anyone has any. Running dpkg -S on that "hook" shows that it comes from the keyboard-configuration package which could be a clue.)



          Anyway, the console-setup keyboard layout comes from /etc/default/keyboard, which has some variable assignments in it. To give an idea how to set this, you can figure it out from your normal xkb layout (this is the one that "System Settings" changes), by running this in a terminal:



          $ setxkbmap -print

          xkb_keymap {
          xkb_keycodes { include "evdev+aliases(qwerty)" };
          xkb_types { include "complete+numpad(mac)" };
          xkb_compat { include "complete" };
          xkb_symbols { include "pc+us(dvorak)+inet(evdev)+capslock(backspace)+shift(both_capslock)" };
          xkb_geometry { include "pc(pc105)" };
          };


          My layout's a bit weird, but the important bits are xkb_symbols ... us(dvorak) and xkb_geometry ... pc(pc105). From this we derive the following /etc/default/keyboard variables:



          $ sudo nano /etc/default/keyboard

          XKBMODEL="pc105"
          XKBLAYOUT="us"
          XKBVARIANT="dvorak"
          XKBOPTIONS=""
          [...]


          Once you've edited /etc/default/keyboard, you need to trick console-setup into updating. I have no idea how to do this so I just rebooted, which seemed to work. (It could actually be because I'd already done the next step before this reboot, although it didn't work this time around.)



          After that, just run sudo update-initramfs -u. It will say 'Generating /boot/initrd.img-{latest-kernel-version}' and take some time while it copies a bunch of stuff into a new initramfs image. After that, your next reboot should have the layout you want in the dm-crypt prompt :).



          TL;DR:




          1. Edit /etc/default/keyboard based on the output from setxkbmap -print.

          2. Reboot (or figure out the proper way to update console-setup).

          3. Run sudo update-initramfs -u.

          4. Hopefully enjoy the next reboot slightly more.


          Good luck and I'm sorry to only have had the same issue now. Maybe in another 18 months someone with the same problem will let me know how it goes?






          share|improve this answer
























          • sudo setupcon --save-only is the command which updates cached.kmap.gz. It should work instead of the reboot. The reboot worked because setupcon is normally run by /lib/systemd/system/console-setup.service

            – Tom Spurling
            Sep 12 '17 at 18:04











          • Having to type a password inputed in azerty back in qwerty with no way of seeing the typed password is such a pain, it's faster to reinstall ubuntu.

            – Vadorequest
            May 6 '18 at 12:23



















          0














          On an Ubuntu 18.04 machine, I did:



          dpkg-reconfigure keyboard-configuration


          with root permissions. That regenerated the initramfs automatically, and I was able to use the new keyboard layout to type the key on the next bootup.






          share|improve this answer























            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "89"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f714764%2fhow-do-i-change-the-keyboard-layout-used-when-entering-in-my-sda-crypt-password%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            1














            I think I've mostly solved this (except the other way round, trying to escape QWERTY), on a 16.04 LTS install.



            Since the prompt is after GRUB, but before the encrypted root partition is accessible, we know the layout choice is embedded in the initramfs (mini file system loaded into memory before the real root filesystem, containing everything necessary to load the real one).



            The initramfs is built by initramfs-tools, which is a giant list of scripts for copying stuff into there. It looks like the specific one affecting this is /usr/share/initramfs-tools/hooks/console_setup, which re-uses the same /etc/console-setup/cached.kmap.gz that's used (I think?) for the normal serial/tty consoles.



            (I would appreciate some clarity on this if anyone has any. Running dpkg -S on that "hook" shows that it comes from the keyboard-configuration package which could be a clue.)



            Anyway, the console-setup keyboard layout comes from /etc/default/keyboard, which has some variable assignments in it. To give an idea how to set this, you can figure it out from your normal xkb layout (this is the one that "System Settings" changes), by running this in a terminal:



            $ setxkbmap -print

            xkb_keymap {
            xkb_keycodes { include "evdev+aliases(qwerty)" };
            xkb_types { include "complete+numpad(mac)" };
            xkb_compat { include "complete" };
            xkb_symbols { include "pc+us(dvorak)+inet(evdev)+capslock(backspace)+shift(both_capslock)" };
            xkb_geometry { include "pc(pc105)" };
            };


            My layout's a bit weird, but the important bits are xkb_symbols ... us(dvorak) and xkb_geometry ... pc(pc105). From this we derive the following /etc/default/keyboard variables:



            $ sudo nano /etc/default/keyboard

            XKBMODEL="pc105"
            XKBLAYOUT="us"
            XKBVARIANT="dvorak"
            XKBOPTIONS=""
            [...]


            Once you've edited /etc/default/keyboard, you need to trick console-setup into updating. I have no idea how to do this so I just rebooted, which seemed to work. (It could actually be because I'd already done the next step before this reboot, although it didn't work this time around.)



            After that, just run sudo update-initramfs -u. It will say 'Generating /boot/initrd.img-{latest-kernel-version}' and take some time while it copies a bunch of stuff into a new initramfs image. After that, your next reboot should have the layout you want in the dm-crypt prompt :).



            TL;DR:




            1. Edit /etc/default/keyboard based on the output from setxkbmap -print.

            2. Reboot (or figure out the proper way to update console-setup).

            3. Run sudo update-initramfs -u.

            4. Hopefully enjoy the next reboot slightly more.


            Good luck and I'm sorry to only have had the same issue now. Maybe in another 18 months someone with the same problem will let me know how it goes?






            share|improve this answer
























            • sudo setupcon --save-only is the command which updates cached.kmap.gz. It should work instead of the reboot. The reboot worked because setupcon is normally run by /lib/systemd/system/console-setup.service

              – Tom Spurling
              Sep 12 '17 at 18:04











            • Having to type a password inputed in azerty back in qwerty with no way of seeing the typed password is such a pain, it's faster to reinstall ubuntu.

              – Vadorequest
              May 6 '18 at 12:23
















            1














            I think I've mostly solved this (except the other way round, trying to escape QWERTY), on a 16.04 LTS install.



            Since the prompt is after GRUB, but before the encrypted root partition is accessible, we know the layout choice is embedded in the initramfs (mini file system loaded into memory before the real root filesystem, containing everything necessary to load the real one).



            The initramfs is built by initramfs-tools, which is a giant list of scripts for copying stuff into there. It looks like the specific one affecting this is /usr/share/initramfs-tools/hooks/console_setup, which re-uses the same /etc/console-setup/cached.kmap.gz that's used (I think?) for the normal serial/tty consoles.



            (I would appreciate some clarity on this if anyone has any. Running dpkg -S on that "hook" shows that it comes from the keyboard-configuration package which could be a clue.)



            Anyway, the console-setup keyboard layout comes from /etc/default/keyboard, which has some variable assignments in it. To give an idea how to set this, you can figure it out from your normal xkb layout (this is the one that "System Settings" changes), by running this in a terminal:



            $ setxkbmap -print

            xkb_keymap {
            xkb_keycodes { include "evdev+aliases(qwerty)" };
            xkb_types { include "complete+numpad(mac)" };
            xkb_compat { include "complete" };
            xkb_symbols { include "pc+us(dvorak)+inet(evdev)+capslock(backspace)+shift(both_capslock)" };
            xkb_geometry { include "pc(pc105)" };
            };


            My layout's a bit weird, but the important bits are xkb_symbols ... us(dvorak) and xkb_geometry ... pc(pc105). From this we derive the following /etc/default/keyboard variables:



            $ sudo nano /etc/default/keyboard

            XKBMODEL="pc105"
            XKBLAYOUT="us"
            XKBVARIANT="dvorak"
            XKBOPTIONS=""
            [...]


            Once you've edited /etc/default/keyboard, you need to trick console-setup into updating. I have no idea how to do this so I just rebooted, which seemed to work. (It could actually be because I'd already done the next step before this reboot, although it didn't work this time around.)



            After that, just run sudo update-initramfs -u. It will say 'Generating /boot/initrd.img-{latest-kernel-version}' and take some time while it copies a bunch of stuff into a new initramfs image. After that, your next reboot should have the layout you want in the dm-crypt prompt :).



            TL;DR:




            1. Edit /etc/default/keyboard based on the output from setxkbmap -print.

            2. Reboot (or figure out the proper way to update console-setup).

            3. Run sudo update-initramfs -u.

            4. Hopefully enjoy the next reboot slightly more.


            Good luck and I'm sorry to only have had the same issue now. Maybe in another 18 months someone with the same problem will let me know how it goes?






            share|improve this answer
























            • sudo setupcon --save-only is the command which updates cached.kmap.gz. It should work instead of the reboot. The reboot worked because setupcon is normally run by /lib/systemd/system/console-setup.service

              – Tom Spurling
              Sep 12 '17 at 18:04











            • Having to type a password inputed in azerty back in qwerty with no way of seeing the typed password is such a pain, it's faster to reinstall ubuntu.

              – Vadorequest
              May 6 '18 at 12:23














            1












            1








            1







            I think I've mostly solved this (except the other way round, trying to escape QWERTY), on a 16.04 LTS install.



            Since the prompt is after GRUB, but before the encrypted root partition is accessible, we know the layout choice is embedded in the initramfs (mini file system loaded into memory before the real root filesystem, containing everything necessary to load the real one).



            The initramfs is built by initramfs-tools, which is a giant list of scripts for copying stuff into there. It looks like the specific one affecting this is /usr/share/initramfs-tools/hooks/console_setup, which re-uses the same /etc/console-setup/cached.kmap.gz that's used (I think?) for the normal serial/tty consoles.



            (I would appreciate some clarity on this if anyone has any. Running dpkg -S on that "hook" shows that it comes from the keyboard-configuration package which could be a clue.)



            Anyway, the console-setup keyboard layout comes from /etc/default/keyboard, which has some variable assignments in it. To give an idea how to set this, you can figure it out from your normal xkb layout (this is the one that "System Settings" changes), by running this in a terminal:



            $ setxkbmap -print

            xkb_keymap {
            xkb_keycodes { include "evdev+aliases(qwerty)" };
            xkb_types { include "complete+numpad(mac)" };
            xkb_compat { include "complete" };
            xkb_symbols { include "pc+us(dvorak)+inet(evdev)+capslock(backspace)+shift(both_capslock)" };
            xkb_geometry { include "pc(pc105)" };
            };


            My layout's a bit weird, but the important bits are xkb_symbols ... us(dvorak) and xkb_geometry ... pc(pc105). From this we derive the following /etc/default/keyboard variables:



            $ sudo nano /etc/default/keyboard

            XKBMODEL="pc105"
            XKBLAYOUT="us"
            XKBVARIANT="dvorak"
            XKBOPTIONS=""
            [...]


            Once you've edited /etc/default/keyboard, you need to trick console-setup into updating. I have no idea how to do this so I just rebooted, which seemed to work. (It could actually be because I'd already done the next step before this reboot, although it didn't work this time around.)



            After that, just run sudo update-initramfs -u. It will say 'Generating /boot/initrd.img-{latest-kernel-version}' and take some time while it copies a bunch of stuff into a new initramfs image. After that, your next reboot should have the layout you want in the dm-crypt prompt :).



            TL;DR:




            1. Edit /etc/default/keyboard based on the output from setxkbmap -print.

            2. Reboot (or figure out the proper way to update console-setup).

            3. Run sudo update-initramfs -u.

            4. Hopefully enjoy the next reboot slightly more.


            Good luck and I'm sorry to only have had the same issue now. Maybe in another 18 months someone with the same problem will let me know how it goes?






            share|improve this answer













            I think I've mostly solved this (except the other way round, trying to escape QWERTY), on a 16.04 LTS install.



            Since the prompt is after GRUB, but before the encrypted root partition is accessible, we know the layout choice is embedded in the initramfs (mini file system loaded into memory before the real root filesystem, containing everything necessary to load the real one).



            The initramfs is built by initramfs-tools, which is a giant list of scripts for copying stuff into there. It looks like the specific one affecting this is /usr/share/initramfs-tools/hooks/console_setup, which re-uses the same /etc/console-setup/cached.kmap.gz that's used (I think?) for the normal serial/tty consoles.



            (I would appreciate some clarity on this if anyone has any. Running dpkg -S on that "hook" shows that it comes from the keyboard-configuration package which could be a clue.)



            Anyway, the console-setup keyboard layout comes from /etc/default/keyboard, which has some variable assignments in it. To give an idea how to set this, you can figure it out from your normal xkb layout (this is the one that "System Settings" changes), by running this in a terminal:



            $ setxkbmap -print

            xkb_keymap {
            xkb_keycodes { include "evdev+aliases(qwerty)" };
            xkb_types { include "complete+numpad(mac)" };
            xkb_compat { include "complete" };
            xkb_symbols { include "pc+us(dvorak)+inet(evdev)+capslock(backspace)+shift(both_capslock)" };
            xkb_geometry { include "pc(pc105)" };
            };


            My layout's a bit weird, but the important bits are xkb_symbols ... us(dvorak) and xkb_geometry ... pc(pc105). From this we derive the following /etc/default/keyboard variables:



            $ sudo nano /etc/default/keyboard

            XKBMODEL="pc105"
            XKBLAYOUT="us"
            XKBVARIANT="dvorak"
            XKBOPTIONS=""
            [...]


            Once you've edited /etc/default/keyboard, you need to trick console-setup into updating. I have no idea how to do this so I just rebooted, which seemed to work. (It could actually be because I'd already done the next step before this reboot, although it didn't work this time around.)



            After that, just run sudo update-initramfs -u. It will say 'Generating /boot/initrd.img-{latest-kernel-version}' and take some time while it copies a bunch of stuff into a new initramfs image. After that, your next reboot should have the layout you want in the dm-crypt prompt :).



            TL;DR:




            1. Edit /etc/default/keyboard based on the output from setxkbmap -print.

            2. Reboot (or figure out the proper way to update console-setup).

            3. Run sudo update-initramfs -u.

            4. Hopefully enjoy the next reboot slightly more.


            Good luck and I'm sorry to only have had the same issue now. Maybe in another 18 months someone with the same problem will let me know how it goes?







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Jun 29 '17 at 20:55









            Tom SpurlingTom Spurling

            1366




            1366













            • sudo setupcon --save-only is the command which updates cached.kmap.gz. It should work instead of the reboot. The reboot worked because setupcon is normally run by /lib/systemd/system/console-setup.service

              – Tom Spurling
              Sep 12 '17 at 18:04











            • Having to type a password inputed in azerty back in qwerty with no way of seeing the typed password is such a pain, it's faster to reinstall ubuntu.

              – Vadorequest
              May 6 '18 at 12:23



















            • sudo setupcon --save-only is the command which updates cached.kmap.gz. It should work instead of the reboot. The reboot worked because setupcon is normally run by /lib/systemd/system/console-setup.service

              – Tom Spurling
              Sep 12 '17 at 18:04











            • Having to type a password inputed in azerty back in qwerty with no way of seeing the typed password is such a pain, it's faster to reinstall ubuntu.

              – Vadorequest
              May 6 '18 at 12:23

















            sudo setupcon --save-only is the command which updates cached.kmap.gz. It should work instead of the reboot. The reboot worked because setupcon is normally run by /lib/systemd/system/console-setup.service

            – Tom Spurling
            Sep 12 '17 at 18:04





            sudo setupcon --save-only is the command which updates cached.kmap.gz. It should work instead of the reboot. The reboot worked because setupcon is normally run by /lib/systemd/system/console-setup.service

            – Tom Spurling
            Sep 12 '17 at 18:04













            Having to type a password inputed in azerty back in qwerty with no way of seeing the typed password is such a pain, it's faster to reinstall ubuntu.

            – Vadorequest
            May 6 '18 at 12:23





            Having to type a password inputed in azerty back in qwerty with no way of seeing the typed password is such a pain, it's faster to reinstall ubuntu.

            – Vadorequest
            May 6 '18 at 12:23













            0














            On an Ubuntu 18.04 machine, I did:



            dpkg-reconfigure keyboard-configuration


            with root permissions. That regenerated the initramfs automatically, and I was able to use the new keyboard layout to type the key on the next bootup.






            share|improve this answer




























              0














              On an Ubuntu 18.04 machine, I did:



              dpkg-reconfigure keyboard-configuration


              with root permissions. That regenerated the initramfs automatically, and I was able to use the new keyboard layout to type the key on the next bootup.






              share|improve this answer


























                0












                0








                0







                On an Ubuntu 18.04 machine, I did:



                dpkg-reconfigure keyboard-configuration


                with root permissions. That regenerated the initramfs automatically, and I was able to use the new keyboard layout to type the key on the next bootup.






                share|improve this answer













                On an Ubuntu 18.04 machine, I did:



                dpkg-reconfigure keyboard-configuration


                with root permissions. That regenerated the initramfs automatically, and I was able to use the new keyboard layout to type the key on the next bootup.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered 2 days ago









                AzendaleAzendale

                8,79873962




                8,79873962






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Ask Ubuntu!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f714764%2fhow-do-i-change-the-keyboard-layout-used-when-entering-in-my-sda-crypt-password%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    數位音樂下載

                    When can things happen in Etherscan, such as the picture below?

                    格利澤436b