View previous topic :: View next topic |
Author |
Message |
th0th696 Apprentice
Joined: 08 Dec 2004 Posts: 185
|
Posted: Fri Oct 19, 2012 10:07 pm Post subject: cryptomount fails on boot with dm-crypt volume |
|
|
I've followed this wiki page:
http://en.gentoo-wiki.com/wiki/Root_filesystem_over_LVM2,_DM-Crypt_and_RAID
However I am not using RAID, the section on grub2 appears to be incomplete, as the wiki page for grub2 here:
http://wiki.gentoo.org/wiki/GRUB2#Booting_from_LUKS_Physical_Volume
implies that you must have:
Code: | insmod gzio
insmod part_gpt
insmod cryptodisk
insmod luks
insmod gcry_twofish
insmod gcry_sha256
cryptomount -u <uuid>
insmod lvm
insmod ext2
set root='lvm/<VG>-<LV>' |
in your menuentry for luks to work, so i've added a file 01_mygrub2 into /etc/grub.d in which I've put:
http://bpaste.net/show/52375/
However, when booting it tells me that cryptomount device is missing, I have double-checked the UUID it is correct, any idea what I can do to please cryptomount?
EDIT: of note I tried setting cryptomount to
Code: |
cryptomount (hd0,msdos3) |
as well using the autocomplete from grub2's edit mode, but pretty much same error:
Code: | Error: disk (hd0,msdos3) not found |
but as I said I used the autocomplete so it should be there. blkid certainly shows it there:
Code: | /dev/sda3: UUID="6a3603e9-xxxxxx" TYPE="crypto_LUKS" |
here is how I enter the crypt using another bootable partition (linux mint):
http://bpaste.net/show/52374/
and the environment is certainly fine there, I can emerge fine and all of that.
Here is the script I used to create the crypt and lvm before hand:
http://bpaste.net/show/52373/
here's the script I used to create the initramfs:
http://bpaste.net/show/52372/
my 'init' can be found here:
http://bpaste.net/show/52371/
emerge --info:
http://bpaste.net/show/52464/
kernel config:
http://bpaste.net/show/52465/ |
|
Back to top |
|
|
ribx Apprentice
Joined: 20 Nov 2003 Posts: 219 Location: germany
|
Posted: Mon Oct 22, 2012 1:02 pm Post subject: |
|
|
just a guess:
/dev/sda3 = (hd0,msdos2)
[EDIT] no, that was wrong sorry! I forgot that I have a /boot partition, but I know remember why I also tried luks once, but at the end the conclusion was, that its not worth the work for everything outside /home (for me of course).[/EDIT] _________________ The adopt an unanswered post initiative |
|
Back to top |
|
|
th0th696 Apprentice
Joined: 08 Dec 2004 Posts: 185
|
Posted: Fri Oct 26, 2012 2:26 am Post subject: |
|
|
Just in case I tried:
cryptomount (hd0,msdos2)
and
cryptomount (hd0,msdos1)
same odd error about the partition not being found.
Here are the flags I currently have built in grub:
custom-cflags debug device-mapper doc efiemu nls sdl static truetype
and the full eix:
[I] sys-boot/grub
Available versions:
(0) *0.92-r1 0.94-r1 0.96-r1 0.96-r2 (~)0.96-r3 (~)0.97 0.97-r2 0.97-r3 0.97-r4 0.97-r5 0.97-r6 (~)0.97-r8 0.97-r9 0.97-r10 (~)0.97-r11 0.97-r12 (~)0.97-r13
(2) **1.99-r2 **2.00_beta6 (~)2.00-r1 **9999
{{custom-cflags debug device-mapper doc efiemu libzfs mount ncurses netboot nls sdl static truetype GRUB_PLATFORMS="coreboot efi-32 efi-64 emu ieee1275 multiboot pc qemu qemu-mips yeeloong"}}
Installed versions: 2.00-r1(2)(09:31:55 10/24/12)(custom-cflags debug device-mapper doc efiemu nls sdl static truetype -libzfs -mount GRUB_PLATFORMS="-coreboot -efi-32 -efi-64 -emu -ieee1275 -multiboot -pc -qemu -qemu-mips -yeeloong")
Homepage: http://www.gnu.org/software/grub/
Description: GNU GRUB boot loader
I am still stumped here, I have tried everything I can think of, it seems cryptomount is the problem, but I am not certain of that. Anyone have any suggestions? |
|
Back to top |
|
|
TakChun n00b
Joined: 28 Oct 2012 Posts: 1
|
Posted: Sun Oct 28, 2012 9:47 am Post subject: |
|
|
I have similar problems.
What might help you is to use no brackets:
grub> cryptomount (hd0,msdos6)
Error: disk (hd0,msdos6) not found
grub> cryptomount hd0,msdos6
Attempting to decrypt master key ...
(Works also from within grub.cfg) |
|
Back to top |
|
|
th0th696 Apprentice
Joined: 08 Dec 2004 Posts: 185
|
Posted: Sun Oct 28, 2012 2:03 pm Post subject: |
|
|
woohoo, getting rid of the parantheses did work at least for cryptomount:
Code: | cryptomount hd0,msdos3
Attempting to decrypt master key ... |
however, it does bork right after that with:
Code: | error invalid file name: root=/dev/mapper/vg-root |
which is I'm assuming the linux kernel line firing off:
Code: | root=/dev/mapper/vg-root |
perhaps it's the earlier line in grub.cfg that is obfuscating this issue by not loading the lvm properly:
Code: | set root='lvm/vg-root' |
I'm going to try altering those with some obvious values, btw so far I've tried
Code: | set root='lvm/vg'
set root='lvm/vault' |
any suggestions are very welcome. And thanks again TakChun!!! good catch, I'll have to fill out a bug report on grub2 as I think the auto-fill was at fault here.
bug:
https://savannah.gnu.org/bugs/index.php?37644
btw: vg is the name of the VG as it appears in vgdisplay:
http://bpaste.net/show/54095/ |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|