Comment 20 for bug 1848856

Revision history for this message
jpb (jbrown10) wrote : Re: Upgrade from 19.04 to 19.10 with zfs on root fails with grub syntax error

Problem identified. The variable intrd_device contains a \r at the end of the variable. When concatenating the variable with the subsequent variables, it effectively truncates the subsequent data in the echo return.

Preceding the if statement, I inserted the following:

    # remove the trailing \r from the variable
    initrd_device=$(echo ${initrd_device} | tr -d '\r')

This removed the trailing \r, allowing the full set of data to be returned.

I tested this fix on my own system by modifying the 10_linux_zfs script in /etc/grub.d. The grub.cfg is now successfully generated and apt/dpkg are able to perform an update-grub.

10_linux_zfs attached.