I had an existing Linux on a disk with free space. The existing / partition was too small, so I created new partitions for / and separate /home, then rsynced files over - from old / to new / and /home.

How do I instruct the existing boot loader to add an option for the new Linux, or install a new EFI/UEFI option alongside the other option?

To make things complicated, the / partitions are encrypted with LUKS.

Disk layout:

# lsblk 
sda                    8:0    0 234.3G  0 disk  
├─sda1                 8:1    0   100M  0 part  /boot/efi
├─sda2                 8:2    0   556M  0 part  /boot
├─sda3                 8:3    0  21.4G  0 part  
│ └─sda3_crypt       254:0    0  21.4G  0 crypt /
└─sda4                 8:4    0 120.5G  0 part  
  └─lvm_vol          254:1    0 120.5G  0 crypt 
    ├─lvm_swap       254:2    0     8G  0 lvm   
    ├─lvm_linux      254:3    0    22G  0 lvm   
    └─lvm_home       254:4    0  52.8G  0 lvm   

New (on lvm_linux) and old (on sda3_crypt) are Ubuntus, the new one LVM over LUKS, the old one simply ext4 over LUKS. Currently I cannot boot the new one.

I am sure the question is not specific to Ubuntu (but instead concerns (U)EFI and its boot loaders on LUKS+LVM), therefore I am asking it here.

EDIT: The system boots with (U)EFI which means I need a modified EFI configuration and possibly, files in the /boot partition.

  • It would be useful to tell which bootloader you are using, with UEFI things get hairy with bootloaders: Some people use GRUB, others efibootmgr, others do not even use a bootloader but use the kernel itself as its own EFI stub (that's me for example). – grochmal Aug 21 '16 at 18:36
  • @grochmal Thanks, I believe it is efibootmgr but I will check and get back to you. What is the fastest way to find out? – Ned64 Aug 21 '16 at 20:25
  • 1
    Might be helpful: rodsbooks.com/efi-bootloaders/principles.html – Michael Shigorin Aug 22 '16 at 12:59
  • @grochmal efibootmgr is not a bootloader, it's a tool to instruct firmware about bootloader (or a kernel with UEFI stub); again, see the link above, Rod has it all covered. – Michael Shigorin Aug 22 '16 at 13:01
  • 1
    @MichaelShigorin - Wow, that's an interesting book, bookmarked. And very interesting is the fact that efiootmgr simply automates what I normally perform by hand. Thanks. As of the question, I need to admit that I never used efibootmgr. – grochmal Aug 23 '16 at 0:54

I you do not strictly need UEFI per se you might be happy to turn your Firmware to use legacy boot instead of UEFI. And then use any traditional boot loader to boot directly your boot partition.

  • Thanks, but that does not work on this machine. It currently uses EFI and I (just?) need a new configuration based on the non-booted Linux files. – Ned64 Aug 23 '16 at 17:02

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.