You are not logged in.

#1 2012-08-05 12:23:55

Durag
Member
Registered: 2012-08-05
Posts: 9

Problems with installation, crypted lvm and systemd

Hi,

I'm migrating my desktop PC from Windows 7 to Arch with an crypted LVM.
In the past I've installed with AIF, which is not available anymore on the new installation medium.

The base system is already installed, fstab is created, I've switched into the chroot environment, set a symlink to my timezone and configured my system for systemd as described in the wiki. Because my mainboard got uEFI, I'm using GRUB2 instead of syslinux.

Now my configuration files:

/etc/hostname:

mein-pc

/etc/locale.conf:

LANG=de_DE.UTF-8
LC_COLLATE=C

/etc/locale.gen:

de_DE.UTF-8 UTF-8
de_DE ISO-8859-1
de_DE@euro ISO-8859-15

locale-gen was executed successfully.

/etc/mkinitcpio.conf:

MODULES=""
BINARIES=""
FILES=""
HOOKS="base udev autodetect sata usbinput keymap encrypt lvm2 filesystems fsck shutdown"

/etc/rc.conf:

DAEMONS=(syslog-ng network crond)
USELVM="yes"

/etc/vconsole.conf:

KEYMAP=de
FONT=lat9w-16
FONT_MAP=8859-1_to_uni

/etc/timezone:

Europe/Berlin

If I'm executing mkinitcpio -p linux, I'll get this output:

==> Building image from preset: 'default'
  -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img
==> Staring build: 3.4.7-1-ARCH
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [autodetect]
  -> Running build hook: [sata]
  -> Running build hook: [usbinput]
  -> Running build hook: [keymap]
==> WARNING: keymap: hook specified, but no KEYMAP found in configuration
  -> Running build hook: [encrypt]
  -> Running build hook: [lvm2]
  -> Running build hook: [filesystems]
  -> Running build hook: [fsck]
  -> Running build hook: [shutdown]
==> Generating module dependencies
==> Creating gzip initcpio image: /boot/initramfs-linux.img
bsdcpio: Failed to set default locale
==> Image generation successful
==> Building image from preset: 'fallback'
  -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-fallback.img -S autodetect
==> Staring build: 3.4.7-1-ARCH
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [autodetect]
  -> Running build hook: [sata]
  -> Running build hook: [usbinput]
  -> Running build hook: [keymap]
==> WARNING: keymap: hook specified, but no KEYMAP found in configuration
  -> Running build hook: [encrypt]
  -> Running build hook: [lvm2]
  -> Running build hook: [filesystems]
  -> Running build hook: [fsck]
  -> Running build hook: [shutdown]
==> Generating module dependencies
==> Creating gzip initcpio image: /boot/initramfs-linux-fallback.img
bsdcpio: Failed to set default locale
==> Image generation successful

I don't know, why no KEYMAP is found and why default locale was failed to set.
As described in the wiki, the KEYMAP has to be set in /etc/vconsole.conf instead of /etc/rc.conf.

And I also don't know why my default locale was failed to set inspite of the successfull execution of locale-gen.

There are also some errors in the output of locale and locale -a

sh-4.2# locale
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL

sh-4.1# locale -a
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
C
POSIX
de_DE
de_DE.iso88591
de_DE.iso885915@euro
de_DE.utf8
de_DE@euro
deutsch
german


I researched about this problem and found following bug description:
https://bugs.archlinux.org/task/24685

But it was closed already last year

losed by  Dave Reisner (falconindy)
Wednesday, 05 October 2011, 00:13 GMT
Reason for closing:  Implemented

So it must have to be supported in the actual version as far as I understand.

This all is a little bit confusing to me.

I'm at the beginning of my "linux career" and hope, that you can help me to get my system to work. If you need any more information to help me, please tell.

Sincerly,
Durag

Offline

#2 2012-08-05 12:56:29

John0000
Member
Registered: 2012-04-12
Posts: 40

Re: Problems with installation, crypted lvm and systemd

Hello,
For the keymap/problem,you forgot to put some some quotes, like

KEYMAP=de

should be like :

KEYMAP="de"

I have LOCALE="en_US.UTF-8" and not LANG="en_US.UTF-8" in my  configuration file.
I forgot the keymap at my first install and got the same msg you had with mkinitcpio.

Last edited by John0000 (2012-08-05 13:11:26)

Offline

#3 2012-08-05 13:22:26

Durag
Member
Registered: 2012-08-05
Posts: 9

Re: Problems with installation, crypted lvm and systemd

Hi John0000,
thank you for your reply.

But even if I put quotes aroud the specified keymap in /etc/vconsole.conf and add LOCALE="de_DE.UTF-8" to /etc/locale.conf the same error occures. I really don't know what to do anymore by now. sad

Offline

#4 2012-08-05 13:32:15

John0000
Member
Registered: 2012-04-12
Posts: 40

Re: Problems with installation, crypted lvm and systemd

Ok, maybe it has to do with this new configuration type : I am still in my old system, with everything in rc.conf (I didn't get a look at how things work with separate configuration files yet, i.e. /etc/hostname, /etc/vconsole.conf etc), maybe it's worth a shot to put only the KEYMAP and LOCALE settings in rc.conf, remove just those two settings from your other configuration files (because I read they wille be read before rc.conf) and then see if the mkinitcpio give you the same errors.
I'm not an expert but I recently installed arch in virtual box with the new netinstall dual iso, and everything is fine with the keymap and locale settings.

Offline

#5 2012-08-05 13:50:32

boogy
Member
From: /dev/random
Registered: 2010-05-20
Posts: 37
Website

Re: Problems with installation, crypted lvm and systemd

Hello

I had the same problem when installing my little notebook.
And I noticed that the rc.conf file is different know when installing. It does not contain the LOCALE and KEYMAP variables. So after installing despite the locale error everything seems to work ok, but before login my keyboard is not fr_CH but en_US.


Where there is a shell, there is a way

Offline

#6 2012-08-05 13:53:22

Durag
Member
Registered: 2012-08-05
Posts: 9

Re: Problems with installation, crypted lvm and systemd

To get that baby to work, I used a workaround.

I've added

KEYMAP="de"

to /etc/rc.conf. With this setting, the message

==> WARNING: keymap: hook specified, but no KEYMAP found in configuration

was gone during the execution of mkinitcpio -p linux.

Also I've executed

export LANG=de_DE.UTF-8

and so the message

bsdcpio: Failed to set default locale

was also gone.

This was just a workaround, to get the system to work. I don't know, if this is a bug or not. That should be said by the people with more experience.

Bye,
Durag

P.S.: How can I mark the thread as solved?

Last edited by Durag (2012-08-05 13:53:52)

Offline

#7 2012-08-06 09:06:05

alphazo
Member
Registered: 2009-10-20
Posts: 163

Re: Problems with installation, crypted lvm and systemd

Hi,

I'm working on the exact same setup as you but my machine won't boot my LUKS encrypted LVM system.

Can you post or send your GRUB2 configuration?

I used the following grub settings and dedicated entry but it fails to boot:

/etc/default/grub
GRUB_CMDLINE_LINUX="cryptdevice=/dev/sda4:vgroup"
GRUB_DISABLE_LINUX_UUID=true
GRUB_PRELOAD_MODULES=lvm


/etc/grub.d/11_luks
#!/bin/sh -e
echo "ArchLinux LUKS"
cat << EOF
# (0) Arch Linux
menuentry "Arch Linux" {
insmod lvm
set root=(hd0,2)
# you can only set following two lines
linux /vmlinuz-linux root=/dev/mapper/vgroup-root ro
initrd /initramfs-linux.img
}
EOF


[EDIT] SOLVED!
After writing that post I went back to GRUB to see what exactly it was running and in fact the GRUB_CMD_LINE_LINUX line was not used at all which is normal as I created a custom entry.

So the right /etc/grud.d/11_luks is:
#!/bin/sh -e
echo "ArchLinux LUKS"
cat << EOF
# (0) Arch Linux
menuentry "Arch Linux" {
insmod lvm
set root=(hd0,2)
# you can only set following two lines
linux /vmlinuz-linux root=/dev/mapper/vgroup-root cryptdevice=/dev/sda4:vgroup ro
initrd /initramfs-linux.img
}
EOF


Now the next test is to put /boot in the encrypted LVM space too but keep /boot/grub in a separate partition. Reason for that is not security but having full LVM snapshot including kernel would be nice.

Last edited by alphazo (2012-08-06 09:26:57)

Offline

Board footer

Powered by FluxBB