Results 1 to 7 of 7
  1. #1
    Star Lounger
    Join Date
    Dec 2009
    Posts
    88
    Thanks
    3
    Thanked 1 Time in 1 Post

    Need help with chainloading

    I have a desktop with Ubuntu 11.04 (32-bit) installed.
    When I installed Ubuntu, I put its boot loader (GRUB 2) in the MBR. Ubuntu itself is installed in /dev/sda1 (root) and /dev/sda/5.

    I have recently also installed Slackware 13.37. I put its boot loader (LILO) in the same partition where Slackware's root resides, i.e. /dev/sda3. The other partition used by Slackware is /dev/sda7 (/home).

    Now I would like to insert a chainloader command in GRUB 2 so that I can start Slackware from its menu.

    Here's what I've done (which obviously does not work!):

    1) I inserted the following entries in file /etc/grub.d/40_custom (as root):
    Code:
    menuentry "Slackware" {
      set root=(hd0,3)
      chainloader (hd0,3)+1
    }
    2) I ran the following command (as root):
    Code:
    grub-mkconfig -o /boot/grub/grub.cfg
    The error that I get when I select "Slackware" from the GRUB 2 menu is "No such partition". Of course, I am 100% sure that Slackware's root (and LILO) reside on /dev/sda3!

    So, how do I chainload this correctly? Please note that Ubuntu 11.04 uses GRUB 2, not GRUB legay!

  2. #2
    New Lounger
    Join Date
    Dec 2009
    Location
    UK
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by tb75252 View Post
    I have a desktop with Ubuntu 11.04 (32-bit) installed.
    When I installed Ubuntu, I put its boot loader (GRUB 2) in the MBR. Ubuntu itself is installed in /dev/sda1 (root) and /dev/sda/5.

    I have recently also installed Slackware 13.37. I put its boot loader (LILO) in the same partition where Slackware's root resides, i.e. /dev/sda3. The other partition used by Slackware is /dev/sda7 (/home).

    Now I would like to insert a chainloader command in GRUB 2 so that I can start Slackware from its menu.

    Here's what I've done (which obviously does not work!):

    1) I inserted the following entries in file /etc/grub.d/40_custom (as root):
    Code:
    menuentry "Slackware" {
      set root=(hd0,3)
      chainloader (hd0,3)+1
    }
    2) I ran the following command (as root):
    Code:
    grub-mkconfig -o /boot/grub/grub.cfg
    The error that I get when I select "Slackware" from the GRUB 2 menu is "No such partition". Of course, I am 100% sure that Slackware's root (and LILO) reside on /dev/sda3!

    So, how do I chainload this correctly? Please note that Ubuntu 11.04 uses GRUB 2, not GRUB legay!

    I've no experience with LILO but have you tried "sudo update-grub" from a terminal in Ubuntu? That automatically detects other operating systems - Windows versions & other Linux OS using both Grub Legacy & Grub2 - and produces a boot menu.

  3. #3
    Star Lounger
    Join Date
    Dec 2009
    Posts
    88
    Thanks
    3
    Thanked 1 Time in 1 Post
    Quote Originally Posted by Jackc38 View Post
    I've no experience with LILO but have you tried "sudo update-grub" from a terminal in Ubuntu? That automatically detects other operating systems - Windows versions & other Linux OS using both Grub Legacy & Grub2 - and produces a boot menu.
    Yes I did and unfortunately it does not solve the problem...

  4. #4
    This user has been Banned
    Join Date
    Dec 2009
    Posts
    48
    Thanks
    0
    Thanked 1 Time in 1 Post

    Just a thought

    Seems to me I had a strange problem with Grub, that when I updated to 11.04, the list of OSes would be off a little. There was a menu item added, labeled "other Linuxes" or something, that threw the numbering system off. So when I selected "Windows 7", it would load the OS that's listed two lines down, which was Windows Vista recovery, or some such. What I had to do was select the listing up two from what I really wanted.

    Another problem I had (on a different machine) is that the Grub it boots from was not the Grub from the distro I want to use, and I can't change it. I have to boot into the "right" distro and update Grub from there.

  5. #5
    New Lounger
    Join Date
    Dec 2009
    Location
    Porirua/Wellington/NZ
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Remember Grub's drive numbering.

    In Grub, sda3 =hdo,2 not 3. Drive numbering starts at 0 rather than 1

  6. #6
    2 Star Lounger
    Join Date
    Dec 2009
    Location
    Florida
    Posts
    113
    Thanks
    24
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by vandamme View Post
    Seems to me I had a strange problem with Grub, that when I updated to 11.04, the list of OSes would be off a little. There was a menu item added, labeled "other Linuxes" or something, that threw the numbering system off. So when I selected "Windows 7", it would load the OS that's listed two lines down, which was Windows Vista recovery, or some such. What I had to do was select the listing up two from what I really wanted.

    Another problem I had (on a different machine) is that the Grub it boots from was not the Grub from the distro I want to use, and I can't change it. I have to boot into the "right" distro and update Grub from there.
    You may have known this, but everytime you update to a new version GRUB places an entry in the boot list, leaving the other still intact. There's a method to remove the old entry's though. I myself am having trouble updating the grub.cfg file, I liked GRUB 1.0 better.

  7. #7
    5 Star Lounger
    Join Date
    Jan 2010
    Location
    Los Angeles, CA
    Posts
    828
    Thanks
    4
    Thanked 38 Times in 34 Posts
    Quote Originally Posted by Gomek View Post
    You may have known this, but everytime you update to a new version GRUB places an entry in the boot list, leaving the other still intact. There's a method to remove the old entry's though.
    Here's what I do. If I notice that an update is installing a new Linux kernel, I would rename the old one (/boot/linuz-*) so that when update-grub ran it would see only the current version and the previous version, thus leaving order of things in the menu intact (I always had my current Windows system as the default in grub). Of course, if I wasn't paying attention during the update, I would just rename the old kernel later and run update-grub manually.

    With Grub 2, never edit grub.cfg directory, instead edit the files at /etc/grub.d and /etc/default/grub instead. Yeah its different than Grub 1, but the automatic configuration in Grub 2 makes it worthwhile.

Posting Permissions

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