cant log in i get grub message or error: minimal Bash-like...

Asked by david lamantia

see - Gnu Grub version 1.98-1ubuntu12
minimal Bash-like time editing is suported.for first word,tab
lists posible command completions.Anywhere else TAB lists posible
device or completions.
grub>-

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu grub2 Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Chris (fabricator4) said :
#1

Did you upgrade from 10.10 to 11.04? There was a bug in the upgrade process that did not install and configure grub correctly.

To fix it you'll need the LiveCD, preferably of your current version, the one you upgraded to. If you have to now download the LiveCD I suggest you just download 11.10 if you don't already have it and re-install completely from that.

If you want to fix grub however, boot off the LiveCD (of your installed version) and do the following:

First thing to do is identify what the device name of the Live file system is. In most cases this will be /dev/sda, especially if it's the only hard drive in the computer.

A little more complicated is to identify which partition Ubuntu lives on. This will depend on exactly how you installed Ubuntu so it's best to check and be sure. Once you've booted the LiveCD use either Disk Manager or Gparted to look at the hard drive and identify the Ubuntu root (/) partition that you set up. You would be looking for an ext4 partition of the correct size.

For the purposes of these instructions I'm going to assume the correct device (drive) is /dev/sda and that the partition is /dev/sda1. You should substitute the correct device names as appropriate.

Firstly, mount Ubuntu root partition:

sudo mount /dev/sda1 /mnt

Next, export the LiveCD filesystem to the root filesystem on the drive:

sudo mount ‐‐bind /dev /mnt/dev
sudo mount ‐‐bind /proc /mnt/proc
sudo mount ‐‐bind /sys /mnt/sys

Now change the root filesystem to the hard disk:

sudo chroot /mnt

Now re-install grub2 to /dev/sda

sudo grub-install /dev/sda

grub is now re-installed, however it will need to be configured, so just run the update program

sudo update-grub

and it will find all OS's on your system and add them to the grub menu. You can now reboot:

sudo reboot

Chris

Revision history for this message
david lamantia (dlaman1948) said :
#2

no Chris i didn't install any upgrades..i was trying to find a disk clean up to get rid of things i thought i wouldn't need.and i guess i messed something up in the process.I know little about ubuntu.

Revision history for this message
Chris (fabricator4) said :
#3

You could try the Grub install and configure anyway. If the kernel is still intact it should work. What release of Ubuntu are you running?

Just boot off your live CD and follow the instructions above.

If that doesn't work you should boot off the LiveCD again and back up any important data. Without knowing exactly what the problem is it might be much quicker to re-install.

If you manually re-install and select "something else" when asked where to install Ubuntu, you can specify your root partition but do not tell it to re-format the partition. This will re-install while leaving your data intact. If you specify the same username then even your ~/home directory and all it's data will still be in place. This can work quite well if you're re-installing the same release.

Chris

Can you help with this problem?

Provide an answer of your own, or ask david lamantia for more information if necessary.

To post a message you must log in.