Skip to content

Support dual boot on same pool. #6

@HankB

Description

@HankB

Provide capability to dual boot Ubuntu and Debian on the same root pool. See Richard Laager's email Apr 18, 2019, 4:29 PM "Grub error "compression algorithm inherit not supported" on reboot" (Sorry, I can't figure out how to find a link to that.)

On 4/18/19 3:46 PM, Hank Barta wrote:

I've given this some thought as a way to dual boot multiple Linux
variants from a single zpool. I have more questions than answers. Here
are some of mine.

  • For all of the partitions that are automounted, is there a way to
    control which ones are mounted for a given distro? Or is it
    necessary to set them all to "legacy" and mount via fstab? Or a
    root=... in the linux grub command line?

If they aren't shared (e.g. /home is probably shared, though you noted
issues), then you need one of these two approaches:

A) Put them under the rootfs dataset. I believe the initramfs will mount
them, but you'll have to test. For example, if you had /opt
rpool/ROOT/ubuntu/opt
rpoot/ROOT/debian/opt

B) Make them all legacy and use different /etc/fstab per distro.

  • Will grub (e.g. update-grub recognize more than the presently
    loaded distro? In this case, I think that EFI boot could come to the
    rescue. I have Win10, Ubuntu 19.04 (on EXT4) and Debian Buster (root
    on ZFS) on a laptop. Since the Ubuntu install (which followed
    Debian) I boot Debian via the BIOS boot selection menu. I could fix
    this by reinstalling grub when running Debian but it's so little
    trouble I haven't bothered. (I have become a huge fan of ZFS and
    secondarily, a fan of EFI.)

I'm not sure how well this will all work. You'll have to try. If it
doesn't work well now, hopefully this will be improved in the
not-too-distant future. People are looking into it.

  • Not strictly related to ZFS but perhaps involved... Filesystems
    shared between distros (e.g. /home/$USER.) As an unrepentant distro
    hopper (or just distro upgrader) I have had a separate /home
    filesystem but found that some configuration files conflicted with
    the different versions of S/W installed by various distros. I
    resolved that by leaving $HOME in the root filesystem, mounting the
    old home filesystem at /mnt/home and linking directories I wanted to
    share (~/Documents, ~/Pictures etc.) to my home directory. It works
    well with a few quirks. (I need to follow directories with a
    trailing slash to get the result I want, such as “find ~/Documents/
    -name foo.bar” or “ls -l ~/Pictures/”.) This could be an issue if
    something in a newer version of Ubuntu puts things in the
    configuration files that would cause an older version to crash.
    (DAMHIK) This practice I describe is using EXT4 filesystems and is
    how my present desktop is organized. I wonder if there is a way to
    leverage ZFS filesystems to accomplish the same goal (or just
    migrate this practice to ZFS filesystems.) This should really be a
    subject for a different thread but could impact you if you get all
    of the other stuff to work.

You could do several things for /home/$USER, and then with any of them
have /home/$USER/Pictures as a ZFS dataset that is mounted normally or
is in all the /etc/fstabs:

A) /home/$USER exists in rpool/ROOT/{ubuntu,debian}
B) /home/$USER is rpool/ROOT/{ubuntu,debian}/home/$USER
C) /home/$USER is rpool/{ubuntu,debian}/home/$USER, mountpoint=legacy,
and in the separate /etc/fstabs

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions