Multi-boot with grub and grub2 and chainloading


Page 1 of 4 1234 LastLast
Results 1 to 15 of 47

Thread: Multi-boot with grub and grub2 and chainloading

  1. #1
    Join Date
    Aug 2004
    Location
    grand rapids michigan
    Posts
    93

    Multi-boot with grub and grub2 and chainloading

    I have a multi-boot system. I have winxp, mepis8, slackware13, and ubuntu 9.10 alpha5.
    I am having trouble with grub and grub2 not playing nice. I am unable to start ubuntu.

    I have grub 0.97 installed from my mepis install in the MBR. I then chainload +1 win, slack, and ubuntu. I have slack 13 installed with lilo installed to the root partition. I have ubuntu 9.10 installed with grub2 installed to the root partition.

    Here is my menu.lst file.

    timeout 60
    color cyan/blue white/blue
    foreground ffffff
    background 0639a1

    gfxmenu /boot/grub/message

    title MEPIS at sda5, newest kernel
    root (hd0,4)
    kernel /boot/vmlinuz root=/dev/sda5 nomce quiet splash vga=791 resume=/dev/sda6
    initrd /boot/initrd.img
    boot

    title MEPIS at sda5, previous kernel (if any)
    root (hd0,4)
    kernel /boot/vmlinuz.old root=/dev/sda5 nomce quiet splash vga=791 resume=/dev/sda6
    boot

    title MEPIS at sda5, kernel 2.6.27-1-mepis-smp
    root (hd0,4)
    kernel /boot/vmlinuz-2.6.27-1-mepis-smp root=/dev/sda5 nomce quiet splash vga=791 resume=/dev/sda6
    initrd /boot/initrd.img-2.6.27-1-mepis-smp
    boot

    title Microsoft Windows XP Professional at sda1
    rootnoverify (hd0,0)
    chainloader +1

    title Slackware
    root (hd0,6)
    chainloader +1

    title Ubuntu 9.10
    set root=(sd0,8)
    chainloader +1


    title MEMTEST
    kernel /boot/memtest86+.bin

    Origanlly I had just :
    Ubuntu 9.10
    root (sd0,8)
    chainloader +1
    I had errors:

    File system type is ext2fs type 0x83
    error 13 invalid or unsupported executable format

    I changed it to
    Ubuntu 9.10
    set root=(sd0,8)
    chainloader +1

    Now I do not grt any errors but instead I get two lines that say:

    chainload +1
    grub

    I have been searching and asked in the ubuntu forums with no luck. Will grub and grub2 not work together?

    Thanke for any help, Kevin.
    Debian Testing
    Absolute linux 12.x

  2. #2
    Join Date
    Jun 2004
    Location
    Newcastle upon Tyne
    Posts
    2,975
    I know in some recent versions Ubuntu has started to ship Grub2 as the default boot loader but I haven't got time to check it out.

    This thread forced me to to try out Grub2 which in my opinion nowhere ready yet.

    As I expected Grub2 will boot fine if we treat it as "any" other operating system without the knowledge of it. This is done when installing the new Ubuntu at the 8 of 8 step, click the "Advance" box and alter the boot loader location to be its root partition. Thereafter just boot it by the standard "chainloader +1" command in Legacy Grub. Say if the root partition is 9th partition of the 1st disk and known to Grub as (hd0,8). Legacy Grub (Version 0.9x) will fire it up with these command
    Code:
    title My Grub2 Ubuntu in (hd0,0)
    root (hd0,8)
    chainloader +1
    In actual fact I installed Ubuntu 9.10 over a sda15 partition which had Puppy Linux 3.0 inside. I didn't even bother to amend the controlling Grub menu from sda6 and the new Ubuntu can be booted with the existing commands I used for Puppy Linux. If I change the Legacy Grub menu.lst the alteration is only in the "Title" statement which has no consequence to the booting process.

    Do not mix the Grub2 commands with Legacy commands because you are using Lagacy Grub in the MBR and it will be that version that will be put into the memory to control the booting.

    Have installed Ubuntu 9.10 Alpha5 in a SSD as well as a mechanical hard disk. The boot up time for the two are 30 and 40 seconds respectively.

    Who says Linux is slow and SSD doesn't work faster than normal hard disk?
    Last edited by saikee; 09-05-2009 at 08:41 PM.
    Linux user started Jun 2004 - No. 361921
    Using a Linux live CD to clone XP
    To install Linux and keep Windows MBR untouched
    Adding extra Linux & Doing it in a lazy way
    A Grub menu booting 100+ systems & A "Howto" to install and boot 145 systems
    Just cloning tips Just booting tips A collection of booting tips

    Judge asked Linux "You are being charged murdering Windoze by stabbing its heart with a weapon, what was it?" Replied Linux "A Live CD"

  3. #3
    Join Date
    Aug 2004
    Location
    grand rapids michigan
    Posts
    93
    When I change menu.lst file to the basic chainloader +1 I get this error.

    File system type is ext2fs type 0x83

    error 13 invalid or unsupported executable format
    The only thing I can do it to reset.
    Debian Testing
    Absolute linux 12.x

  4. #4
    Join Date
    Jun 2004
    Location
    Newcastle upon Tyne
    Posts
    2,975
    That to me is Grub could not find a boot loader inside the partition you want to boot. In chainloading Legacy Grub simply passes the control to Grub2 but in your case Grub2 isn't there to be found.

    My explanation is when you installed Ubunru you did not managed to tell the installer to put Grub2 in the root partition of the Linux. It is in the last step, 8th of the 8 steps, that you must specify this option. The default is for Grub2 in the MBR. I have it done both ways myself; one in SSD and one in a normal hard disk.

    Couldn't advise how to fix it as I am just starting to read the Grub2 manual myself. The quickest is to re-install Ubuntu 9.10 again and watch the 8th Step of the installation like a hawk.
    Last edited by saikee; 09-06-2009 at 06:20 PM.
    Linux user started Jun 2004 - No. 361921
    Using a Linux live CD to clone XP
    To install Linux and keep Windows MBR untouched
    Adding extra Linux & Doing it in a lazy way
    A Grub menu booting 100+ systems & A "Howto" to install and boot 145 systems
    Just cloning tips Just booting tips A collection of booting tips

    Judge asked Linux "You are being charged murdering Windoze by stabbing its heart with a weapon, what was it?" Replied Linux "A Live CD"

  5. #5
    Join Date
    Aug 2004
    Location
    grand rapids michigan
    Posts
    93
    Thank you Saikee. I will give it another try.
    Debian Testing
    Absolute linux 12.x

  6. #6
    Join Date
    Aug 2004
    Location
    grand rapids michigan
    Posts
    93
    I just reinstalled , made sure I picked to install grub to partition 9. I watched the output of the installer and seen it install grub to partition 9. Rebooted and received the same error. So I have a bad disk or hard drive issue.

    Thanks Kevin
    Debian Testing
    Absolute linux 12.x

  7. #7
    Join Date
    Aug 2004
    Location
    grand rapids michigan
    Posts
    93
    I installed Crunchbang linux. It is a ubuntu based distro. I installed it the same way as ubuntu 9.10. Installed grub in root partition. It started and worked like it should.

    I beleive my ubuntu disk was a bad burn or corrupt.
    Debian Testing
    Absolute linux 12.x

  8. #8
    Join Date
    Sep 2009
    Posts
    1
    panther3e, on Crunchbang linux web page, there is the information that the last edition of Crunchbang linux it is -CrunchBang Linux 9.04.01- which is based on Ubuntu Jaunty Jackalope.
    Ubuntu 9.04.01-jaunty jackalope -have Grub Legacy-GRUB 0.97.

  9. #9
    Join Date
    Aug 2004
    Location
    grand rapids michigan
    Posts
    93
    Yes I know, I origanly was trying to install ubuntu 9.10 karmic. I had downloaded it twice, burned it twice, and installed it twice. All with no luck. I had the crunchbang disk handy to see if there was something wrong with my hard drive or the disk.
    Debian Testing
    Absolute linux 12.x

  10. #10
    Join Date
    Jun 2004
    Location
    Newcastle upon Tyne
    Posts
    2,975
    panther3e,

    It is funny that I don't get the sort of problems you are experiencing.

    The curiosity got hold of me so I took out an old floppy that has Grub1 made from an old version of Mepis, booted it up, and used it to fire up Ubuntu 9.10 Alpha 5. Since my Ubuntu is in sda15 and these were the Grub1 commands I issued

    Code:
    root (hd0,14)
    chainloader +1
    boot
    As a second trial I also took out an Open Solaris CD and booted it up. As Solaris now uses Grub1 so I can press "c" to get a Grub prompt before booting the Solaris up. In other word I used the Grub 0.97 version from Open Solaris and the above commands and was able to fire up the installed Ubuntu 9.10 again.

    It is interesting to me because Ubuntu 9.10 has a Ext4 filing system as well as Grub2. Grub1 cannot read Ext4 because it is invented after Grub1 ceased to be maintained after Version 0.97. Therefore I tried and cannot fire up Ubuntu 9.10 directly (using "kernel" & "initrd" commands). However as far as I known there is no "installed" PC system that Grub1 cannot boot "indirectly" using the chainloading.

    In chainloading Grub1 simply goes to the specified partition location specified by the "root" statement, loads the boot loader residing in that boot sector of the specified partition, hands over the control and buggers off itself. For this to happen you must tell Ubuntu 9.10 installer to place Grub2 in its root partition. That is all to it.

    May be you can try it too, with a Grub1 floppy or CD.
    Last edited by saikee; 09-07-2009 at 04:45 AM.
    Linux user started Jun 2004 - No. 361921
    Using a Linux live CD to clone XP
    To install Linux and keep Windows MBR untouched
    Adding extra Linux & Doing it in a lazy way
    A Grub menu booting 100+ systems & A "Howto" to install and boot 145 systems
    Just cloning tips Just booting tips A collection of booting tips

    Judge asked Linux "You are being charged murdering Windoze by stabbing its heart with a weapon, what was it?" Replied Linux "A Live CD"

  11. #11
    Join Date
    Jun 2004
    Location
    Newcastle upon Tyne
    Posts
    2,975
    panther3e,

    This is a thread I wrote on Grub2. You should find some of your questions are being answer there.

    If you make a Grub2 floppy or CD then you can use it to boot up your Ubuntu 9.10. I tried and it works fine. You can also mix the Grub1 and Grub2 in the manner I described in the thread.
    Linux user started Jun 2004 - No. 361921
    Using a Linux live CD to clone XP
    To install Linux and keep Windows MBR untouched
    Adding extra Linux & Doing it in a lazy way
    A Grub menu booting 100+ systems & A "Howto" to install and boot 145 systems
    Just cloning tips Just booting tips A collection of booting tips

    Judge asked Linux "You are being charged murdering Windoze by stabbing its heart with a weapon, what was it?" Replied Linux "A Live CD"

  12. #12
    Join Date
    Aug 2004
    Location
    grand rapids michigan
    Posts
    93
    Thank you very much saikee. That is some nice information. That will come in very handy. I got very frustrated yesterday, after installing ubuntu 9.10 two times. I did not have any luck getting ubuntu to boot from grub1. I tried all of your suggestions with the grub boot disk and could not get it to boot.

    So that was three times trying to get ubuntu to boot with grub1. Thats three strikes your out. I bit the bullet and installed again. This time installing grub2 to the MBR. It installed just fine, booted up, and looks very nice.

    I had tried this a couple of months ago but I could never get my other installed linux distro's to start with grub2. Now I see why they didn't with the change in the partition numbering.

    I just need to read a bit so I can boot my slackware and mepis partitions. Oh and reinstall grub to mepis partition.

    I want to thank you again saikee. You have been very helpful to mylittle project to see if the 9.10 ubuntu works woit my intel graphics card and it does.

    Thanks, Kevin.
    Debian Testing
    Absolute linux 12.x

  13. #13
    Join Date
    Aug 2004
    Location
    grand rapids michigan
    Posts
    93
    After doing a fair amount of reading I was very confused. The grub2 documation needs some work. So I thought I would run grub-update. I was very surprised when it listed all of my linux partitions. I was sure I would have to add them manually.

    Kevin.
    Debian Testing
    Absolute linux 12.x

  14. #14
    Join Date
    Jun 2004
    Location
    Newcastle upon Tyne
    Posts
    2,975
    I have not got myself into Grub2 because there is no Grub manual at all. Just a draft without even a full list what is inside. You have to know a fair bit of Grub1 just to get by and there is a significant amount of changes. I started to look at Grub2 because you sought help.

    My advice is you can stick with whatever version of Grub in each Linux. Every one can be boot indirectly using chainloading so it doesn't matter as long as you know how to put Grub, both Grub1 and Grub2, into the Linux own partition.

    I think Grub2 is moving with the advance in the MS systems so may be in long term it will become a powerful boot loader. At the moment it isn't fully developed yet. It is shipped with Ubuntu 9.10 and not before.

    Grub2 has been in this state for several years and did not attract any distro to use it until recently.
    Linux user started Jun 2004 - No. 361921
    Using a Linux live CD to clone XP
    To install Linux and keep Windows MBR untouched
    Adding extra Linux & Doing it in a lazy way
    A Grub menu booting 100+ systems & A "Howto" to install and boot 145 systems
    Just cloning tips Just booting tips A collection of booting tips

    Judge asked Linux "You are being charged murdering Windoze by stabbing its heart with a weapon, what was it?" Replied Linux "A Live CD"

  15. #15
    Join Date
    Aug 2004
    Location
    grand rapids michigan
    Posts
    93
    I very much appreciate that saikee. I had tried all of your suggestions and was never able to get Ubuntu 9.10 with grub to start with chainloading. I tried using a grub boot disk and was not able to get to start it with.

    I do not know if it was me, the install, the hardware, or not getting grub installed properly in the root partition. But I was not able to start Ubuntu until I put grub in the mbr.

    I did a lot of reading and following different links from you and some from ubuntu forums. I also found more information using google. I took a chance with the update-grub command and it worked out.

    From what I read most of the problems that people were having involved two hard drives or usb flash drives. I only have one hard drive with a fairly simple layout.

    I do not have anything important on the drive so if I hosed something I would only be out time reinstalling. Granted I would not be happy about it, but I have learned a great deal about partitioning hard drives, installing linux, grub, and chainloading.

    I am happy with my setup now. I have Ubuntu 9.10 Karmic Koala with gnome. I have Slackware 13 with kde 4.xx. Lastly I have mepis 8 with kde 3.5. I have each installed for a specific reason in mind.

    So thank you very much saikee for all of your help and information.

    Kevin.
    Debian Testing
    Absolute linux 12.x

Posting Permissions

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