Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Chain loading grub2

  1. #1
    Join Date
    Oct 2009
    Location
    127.0.0.1
    Beans
    10
    Distro
    Ubuntu 9.10 Karmic Koala

    Chain loading grub2

    In the past I've used Vista's boot manager to boot Ubuntu 9.04 and earlier. The basic steps I used are outlined in the first section of this article.
    With 9.10 however I have hit a snag. The bootsector file I grabbed with dd if=/dev/sda5 (yes that's the partition I told grub to install to) is all zeroes, and obviously does not successfully boot. I know that there are two major changes with 9.10 (ext4 and grub2) so I'm trying to figure out where the problem lies.

  2. #2
    Join Date
    Aug 2007
    Location
    Cairo - Egypt
    Beans
    71
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Chain loading grub2

    I don't know that much about Vista boot loader, may be this info would help you

    to chainload grub2 from legacy grub I used this line
    Code:
    kernel /boot/grub/core.img
    Maybe it would help you in figuring out how to chainload grub2 from Vista boot loader

  3. #3
    Join Date
    Sep 2009
    Location
    Paris France
    Beans
    213
    Distro
    Ubuntu Development Release

  4. #4
    Join Date
    Oct 2009
    Location
    127.0.0.1
    Beans
    10
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Chain loading grub2

    Thanks for the suggestions. I tried using the core.img file but no luck, just got some garbage character feedback after attempting to boot from it.
    Would it be possible to install grub legacy from the live cd onto /dev/sda5? Basically my idea is to chain load grub legacy from the vista boot loader and chain load grub 2 from that.
    I tried "sudo grub-install /dev/sda5" but got an error back (obviously I'm not exactly an expert).

  5. #5
    Join Date
    Aug 2007
    Location
    Cairo - Egypt
    Beans
    71
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Chain loading grub2

    Quote Originally Posted by silmarilwest View Post
    Basically my idea is to chain load grub legacy from the vista boot loader and chain load grub 2 from that.
    Then install grub4dos , its alot easer
    - Download it from here http://ubuntuforums.org/newreply.php...eply&p=8210516
    - Extract "gldr" and the example menu.lst from the zip file into ur vista partition. in Boot.ini add c:\gldr = "Grub" (I don't know about Vista)

    Edit the example menu.lst whatever you like , reboot, select Grub from Vista bootloader menu, now you have a legacy grub ready to go.

  6. #6
    Join Date
    Jun 2006
    Location
    UK
    Beans
    Hidden!
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Chain loading grub2

    Quote Originally Posted by silmarilwest View Post
    Thanks for the suggestions. I tried using the core.img file but no luck, just got some garbage character feedback after attempting to boot from it.
    I've only just come across this "kernel /boot/grub/core.img" trick and I can confirm it works. However, you need a root line in your Legacy Grub menu.lst. So, say your Karmic/grub2 root partition is sda5, you need this stanza in your grub1 menu.lst:

    Code:
    title Whatever you want
    root (hd0,4)
    kernel /boot/grub/core.img
    Last edited by coffeecat; November 1st, 2009 at 01:59 PM. Reason: Whoops! Forgot title line in code.
    Ubuntu 16.04 Desktop Guide - Ubuntu 14.04 Desktop Guide - Forum Guide to BBCode - IRC #ubuntuforums

    Member: Not Canonical Team

    Please do not PM me about your forum account unless you have been asked to. The correct place to contact an admin about your account is here.

  7. #7
    Join Date
    Oct 2009
    Location
    127.0.0.1
    Beans
    10
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Chain loading grub2

    Thanks again for the great suggestions. It only took a little modification to point my vista bcd entry at grub4dos (grldr.mbr).
    However I don't think the grub4dos syntax is exactly the same as the grub I am used to.
    My entry:
    title Load Ubuntu 9.10
    root (hd0,4)
    kernel /boot/grub/core.img
    It shows up in the grub4dos menu but is not selectable. Any suggestions on how to modify the entry so it works in my grub4dos menu.lst?

  8. #8
    Join Date
    Oct 2009
    Location
    127.0.0.1
    Beans
    10
    Distro
    Ubuntu 9.10 Karmic Koala

    Smile Re: Chain loading grub2

    Quote Originally Posted by silmarilwest View Post
    It shows up in the grub4dos menu but is not selectable. Any suggestions on how to modify the entry so it works in my grub4dos menu.lst?
    Scratch that, I'm just retarded (I spelled kernel kernal). Working beautifully now with the correct spelling, thanks very much to everyone for the very helpful replies.

  9. #9
    Join Date
    Oct 2009
    Location
    Norway
    Beans
    41
    Distro
    Xubuntu 10.04 Lucid Lynx

    Re: Chain loading grub2

    Quote Originally Posted by silmarilwest View Post
    In the past I've used Vista's boot manager to boot Ubuntu 9.04 and earlier. The basic steps I used are outlined in the first section of this article.
    With 9.10 however I have hit a snag. The bootsector file I grabbed with dd if=/dev/sda5 (yes that's the partition I told grub to install to) is all zeroes, and obviously does not successfully boot. I know that there are two major changes with 9.10 (ext4 and grub2) so I'm trying to figure out where the problem lies.
    I installed grub 2 to /dev/sda6, grabbed the bootsector with dd, and it is not filled with zeroes. Everything works just as it did with 8.04. I use XP's boot manager. I compared the old and new bootsectors (legacy grub and grub 2), and the differences were like expected.

    Perhaps just a reinstall of grub 2?

  10. #10
    Join Date
    Oct 2009
    Location
    127.0.0.1
    Beans
    10
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Chain loading grub2

    Odd, I installed grub2 about 5 times so I don't think that would be a fix for me. Regardless, grub4dos works great so I have no reason to use dd anymore at the moment. Out of curiosity what was the exact syntax you used?
    For me it was: "dd if=/dev/sda5 of=/tmp/linux.bin bs=512 count=1"
    Or perhaps it's a bug specific to my hardware.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •