You can do that in two ways:
Use a grub-customizer to edit Ubuntu's grub menu entry
Enter the following commands in your terminal:
sudo add-apt-repository ppa:danielrichter2007/grub-customizer
sudo apt-get update
sudo apt-get install grub-customizer
grub-customizer
When it finishes loading all scripts, click right mouse button on your Ubuntu's entry and select Edit or select this menu entry and click on pencil over tabs. In the new window append the second one line with your parameter. Confirm all changes and close program saving all changes.
I'm not sure if it'll survive kernel and grub update because this method is similar to editing /boot/grub/grub.cfg file manually what is not recommended.
Inspiration: Is it possible to edit grub.cfg?
- Edit /etc/grub.d/10_linux file and update grub
Run in your terminal:
sudo nano /etc/grub.d/10_linux
Then look for the following lines:
if test -d /sys/firmware/efi && test -e "${linux}.efi.signed"; then
sed "s/^/$submenu_indentation/" << EOF
linux ${rel_dirname}/${basename}.efi.signed root=${linux_root_device_thisversion} ro ${args}
EOF
else
if [ x"$GRUB_FORCE_PARTUUID" = x ]; then
sed "s/^/$submenu_indentation/" << EOF
linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args}
EOF
else
sed "s/^/$submenu_indentation/" << EOF
linux ${rel_dirname}/${basename} root=PARTUUID=${GRUB_FORCE_PARTUUID} ro ${args}
EOF
And append this one (from "if [ x"$GRUB_FORCE_PARTUUID" = x ]; then" section):
linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args}
with your desired parameter. Close file saving changes and use in terminal:
sudo update-grub
And that's all.
In my opinion this way is much more reliable.
Inspiration: Changing bootparameters in Ubuntu Grub