You are not logged in.

#1 2014-01-11 15:11:00

ManFrommArch
Member
Registered: 2014-01-11
Posts: 8

[SOLVED] Grub2 install, GRUB_ENABLE_CRYPTODISK=1 fails

Im trying to install grub 2 and get the error

    error: attempt to install to encrypted disk without cryptdisk enabled. Set `GRUB_ENABLE_CRYPTODISK=1` in file `/etc/default/grub`..

I did what I was told in the error message but it still persists.

I used:

    grub-install --target=i386-pc --root-directory=/mnt --recheck --debug /dev/md126

md126 looks like this:

    /dev/md126p1 6 MB ef02 BIOS boot partition ext3
    /dev/md126p2 300 MB 8300 /boot ext3
    /dev/md126p3 [the rest of the disk, encrypted lvm partition]

/mnt is mounted like this:

    mount /dev/mapper/main-root /mnt

where

    /dev/mapper/main-root

is is a lvm partition located at md126p3 created like this:

    pvcreate /dev/mapper/lvm
    vgcreate main /dev/mapper/lvm
    lvcreate -L 40GB -n root main



Am I doing the install of grub in the right way? Why do the installer ignore GRUB_ENABLE_CRYPTODISK=1 in /etc/default/grub?

Last edited by ManFrommArch (2014-01-11 22:34:46)

Offline

#2 2014-01-11 15:36:23

dodo3773
Member
Registered: 2011-03-17
Posts: 818

Re: [SOLVED] Grub2 install, GRUB_ENABLE_CRYPTODISK=1 fails

Why are you doing "--root-directory=/mnt" (are you on a uefi system? even so read our wiki on what is and is not depreciated / what works etc... https://wiki.archlinux.org/index.php/GRUB )? Also, you do not need that option ( GRUB_ENABLE_CRYPTODISK=1 ) to decrypt a root partition. Are you following this tutorial for your encryption part? https://wiki.archlinux.org/index.php/Dm … UKS_on_LVM In this distro it is as simple as adding the correct hooks to mkinitcpio.conf and  then recreating your initramfs image. I have a feeling maybe you are trying to do this the hard way (or read: different / old way).

Offline

#3 2014-01-11 16:06:44

ManFrommArch
Member
Registered: 2014-01-11
Posts: 8

Re: [SOLVED] Grub2 install, GRUB_ENABLE_CRYPTODISK=1 fails

Thanks for pointing me in the right direction. I have been struggeling a bit with this installation since I want booth raid5, gpt and full disk encryption. Found some guide to install arch with full disk encryption but it seams outdated. Systemd is also new to me.

Thanks again:)

Offline

#4 2014-01-11 17:04:02

dodo3773
Member
Registered: 2011-03-17
Posts: 818

Re: [SOLVED] Grub2 install, GRUB_ENABLE_CRYPTODISK=1 fails

You are welcome. Just always search the arch wiki. It's huge and updated (well most of the time tongue). There are a lot of problems that seem to arise sometimes with new users using some tutorial they found in some place on some corner of the internet. Also, remember to prepend "[SOLVED]" to the title of your original post if / when you figure it out (not sure if you already knew this; just wanted to point it out in case you didn't since this was your first post / thread on these forums).

Offline

Board footer

Powered by FluxBB