Score:-2

Need help reinstall Grub2 from Live Ubuntu 20.4.1 Usb

pn flag

I have a 3 boot system that's badly infected- Win10 has a reboot virus; Pepermint9 got something so funky that I reinstalled new Ubuntu (now 20.4 8 months ago); a month ago stupidly I used Pep9 for a while, even using the bad software updater; which messed it up so much it doesn't even boot from the recovery partition; + which got into my Ubuntu. Because now I am not booting into the Ubuntu Grub but into the Peppermint Grub and it didn't even update the new kernel Ubun20.4.1 just installed.

I need help to reinstall the Grub only (Ubuntu 20.4.1) from Live USB so that it becomes the master. I've done it before with the Pep Grub but need step by step instructions, like a moron. It is a Dell Inspiron 15; UEFI SDA1, Win10 SDA3, Ubun10.4.1 SDA10, Swap SDA11, Pep9 SDA12; booting into a Live Ubuntu 10.4.1 flash fm UEFI- that is the original installation medium. I know there is some Grub Rescue program, rather not use it cause it didn't seem to work last time; just want the exact terminal commands to force Grub to reinstall on Sda while operating from the Live Ubuntu flash.

Chokoladekiks avatar
it flag
You both mentioning Ubuntu 10.4.1 and 20.4.1. Please edit your question to make this clear, which version you have. If your have version 10.4.1, then please note that this version is EOL.
FedKad avatar
cn flag
Please avoid using ALL UPPERCASE in your headings and sentences. To emphasize use _italics_ or **bold** as appropriate (but not too much!). Please, [edit] your question to take actions for these comment requests.
Crighton avatar
sd flag
Sounds like rescue data using a LiveCD, and then a complete disk wipe and re-install of all 3 OS having made sure rescued data is "clean" before restoring it. You do not indicate you have removed the virus. If it is in BIOS it gets a little more complicated. A Live CD should be able to manage a wipe, partition and install, leaving spare partitions for Pep and Win
mkham66 avatar
pn flag
Sorry, saw some ancient 10.4 artifact in files and it got in my head. Didn't think you could do bold, No, complete wipe is the last thing I want to do.
HomerSimpson avatar
sa flag
Make a rescue usb with 'Ikki Boot', 'Rescatux' and 'Hiren's Boot CD' using Ventoy. All 3 iso's on one stick (at least 16 Gb). And attack the virus if you don't want to wipe your disk. This is why backups are so important. If you would have a recent one, you would wipe the disk.
Joepie Es avatar
eg flag
@HomerSimpson Looks like he doesn't have backups. That is why he doesn't want to wipe the disk.
Score:1
sa flag

Run this sudo grub-install /dev/sda in the terminal of the live environment.

mkham66 avatar
pn flag
Thanks. Now I'm back to using the installation Just that?? Seems awful simple. Not going to brick my installation, am I? Wouldn't you have to specify or mount partitions for that first, or it is gonna install on SdaA1 anyway. The Ubuntu is on Sda10. Hasn't been finding new kernels of Ubuntu (56) cause it's using the Peppermint Grub, so I edit the 50 recovery Kernel to 56, and boot up w that. Can one edit those screens permanantly? It doesn't ask for any password with sudo on the live stick, right? I'd love to attack the Virus- HOW? Only have Clam + not finding anything now.
HomerSimpson avatar
sa flag
You don't have to mount partitions first. Grub will install itself in the EFI partition. Use the Ubuntu 22.04.1 iso on the USB stick ( and not the 10.04.1 like in your question ). See this page https://www.atulhost.com/how-to-disable-or-enable-os-prober-from-the-grub to enable OS-prober in Grub2, in oreder to see all the installed Operating Systems. If 22.04.1 asks for a sudo password I don't know. But look at the documentation for that. How to attack a Windows virus is off topic here.
mkham66 avatar
pn flag
OK. It sees all the partitions and systems; just boots from the Pep Grub, which doesn't see latest Ubuntu kernels. The Windows is just a nasty reboot one, the 2nd virus is some Linux thing that is trashing both Grubs, hopefully rewriting the Ubuntu 1 will fix it. Ubunt was just randomly closing programs, before I went to recovery only. Thanks. Really would like to get the Windows back, since I have 3 years of Dell hardware (+ software) updates to do; but i'm not sure if those are relevant to Linux- since they have their own drivers ... or do some Windows updates actually embed on the hardware?
HomerSimpson avatar
sa flag
Nowadays Microsoft embeds passwords on the TPM chip ( TPM 2.0 ). That is why when updating Windows 11 you have to reinstall it. For explanation see this video on YouTube from EBuzzCentral: https://www.youtube.com/watch?v=Lv5xHfZnk4s .
mkham66 avatar
pn flag
Didn't work, I thought, too easy. Think you have to specify Sda1 (boot directory) somehow, since it thinks the stick IS the OS! Why "Installing for i386-pc platform", it is a Dell AMD, and Ubun 20.4 installed as a 3rd system with no problem 8 mon ago. Is it trying to put it in Windows Boot Manager? sudo grub-install /dev/sda Installing for i386-pc platform. grub-install: error: failed to get canonical path of `/cow'. ubuntu@ubuntu:~$ grub-install /dev/sda Installing for i386-pc platform. grub-install: error: cannot open `/boot/grub/i386-pc/915resolution.mod': Permission denied.
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.