Pular para o conteúdo principal

Ubuntu Won't Start After Windows Reinstallation

How to restore Grub from a live Ubuntu cd.

This will restore grub if you already had grub installed but lost it to a windows install or some other occurence that erased/changed your MBR so that grub no longer appears at start up or it returns an error.

(This how to is written for Ubuntu but should work on other systems. The only thing to take note of, when you see "sudo" that will mean to you that the following command should be entered at a root terminal.)

Boot into the live Ubuntu cd. This can be the live installer cd or the older live session Ubuntu cds.

When you get to the desktop open a terminal and enter. (I am going to give you the commands and then I will explain them later)

Code:
sudo grub
This will get you a "grub>" prompt (i.e. the grub shell). At grub>. enter these commands

Code:
find /boot/grub/stage1
This will return a location. If you have more than one, select the installation that you want to provide the grub files.
Next, THIS IS IMPORTANT, whatever was returned for the find command use it in the next line (you are still at grub>. when you enter the next 3 commands)

Code:
root (hd?,?)
Again use the value from the find command i.e. if find returned (hd0,1) then you would enter root (hd0,1)

Next enter the command to install grub to the mbr

Code:
setup (hd0)
Finally exit the grub shell
Code:
quit
That is it. Grub will be installed to the mbr.
When you reboot, you will have the grub menu at startup.

Now the explanation.
Sudo grub gets you the grub shell.
Find /boot/grub/stage1 has grub locate the file stage1. What this does is tell us where grub's files are. Only a small part of grub is located on the mbr, the rest of grub is in your boot folder. Grub needs those files to run the setup. So you find the files and then you tell grub where to locate the files it will need for setup.
So root (hd?,?) tells grub it's files are on that partition.
Finally setup (hd0) tells grub to setup on hd0. When you give grub the parameter hd0 with no following value for a partition, grub will use the mbr. hd0 is the grub label for the first drive's mbr.
Quit will exit you from the grub shell.

Comentários

Postagens mais visitadas deste blog

OS CHANGE NAME - WIN 7

1.  Open a  elevated command prompt  or a  command prompt at boot . NOTE:   If you have a  RAID  setup or a  PCI-E SSD  as your boot drive and want to open a command  prompt  at boot, then you may need to use the  Load  Drivers  option in the  System Recovery Options  screen to load it's  drivers  first before Windows will see the boot drive to be able to use the bcdedit command on it . 2.  In the elevated command prompt, type  bcdedit  and press enter. (see  screenshot  below) NOTE:   This will let you see what the  description  (name) and  identifier  of the operating system(s) listed in Windows Boot Manager are under the  Windows  Boot  Loader  section(s). For example,  Windows 7  (description) as  {current}  (identifier).   3.  In the elevated command prompt, type the command below for a listed ...

How to show hidden files/folders on U...

How to show hidden files/folders on Ubuntu                                                  by: Prof.: Jose Dias Jr - downloaddr@gmail.com Let’s learn the method for showing up the hidden files and folders in Ubuntu in this article. To show hidden files and folders on Ubuntu, just follow these simple steps. Go to  Places  >  Home  Folder  To temporarily show hidden files/folders press 'Ctrl + H'.   To permanently show all hidden files/folders Go to  Edit Menu  >  Preferences The  File Management Preferences  window is displayed. Select the  Views Tab . Under the list  Default View  go to  Show hidden and backup files  and check it. Click on Close. From now on, you will be able to see all the hidden files and folder in Ubuntu.

Opening RAR at Ubuntu

Installing RAR reader at UBUNTU [ update ] Added more detail about different RAR packages and Ubuntu 8.04. Downloaded a file compressed in the RAR format and found that Archive Manager couldn’t open it? RAR support can’t be included in Ubuntu by default because it’s proprietary, but installing it is simple. There are two options for opening RAR files in Ubuntu: The package unrar-free is an open source project for opening RAR files. However, this package may not be able to handle all types of RAR archives. You need to have the Ubuntu universe repository enabled to install this package. Install unrar-free from the package unrar-free (click the link to install), or by running the command below in your terminal: sudo apt-get install unrar-free The package unrar is not open source, but should be able to open any RAR files you can find. This is likely the option you want. You need to have the Ubuntu multiverse repository enabled to install this pac...