Public bug reported:

10_linux_zfs did not create a bootable entry in grub.cfg.

I found that the issue was that somehow the bootlist was displaying tab
(\t) characters and the script was not able to detect the entries. I
changed the last 'echo' to 'echo -e' and then it worked again:

bootlist() {
    local mntdir="$1"
    local boot_list=""

    for dataset in $(get_root_datasets); do
        # get information from current root dataset
        boot_list="${boot_list}$(get_dataset_info "${dataset}" ${mntdir})\n"

        # get information from snapshots of this root dataset
        snapshots="$(zfs list -H -o name -t snapshot "${dataset}"|while read 
snapshot_dataset; do
            get_dataset_info "${snapshot_dataset}" ${mntdir}
        done)"
        [ -n "${snapshots}" ] && boot_list="${boot_list}${snapshots}\n"
    done
    echo "${boot_list}"
}

lsb_release -rd
No LSB modules are available.
Description:    Ubuntu 24.04.2 LTS
Release:        24.04

# apt-cache policy grub2
grub2:
  Installed: (none)
  Candidate: 2.12-1ubuntu7.1

** Affects: grub2 (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2102163

Title:
  10_linux_zfs did not create bootable config

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/2102163/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to