Comment 24 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

The \r is an invisible return character, commonly returned by an echo. However, here, we are executing grub_probe --target=device /boot

The code in 10_linux_zfs:
 initrd_device=$(${grub_probe} --target=device "${boot_dir}")

The results are the same as above. For the specific entry, it is the first drive in my mirror:
/dev/sdc1 (first drive as defined in my mirror)
/dev/sda1 (second drive as defined in my mirror)
/dev/nvme0n1p2 (zfs logs)
/dev/nvme0n1p4 (zfs cache)

Notice that the results of the output from grub_probe has new lines. New lines are usually \n but may be \r\n. I don't know what grub_probe is doing and didn't look to see how it does it. But the return from there would be what's got the \r (again it isn't visible).

I have nothing special or different from the stock Ubuntu /etc/default/grub other than I added zswap entries to the /etc/default/grub and those don't affect this.

The underlying cause may be that because I have a mirrored root using zfs mirroring, multiple devices show up and may cause the \r to be returned. It's just a guess.

So, to test, you'd want grub_probe to return multiple devices and the easiest way would be to just have a mirror for the rpool.