[Bug 2102163] [NEW] 10_linux_zfs did not create bootable config

J 2102163 at bugs.launchpad.net
Wed Mar 12 20:04:24 UTC 2025


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
Foundations Bugs, which is subscribed to grub2 in Ubuntu.
https://bugs.launchpad.net/bugs/2102163

Title:
  10_linux_zfs did not create bootable config

Status in grub2 package in Ubuntu:
  New

Bug description:
  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

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




More information about the foundations-bugs mailing list