Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
GRUB2 installer detects wrong LVM volume group name
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
imp0s5ible
n00b
n00b


Joined: 16 Jul 2015
Posts: 9

PostPosted: Wed Jul 29, 2015 3:57 am    Post subject: GRUB2 installer detects wrong LVM volume group name Reply with quote

I'm trying to install Gentoo with full drive encryption using logical volumes in that encrypted partition, and I'm having some trouble installing GRUB2.

Output of the command grub2-mkconfig:
Code:
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.0.5-gentoo
Found initrd image: /boot/initramfs-4.0.5-gentoo.img
  /run/lvm/lvmetad.socket: connect failed: No such file or directory
  WARNING: Failed to connect to lvmetad. Falling back to internal scanning.
File descriptor 3 (pipe:[247485]) leaked on vgs invocation. Parent PID 31858: /usr/sbin/grub2-probe
  /run/lvm/lvmetad.socket: connect failed: No such file or directory
  WARNING: Failed to connect to lvmetad. Falling back to internal scanning.
  Volume group "lvm" not found
  Skipping volume group lvm
  /run/lvm/lvmetad.socket: connect failed: No such file or directory
  WARNING: Failed to connect to lvmetad. Falling back to internal scanning.
File descriptor 3 (pipe:[247487]) leaked on vgs invocation. Parent PID 31858: /usr/sbin/grub2-probe
  /run/lvm/lvmetad.socket: connect failed: No such file or directory
  WARNING: Failed to connect to lvmetad. Falling back to internal scanning.
  Volume group "lvm" not found
  Skipping volume group lvm
/usr/sbin/grub2-probe: error: disk `lvm/main-root' not found.
  /run/lvm/lvmetad.socket: connect failed: No such file or directory
  WARNING: Failed to connect to lvmetad. Falling back to internal scanning.
File descriptor 3 (pipe:[247494]) leaked on vgs invocation. Parent PID 31911: /usr/sbin/grub2-probe
  /run/lvm/lvmetad.socket: connect failed: No such file or directory
  WARNING: Failed to connect to lvmetad. Falling back to internal scanning.
  Volume group "lvm" not found
  Skipping volume group lvm
  /run/lvm/lvmetad.socket: connect failed: No such file or directory
  WARNING: Failed to connect to lvmetad. Falling back to internal scanning.
File descriptor 3 (pipe:[247496]) leaked on vgs invocation. Parent PID 31911: /usr/sbin/grub2-probe
  /run/lvm/lvmetad.socket: connect failed: No such file or directory
  WARNING: Failed to connect to lvmetad. Falling back to internal scanning.
  Volume group "lvm" not found
  Skipping volume group lvm
/usr/sbin/grub2-probe: error: disk `lvm/main-root' not found.
  /run/lvm/lvmetad.socket: connect failed: No such file or directory
  WARNING: Failed to connect to lvmetad. Falling back to internal scanning.
File descriptor 3 (pipe:[250231]) leaked on vgs invocation. Parent PID 31955: /usr/sbin/grub2-probe
  /run/lvm/lvmetad.socket: connect failed: No such file or directory
  WARNING: Failed to connect to lvmetad. Falling back to internal scanning.
  Volume group "lvm" not found
  Skipping volume group lvm
  /run/lvm/lvmetad.socket: connect failed: No such file or directory
  WARNING: Failed to connect to lvmetad. Falling back to internal scanning.
File descriptor 3 (pipe:[247507]) leaked on vgs invocation. Parent PID 31955: /usr/sbin/grub2-probe
  /run/lvm/lvmetad.socket: connect failed: No such file or directory
  WARNING: Failed to connect to lvmetad. Falling back to internal scanning.
  Volume group "lvm" not found
  Skipping volume group lvm
/usr/sbin/grub2-probe: error: disk `lvm/main-root' not found.
  /run/lvm/lvmetad.socket: connect failed: No such file or directory
  WARNING: Failed to connect to lvmetad. Falling back to internal scanning.
Found Windows Vista (loader) on /dev/sda1
done


Output of the command grub2-install /dev/sda:
Code:
Installing for i386-pc platform.
  /run/lvm/lvmetad.socket: connect failed: No such file or directory
  WARNING: Failed to connect to lvmetad. Falling back to internal scanning.
File descriptor 3 (pipe:[250369]) leaked on vgs invocation. Parent PID 32643: grub2-install
  /run/lvm/lvmetad.socket: connect failed: No such file or directory
  WARNING: Failed to connect to lvmetad. Falling back to internal scanning.
  Volume group "lvm" not found
  Skipping volume group lvm
  /run/lvm/lvmetad.socket: connect failed: No such file or directory
  WARNING: Failed to connect to lvmetad. Falling back to internal scanning.
File descriptor 3 (pipe:[250370]) leaked on vgs invocation. Parent PID 32643: grub2-install
  /run/lvm/lvmetad.socket: connect failed: No such file or directory
  WARNING: Failed to connect to lvmetad. Falling back to internal scanning.
  Volume group "lvm" not found
  Skipping volume group lvm
grub2-install: error: disk `lvm/main-root' not found.


Output of the command blkid:
Code:
/dev/loop0: TYPE="squashfs"
/dev/sda1: LABEL="System Reserved" UUID="B80023420023074A" TYPE="ntfs" PARTUUID="d28cd28c-01"
/dev/sda2: LABEL="Adat" UUID="8AFC915AFC91417D" TYPE="ntfs" PARTUUID="d28cd28c-02"
/dev/sdb1: LABEL="Data" UUID="A8BE019ABE016264" TYPE="ntfs" PARTUUID="1b47b170-01"
/dev/sdb2: UUID="E8F8170DF816D9A0" TYPE="ntfs" PARTUUID="1b47b170-02"
/dev/sr0: UUID="2014-04-26-19-41-06-00" LABEL="WDDisk2" TYPE="iso9660"
/dev/sdc1: UUID="2015-07-09-06-41-51-54" LABEL="Gentoo Linux amd64 20150709" TYPE="iso9660" PTUUID="480eeb5a" PTTYPE="dos" PARTUUID="480eeb5a-01"
/dev/mapper/lvm: UUID="flmXof-M6xY-q6N7-6wK6-8zVr-WVUG-e61lzm" TYPE="LVM2_member"
/dev/mapper/main-home: UUID="6065c71d-df3a-4f85-81f1-ff3ae15a1917" TYPE="ext4"
/dev/block/8:3: UUID="0683d5c4-9c57-418e-afbd-e884def9d2c3" TYPE="crypto_LUKS" PARTUUID="d28cd28c-03"
/dev/block/253:2: UUID="7e1061e5-6c6b-4edf-960e-cad36de81d64" TYPE="ext4"
/dev/block/253:0: UUID="flmXof-M6xY-q6N7-6wK6-8zVr-WVUG-e61lzm" TYPE="LVM2_member"
/dev/sda3: UUID="0683d5c4-9c57-418e-afbd-e884def9d2c3" TYPE="crypto_LUKS" PARTUUID="d28cd28c-03"
/dev/disk/by-uuid/0683d5c4-9c57-418e-afbd-e884def9d2c3: UUID="0683d5c4-9c57-418e-afbd-e884def9d2c3" TYPE="crypto_LUKS" PARTUUID="d28cd28c-03"
/dev/dm-2: UUID="7e1061e5-6c6b-4edf-960e-cad36de81d64" TYPE="ext4"
/dev/mapper/main-root: UUID="7e1061e5-6c6b-4edf-960e-cad36de81d64" TYPE="ext4"
/dev/block/253:1: LABEL="swap" UUID="b41a3bd8-40d6-4fcc-b8b0-969e1949658e" TYPE="swap"
/dev/dm-1: LABEL="swap" UUID="b41a3bd8-40d6-4fcc-b8b0-969e1949658e" TYPE="swap"
/dev/mapper/main-swap: LABEL="swap" UUID="b41a3bd8-40d6-4fcc-b8b0-969e1949658e" TYPE="swap"


My encrypted partition is on /dev/sda3, nothing else is part of the OS (except the live usb, of course).
My vg is called "main" and the logical volumes it's looking for are at /dev/main/, but for some reason GRUB2 seems to be looking for one called "lvm". I checked my settings and I don't think I mis-named it anywhere related, like the grub or dracut config files.
I have no idea how to tackle this problem, so your help would be much appreciated!

EDIT: I looked into /boot and it looks like it still builds the configuration file and it looks like grub is there too. Despite this when I reboot and try to boot GRUB I get an "unknown filesystem" error and I'm dropped down to the Grub rescue shell.
My /boot is encrypted as well but I have GRUB_ENABLE_CRYPTODISK=y and GRUB_CMDLINE_LINUX="cryptdevice=/dev/sda3:lvm" set, so it should be asking me for the password to decrypt it before anything else, shouldn't it? I suspect this means Grub didn't install properly.
EDIT2: I had a previous Linux Mint installation that I deleted to install Gentoo and it's possible that the GRUB from that install was still in the MBR and that's what I was seeing.
When I run grub2-probe --target=drive / I get the same error, for some reason it's looking for this nonexistant volume group and because of this I suspect it refuses to install Grub, but I'm not entirely sure.

EDIT3: For some reason the error stopped happening. This time I executed grub2-install --efi-directory=/boot and it completed with no error reported, after which grub2-mkconfig worked the same. However this time when booting into GRUB I'm greeted with the following:
Code:
GRUB loading.
Welcome to GRUB!

error: disk 'lvm/main-root' not found.
Entering rescue mode...
grub rescue> _

In other words, it still keeps insisting on looking for this nonexistant lvm/main-root disk, not to mention it still won't attempt to decrypt the disk like it's supposed to.
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3846
Location: Austro Bavaria

PostPosted: Tue Aug 04, 2015 6:16 pm    Post subject: Reply with quote

you need an initramfs for sure.

and i use the grub2 bootloader from linux mint on 512mb ext2 /boot partition. nothing wrong with that grub2 and lvm / luks / ext4 / ext2 ...

you need to feed grub2 all the needed parameters else it wont boot and you need separate boot and initramfs. you could use genkernel intiramfs generated with the correct genkernel parameters for hte initramfs.

kernel need all the stuff build in of course.

just careful when you update linux mint because those "genius" erase hole grub.config without user confirmation with their updater gui. the bug is still unanswered on the ubuntu side, lolz.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
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