You are not logged in.

#1 2024-05-25 19:45:33

Streicher
Member
Registered: 2024-05-25
Posts: 1

dual boot (ubuntu, arch) with dm-crypt lvm grub not working

My current system looks like this.

nvme0n1                         259:0    0 953.9G  0 disk
├─nvme0n1p1                     259:1    0     1G  0 part  /boot/efi
├─nvme0n1p2                     259:2    0     2G  0 part  /boot
└─nvme0n1p3                     259:3    0 950.8G  0 part
  └─dm_crypt-0                  252:0    0 950.8G  0 crypt
    ├─ubuntu--vg-ubuntu--lv     252:1    0   300G  0 lvm   /
    ├─ubuntu--vg-arch_lv        252:2    0   400G  0 lvm   /mnt
    └─ubuntu--vg-data_backup_lv 252:3    0 250.8G  0 lvm

I installed arch on /dev/mapper/ubuntu--vg-arch_lv as described in the instructions.
But I am having trouble booting from both systems with grub.
I want to use the /boot /boot/efi part for both ubuntu and arch.

After installation I copied the linux kernel from arch to /boot (nvme0n1p2).

 ls /boot
config-6.5.11-060511-generic
config-6.7.5-060705-generic
config-6.9.1-060901-generic
efi
grub
initramfs-linux-fallback.img
initramfs-linux.img
initrd.img -> initrd.img-6.5.11-060511-gener
initrd.img-6.5.11-060511-generic
initrd.img.old -> initrd.img-6.5.11-060511-g
lost+found
memtest86+ia32.bin
memtest86+ia32.efi
memtest86+x64.bin
memtest86+x64.efi
System.map-6.5.11-060511-generic
System.map-6.7.5-060705-generic
System.map-6.9.1-060901-generic
vmlinuz -> vmlinuz-6.5.11-060511-generic
vmlinuz-6.5.11-060511-generic
vmlinuz-linux
vmlinuz.old -> vmlinuz-6.5.11-060511-generic

Then I added the following under ubuntu /etc/default/grub

GRUB_DISABLE_OS_PROBER=true

Arch was found, but at booting the message, no cryptmodule was loaded No linux kernel found.
Then I try it with a custom grub config

cat /etc/grub.d/40_custom
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.

menuentry 'Arch Linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-680f94d1-fe7f-42be-89c0-a9fe64a4ffb6' {
    load_video
    set gfxpayload=keep
    insmod gzio
    insmod part_gpt
    insmod cryptodisk
    insmod luks
    insmod ext2
    insmod lvm
    cryptomount -u cBiv1C-k6TL-WhKF-FhRy-oJS0-MTme-6qsZ79
    set root='lvmid/43ffe042-8980-4acf-aacd-04a1622d43e9/680f94d1-fe7f-42be-89c0-a9fe64a4ffb6'
    echo    'Loading Linux linux ...'
    linux   /vmlinuz-linux root=UUID=680f94d1-fe7f-42be-89c0-a9fe64a4ffb6 rw quiet
    echo    'Loading initial ramdisk ...'
    initrd  /initramfs-linux.img
}

But again, no cryptdisk module found

error no such cryptdisk found perhaps a needed disk  or cryptdisk module is not loaded
loading Linux linux
error no server is specified
Loading inital ramdisk
error you need to load the kernel first.

What am I doing wrong?

Last edited by Streicher (2024-05-25 19:53:54)

Offline

#2 2024-05-26 12:01:42

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 13,408

Re: dual boot (ubuntu, arch) with dm-crypt lvm grub not working

Which distro do you want to use to maintain grub config ?

If ubuntu you'll probably have to check ubuntu grub instructions to boot another distro .

If arch is to manage grub, see https://wiki.archlinux.org/title/GRUB#Dual-booting
(it may also be helpful in the first case).


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

Board footer

Powered by FluxBB