Today I just repeated the test "Create a Gen-1 Ubuntu 19.10 VM on Azure, and upgrade it to Ubuntu 20.04 by “do-release-upgrade –d" and I reproduced this bug again, and the grub version is also 2.04-1ubuntu26!
So I suspect grub itself should be good, but some grub config file (i.e. /etc/grub.d/10_linux?) causes the bug?
I checked my /etc/grub.d/10_linux: after I added line 263, "grub-mkconfig" can generate the needed initrd line correctly:
257 fi
258
259 sed "s/^/$submenu_indentation/" << EOF
260 initrd ${rel_dirname}/${initrd}
261 else
262 linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args} panic=-1
263 initrd ${rel_dirname}/${initrd}
264 fi
265 initrdfail
266 EOF
My /etc/grub.d/10_linux is from the grub2-common package (2.04-1ubuntu26). It looks this file in my VM that's upgraded from 19.10 to 20.04 is different from the version of the file in a VM that's created from https://releases.ubuntu.com/20.04/ubuntu-20.04-live-server-amd64.iso
That's why I suspected it is specific to the cloud-image version of Ubuntu 20.04. I don't know how exactly “do-release-upgrade -d" works and where the upgrade procedure pulls the grub2 that lacks the initrd line in the /etc/grub.d/10_linux.
Today I just repeated the test "Create a Gen-1 Ubuntu 19.10 VM on Azure, and upgrade it to Ubuntu 20.04 by “do-release-upgrade –d" and I reproduced this bug again, and the grub version is also 2.04-1ubuntu26!
So I suspect grub itself should be good, but some grub config file (i.e. /etc/grub. d/10_linux? ) causes the bug? d/10_linux: after I added line 263, "grub-mkconfig" can generate the needed initrd line correctly:
I checked my /etc/grub.
257 fi indentation/ " << EOF /${initrd} /${basename} root=${ linux_root_ device_ thisversion} ro ${args} panic=-1 /${initrd}
258
259 sed "s/^/$submenu_
260 initrd ${rel_dirname}
261 else
262 linux ${rel_dirname}
263 initrd ${rel_dirname}
264 fi
265 initrdfail
266 EOF
My /etc/grub. d/10_linux is from the grub2-common package (2.04-1ubuntu26). It looks this file in my VM that's upgraded from 19.10 to 20.04 is different from the version of the file in a VM that's created from https:/ /releases. ubuntu. com/20. 04/ubuntu- 20.04-live- server- amd64.iso
That's why I suspected it is specific to the cloud-image version of Ubuntu 20.04. I don't know how exactly “do-release-upgrade -d" works and where the upgrade procedure pulls the grub2 that lacks the initrd line in the /etc/grub. d/10_linux.
In summary, /cloud- images. ubuntu. com/focal/ 20200430. 1/focal- server- cloudimg- amd64.img and https:/ /cloud- images. ubuntu. com/focal/ 20200430. 1/focal- server- cloudimg- amd64-azure. vhd.zip have the bug. /releases. ubuntu. com/20. 04/ubuntu- 20.04-live- server- amd64.iso does not have the bug.
1. https:/
2. https:/
3. A quick fix is add the needed line 263 (see above), but I think we need to understand how the bug is introduced.