Booting Ubuntu From Grub Rescue
I have been using the Ubuntu operating system since when I has a requirement for this operating system in the place where I was doing a job. I now tried a new thing in my Ubuntu by installing the Ubuntu 7.4 which is the newer version of Ubuntu and has got better features for functionality. But while the automatic installation I made a mistake of continuing the installation without the boot loader because the grub had failed to install and also on the other hand I have a partition of Windows XP, and now the XP is not loading at all. Now I get a the grub rescue command prompt whenever I try to start my machine. Please tell me a solution as to how can I boot to Ubuntu from this prompt, and also tell me that can I install the grub once the Ubuntu is booted.
Re: Booting Ubuntu From Grub Rescue
At the first you have to look out the name of the kernel you are using and also the partition name in which you have installed to, this will help you to boot to Ubunut directly from the command line. But on the other hand you take the case of installing the GRUB from your live CD.
For doing that, after booting the live CD, you have to bring up a terminal window in that go to the Applications in that Accessories and then to Terminal, and then you got to verify what partitions you have by typing:
In this your going to see two partitions, with the first being the MS Windows (NTFS) partition and the second being your Linux installation. And then when you will proceed:
Code:
$sudo grub
grub> root (hd0,1)
grub> setup (hd0)
grub> quit
$
If everything is going well, you should be able to reboot, remove the CD and boot into Ubuntu. You can also make the adjustment by /boot/grub/menu.lst so that at boot time you can get the either of the operating system.
Re: Booting Ubuntu From Grub Rescue
The above steps just only allows you to recover the previously working grub and the OP was showing a error that the grub cannot be installed. The set-up will only build the code which can be used for the loading of the loader class and may be it is for the stage 1.5. And the boot will be required the support the files normally found in /boot/grub/*. And with something like Ubuntu, is the probably the easiest to re-install.
Re: Booting Ubuntu From Grub Rescue
The most easiest is to reinstall and that would be probably be easiest but if you wanted to fix it is instead a great option for the startover. I would like to boot into the Windows CD and then start the recovery console type fixmbr. That will make sure that it is so that you can boot into windows at least. Then you can also boot into windows and edit the boot called the .ini file through msconfig. And yet it is the easiest way.
Re: Booting Ubuntu From Grub Rescue
And when Ubuntu says the boot loader is not installed it means only to the MBR or root partition. Grub is always considered the part of the kernel and will be available regardless of any issues in the kernel. I would also recommend you to do the boot and see the OP has already confirm Grub whether it is available with a Grub prompt on booting up.
It is not necessary that it should go through the Linux you can run the Grub simply:
and also if the partition 1 of disk that is denoted by the HD0 is the first one with Type 83, that indicates the boot or the root partition of Ubuntu, then the Grub can be installed into the MBR of the first disk i.e the HD0 by "sourcing" the files from partition HD0,1 by command in Grub prompt
Code:
grub> root (HD0,1)
grub> setup (HDF0)
It will be booted immediately by command in Grub prompt
Code:
configfile (hd0,1)/boot/grub/menu.lst
Grub is available as a Grub prompt which is the most powerful booting tool in the planet.
Re: Booting Ubuntu From Grub Rescue
So from the above solutions I take that in my case I need to restore the boot menu but I have a working and configured ubuntu 10.10 and a working winXP also. What I need is to restore the grub boot menu without reinstalling the ubuntu.
And I have done the below things:
Loaded the Live CD
Installed Grub package on the live session
This is the output of the geometry (HD0) command:
grub> geometry (HD0)
Code:
drive 0x80: C/H/S = 60801/255/63, The number of sectors = 976773168, /dev/sda
Partition num: 0, Filesystem type unknown, partition type 0xde
Partition num: 1, Filesystem type unknown, partition type 0x7
Partition num: 4, Filesystem type is ext2fs, partition type 0x83
Partition num: 5, Filesystem type unknown, partition type 0x82
And also that my valid ubuntu is on partition number 4, the other ubuntu was effectively erased.
After that I run:
Then:
Code:
grub> setup (HD0)
Checking if "/boot/grub/stage1" exists... no
Checking if "/grub/stage1" exists... no
Error 15: File not found
And now it is working well.