tutorial - How to restore GRUB with an Ubuntu Live CD

Sometimes, if an Ubuntu installation goes wrong, or a Windows bootloader overwrites MBR and doesn't recognise the Linux installation, we have to restore our GRUB bootloader

we boot the Live CD, we choose the first option and in a few minutes we have arrived at the Live CD Desktop.

So, we go :  Applications --> Accessories --> Terminal

Then, we have to remember which is our Ubuntu installation partition.

In our example, it is the second one (/dev/sda2), formatted as ext3, in the first HDD of a SATA controller. We suppose that it is the second one, since, in case we have Windows that demand to be in the first partition (/dev/sda1), this one is occupied.

Now, you have to be really careful. You have to enter the right partition, instead of sda2 (unless it is the same) In the terminal :

  cd /
  sudo -s -H
  mount -t ext3 /dev/sda2 /mnt
  mount -t proc proc /mnt/proc
  mount -t sysfs sys /mnt/sys
  mount -o bind /dev /mnt/dev
  chroot /mnt  /bin/bash

And now, you are actually "running" Ubuntu within the Hard Drive but through Live CD's terminal.

Now we restore GRUB like that:

1) Restoration to MBR

  grub-install /dev/sda

2) Restoration to partition (example: /dev/sda2)

  grub-install /dev/sda2

In the first case (that is the most usual) you have certainly installed GRUB on MBR after you receive, in the terminal, the message that there are no errors.

After you reboot, you have your favorite bootloader restored.


Free, facebook, tips, Links, blogging, Downloads, Google, facebookTips, money, news, apps, Social, Media, Website, Tricks, games, Android, software, PIctures, Internet, Security, Web, codes, Review, bloggers, SAMSUNG, Worldwide, Contest, Exitic, Phones, facebookTricks, hacking, London, Olympics, SEO, Youtube, iOS, Adsense, gadgets, iPHONE, widgets, Doodle, twitter, video, Deals, technology, Aircel, Airtel, iPAD, Angry, Birds, BSNL, TechLife, GMAIL, Idea, Microsoft, SmartPhones, Stress, Buster, Windows, Yahoo, Infolinks, Nokia, Scam, Uninor, browsers, Amazon, Euro, CUP, Chat, IDM, JOBS, Modem, Music, Reliance, Results, SSC, Tata, Docomo, bing, freebie, mobile, placements, AIEEE, AlertPay, Chrome, College, Competetive, Exam, Dehradun, Extension, FireFox, GPRS, HTC, IMPACT, Info, MTS, Mark, Zukerberg, Paypal, Promotional, Post, Torrent, UTU, Unlocking, VodaFone, Wall, Paper, apple, books, engineering, iCAR, iTunes, pinterest, rovio, AVG, Admit, Card, Adobe, Affiliate, Marketing, Akhilesh, Amul, Girl, BlackBerry, ChromeBook, Clixsense, Coupon, Digitallife, Discovery, Emoticons, Festival, GATE, GIMP, Income, Tax, International, JSS, JailBreaking, Kindle, Linux, Local, MAX, PAYNE, Mac, Mango, Memory, Speed, Nexus, Online, Shopping, Raakhi, Report, Rising, Stars, Sample, Science, Sony, Syllabus, TabletBooK, Teamviewer, Templates, Dark, Knight, Rises, USA, UPMT, Virgin, Xperia, ZTE, challan, counselling, course, btech, funny, iMOVE, registration

source:http://linuxpoison.blogspot.com/2008/09/135781757117174.html