LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Trouble with Grub 2 on Ubuntu 10.04 install (https://www.linuxquestions.org/questions/linux-newbie-8/trouble-with-grub-2-on-ubuntu-10-04-install-816099/)

kmacphail 06-24-2010 05:28 AM

Trouble with Grub 2 on Ubuntu 10.04 install
 
I have been asked to install Ubuntu 10.04 onto a friends machine but appear to be having some very basic problems. I think it may be related to the Grub 2. I do not consider myself a newbie but I am very inexperienced with Grub 2. I know a lot of the tricks of Grub Legacy, but this is driving me daft.

It should be simple; a new hard drive, 500GB SATA, has been put into the computer, there are no other hard disks installed and the drive went in as empty. Ubuntu booted fine into live CD mode without any issues, all of the hardware appeared to be working properly. I then installed it onto the machine, taking up the entire disk as per my friends request.

When the installation finsihed everything seemed as normal, but upon startup I am greeted with a grub rescue prompt.

Upon a bit of internet research I discovered that it may be simply that the 500GB is simply too big and that a seperate partition should be made for /boot This was done however now I do not even get to the grub rescue prompt after checking the DVD drive for bootable media the computer simply sits at a blinking cursor.

I have made sure that grub 2 was installed and setup to look for the /boot partition but these all check out and I am still stuck with the same problem.

I am considering simply installing 8.04 LTS and then updating and that should solve my issue of Grub 2, but I know that is avoiding the problem and I will need to learn about Grub 2 at some point.

ronlau9 06-24-2010 06:40 AM

Normally GrUB2 is installed in MBR ,
What is the contains of grub.cfg , as you know you'll find it /boot/grub/grub.cfg
Is grub.cfg correct ?
And does it exist ?

Fred Caro 06-24-2010 07:33 AM

grub2
 
I too will have to learn about G2 and I am at a loss to see the advantages for a pc user.
Perhaps, a simple solution (if not already tried) would be to use the cd/dvd to boot from the first hard drive? If it will boot to the command line update it from there; is it a beta version?

Fred.

linuxlover.chaitanya 06-24-2010 07:41 AM

By default in Lucid, you will not see the grub prompt if there is only one OS. You can change the behavior by editing /etc/default/grub file. You should defer from editing grub.cfg file as much as possible.

saikee 06-24-2010 08:00 AM

Come on guys, Grub2 can boot to the end of a 2TB disk. I tried it on both MSdos and gpt disks with the maximum 128 partitions.

Grub1 may have a problem if asked to boot a partition at about 1.2TB location where it will report "Number of cylinders exceeds that supported by the Bios".

500Gb is fine for both Grub.

If you get a Grubrescue then the partition holding core.img could not be linked to the MBR.

The normal cure

(1) Boot up the Ubuntu as a Live CD and check the partition where it has been installed by command
Code:

sudo
fdisk -l

(2) Say the partition is /dev/sda1 then make a mounting point, mount /dev/sda1 and do a grub-install
Code:

mkdir /mnt/sda1
ls /mnt/sda1/boot/grub
mount /dev/sda1 /mnt/sda1
mount --bind /dev  /mnt/sda1/dev
grub-install --root-directory=/mnt/sda1 /dev/sda

The sda1 is the correct partition if it has Grub2 system files containing many files including core.img

jone kim 06-24-2010 08:08 AM

refer to this site
 
see it;

http://members.iinet.net/~herman546/...B_from_Live_CD

I hope it will help you.

fpmurphy 06-24-2010 05:45 PM

GRUB2 works fine with 500Mb disk. I have several such installations.

From the GRUB2 rescue prompt what is the output of:
Code:

root=(hd0,1)
lsmod
ls /grub
cat /grub/grub.cfg


kmacphail 06-26-2010 04:45 PM

Thanks everybody for your help. Saikee: reinstalling grub2 from the liveCD environment did the trick, however using the Ubuntu liveCD in the code one of your lines needed to be altered from:
Code:

bind /dev//mnt/sda1/dev
to
Code:

mount --bind /dev/ /mnt/sda1/dev
This at least allowed me to boot into the grub menu but I was then faced with another problem. One selecting Ubuntu I was greeted with the message:
Quote:

error: no such device: xxxxxxxxxxxxxxxx
Having searched a variety of forums via Google a solution that worked for me was found here

I needed to remove the search line from grub.cfg , once again thanks to everybody for their help, I hope that this will also help other with similar problems :)

saikee 06-26-2010 05:27 PM

kmacphail,

Glad you got it sorted.

Yep it was a mistake on the bind statement. Thanks for point it out. I have since updated my post.


All times are GMT -5. The time now is 09:00 AM.