0

I have installed Elementary OS on my LVM partition alongside Fedora. Since I already have a boot partition with grub installed I skipped the boot-loader installation by running the ubiquity installer with -b option.

After successful installation, I booted my Fedora and ran grub2-mkconfig > /boot/grub2/grub.cfg. It generated the following grub menu entry (relevant lines only)

menuentry 'elementary OS 0.4.1 Loki (0.4.1) (on /dev/mapper/fedora-elementary)' --class elementary --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-9e66ef60-8278-4968-8cd8-71dfb9f6b927' {
    insmod part_msdos
    insmod lvm
    insmod ext2
    set root='lvmid/UIHXow-y3Kc-vBsq-ogUW-OzCC-FszJ-67j45F/enyHZA-qS1r-Yvlk-753N-pHNR-Mt93-mY0pv3'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint='lvmid/UIHXow-y3Kc-vBsq-ogUW-OzCC-FszJ-67j45F/enyHZA-qS1r-Yvlk-753N-pHNR-Mt93-mY0pv3'  9e66ef60-8278-4968-8cd8-71dfb9f6b927
    else
      search --no-floppy --fs-uuid --set=root 9e66ef60-8278-4968-8cd8-71dfb9f6b927
    fi
    linux16 /boot/vmlinuz-4.13.0-32-generic root=/dev/dm-2
    initrd16 /boot/initrd.img-4.13.0-32-generic
}

The problem is that when I select "elementary OS" grub menu item, booting stops with error: ALERT! /dev/dm-2 does not exist. Dropping to a shell!

ALERT! /dev/dm-2 does not exist. Dropping to a shell!

In the "rescue" initramfs shell checked that /dev/dm-2 indeed does not exist until I run vgchange -ay.

What I'm doing wrong? Is some kernel module missing in Loki installation? If so, how can I add it? Or should be the grub menu generated somehow else? I didn't want to let Elementary installer to install boot-loader (and thus delete previous working installation)


Here is my disk partitioning setup:

SSD 128GB
/dev/sda1 - 524MB boot, ext4
/dev/sda2 - 128GB LVM2 PV
    /dev/fedora/root 87GB ext4
    /dev/fedora/swap 8.3GB swap
    /dev/fedora/elementary 32GB ext4
  • From many years of experience with Linux dualbooting I came to canclusion that the safest way to dualboot is to not dualboot at all. Dedicated harddrives for every system give less headache and your systems are independent of each other. Additionally you loose a single point of failure - which in case of dualboot - is the shared harddrive. – DanyGee Jun 11 '18 at 9:33
0

AFAIK ... I do not think you can do what you are trying to do with LVM ... LVM has a catalog file that exists in the OS you are running ... and elementary knows nothing about this LVM volume catalog in fedora ... Assuming that you just want to use LVM for both distros ... you would need to have your drive partitioned with another partition for a private volume for Elementary's LVM "volumes" ... please note in this dual boot configuration ... that reading an LVM "volume" on one system from another's LVM is difficult at best and is probably impossible. To share part of the disk to both systems I would suggest a plain partition as maybe ext4 formatted that both can read. Sorry about the format of this answer ... still not comfortable formatting text in this.

  • to expound a bit further ... you would need to create a /dev/sda3 for use as a PV (physical volume) to be used by Elementary for its LVM volumes ... i think I covered everthing now – George Barbaz Jun 12 '18 at 18:28
  • Thanks for the answer. The strange thing is that when I try to run ElementaryOS, booting ends in the initramfs "rescue" shell. And when I run there "vgchange -ay", /dev/dm-2 appears, I am able to mount it and browse it. – stepan Jun 13 '18 at 19:53
0

In my experience, try to specify root parameter with /dev/mapper/fedora-elementary.

So, it goes like...

linux16 /boot/vmlinuz-4.13.0-32-generic root=/dev/mapper/fedora-elementary

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.