LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   How to load grub2 from grub legacy or grub4dos (https://www.linuxquestions.org/questions/linux-software-2/how-to-load-grub2-from-grub-legacy-or-grub4dos-858302/)

miros84 01-24-2011 04:54 AM

How to load grub2 from grub legacy or grub4dos
 
Hello
I want to load grub2 from grub legacy or grub4dos ( I think they use the same commands)
I want to load directly the grub2 core. I know how to load first 512 bytes from some patition by chainloader and load grub2, but what I need is to load directly grub2 core without passing by bootstriping code (first 512 bytes).

I tried this ways, but no luck at this moment.

Code:

title grub2
find (hd0,7) /boot/grub/core.img
kernel /boot/grub/core.img

Code:

title grub2
root (hd0,7) /boot/grub/core.img
kernel /boot/grub/core.img

In hdd 0,7 (sda8) I have Ubuntu 10.10.

Any idea?

Larry Webb 01-24-2011 05:46 AM

I am not sure if I understand

You want to boot a grub2 distro from grub legacy direct instead of chainloading?

Grub legacy will not work with ext4 file systems without a lot of changes that I am not capable of doing. If it was easy, would not the GNU team have modified grub legacy?

You are better off learning grub2 and directly booting from it.

I can not speak for grub4dos.

miros84 01-24-2011 05:48 AM

grub4dos do can boot directly from ext4. but I dont know the command to load core.img.
What's why i ask how to load directly core.img.

Larry Webb 01-24-2011 05:54 AM

Here is a good tutorial on grub2

grub2

miros84 01-24-2011 06:22 AM

The idea is to boot grub2 grom grub4dos.

The example I have is:
Code:

title grub2
find --set-root /boot/grub/core.img
kernel /boot/grub/core.img

So, my first boot manager is grub4dos, then I can load grub2 and later I load Ubuntu. But I think I have to edit --set-root
What I dont know is how.
Any idea?

yancek 01-24-2011 07:40 PM

Your entry for grub legacy to boot Ubuntu on sda8 is incomplete. It should be:

Quote:

title Ubuntu 10.10
root (hd0,7)
kernel /boot/grub/core.img
savedefault
boot
This works for me booting Ubuntu 10.10 from PCLinux-2010 which uses Grub Legacy. See this tutorial under section 5.B. You will need to scroll down the page a little to get the information.

http://www.dedoimedo.com/computers/g...mozTocId982259

miros84 01-26-2011 10:51 AM

This works for me.


All times are GMT -5. The time now is 05:41 PM.