Page 1 of 1

[SOLVED] GRUB not showing

PostPosted: Jul 26th, '11, 19:42
by sloothword
Hello Community,

I previously had the following GRUB setup:
- Dual boot Windows 7 and Mageia 1
- 10 sec time to choose at startup
- Mageia as default

And it worked at first (display at startup, choose) but now (since about 2 weeks ago) it always boots up Windows without asking.

Three possible causes (Dont know if any of these broke something):

- I used the great function in KDE to restart into a specific boot option.
(Leave -> Restart -> Dropdown)
The Laptop then restarts directly into e.g. Windows without displaying the GRUB screen.
(flashes the same blue-green screen it does now)

- I remembered a kernel update in the meantime.

- I installed the SP1 for Windows 7 and activated it


Then i tried booting with the LiveCD and writing the mbr back with the GUI
(Control Center -> Boot -> Set up boot system) but it didnt work.

I mounted and opened /mnt/LinuxOnHarddisk/boot/grub/menu.lst with kwrite and found it complete empty.
There are however some stage1, stage2 etc. files.

Questions:
- How to write a correct grub/mbr entry?
- How to manually boot into installed Mageia as a quick fix.

Thanks in advance

Fabian

Re: GRUB not showing

PostPosted: Jul 28th, '11, 12:20
by barjac
Booting Mageia manually :-
Burn a SuperGrub boot CD. (only 4.4MB)
Boot from it and get to a grub prompt (in the CD hit "c" at the menu) then:-
Code: Select all
grub> find /etc/mageia-release
This will list the root partition(s) of your Mageia installation(s), (hdx,y) use the required one in the next command :-
Code: Select all
grub> root (hdx,y)
Hit ENTER then type:-
Code: Select all
grub> kernel /boot/vmlinuz
Hit ENTER then type :-
Code: Select all
grub> initrd /boot/initrd.img
Hit ENTER then type :-
Code: Select all
grub> boot
Hit ENTER.
That will boot Mageia.
You can then re-configure the boot loader correctly from the GUI interface in "Mageia Control Center -> Boot".

Re: GRUB not showing

PostPosted: Jul 31st, '11, 23:09
by sloothword
Wow. Many thanks!

Worked perfect!

1. Such post should get into the (new) wiki.

2. Booting to LiveCD and using MCC to rewrite Bootmanager didnt worked. Why?

Re: GRUB not showing

PostPosted: Aug 1st, '11, 01:31
by barjac
sloothword wrote:2. Booting to LiveCD and using MCC to rewrite Bootmanager didnt worked. Why?

Because the live CD is not running from your hard drive, it is a virtual system in memory only.
It goes through the motions of writing to the MBR and IIRC gives no errors, but it actually writes nothing.

It is possible to boot into a live CD and chroot into a real system on the hard drive to install grub, but the above method is easier and probably quicker.

You need to be root to view /boot/grub/menu.lst.
I feel that it is a bug in Dolphin that opens it as an empty file in kwrite or kate as a regular user. It should refuse to open the file, not display it as empty. (If you open kwrite or kate as regular user and use the open dialog to attempt to open menu.lst you will be correctly refused access)
To run kwrite as root use :-
Code: Select all
su -
kwrite

Glad you sorted it. :)