You are Here:
Linux Lite 6.6 FINAL Released - Support for 22 Languages Added - See Release Announcement Section



HELP!!!! Deleted grub by mistake

Author (Read 5850 times)

0 Members and 1 Guest are viewing this topic.

Re: HELP!!!! Deleted grub by mistake
« Reply #3 on: May 04, 2015, 01:12:13 PM »
 

gold_finger

  • Documentation Writer
  • Platinum Level Poster
  • *****
  • 1094
    Posts
  • Reputation: 325
  • Linux Lite Member
    • View Profile

  • CPU: Intel Core2 Duo E7500 3.0GHz

  • MEMORY: 4Gb

  • VIDEO CARD: Intel 4 Series Integrated Graphics
EDIT:  I see you beat me to it and answered your own question.  Good job!  Since I've already typed all this out, posting the answer anyway.  I'm sure this is what you did.

Just boot to your "live" LL install disk and you can re-install grub from there.

You'll need to know which partition is your LL root partition (/dev/sda1, /dev/sda2, etc. ?) on the hard drive.  If you did a non-standard installation and you made a separate partition for "/boot", you'll need to know that partition too.  Below are steps for reinstalling grub from a terminal in your "live" LL environment.  Substitute your correct drive ("X") / partition #'s ("Y") in "/dev/sdXY" and "/dev/sdX" below.  If you don't have a separate partition for "/boot", skip the steps for mounting and unmounting it.

Run one or both of these commands to confirm the location of your LL Root and Boot (if applicable) partitions.
Code: [Select]
sudo blkid -c /dev/null
sudo os-prober
sudo parted -l

Mount your HDD Root partition to live environment.
Code: [Select]
sudo mount /dev/sdXY /mnt
If applicable, mount your separate Boot partition.
Code: [Select]
sudo mount /dev/sdXY /mnt/boot
Re-install grub with this command.  (Same command applies whether or not you have a separate Boot partition.)
Code: [Select]
sudo grub-install --boot-directory=/mnt/boot /dev/sdX
Unmount your Root and Boot partitions.
Code: [Select]
sudo umount /dev/sdXY     # Root partition
sudo umount /dev/sdXY     # Boot partition if applicable

Shutdown and reboot computer.  If you've got more than one hard drive, make sure BIOS is set to boot from /dev/sdX (your LL drive).

If you've got more than one OS on the system and you are missing grub entries to boot the other(s), open a terminal when you're booted into LL (your hard drive installed LL) and run this command to add those entries to grub.  All will be fine on subsequent reboots.
Code: [Select]
sudo update-grub
Try Linux Beginner Search Engine for answers to Linux questions.
 

Re: HELP!!!! Deleted grub by mistake
« Reply #2 on: May 04, 2015, 01:02:37 PM »
 

Lend27

  • PayPal Supporter
  • Occasional Poster
  • *****
  • 75
    Posts
  • Reputation: 10
  • Linux Lite Member
    • View Profile

  • CPU: Intel i7-4790K

  • MEMORY: 32Gb

  • VIDEO CARD: NVidia GTX760
Problem solved!

Found simple instructions online for reinstalling Grub from within the Linux Lite live USB drive. Worked like a charm...took all of 5 minutes.

If anyone wants the full set of terminal commands for this let me know.

Len
 

HELP!!!! Deleted grub by mistake
« Reply #1 on: May 04, 2015, 11:56:32 AM »
 

Lend27

  • PayPal Supporter
  • Occasional Poster
  • *****
  • 75
    Posts
  • Reputation: 10
  • Linux Lite Member
    • View Profile

  • CPU: Intel i7-4790K

  • MEMORY: 32Gb

  • VIDEO CARD: NVidia GTX760
I was installing another OS and by mistake it deleted grub from my Linux Lite drive.
I still have everything there, but it won't boot. It goes to a Grub Rescue prompt.

How can I reinstall grub on my drive and be able to boot into my Linux Lite?
I have it setup just the way I want it and would hate to have to reinstall.

Thanks!
Len
 

 

-->
X Close Ad

Linux Lite 6.6 FINAL Released - Support for 22 Languages Added - See Release Announcement Section