0

I upgraded my ubuntu 12.04 to 12.10 with the help of update manager. Everything was going well during upgrading but in the end when the system restarted the following error occured:

Error: File not found.
Grub rescue>

What i need to do to fix that error? Will my personal data be safe? Please reply me.

Harsh
  • 233
  • Don't worry - your data is safe. Do you use LVM and snapshots? I've had a similar issue with grub-pc on upgrade. Removing the snapshot and reinstalling grub from live USB solved my problem. If this is the case - let me know and I'll explain how to do that. – Pavel A Dec 11 '12 at 10:25
  • If the solution bellow works this is a dupe of: http://askubuntu.com/questions/207765/error-file-not-found-without-any-grub-menu – Bruno Pereira Dec 11 '12 at 11:32

1 Answers1

1

I've had a similar issue with grub-pc on upgrade. Removing the snapshot (which somehow prevented grub installation) and reinstalling grub from live USB solved my problem.

To reinstall grub, you need to do the following as root (if you do have snapshots, also execute actions marked italic):

  1. create a bootable USB drive preferably with ubuntu 12.10 and some space reserved for persistent storage.
  2. boot from live USB
  3. install lvm on your flash drive:

    apt-get install lvm2

  4. search for lvm logical volumes: lvscan
  5. remove those, marked as Snapshot:

    lvremove /dev/<VG name>/<LV name>

  6. mount the / of your hard disk and some run-time partitions:

    mount /dev/<root partition> /mnt/

    mount --bind /dev /mnt/dev

    mount --bind /proc /mnt/proc

    mount --bind /sys /mnt/sys

  7. cd to the system on your hard disk:

    chroot /mnt/

  8. install grub and exit chroot:

    grub-install /dev/<your hard drive>

    exit

  9. The grub boot loader should now have been installed to the MBR of your local hard drive. Try rebooting from it.
Pavel A
  • 809
  • I am new here. Don't have idea about LVM and snapshot. You can explain me how to remove snapshot and reinstall grub from live USB. Which live USB i need? can I use older version of Ubuntu live USB to fix this problem? – Harsh Dec 11 '12 at 10:01
  • Yes, you should be able to. The drawback is that you'll be most likely installing an older version of grub. This is not critical though. – Pavel A Dec 11 '12 at 10:27
  • @Bruno Pereira, please, revise if the updated post is ok. – Pavel A Dec 11 '12 at 11:08