You are not logged in.

#1 2021-11-23 10:50:00

str0gg
Member
Registered: 2012-12-01
Posts: 75
Website

setup grub to boot iso from lvm

I am trying to setup live cd from lvm encrypted hard drive could some grub specialist help me? ;-)

menuentry 'Arch Linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-UUID3' {
        load_video
        set gfxpayload=keep
        insmod gzio
        insmod part_gpt
        insmod cryptodisk
        insmod luks
        insmod gcry_rijndael
        insmod gcry_rijndael
        insmod gcry_sha256
        insmod lvm
        insmod ext2
        cryptomount -u <UUDI1>
        set root='lvmid/<UUID2>'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint='lvmid/<UUID2>'  <UUDI3>
        else
          search --no-floppy --fs-uuid --set=root <UUDI3>
        fi
        echo    'Loading Linux linux ...'
        linux   /boot/vmlinuz-linux root=/dev/mapper/__path__-root rw cryptdevice=UUID=<UUDI1>:cryptlvm cryptkey=rootfs:/__path__/cryptolvm.keyfile resume=/dev/__path__/swap nvidia.drm.modeset=1 rcutree.rcu_idle_gp_delay=1 loglevel=3 noquiet
        echo    'Loading initial ramdisk ...'
        initrd  /boot/amd-ucode.img /boot/initramfs-linux.img
}



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 "cinamon" {
        insmod gzio
        insmod part_gpt
        insmod cryptodisk
        insmod luks
        insmod gcry_rijndael
        insmod gcry_rijndael
        insmod gcry_sha256
        insmod lvm
        insmod ext2
        search --fs-uuid --no-floppy --set=root --hint='lvmid/<UUDI2>'  <UUDI3>
        set isofile="/boot/iso/linuxmint-20.2-cinnamon-64bit.iso"
        loopback loop $isofile
        linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile noeject noprompt
        initrd (loop)/casper/initrd.lz
}

Last edited by str0gg (2021-11-23 10:50:34)

Offline

Board footer

Powered by FluxBB