Score:1

Corresponding Edit In grub.cfg

ph flag

How would you translate this single edited line

GRUB_CMDLINE_LINUX_DEFAULT="amdgpu.ppfeaturemask=0xffffffff"

from /etc/default/grub to /mnt/boot/grub/grub.cfg on mkusb 18.04.5 LTS Persistent USB?

I need it translated to code manually, because I can't do sudo update-grub for the changes made to /etc/default/grub to take place on the mkusb persistent USB. Otherwise I get this error

/usr/sbin/grub-probe:error:failed to get canonical path of /cow

And the only way I can edit mkusb's grub.cfg is by following this tutorial. Please help, I've had so many headaches because of this. I first tried solving it 7 months ago and still haven't figured it out.

Link for the grub files: https://drive.google.com/drive/folders/1ki5fCN9CdyvuBqe58zv6NuFhehokJsXe?usp=sharing

oldfred avatar
cn flag
Why does not the tutorial you post not work? You do have to directly edit grub.cfg. Are there two grub.cfg, one for BIOS and one for UEFI boot? Have not used persistent install. And with 18.04, BIOS mode would use syslinux/txt.cfg boot and only UEFI would use grub.cfg.
patron avatar
ph flag
Are you saying that if I run my persistence Ubuntu in BIOS Mode the change I made in /etc/default/grub would take effect?
oldfred avatar
cn flag
No, changes to grub only would be for UEFI boot with older versions of Ubuntu that use syslinux to BIOS boot. If using BIOS, edit syslinux settings. New versions use grub for both UEFI & BIOS boot. But grub may have two versions in different folders? Have not checked as do not use BIOS boot anymore.
patron avatar
ph flag
@oldfred The reason that tutorial doesn’t work Is because I don’t know how to translate the change I made in /etc/default/grub to manual code to /mnt/boot/grub/grub.cfg
patron avatar
ph flag
Do you maybe know ?
oldfred avatar
cn flag
With a full install, you never edit grub.cfg. You edit /etc/default/grub or scripts in 40_custom and run sudo update-grub to update grub.cfg. But with any install that is not a full install where you can run the update-grub, you violate the rule of never directly editing grub and just edit /mnt/boot/grub/grub.cfg. Or where ever you have it mounted. I prefer full installs on flash drives, as then they can be updated. And flash drives are now larger so room for full install & data partition(s).
patron avatar
ph flag
I can’t run sudo update-grub because I get this error /usr/sbin/grub-probe:error:failed to get canonical path of /cow
patron avatar
ph flag
Could you please translate the changes I made to /etc/default/grub to grub.cfg ?
oldfred avatar
cn flag
https://help.ubuntu.com/community/Grub2/Setup#Configuring_GRUB_2 GRUB_CMD_LINUX_DEFAULT="quiet splash" * This imports any entries to the end of the 'linux' (GRUB legacy's "kernel" ). The entries are appended to the end of the normal mode only. Entries then are on linux line like this, yours will have different UUID. `linux /boot/vmlinuz-5.4.0-42-generic root=UUID=db535ec5-b653-4627-9f21-2645e1d7ca4e ro quiet splash $vt_handoff`
patron avatar
ph flag
GRUB_CMDLINE_LINUX_DEFAULT="amdgpu.ppfeaturemask=0xffffffff"
patron avatar
ph flag
This is the line I need translated to grub.cfg from /etc/default/grub
oldfred avatar
cn flag
Posted above, linux line in grub menu.I prefer to replace quiet splash or you can just add it. Keep a space between entries like with quiet splash is.
sudodus avatar
jp flag
**I don't think you should use `sudo update-grub` at all in a persistent live drive.** Instead, you should edit the `/mountpoint/boot/grub/grub.cfg` file, which is in partition #3 in a persistent live drive made by mkusb-dus. This kind of drive boots via grub also in BIOS mode. In older Ubuntu drives made by mkusb-plug and many other tools, syslinux is used to boot in BIOS mode. But still, do not use `sudo update-grub` in such [persistent] live drives.
C.S.Cameron avatar
cn flag
Yes what sudodus says works for me also, `sudo update-grub` does not work for a persistent drive, Thre response is: Failed to get canonical path of /cow, but as oldfred says, `sudo update-grub` does work for a Full install USB.
patron avatar
ph flag
linux /boot/vmlinuz-5.4.0-42-generic root=UUID=db535ec5-b653-4627-9f21-2645e1d7ca4e ro amdgpu.ppfeaturemask=0xffffffff $vt_handoff
patron avatar
ph flag
So I just have to type this into grub and it should work? I looked at grub from installed system where sudo update-grub worked and there were three instances of amdgpu.ppfeaturemask=0xffffffff
patron avatar
ph flag
Do you want me to upload the grub file from the installed system?
Score:0
jp flag

I suggest that you

  1. Save (make a backup copy of) your personal files from the problematic persistent live system to another drive. You may need to boot from another drive for this purpose, and in that case find them in the partition for persistence in the directory tree /mountpoint/upper/ (and/or if you used mkusb-dus to create the persistent live system, in the NTFS partition labeled usbdata).

  2. Create a fresh version of a persistent live system. This will overwrite the drive so you must save what you cannot afford to lose before doing it.

  3. Restore your personal files to the persistent live system (typically into subdirectories of your home directory).

  4. If necessary, install some program package, that you need.

  5. Finally, if you used mkusb-dus to create the persistent live system, backup the content of the partition for persistence. Then you will be able to recover quickly from problems like this one.

    Otherwise, use your own method to make a backup copy of the content in the partition for persistence (for example with tar or rsync).

    And please remember to backup also the content of the NTFS partition labeled usbdata (if there is such a partition).

Edit: Here is a correct version of grub.cfg for a persistent live drive of Lubuntu 18.04.5 LTS made by mkusb-dus from lubuntu-18.04.5-desktop-amd64.iso. It should be copied to the third partition of the persistent live drive mounted at 'mountpoint': /mountpoint/boot/grub/grub.cfg

set timeout=10
set default=0
if loadfont /boot/grub/font.pf2 ; then
#   set gfxmode=auto
    insmod efi_gop
    insmod efi_uga
    insmod gfxterm
#   terminal_output gfxterm
fi
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
if loadfont /boot/grub/font.pf2 ; then
#       set gfxmode=auto
        set menu_color_normal=light-gray/black
        set menu_color_highlight=black/light-gray
        set color_normal=light-gray/black
        set gfxmode=800x600
        insmod efi_gop
        insmod efi_uga
        insmod gfxterm
        insmod ieee1275_fb
        insmod vbe
        insmod vga
        insmod video_bochs
        insmod video_cirrus
        terminal_output gfxterm
        insmod png
        background_image /mkusb-grub-bg_800x600.png
fi
menuentry "Run Lubuntu - persistent live" {
 search --set=root --fs-uuid 2020-08-06-23-08-05-00
    set gfxpayload=keep
    linux   ($root)/casper/vmlinuz  file=/cdrom/preseed/lubuntu.seed boot=casper quiet splash fsck.mode=skip persistent ---
    initrd  ($root)/casper/initrd
}
menuentry "Run Lubuntu - persistent live to RAM" {
 search --set=root --fs-uuid 2020-08-06-23-08-05-00
    set gfxpayload=keep
    linux   ($root)/casper/vmlinuz  file=/cdrom/preseed/lubuntu.seed boot=casper quiet splash fsck.mode=skip toram persistent ---
    initrd  ($root)/casper/initrd
}
menuentry "Run Lubuntu - live-only to RAM" {
 search --set=root --fs-uuid 2020-08-06-23-08-05-00
    set gfxpayload=keep
    linux   ($root)/casper/vmlinuz  file=/cdrom/preseed/lubuntu.seed boot=casper quiet splash fsck.mode=skip toram nopersistent ---
    initrd  ($root)/casper/initrd
}
menuentry "Try Lubuntu without installing" {
 search --set=root --fs-uuid 2020-08-06-23-08-05-00
    set gfxpayload=keep
    linux   ($root)/casper/vmlinuz  file=/cdrom/preseed/lubuntu.seed boot=casper quiet splash ---
    initrd  ($root)/casper/initrd
}
menuentry "Install Lubuntu" {
 search --set=root --fs-uuid 2020-08-06-23-08-05-00
    set gfxpayload=keep
    linux   ($root)/casper/vmlinuz  file=/cdrom/preseed/lubuntu.seed boot=casper only-ubiquity quiet splash ---
    initrd  ($root)/casper/initrd
}
menuentry "OEM install (for manufacturers)" {
 search --set=root --fs-uuid 2020-08-06-23-08-05-00
    set gfxpayload=keep
    linux   ($root)/casper/vmlinuz  file=/cdrom/preseed/lubuntu.seed boot=casper only-ubiquity quiet splash oem-config/enable=true ---
    initrd  ($root)/casper/initrd
}
menuentry "Check disc for defects" {
 search --set=root --fs-uuid 2020-08-06-23-08-05-00
    set gfxpayload=keep
    linux   ($root)/casper/vmlinuz  boot=casper integrity-check quiet splash ---
    initrd  ($root)/casper/initrd
}

If there are other damages in the persistent live system, or if you created it by some other method (not by mkusb-dus), it will not help to use this grub.cfg file, and I suggest again that you create a fresh version of a persistent live system.

Edit 2: Try first without editing.

If there will be no graphics, you may have problems with the driver for the graphics chip/card. In that case try first to add nomodeset near the end of the line starting with 'linux' (in each menuentry in the file grub.cfg),

linux ...... nomodeset ---

Next you could try to replace nomodeset with your string like so:

linux ...... amdgpu.ppfeaturemask=0xffffffff ---

This may or may not work, because it may need some driver that is not available in a live or persistent live system.

The dots, ......, represent some text content, for example the first instance of line should be

linux   ($root)/casper/vmlinuz  file=/cdrom/preseed/lubuntu.seed boot=casper quiet splash fsck.mode=skip persistent nomodeset ---

and/or

linux   ($root)/casper/vmlinuz  file=/cdrom/preseed/lubuntu.seed boot=casper quiet splash fsck.mode=skip persistent amdgpu.ppfeaturemask=0xffffffff ---
Zanna avatar
kr flag
Hi folks! This conversation has been [moved to chat](https://chat.stackexchange.com/rooms/128307/discussion-on-answer-by-sudodus-corresponding-edit-in-grub-cfg) and you should both be able to join this time
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.