Entering the GRUB 2 boot menu from the Windows 7 menu issue

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
jason102

Entering the GRUB 2 boot menu from the Windows 7 menu issue

Post by jason102 »

Hi all,

So I recently tried installing Linux Mint 13 alongside my previous install of Windows 7 by following this fantastic tutorial at LinuxBSDos.com:
http://www.linuxbsdos.com/2012/06/06/ho ... windows-7/

If you scroll down to the comments section you can see I left a comment related to this issue as "Jason S". Nobody has answered me yet, so wanting an answer faster, I'm turning to the forums :)

Essentially the tutorial has you install Mint on other partitions and then use a tool in Windows called EasyBCD to add a menu entry for Mint in the Windows 7 boot menu. If you had done everything correctly according to the tutorial up until that point, selecting Mint in the Windows boot menu should bring you to the GRUB 2 boot menu, and from there you can select Mint and boot into Linux without a problem. However, despite making sure I followed every step correctly, when I select the Linux Mint menu item I created in the Windows 7 boot menu, I don't get the correct GRUB 2 menu. Instead, I get this:

____________________
GRUB4DOS 0.4.5b 2011-11-27, Mem: 630K/3177M/766M, End: 35560D

[ Minimal BASH-like line editing is supported. For the first word, TAB lists possible command completions. Anywhere else TAB lists the possible completions of a device/filename. ]
grub>
___________________

And that’s where I’m stuck. Why am I not seeing the correct GRUB 2 boot menu? Why am I seeing a grub command line interface instead? I tried using the “boot” and “kernel” commands, but obviously I don’t know enough to use this command line properly.

Please let me know what I can do next! I have an Asus Aspire 4750G.

Thanks,
Jason
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
mintybits

Re: Entering the GRUB 2 boot menu from the Windows 7 menu is

Post by mintybits »

I'm not an expert on EasyBCD. What you are seeing is the NeoGrub menu...this is a version of Grub4dos that EasyBCD uses, presumably to directly boot linux rather than chain-loading the Grub2 that you put in sda3. It is giving you a grub> prompt and I think it works like Grub1 - it has a config file at C:\NST\menu.lst according to Wikipedia: https://en.wikipedia.org/wiki/EasyBCD. For some reason the config of NeoGrub is not working correctly.

You might want to check the menu.lst file to see if it correctly defines your Mint OS location.

Alternatively, can you set EasyBCD up to chainload Grub2 in sda3 rather than using NeoGrub? However, It is better to use NeoGrub because booting Grub2 in a partition is unreliable.

BTW, that tutorial tells you to make a boot partition which is unecessary nowadays.
jason102

Re: Entering the GRUB 2 boot menu from the Windows 7 menu is

Post by jason102 »

mintybits, thanks for your quick reply!

So first, for some clarification, maybe my partition setup is not exactly like that described in the tutorial, but it's similar. I'll post it just so we're all clear. Here's what's currently displayed by GParted:

Code: Select all

                                   Flags
/dev/sda1     ntfs        390GB    boot      <- Windows 7
/dev/sda2     ext4        477MB              <- Mint /boot partition
/dev/sda3     extended    74GB
   /dev/sda5  linux-swap  4GB
   /dev/sda6  ext4 10GB                      <- Mint root partition ( / )
   /dev/sda7  ext4 61GB                      <- Mint /home partition
As the tutorial suggested, I installed the boot loader into the boot partition I made, in this case sda2.

As for your comments, I checked the C:\NST\ directory in Windows, but I could not find any menu.lst file. Instead, a single file called "AutoNeoGrub0.mbr" exists there. This makes sense, as when I check the EasyBCD configuration, that .mbr file is specified for the Linux Mint menu item. I assume this explains the NeoGrub menu I'm getting.

EasyBCD configuration:

Code: Select all

Real-mode Boot Sector
---------------------
identifier              {2ad55d78-fcce-11e0-b084-d1a20200fb92}
device                  partition=C:
path                    \NST\AutoNeoGrub0.mbr
description             Linux Mint (Maya)
I used EasyBCD v2.1.1 - perhaps the older versions used .lst files? I checked the EasyBCD website, and I found an interesting tutorial posted in 2011 for installing Ubuntu alongside Windows 7, but I'm not sure if that applies to my Mint configuration:
http://neosmart.net/wiki/display/EBCD/Ubuntu

So now this finally brings me to my next question. Do you think there's an easy fix for this? If not, it's no big deal - I'm willing to reinstall Mint a second time if I have to as I haven't even been able to boot into my first installation attempt of Mint!

If you can think of a better way to install Mint alongside Windows 7, please let me know! If I were to install Mint again, should I instead overwrite the Windows 7 MBR? I'm a little hesitant to do that after reading the following from an Ubuntu guide also found on the linuxbsdos.com website:
http://www.linuxbsdos.com/2012/05/17/ho ... windows-7/
Now that you know what the overall goal is, how do you get from here to there? First, understand that if you have a computer running Windows 7, that Windows 7′s boot manager is responsible for making sure that the system boots. Installing Ubuntu on the same hard drive throws another boot manager into the mix, so the most important decision you are going to make about this, is which boot manager (Windows 7′s boot manager or Ubuntu’s) do you want to be responsible for primary boot operations?

When dual-booting Windows 7 and a Linux distribution on a computer with one hard drive, the best option is to have Windows 7′s boot manager be the primary boot manager. Why? Because whenever you reinstall or update Windows 7, its installer will overwrite anything it finds in the portion of the hard drive where critical boot-related programs are installed. That portion of the hard drive is known as the Master Boot Record (MBR). Also, certain anti-virus programs have been known to mess with the contents of the MBR, so installing GRUB in another location will ease the maintenance headache associated with your system. This point determines where GRUB will be installed.
Please let me know how I could do this better! I'm willing to reinstall Mint if I have to (at this point I can't reinstall Windows, so any solutions I'm hoping will leave Windows be). Thanks!
mintybits

Re: Entering the GRUB 2 boot menu from the Windows 7 menu is

Post by mintybits »

I think I would be inclined to reinstall EasyBCD. For some reason it isn't configured correctly, it seems.

There should be no reason to reinstall Mint if the problem is just with the bootloader.

If you want to test that your Mint works you can change the boot flag to sda2. The MS_DOS MBR is a universal booter in that it loads and runs the partition boot code for the partition whose boot flag is set. The idea being you can have several operating systems and choose which to boot using the flag. Because you installed grub's boot code to sda2 it should boot if you set the boot flag to sda2. You'll have to boot a live Mint to do this in a terminal:
sudo sfdisk /dev/sda -A2
To set the boot flag back to Windows: sudo sfdisk /dev/sda -A1

If you can get EasyBCD to work then that is your best bet. Otherwise, the best thing is always to install Grub2 to the MBR of a disk, not a partition. This is because of a reliability problem. Best to install to the MBR of another disk or device, even a USB stick. The trouble with installing to your Windows disk is that grub canibalizes the standard MBR code and a bunch of sectors after it and Windows will, on ocassion, repair it. Then you have to reinstall grub to the MBR to use Mint, which is a pest.
jason102

Re: Entering the GRUB 2 boot menu from the Windows 7 menu is

Post by jason102 »

Hi mintybits,

I played around with many different EasyBCD configurations, and even reinstalled the program trying to get it to all work as you recommended, but I continued to run into barriers and cryptic error messages.

Well, I finally ran the sfdisk command you suggested. Aha! The first thing I saw when I tried to boot after running the command was "Missing operating system". That statement definitely explains a lot! No wonder EasyBCD couldn't get it right! I had no problem using the Mint LiveCD to run the command again to reset the boot flag and get back into Windows. FYI, when I ran the command I got the following warning both times:

Code: Select all

sudo sfdisk /dev/sda -A2
Warning: extended partition does not start at a cylinder boundary.
DOS and Linux will interpret the contents differently.
Done
What I suppose this means is that my original Mint installation failed to configure GRUB or the boot software correctly. Maybe I should try installing Mint without the separate /boot partition, as you believe it's unnecessary? Or do you think I should risk it and install Grub2 to the MBR of sda1? What are the chances that one morning I'll wake up only to find I can't boot into Linux because Windows changed the MBR contents due to an update? As a novice user, I'm obviously a bit worried about having to fight an uphill battle to get Grub reinstalled, which you say is quite difficult.

Thanks for your continuing support! Please let me know if you or anyone else has any other ideas :D
jason102

Re: Entering the GRUB 2 boot menu from the Windows 7 menu is

Post by jason102 »

BUMP

mintybits is probably taking a break. Anyone else have any other ideas?

Does anyone have any good links to tutorials about installing Mint 13 alongside Windows 7 on the same hard disk (different partitions)? I'd like some good tips before I start experimenting/breaking stuff again!

Thanks!
mintybits

Re: Entering the GRUB 2 boot menu from the Windows 7 menu is

Post by mintybits »

hi. The best way to diagnose the problem with booting Mint is to download and run this http://bootinfoscript.sourceforge.net/ and post the results.txt inside code tags.

You definitely do not need a separate boot partition. I have seen a couple of people with grub difficulties in here recently who used a separate boot partition. Removing the boot partn by reinstalling fixed it. Having said that it ought to work and the bootinfoscript should show whats wrong and enable a simpler fix than a reinstall. But if a reinstall isnt a big deal then dont hesitate if you want to.

Do not install grub to sda1. This is your Windows partition and grub will trash it. The safest alternative to the MBR (which is sda) is to your Mint boot or root partition (sda2 or sda6).
mintybits

Re: Entering the GRUB 2 boot menu from the Windows 7 menu is

Post by mintybits »

BTW that sfdisk warning is not important. It is referring to ancient disk drive architectures.
jason102

Re: Entering the GRUB 2 boot menu from the Windows 7 menu is

Post by jason102 »

Hi mintybits,

I got it to work! Thank you so much for your help! This is what I did -

1. Reinstalled Mint, this time with just 3 partitions (root, home, and swap), instead of 4 (this time I left out the boot partition). As per your advice, I installed the boot loader to the root partition.

2. I followed the tutorial's advice (the one that I linked to in my first post), and used EasyBCD in Windows 7 to setup the Grub2 boot menu item. However, this did not work.

3. I decided to try another feature I had seen in EasyBCD - the NeoGrub boot loader. This feature, on the other hand, generates a menu.lst file you can edit. All I had to do was use the LiveCD to browse the new Mint installation's /boot/ directory to see what kernel version I had (in my case 3.2.0-23). Then, using the instructions below found on the NeoSmart website, I was able to configure the menu.lst file:
http://neosmart.net/wiki/display/EBCD/NeoGrub+Linux

This worked! I was able to boot into Mint without a problem! The only downside I can see to this solution is that whenever the Mint update manager downloads and installs a new kernel, I'll need to manually adjust the kernel version specified in that .lst file in Windows so NeoGrub can find the latest kernel and boot using it. Maybe if I had done this EasyBCD configuration at the very beginning I could have used my initial install with the boot partition?

The only unresolved question is why Grub2 can't be used for my setup? Obviously now that's no longer important, but I'd be curious to find an answer to this...

Thanks again so much for your help! It's sort of lame that in the end Windows is required to make this work (I can't separate the two operating systems completely), but I'm happy that after 3 weeks I finally got this to work! Now if I can only find the option to set this thread as being "solved"...
oobetimer

Re: Entering the GRUB 2 boot menu from the Windows 7 menu is

Post by oobetimer »

jason102 wrote: if I can only find the option to set this thread as being "solved"...
Edit the subject .. :wink:
jason102

Re: Entering the GRUB 2 boot menu from the Windows menu [SOL

Post by jason102 »

Got it! Thanks!
Locked

Return to “Installation & Boot”