Can not restore Grub Menu

I had to install Windows 7 SP1 and so I had to set the Widnows partition to active to accomplish this. I now want to go back to grub but after following the directions located at http://en.opensuse.org/SDB:Repair_MBR_after_Windows_install I am now only greeted with a grub prompt.

You seem to be at the grub commands point, so :

Then execute the following commands:
do read them all first, then follow slowly and carefully, the next commands :slight_smile:

Care is needed to read and understand the notes at

Caution

So identify correct locations, admit after few unsuccessful attempts, did learn helped greatly to copy the instructions to paper, before starting so did not became lost, since then the instructions do work :slight_smile:

On 2014-01-11 22:16, psytropic wrote:
>
> I had to install Windows 7 SP1 and so I had to set the Widnows partition
> to active to accomplish this. I now want to go back to grub but after
> following the directions located at
> http://en.opensuse.org/SDB:Repair_MBR_after_Windows_install I am now
> only greeted with a grub prompt.

You only needed to set the original partition as active, not change MBR.
That is done by any decent partitioner, like fdisk from the rescue disk.

The procedure in that link changes MBR, and it is useful on the cases
where GRUB was installed on the MBR. But in that case, just changing the
windows partition to active would not have worked for W7 SP1.


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

using cfdisk in recovery I set the boot partition to sda6 (my root partition with /boot) but still justs boots to a grub prompt. I guess now I need to remove the mbr boot?

If under “boot partition” you mean “active partition” - it is impossible (and I wonder how cfdisk could allow it). sda6 is logical partition and only primary partition can be active and bootable in case of BIOS system.

(my root partition with /boot) but still justs boots to a grub prompt. I guess now I need to remove the mbr boot?

You do not fix problems by following random HOWTOs you found or performing some random actions. Start with telling your openSUSE version and what bootloader you used (grub, grub2, lilo)? If you do not know - boot in rescue mode and check file /etc/sysconfig/bootloader on root filesystem for variable LOADER_TYPE:


bor@opensuse:~> grep -w LOADER_TYPE /etc/sysconfig/bootloader
LOADER_TYPE="grub2"

Your openSUSE version is in file /etc/SuSE-release on root partition (or /etc/os-release for newer releases).

opensuse 13.1, grub2, and my grub files are located on sda6, how opensuse made that work I couldn’t tell you. To run the command to find my grub version I had to mount sda6.

sda5 is swap, sda6 is root(/) sda7 is /home

Please show content of /etc/default/grub_installdevice

remember sda6 is mounted as /mnt
cat /mnt/etc/default/grub_installdevice

/dev/disk/by-id/ata-ST9320325AS_6VDHWBX9-part3
activate

Well …

  1. You used GRUB2 but for some reasons chose instructions to restore Legacy GRUB. There is no configuration for GRUB on your system (only for GRUB2) which explains why Legacy GRUB just sits there doing nothing.
  2. Your bootloader was installed in partition 3
    , not partition 6. But is is irrelevant now, as you do not have generic MBR anymore.

I guess, at this point the simplest solution would be to install GRUB2 in MBR. There is procedure somewhere in Articles section of this site (I guess, somewhere in Install/Boot part). And after you have done it, edit /etc/default/grub_installdevice and change it to use MBR (i.e. - remove "-part3" suffix, leaving only /dev/disk/by-id/ata-ST9320325AS_6VDHWBX9). This ensures you won’t get errors next time system tried to update bootloader.

On 2014-01-12 12:56, arvidjaar wrote:
>
> psytropic;2615283 Wrote:
>> cat /mnt/etc/default/grub_installdevice
>>
>> /dev/disk/by-id/ata-ST9320325AS_6VDHWBX9-part3
>> activate
>
> Well …
>
> - You used GRUB2 but for some reasons chose instructions to restore
> Legacy GRUB. There is no configuration for GRUB on your system (only
> for GRUB2) which explains why Legacy GRUB just sits there doing
> nothing.

Yiks.

That’s for following random howtos.

> - Your bootloader was installed in partition 3, not partition 6.
> But is is irrelevant now, as you do not have generic MBR anymore.

Right. Initially, just setting that partition 3 to active with any
partitioner would have worked, same as setting the windows partition to
active worked for installing the service pack.

It is possible (translation: I’m guessing) that part 3 is an extended
partition, so grub was installed there, but the grub files are in
partition 6. This is typical of double boot machines with Windows - my
own laptop is installed that way.

> I guess, at this point the simplest solution would be to install GRUB2
> in MBR. There is procedure somewhere in Articles section of this site (I
> guess, somewhere in Install/Boot part). And after you have done it, edit
> /etc/default/grub_installdevice and change it to use MBR (i.e. - remove
> "-part3" suffix, leaving only
> /dev/disk/by-id/ata-ST9320325AS_6VDHWBX9). This ensures you won’t get
> errors next time system tried to update bootloader.

But this procedure destroys the possibility of ever again installing
another Windows SP, when it comes (and it will, eventually).

I think we should restore grub2 where it was, and put a generic MBR in
place (which Windows might refuse to use, anyway, for SP installation.
In that case, the MBR should have to be rebuilt from Windows).


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

we? I think, TS should do it :slight_smile:

restore grub2 where it was, and put a generic MBR in
place (which Windows might refuse to use, anyway, for SP installation.
In that case, the MBR should have to be rebuilt from Windows).

In this case using Windows to restore MBR and marking partition 3 as active (from Linux if it is extended, I believe Windows cannot do it) should be sufficient. GRUB2 is most likely still there and untouched. If it won’t boot, then one could try to reinstall it. Do not fix what is not broken :slight_smile:

On 2014-01-12 14:06, arvidjaar wrote:
>
> robin_listas;2615302 Wrote:
>> I think we should
> -we-? I think, TS should do it :slight_smile:

Ah, right. :slight_smile:

We don’t have teletransportation yet. And that would need risk coverage
wages, I don’t like the idea of having my quantum matter reconstructed
and the original destroyed…

(had a friend discussing me with me about such things the other day)

>> restore grub2 where it was, and put a generic MBR in
>> place (which Windows might refuse to use, anyway, for SP installation.
>> In that case, the MBR should have to be rebuilt from Windows).
>
> In this case using Windows to restore MBR and marking partition 3 as
> active (from Linux if it is extended, I believe Windows cannot do it)
> should be sufficient. GRUB2 is most likely still there and untouched. If
> it won’t boot, then one could try to reinstall it. Do not fix what is
> not broken :slight_smile:

Ah, yes, you are right. I was considering a rather more complex route.


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

Thank you all for the help. I got it! I booted the Win7 DVD and used the Repair my Computer option, got to a command prompt and typed

bootrec.exe /FixMbr

This actually fixed Grub2, and now Grub2 loads as it should with my menu for both OS’s. This Windows / Linux install is 2 days old, I just wanted to mess with it as it has been awhile since I had a dual boot system. It seems I had to brush up on my partition rules (only 4 primary allowed) So partition 3 is an extended partition with the 3 Linux logical partitions inside of it.

Well that is why we build PC’s to screw up and re-learn.

On 2014-01-12 22:16, psytropic wrote:
>
> Thank you all for the help. I got it! I booted the Win7 DVD and used
> the Repair my Computer option, got to a command prompt and typed
>
> bootrec.exe /FixMbr
>
> This actually fixed Grub2, and now Grub2 loads as it should with my menu
> for both OS’s.

Nice :slight_smile:

> Well that is why we build PC’s to screw up and re-learn.

Very true! We do.


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)