I destroyed Grub. Hope this helps someone else.

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read this

I destroyed Grub. Hope this helps someone else.

Postby mikhou on Mon Oct 18, 2010 5:14 am

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
mikhou
Level 4
Level 4
 
Posts: 234
Joined: Sat Sep 05, 2009 8:55 am

Linux Mint is funded by ads and donations.
 

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

Postby proxima_centauri on Mon Oct 18, 2010 7:23 am

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
User avatar
proxima_centauri
Level 11
Level 11
 
Posts: 3976
Joined: Tue Dec 25, 2007 3:24 pm
Location: NB, Canada

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

Postby .William. on Mon Oct 18, 2010 10:21 pm

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.
________________________________________________________________________________
My (Dutch language) webpage with 22 reasons for moving to Linux: http://readfirst.weebly.com/

Code: Select all
Ne Jupiter quidem omnibus placet
User avatar
.William.
Level 3
Level 3
 
Posts: 107
Joined: Thu Aug 26, 2010 9:01 pm
Location: The Netherlands

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

Postby mikhou on Mon Oct 18, 2010 11:28 pm

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

mikhou
mikhou
Level 4
Level 4
 
Posts: 234
Joined: Sat Sep 05, 2009 8:55 am

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

Postby .William. on Sat Oct 23, 2010 12:27 pm

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 !
________________________________________________________________________________
My (Dutch language) webpage with 22 reasons for moving to Linux: http://readfirst.weebly.com/

Code: Select all
Ne Jupiter quidem omnibus placet
User avatar
.William.
Level 3
Level 3
 
Posts: 107
Joined: Thu Aug 26, 2010 9:01 pm
Location: The Netherlands


Return to Installation & Boot

Who is online

Users browsing this forum: No registered users and 12 guests