Results 1 to 4 of 4

Thread: openSUSE + Ubuntu encrypted partition dual boot after kernel update

  1. #1

    Question openSUSE + Ubuntu encrypted partition dual boot after kernel update

    Goodmorning,
    On my system I have the following partitions setup:
    -> a / EXT4 partition with openSUSE Linux 15.1;
    -> another / EXT4 partition but entirely encrypted with Ubuntu 18.04.4;
    -> a /boot partition with GRUB (originally created by Ubuntu).

    Recently, I have noticed that after a kernel update, openSUSE updates GRUB removing other entries and leaving just the one about openSUSE itself, (it happens in both cases other entries are GNU/Linux distributions, Windows or BSDs). I have seen this happen in the last versions of Leap (if I correctly remember it didn't happened on openSUSE 13.1 or 13.2).

    Since the Ubuntu partition in this case is encrypted, I think it is somewhat justified that he cannot find another OS, so I would like to know if someone has an idea about the best way to configure GRUB on the openSUSE side to handle correctly this situation.

    The best solution, yet uncomfortable, I thought is to configure on the YaST side
    -> Custom boot partition on the same /boot
    -> every other check disabled (so it does not touch the boot loader)

    and whenever openSUSE gets a new kernel I run update-grub / os-prober from Ubuntu.

    What do you think about that? Does someone has a better solution for this problem?

    Thanks,

    Best Regards
    hawake

  2. #2
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    14,002
    Blog Entries
    3

    Default Re: openSUSE + Ubuntu encrypted partition dual boot after kernel update

    Quick and dirty solution:
    1. Use the "cryptsetup" command (from root command line) to decrypt the Ubuntu partition;
    2. Run (as root in openSUSE)
      Code:
      grub2-mkconfig -o /boot/grub2/grub.cfg


    Long term solution: edit "/etc/grub.d/40_custom" to add booting options of Ubuntu. If you want Ubuntu to control the booting, then do that editing on your Ubuntu system. Otherwise do it on the openSUSE system.

    What I use, in such a situation, is the "configfile" command in grub -- I put that in the "40_custom" file.

    Let's suppose that Ubuntu is controlling the booting. There is a kernel update on openSUSE. Your grub menu entry (from Ubuntu) uses "configfile" to jump to the "grub.cfg" in openSUSE, and that already uses the new kernel because the kernel update has taken care of that. And it works similarly if openSUSE is controlling the booting.

    I could give more details if I know more about your system. The output from
    Code:
    fdisk -l
    would be helpful here, with accompanying notes as to which partition is used for which linux system.
    openSUSE Leap 15.2; KDE Plasma 5.18.5;

  3. #3
    Join Date
    Sep 2012
    Posts
    5,713

    Default Re: openSUSE + Ubuntu encrypted partition dual boot after kernel update

    Quote Originally Posted by nrickert View Post
    What I use, in such a situation, is the "configfile" command in grub
    Ubuntu and SUSE grub are sufficiently different for grub.cfg to not be compatible, so in this case I would chainload Ubuntu grub to be on safe side.

  4. #4
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    14,002
    Blog Entries
    3

    Default Re: openSUSE + Ubuntu encrypted partition dual boot after kernel update

    Quote Originally Posted by arvidjaar View Post
    Ubuntu and SUSE grub are sufficiently different for grub.cfg to not be compatible, so in this case I would chainload Ubuntu grub to be on safe side.
    Interesting. I never ran into that problem, but perhaps that's because I am not using "btrfs".

    Hmm, there was also a compatibility issue with secure-boot. I took care of that by generating "grub.altcfg" on Ubuntu systems, and using configfile on that. To create "grub.altcfg", I changed every "linux" to "linuxefi" and every "initrd" to "initrdefi". But that's no longer needed now that openSUSE (Tumbleweed and 15.2) is using grub 2.04.

    Yes, chainload does avoid such problems.
    openSUSE Leap 15.2; KDE Plasma 5.18.5;

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •