Announcement

Collapse
No announcement yet.

Help repairing GRUB on LUKS-encrypted volume

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Help repairing GRUB on LUKS-encrypted volume

    Hello!

    I'm dual-booting using two separate drives; one using Kubuntu 25.10 and another using Windows 10.
    However, yesterday when I tried booting to my Kubuntu drive, my PC booted straight into Windows 10 and continues to do so.
    Normally, it would boot into the GRUB menu where I can select between the two systems, but not this time.
    This leads me to believe that GRUB has been destroyed, since unlocking the drive using a live USB shows an empty GRUB folder in root.
    My Kubuntu install has two partitions: sda1 (ext4, kubuntu_boot), sda2 (luks2, root).

    I've tried changing the boot order in my BIOS, as well as unplugging the Windows drive, but when I do this, my PC finds no bootable drive.
    I believe I need to follow the guide linked here, but there's a few things I don't understand about it:
    Code:
    sudo -i
    apt-get update
    apt-get install cryptsetup lvm2
    fdisk -l
    cryptsetup luksOpen /dev/sda? TAG # sda? is your root partition
    vgchange -ay
    vgscan
    vgchange -ay [VOLUME GROUP NAME] # From the above command
    lvscan
    mount /dev/[VOLUME GROUP NAME]/[LOGICAL VOLUME NAME] /mnt # LOGICAL VOLUME NAME from above command
    modprobe efivarfs
    mount /dev/sda? /mnt/boot/efi # sda? is your efi partition
    mount --bind /dev /mnt/dev
    mount --bind /dev/pts /mnt/dev/pts
    mount --bind /proc /mnt/proc
    mount --bind /sys /mnt/sys
    cp /etc/resolv.conf /mnt/etc/
    chroot /mnt​
    What is [VOLUME GROUP NAME] and [LOGICAL VOLUME NAME], and where can these be found in the terminal?

    Thank you!

    #2
    Is anyone able to help?

    Comment


      #3
      Originally posted by LinuxNewbie View Post
      What is [VOLUME GROUP NAME] and [LOGICAL VOLUME NAME], and where can these be found in the terminal?
      The example tells you

      Originally posted by LinuxNewbie View Post
      vgchange -ay [VOLUME GROUP NAME] # From the above command
      which is vgscan

      Also note this is quite old, and may not be valid today, or not completely. It *looks* okay, but I haven't used encryption regularly in ages, on any distro where it didn't break.

      As this sort of thing isn't specific to Kubuntu, you may find more people who actively use this or have had similar issues on a general Ubuntu support resource, in addition to whatever experiences are reported here.

      Comment


        #4
        Originally posted by claydoh View Post

        The example tells you


        which is vgscan

        Also note this is quite old, and may not be valid today, or not completely. It *looks* okay, but I haven't used encryption regularly in ages, on any distro where it didn't break.

        As this sort of thing isn't specific to Kubuntu, you may find more people who actively use this or have had similar issues on a general Ubuntu support resource, in addition to whatever experiences are reported here.
        I tried with vgscan, but it didn't work, unfortunately.
        Thanks for the answer, I think I'll see if someone has a solution on Ask Ubuntu.
        I hope I won't have to reinstall, but if I did, couldn't I overwrite my new root with the files from my old one?

        Comment

        Users Viewing This Topic

        Collapse

        There are 0 users viewing this topic.

        Working...
        X