Several issues with the installation on LUKS/LVM

If you are new to Linux or new to Sabayon Linux and just not sure where to post, here ya go. Post without fear of being told to RTFM :-)

Moderator: Moderators

Several issues with the installation on LUKS/LVM

Postby cyberpatrol » Wed Feb 27, 2013 11:55

I just tried to install Sabayon 11 amd64 Xfce for the first time on a dual boot system along with Salix OS.

I want to fully encrypt the system with an unencrypted boot partition, of course, and an LVM setup inside a LUKS container.

Firstly I tried to create this partition layout with the installer but I got an anaconda error and the installation failed while creating this layout. I can't remeber the error message.

Then I created the LUKS container and the LVM setup manually and got Sabayon installed.

But when booting for the first time after the installation I get two other issues.

I'm using LILO from Salix OS as the boot loader. So I didn't install grub2 during the Sabayon installation. After searching the web I found this lilo configuration for booting Sabayon with this setup:
Code: Select all
image = /path/to/sabyon-boot/kernel-genkernel-x86_64-3.7.0-sabayon
   append = "init=/linuxrc ramdisk=8192 dolvm crypt_root=/dev/sda3 real_root=/dev/mapper/sabayonvg-root"
   initrd = /path/to/sabayon-boot/initramfs-genkernel-x86_64-3.7.0-sabayon
   label = Sabayon
   read-only

The system starts booting, but even if I selected the German keyboard layout in the installer I can't enter the LUKS passphrase, because it has only the US keyboard layout loaded but not the German one. If I add a passphrase like "passphrase" I can open the LUKS container at boot time. And I can open the LUKS container with the other passphrase from other sytems. So the problem is not a wrong passphrase, but the keyboard layout.

But then I get a second issue. The boot process hangs at
Code: Select all
* Waiting for uevents to be processed ...    [OK]

So, is it possible to get the German keyboard layout at boot stage when entering the LUKS passphrase, and how?
And what's going wrong with the uevents? Btw., I don't have an Nvidia card, I have an ATI card which is perfectly supported by the OpenSource and the proprietary drivers.
cyberpatrol
Baby Hen
 
Posts: 6
Joined: Wed Feb 27, 2013 11:24

Re: Several issues with the installation on LUKS/LVM

Postby Ryuno-Ki » Wed Feb 27, 2013 21:10

Are you sure, you selected the correct characters?
For example y <-> z or & <-> ^ and so on.
You can find an image on (German) wikipedia.

That would be the first thing, I'd try.
HP-Pavilion ◆ AMD Athlon™ 64 Processor 4000+ ◆ GeForce 6150SE nForce 430 ◆ 1 GiB RAM
German Wiki translator ◆ Want to contribute on the wiki? Ask the Bureaucrats!
Please, mark solved threads ◆ Posts unread and unansweredPackage requests ◆ Sabayon XI with MATE
Ryuno-Ki
Technological Hen
 
Posts: 437
Joined: Mon Feb 27, 2012 22:15
Location: Southern Germany

Re: Several issues with the installation on LUKS/LVM

Postby cyberpatrol » Wed Feb 27, 2013 21:39

Ryuno-Ki wrote:Are you sure, you selected the correct characters?
For example y <-> z or & <-> ^ and so on.
You can find an image on (German) wikipedia.

That would be the first thing, I'd try.


That's why I said that the problem is not a wrong passphrase, but the missing German keyboard layout at boot time. It's impossible to typing a very long passphrase with a lot of special characters with a German keyboard and a US keyboard layout, even with a picture from Wikipedia. And it's technically possible to having a German keyboard layout loaded at that stage, because it's possible with any other distribution I've used and tried so far, incl. Arch Linux, Slackware resp. Salix OS, LMDE and more. Sabayon is the first one, that doesn't load the German keyboard layout.
cyberpatrol
Baby Hen
 
Posts: 6
Joined: Wed Feb 27, 2013 11:24

Re: Several issues with the installation on LUKS/LVM

Postby Ryuno-Ki » Thu Feb 28, 2013 13:06

I've searched the web, how Gentoo would solve this (sources below).
Some attempts you could try:
  • set the KEYMAP environment variable
  • load another keyboard layout with "loadkeys de"
  • Use only ASCII characters for the passphrase (see the Stackexchange answer #1 below for details)

Maybe it's a problem with LILO? Carrier Lost described a tutorial with GRUB and mentiones a place to change the keyboard layout …

http://www.gentoo.org/doc/en/guide-loca ... #doc_chap4 (replace /doc/en with /doc/de for the German translation)
http://www.fredshack.com/docs/gentoo.html
http://www.carrier-lost.org/blog/fully- ... up-and-lvm
http://unix.stackexchange.com/questions ... rd-via-ssh
HP-Pavilion ◆ AMD Athlon™ 64 Processor 4000+ ◆ GeForce 6150SE nForce 430 ◆ 1 GiB RAM
German Wiki translator ◆ Want to contribute on the wiki? Ask the Bureaucrats!
Please, mark solved threads ◆ Posts unread and unansweredPackage requests ◆ Sabayon XI with MATE
Ryuno-Ki
Technological Hen
 
Posts: 437
Joined: Mon Feb 27, 2012 22:15
Location: Southern Germany

Re: Several issues with the installation on LUKS/LVM

Postby cyberpatrol » Thu Feb 28, 2013 15:03

Ryuno-Ki wrote:I've searched the web, how Gentoo would solve this (sources below).
Some attempts you could try:
  • set the KEYMAP environment variable
  • load another keyboard layout with "loadkeys de"

It's a first installation. How would I do it, particularly in the initrd? It's actually something the installer has to do, at least if a language and keyboard layout other than en_US is selected. Or is there a kernel parameter to set the keyboard layout?

Ryuno-Ki wrote:
  • Use only ASCII characters for the passphrase (see the Stackexchange answer #1 below for details)

Not an option.
1. Also ASCII characters are on different keys in different keyboard layouts. So this wouldn't solve this issue anyway.
2. Security. A passphrase like "passphrase", which would be the only kind of passphrases that could be typed with the same keys on a US and a German keyboard, is totally insecure and the same as no encryption.
3. If you use always the same computer and keyboard (layout) it doesn't matter if you use ASCII or UTF-8. This only matters if you move an encrypted device between several computers with different keyboards.

Ryuno-Ki wrote:Maybe it's a problem with LILO? Carrier Lost described a tutorial with GRUB and mentiones a place to change the keyboard layout …

Also not, because no other distribution has this problem, not even with LILO. In any other distribution I've used and tried there was a way to include the language and keyboard settings in the initrd, at least by manually creating the initrd. I don't see it with the graphical installer of Sabayon's.

Ryuno-Ki wrote:http://www.gentoo.org/doc/en/guide-localization.xml#doc_chap4 (replace /doc/en with /doc/de for the German translation)
http://www.fredshack.com/docs/gentoo.html
http://www.carrier-lost.org/blog/fully- ... up-and-lvm
http://unix.stackexchange.com/questions ... rd-via-ssh

We're not talking about Gentoo, but Sabayon. So there's a graphical installer and no stage3, emerge, kernel compilation or manually building an initrd during the installation. And no manual intervention is possible except for the partitioning, creating the LUKS container and the LVM layout, which is the same for every distribution.

That said, the Sabayon installer should actually include the keymap setting into the initrd depending on the language and keyboard settings made at the beginning of the installation.
cyberpatrol
Baby Hen
 
Posts: 6
Joined: Wed Feb 27, 2013 11:24

Re: Several issues with the installation on LUKS/LVM

Postby colock » Thu Mar 14, 2013 23:56

It actually does load the keymap before prompting for luks passphrase, here's the proof:

viewtopic.php?f=56&t=29386&p=160151#p160109
colock
Simple Hen
 
Posts: 56
Joined: Mon Feb 25, 2013 12:01

Re: Several issues with the installation on LUKS/LVM

Postby cyberpatrol » Fri Mar 15, 2013 1:57

I don't see any proof in this thread. Proof that it does not load the keymap is that it does not accept my secure LUKS passphrase, even if I entered it correctly by typing the special characters as they are seen on my German keyboard in front of me, and that it does accept an insecure passphrase like "passphrase" for which the same keys are used on a US and a German keyboard. dolvm doesn't have anything to do with this issue, because it doesn't get to the point where it activates the LVM, because the LVM is inside the LUKS container, and because it finds and activates the LVM correctly when it opens the LUKS container with this insecure passphrase. And if you would have read my original post you would have seen that I have dolvm in my kernel parameters.
cyberpatrol
Baby Hen
 
Posts: 6
Joined: Wed Feb 27, 2013 11:24

Re: Several issues with the installation on LUKS/LVM

Postby colock » Fri Mar 15, 2013 15:55

click on the image link.

You will see the boot messages.

Before asking for the passphrase you see the messages:

Loading keymaps
Loading the ''pt'' keymap
colock
Simple Hen
 
Posts: 56
Joined: Mon Feb 25, 2013 12:01

Re: Several issues with the installation on LUKS/LVM

Postby cyberpatrol » Fri Mar 15, 2013 19:17

colock wrote:click on the image link.

You will see the boot messages.

Before asking for the passphrase you see the messages:

Loading keymaps
Loading the ''pt'' keymap


Firstly there is no image link. Secondly, you know that I'm talking about early bootstage, the initial ramdisk? No, the keymaps are not loaded at the first boot after the first installation. Otherwise my password would have been accepted.

Do you know the difference between a password like "ag%4iOh~uk" and a password like "password"? For the first one you need totally different keys with an en and a de keymap. For the second one you need exactly the same keys with an en and a de keymap. The first one is not accepted, the second one is accepted. What does that mean? Right, that the keymap is not loaded. You really can believe me. I'm not that new to Linux.

There's simply a bug in the Sabayon installer.
cyberpatrol
Baby Hen
 
Posts: 6
Joined: Wed Feb 27, 2013 11:24

Re: Several issues with the installation on LUKS/LVM

Postby colock » Sat Mar 16, 2013 19:25

There is an image and here i report the link to make it easier for you:

http://img201.imageshack.us/img201/1024 ... 104305.jpg

This is obviously in the ramdisk (the hard drive fails to be found, but you can see that it says it's loading a different keymap).


I know what is the problem with typing a passphrase with a different keyboard layout, I understand your point, but I'm saying something different here.

I am not saying that it's impossible that the installer has a bug, maybe you are completely right. What I'm saying is that the ramdisk's init script supports switching keymap before asking for a passphrase, as we can see from the image. If the installer failed to setup grub it does not mean that it's impossible to fix.

Also I carefully re-read your first post and you say that you didn't made Sabayon installer install GRUB, so _no wonder_ it didn't configure it properly!!

Just pass the correct keymap code to the kernel append line, like:

Code: Select all
keymap=de
colock
Simple Hen
 
Posts: 56
Joined: Mon Feb 25, 2013 12:01

Next

Return to Beginners|Newbies Area

Who is online

Users browsing this forum: No registered users and 2 guests