How to edit /etc/default/grub on live-usb?

I have a problem (described here and here) installing Ubuntu on my laptop from USB stick, and some people say that I need to change GRUB_CMDLINE_LINUX_DEFAULT value in /etc/default/grub to quiet iommu=soft splash, but I get /usr/sbin/grub-probe: error: failed to get canonical path of '/cow' error.


Solution 1:

Change Command Line On Rufus Made USB

update-grub does not work on Live or Persistent USB's. However you can edit the command line Directly on a Rufus made USB in Windows.

If booting in Legacy mode: In Windows Explorer select and open /isolinux/txt.cfg and add your iommu=soft between quiet and splash of the first menu item. Save.

If booting in UEFI mode: In Windows Explorer select and open /boot/grub/grub.cfg and add your iommu=soft between quiet and splash of the first menuentry. Save.

You can also make the changes temporarily for each session.

Booting Legacy press shift and Esc at the language screen press F6 and Esc again. Edit the command line as above and press enter to boot.

Booting UEFI mode press e at the boot menu. Edit as above and press F10 to boot.