Score:2

replace uuid in a grub.cfg with sed

gh flag

How can I replace a UUID in a /boot/grub/grub.cfg with sed?

For some reason I have to replace string 88411b09-1aaa-4775-9fc7-f60041049d6c with f210c829-2c04-4963-9a78-d61cf8ebbd48 in a /boot/grub/grub.cfg I found this but I'm unable to adapt it to my situation. And I found also this but I get an error.

grep -q 88411b09-1aaa-4775-9fc7-f60041049d6c /media/alex/f210c829-2c04-4963-9a78-d61cf8ebbd48/boot/grub/grub.cfg && sudo sed -i 's/88411b09-1aaa-4775-9fc7-f60041049d6c/f210c829-2c04-4963-9a78-d61cf8ebbd48' /media/alex/f210c829-2c04-4963-9a78-d61cf8ebbd48/boot/grub/grub.cfg
sed: -e expression #1, char 75: unterminated `s' command
oldfred avatar
cn flag
You should never edit grub.cfg, but either grub's scripts or its configuration file /etc/default/grub. But you would not normally have an external drive like /media/alex in grub. And then run `sudo update-grub`. Are you sure entry is not in fstab? Please copy & paste the pastebin link to the BootInfo summary report ( do not post report), do not run the auto fix till reviewed. Use often updated ppa version over somewhat older ISO with your USB installer or any working install. https://help.ubuntu.com/community/Boot-Repair
Score:4
es flag

You need a slash at the end of the 's/old/new/' expression.

sudo sed -i 's/88411b09-1aaa-4775-9fc7-f60041049d6c/f210c829-2c04-4963-9a78-d61cf8ebbd48/' /media/alex/f210c829-2c04-4963-9a78-d61cf8ebbd48/boot/grub/grub.cfg
I sit in a Tesla and translated this thread with Ai:

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.