Stuck in grub command line

#1
Greetings,

after installing W7 after ubuntu 9.04, I tried to use EasyBCD to add a boot entry to my ubuntu partition, considering it was naturally gone. As I couldn't make it work at the first run, i tried to tick the famous box 'Grub isn't installed ...' I ended up with a grub command line at boot time. Now, and after multiple attempts running from a live CD to restore Grub's normal behaviour, I always end up in the Grub4Dos box after boot. :x

Any idea how I can have a working boot loader ?

Many thanks!
 

Terry60

Knows where his towel is.
Staff member
#2
Hi John, welcome to NST.
What's your configuration ?
W7 on the same/different HDD ?
W7/ Ubuntu 1st in the BIOS ?
bootmgr/grub controlling the boot ?

A screenshot of your disk management and a copy/paste of the output of the EasyBCD "display settings" box (debug mode) would be useful.
 
#3
Hi Terry,

thanks for your swift reply. Find my config in the attached png.

I have managed to boot into windows 7 by using the following command list (i found online) from the grub prompt:

root (hd0,0)
chainloader +1
makeactive
boot

Here is the output from the debug view settings of EasyBCD (i removed the Neogrub entry for linux):

Windows Boot Manager
--------------------
identifier {9dea862c-5cdd-4e70-acc1-f32b344d4795}
device partition=C:
description Windows Boot Manager
locale en-US
inherit {7ea2e1ac-2e61-4728-aaa3-896d9d0a9f0e}
default {122beb2d-78e5-11de-855a-9ce16285609a}
resumeobject {122beb2c-78e5-11de-855a-9ce16285609a}
displayorder {122beb2d-78e5-11de-855a-9ce16285609a}
toolsdisplayorder {b2721d73-1db4-4c62-bf78-c548a880142d}
timeout 30

Windows Boot Loader
-------------------
identifier {122beb2d-78e5-11de-855a-9ce16285609a}
device partition=C:
path \Windows\system32\winload.exe
description Windows 7
locale en-US
inherit {6efb52bf-1766-41db-a6b3-0ee5eff72bd7}
recoverysequence {122beb2e-78e5-11de-855a-9ce16285609a}
recoveryenabled Yes
osdevice partition=C:
systemroot \Windows
resumeobject {122beb2c-78e5-11de-855a-9ce16285609a}
nx OptIn

Not sure who comes first in the BIOS, i just boot from the (only) HD i have. How can I check?

cheers!
 

Attachments

Terry60

Knows where his towel is.
Staff member
#4
Ok. Only one HDD, so ignore the BIOS sequence - not relevant.
SInce you're showing a GPartEd screenshot, I assume you're booting with grub into Linux OK
What do you want to achieve ?
a) The ability to boot W7 from that grub menu.lst ? or
b) for W7 bootmgr to be in control, with a boot option for Linux ?
I notice that the Linux "boot" flag (MS "system" flag) is on sda1, your W7 I assume from the file system, so it looks like grub has overwritten the Windows MBR/PBR.

For option a) you appear already to have the correct syntax you created dynamically. Just add that to /boot/grub/menu.lst as an option.
For option b) you'll need to boot the W7 DVD, run "repair your computer" / "startup repair" as many times as it takes to put the W7 MBR/PBR back in control, then from W7 run EasyBCD 2.0 latest build
(not 1.7) and add the Linux entry selecting the partition containing /boot/grub from the dropdown menu, without ticking the "grub isn't......" box.
 
Last edited:
#5
As a matter of fact the screenshot was taken from a boot from of a LiveCD.

I still am not able to boot into Ubuntu. I am still stuck in the Grub command line after boot. So the goal is to actually have a working bootloader.

I suspect the installation of W7 tinkered with my Ubuntu install, as whenever I mount the ubuntu filesystem inside the LiveCD i can only see john and boot directories. Could this be the case, you think?

Thanks for your help!
 

Terry60

Knows where his towel is.
Staff member
#6
How did you get W7 at the front of the disk if you installed it last ? Was there another OS there previously which you've removed ?
If nothing's booting, best go with option b), get W7 up and running, and when you're in W7, we'll sort out how to boot Ubuntu again.
 
#7
As a matter of fact the screenshot was taken from a execution of a LiveCD.

I still am not able to boot into Ubuntu. I am still stuck in the Grub command line after boot. So the goal is to actually have a working bootloader.

I suspect the installation of W7 tinkered with my Ubuntu install, as whenever I mount the ubuntu filesystem inside the LiveCD i can only see john and boot directories. Could this be the case, you think? :tongueout:oint:

Addendum:

Sorry for the double post. Some firefox vs quickreply option.

I am currently inside W7. As stated before, I manage to boot here from inside the grub prompt.

I installed W7 from inside Vista, actually. Both legal and clean copies. He replaces the Windows install. NOT an update.

How to proceed?
 
Last edited:

Terry60

Knows where his towel is.
Staff member
#8
b) Boot the W7 DVD and "startup repair" W7 so that you can boot without the Live Ubuntu. Then we'll get Ubuntu booting from the BCD.
 

Terry60

Knows where his towel is.
Staff member
#10
Make sure you're using EasyBCD 2.0, and add a linux entry like this without ticking the "grub isn't ....." box.
This should be all you need to do, unless, when you originally installed Ubuntu with Vista, you let it install grub to the MBR and take over the boot from Vista's bootmgr
In that case, the W7 install will have overwritten grub and you'll need to reinstall it to the Ubuntu partition.
 
Last edited:
#11
- SOLVED (well, kinda) -

i figured out that I was running grub on the wrong partition all along. I apologize for my Noobness. Not proud of it.

I installed my system in the 10Gb partition and left the bigger one for home. Now it comes back to me.:wtf:

I have added the Linux entry in EasyBCD and now I am able to dual boot again. :brows:

Weird thing is I still have to go through the grub prompt, boot windows, then I get to the microsoft bootloader (to which I added the Ubuntu 9.04 entry) and finally i still pass the regular Grub bootloader. Only then i arrive at my Ubuntu distro.
 

Terry60

Knows where his towel is.
Staff member
#12
Go into boot/grub/menu.lst and change the timeout value to 0.
It 'll take the default option (normal Linux) without displaying the second menu.
 
#13
Thx Terry!

That is indeed a good workaround for the double bootloader, but I am still going through the grub prompt everytime I boot. Do I have to reinstall grub again, perhaps to the MBR?

cheers!
 

Terry60

Knows where his towel is.
Staff member
#14
Sorry , can you explain what you mean by "the grub prompt" ?
Were you getting 3 boot menus ? (grub/bootmgr/grub)
 
#15
You'll be surprised, but on boot I get a command line stanza of grub.

grub >

in here i type:

grub > root (hd0,0)

grub > chainloader +1

grub > makeactive

grub > boot

which is the way to boot into windows.

after this I get the windows loader and then the grub menu.

what i am missing is a way to directly arrive at the windows loader.

merci!
 

Terry60

Knows where his towel is.
Staff member
#16
Back in post #8 you said you were booting directly into W7, so it seems you've overwritten the boot with grub again. You must ensure that grub installs to the Linux partition, not to the MBR.
Have a read of this and make sure you understand how everything works with a boot chain.
Remember that Ubuntu will always install grub to the MBR unless you use the "advanced" button on the grub page.