I destroyed Grub. Hope this helps someone else.

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
mikhou

I destroyed Grub. Hope this helps someone else.

Post by mikhou »

I totally messed up Grub when trying to install Debian in a separate partition as a dual boot. I tried and tried to fix things, and finally I stumbled upon the following, which at least let me get back to LM. I was at the point of not even seeing the Grub menu - just a flashing cursor. Hope that this helps someone else in the future:

"Moved to a thread of it's own, seeing as this was tacked to the end of a solved thread.

There are a few more steps that oldfred missed. Boot from the Live CD, and once at the desktop, open a terminal and type:
sudo mount /dev/sda5 /mnt
sudo mount -o bind /sys /mnt/sys
sudo mount -o bind /proc /mnt/proc
sudo mount -o bind /dev /mnt/dev
sudo chroot /mnt
grub-install /dev/sda
update-grub

After running update-grub you should see a list of the OSs on your system.

I'm continually adding operating systems to my computer. The one I'm using at the moment has XP, Kubuntu 10.10, Ubuntu 10.10, PCLinuxOS 2010 and Ubuntu+Xbmc 10.10. Everytime I install a new OS Grub gets over written, so I use the above commands to install grub the way I want."
________

I still can't get Debian to dual boot, but I also think that there is something wrong with that partition now. I think that I'm going to have to reinstall it. Anyway, hope that helps.

mikhou
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
proxima_centauri

Re: I destroyed Grub. Hope this helps someone else.

Post by proxima_centauri »

I would like to point out for anyone considering the chroot method above, for the first command

Code: Select all

sudo mount /dev/sda5 /mnt
the part "/dev/sda5" is going to change depending on where partition your "/" linux installation is on. For instance it may be "/dev/sda2" if that's the partition one installed LM to. You can use terminal commands "sudo fdisk -l" or "blkid", or graphical applications like Partition Editor, to help distinguish which partition that is.

This method and others for grub2 reinstallation can be further read here, under Section 12 Reinstalling Grub2 -> https://help.ubuntu.com/community/Grub2
.William.

Re: I destroyed Grub. Hope this helps someone else.

Post by .William. »

Thanks for this thread !
I am in need of this right now :P

Someone had me repair Grub2 by installing Grub (1) over it.
I hope I can undo that and safe my Mint install.
mikhou

Re: I destroyed Grub. Hope this helps someone else.

Post by mikhou »

Hope it helps. That is why I posted it - because I searched and searched for a solution until I found this one.

mikhou
.William.

Re: I destroyed Grub. Hope this helps someone else.

Post by .William. »

Hi. I'm now posting this reply from within Linux Mint; so your solution worked flawlessly for me !
Thanks again, these bits of help are very welcome !
Locked

Return to “Installation & Boot”