Multi-boot with grub and grub2 and chainloading - Page 3


Page 3 of 4 FirstFirst 1234 LastLast
Results 31 to 45 of 47

Thread: Multi-boot with grub and grub2 and chainloading

  1. #31
    Join Date
    Jun 2004
    Location
    Newcastle upon Tyne
    Posts
    2,978
    barjac,

    Welcome to Justlinux!


    If you chainload a Linux booted by Grib2 you use the command "chainloader +1" in the Grub legacy. This is indirect booting and can only be successful if you have installed Grib2 inside the root partition of your Linux, which is sda14 (in Linux) or (hd0,13) in Grub legacy or (hd0,14) in Grub2. To do this after the Linux has been installed you need to mount sda14 and run Grub-install command.

    If you uses the command involving "kernel" and "initrd" commands then you boot that system "directly".

    My guess of your difficulty is that Ubuntu 9.10 default filing system is Ext4. Grub legacy cannot read Ext4 so it cannot go inside sda14 to load the kernel and initrd files with the direct booting booting method.

    There are many ways to fix your problem. Using a Ubuntu 9.10 CD should be the easiest. Have a read of Post #16 and apply it to your case. If you still have a problem report back.

    The commands with a Ubuntu 9.10 CD should be
    Code:
    sudo su
    mkdir /mnt/sda14
    mount /dev/sda14 /mnt/sda14
    chroot /mnt/sda14
    grub-install /dev/sda14
    exit
    The above can be omitted if you think you have installed Grub2 into sda14 as claimed.

    You then mount the Mandriva partition (if you use Ubuntu CD, no need to mount if you can boot Mandriva) and amend its Grub legacy menu.lst with the following insertions
    Code:
    title My Ubuntu 9.10 in sda14 or (hd0,13)
    root (hd0,13)
    chainloader +1
    Reboot and you should be able to boot Ubuntu 9.10.
    Last edited by saikee; 12-11-2009 at 02:11 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"

  2. #32
    Join Date
    Dec 2009
    Posts
    6
    My guess of your difficulty is that Ubuntu 9.10 default filing system is Ext4. Grub legacy cannot read Ext4 so it cannot go inside sda14 to load the kernel and initrd files with the direct booting booting method.
    Thanks for your reply. I am new to grub2 and Ubuntu but quite conversant with grub.
    Mandriva legacy grub supports ext4 and I have no problem booting directly into a kernel, however this is not a long term solution as any kernel updates would have to be manually changed in the legacy menu.lst. I want to chainload into grub2 so the grub2 menu will be displayed giving the option of older kernels etc. as I do with other Linux legacy grub installations.
    I reported a bug on this and just got a reply here :- http://savannah.gnu.org/bugs/?28256
    I am not sure what that will do, if it uses a symlink to boot the current kernel, then that would be adequate. I will re-install Ubuntu again - putting the boot loader in the root as before and see what this gives.
    All your suggestions mirror exactly the approach that I had used.

  3. #33
    Join Date
    Jun 2004
    Location
    Newcastle upon Tyne
    Posts
    2,978
    barjac,

    OK so you can boot Ubuntu 9.10 directly with Mandriva's Grub legacy. It is true some versions of Grub legacy were updated to read Ext4.

    So your problem is grub-install failed no matter how hard you try. May be you can show us the grub.cfg of Grub2.

    My experience with Grub2's grub-install command is that it isn't reliable and sometimes requires more than one attempt. I did managed to chainload Grub2 with the oldest Grub I have which is 0.91 sourced from Damn Small Linux. I still think Grub2 can be chainloaded by any version of Grub legacy.
    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"

  4. #34
    Join Date
    Dec 2009
    Posts
    6
    Thanks for your encouragement, however I am getting nowhere with the chainload.
    I just re-installed Ubuntu 9.10 into a clean re-formatted ext3 partition (sda14 again).
    Despite telling it to install the boot loader on sda14 it will not chainload.
    I can boot to the grub2 menu using
    Code:
    root (hd0,13)
    kernel /boot/grub/core.img
    From within Ubuntu I also ran
    Code:
    sudo grub-install /dev/sda14
    which reported no errors, and still it won't chainload!
    I'm not sure what happened to the bug report, as they closed it without waiting for my comments, I replied anyhow.

    grub.cfg is here
    Last edited by barjac; 12-12-2009 at 05:18 PM.

  5. #35
    Join Date
    Jun 2004
    Location
    Newcastle upon Tyne
    Posts
    2,978
    I have checked your grub.cfg and could not fault it.

    My Ubuntu 9.10 has also been updated some time ago and my Grub2 floppy seems to have an issue of booting it now, saying the "signature" not the same. Perhaps Grub2 1.97 Beta1 has been updated but not in a full working order.

    My grub.cfg is listed here
    Code:
    root@saikee-desktop:/home/saikee# cat /boot/grub/grub.cfg
    #
    # DO NOT EDIT THIS FILE
    #
    # It is automatically generated by /usr/sbin/grub-mkconfig using templates
    # from /etc/grub.d and settings from /etc/default/grub
    #
    
    ### BEGIN /etc/grub.d/00_header ###
    set default=0
    insmod ext2
    set root=(hd0,16)
    search --no-floppy --fs-uuid --set 0e4d2e7c-f6be-40fe-b4ac-e527256573ca
    if loadfont /usr/share/grub/unicode.pf2 ; then
      set gfxmode=640x480
      insmod gfxterm
      insmod vbe
      if terminal_output gfxterm ; then true ; else
        # For backward compatibility with versions of terminal.mod that don't
        # understand terminal_output
        terminal gfxterm
      fi
    fi
    set timeout=10
    ### END /etc/grub.d/00_header ###
    
    ### BEGIN /etc/grub.d/05_debian_theme ###
    set menu_color_normal=white/black
    set menu_color_highlight=black/white
    ### END /etc/grub.d/05_debian_theme ###
    
    ### BEGIN /etc/grub.d/10_linux ###
    menuentry "Ubuntu, Linux 2.6.31-9-generic" {
    	insmod ext2
    	set root=(hd0,16)
    	search --no-floppy --fs-uuid --set 0e4d2e7c-f6be-40fe-b4ac-e527256573ca
    	linux	/boot/vmlinuz-2.6.31-9-generic root=UUID=0e4d2e7c-f6be-40fe-b4ac-e527256573ca ro   quiet splash
    	initrd	/boot/initrd.img-2.6.31-9-generic
    }
    menuentry "Ubuntu, Linux 2.6.31-9-generic (recovery mode)" {
    	insmod ext2
    	set root=(hd0,16)
    	search --no-floppy --fs-uuid --set 0e4d2e7c-f6be-40fe-b4ac-e527256573ca
    	linux	/boot/vmlinuz-2.6.31-9-generic root=UUID=0e4d2e7c-f6be-40fe-b4ac-e527256573ca ro single 
    	initrd	/boot/initrd.img-2.6.31-9-generic
    }
    ### END /etc/grub.d/10_linux ###
    
    ### BEGIN /etc/grub.d/20_memtest86+ ###
    menuentry "Memory test (memtest86+)" {
    	linux	/boot/memtest86+.bin
    }
    menuentry "Memory test (memtest86+, serial console 115200)" {
    	linux	/boot/memtest86+.bin console=ttyS0,115200n8
    }
    ### END /etc/grub.d/20_memtest86+ ###
    
    ### BEGIN /etc/grub.d/30_os-prober ###
    menuentry "Windows Vista (loader) (on /dev/sda1)" {
    	insmod ntfs
    	set root=(hd0,1)
    	search --no-floppy --fs-uuid --set d6b03e6ab03e50eb
    	chainloader +1
    }
    menuentry "openSUSE 11.2 Milestone 1 (x86_64) (on /dev/sda12)" {
    	insmod ext2
    	set root=(hd0,12)
    	search --no-floppy --fs-uuid --set 264ff887-c033-4178-a195-2712aa822945
    	linux /boot/vmlinuz-2.6.29-6-default root=/dev/sda12
    	initrd /boot/initrd-2.6.29-6-default
    }
    menuentry "openSUSE 11.2 Milestone 1 (x86_64) (on /dev/sda12)" {
    	insmod ext2
    	set root=(hd0,12)
    	search --no-floppy --fs-uuid --set 264ff887-c033-4178-a195-2712aa822945
    	linux /boot/vmlinux-2.6.29-6-default.gz root=/dev/sda12
    }
    menuentry "Mandriva Linux 2009.1 (2009.1) (on /dev/sda13)" {
    	insmod ext2
    	set root=(hd0,13)
    	search --no-floppy --fs-uuid --set f6269276-592b-4aac-ae1c-14dfbe448b33
    	linux /boot/vmlinuz-2.6.28.4-desktop-1mnb root=/dev/sda13
    }
    menuentry "Debian GNU/Linux (5.0) (on /dev/sda14)" {
    	insmod ext2
    	set root=(hd0,14)
    	search --no-floppy --fs-uuid --set aed5e0bc-1ce3-46c6-b236-40e08878cc9b
    	linux /boot/vmlinuz-2.6.26.8-elive-686 root=/dev/sda14
    	initrd /boot/initrd.img-2.6.26.8-elive-686
    }
    menuentry "Bluewhite64 (on /dev/sda15)" {
    	insmod ext2
    	set root=(hd0,15)
    	search --no-floppy --fs-uuid --set 851cf392-5507-46b2-8b00-e86f5211024b
    	linux /boot/vmlinuz root=/dev/sda15 ro vga=773
    }
    menuentry "Windows NT/2000/XP (loader) (on /dev/sda18)" {
    	insmod ntfs
    	set root=(hd0,18)
    	search --no-floppy --fs-uuid --set 70a4ff53a4ff19f4
    	drivemap -s (hd0) ${root}
    	chainloader +1
    }
    menuentry "CentOS release 5.3 (Final) (on /dev/sda19)" {
    	insmod ext2
    	set root=(hd0,19)
    	search --no-floppy --fs-uuid --set 36f7fbf2-8592-46b0-a8d0-7258187b0de3
    	linux /boot/vmlinuz-2.6.18-128.1.6.el5 root=/dev/sda19
    }
    menuentry "CentOS release 5.3 (Final) (on /dev/sda19)" {
    	insmod ext2
    	set root=(hd0,19)
    	search --no-floppy --fs-uuid --set 36f7fbf2-8592-46b0-a8d0-7258187b0de3
    	linux /boot/vmlinuz-2.6.18-128.1.6.el5.centos.plus root=/dev/sda19
    }
    menuentry "CentOS release 5.3 (Final) (on /dev/sda19)" {
    	insmod ext2
    	set root=(hd0,19)
    	search --no-floppy --fs-uuid --set 36f7fbf2-8592-46b0-a8d0-7258187b0de3
    	linux /boot/vmlinuz-2.6.18-128.el5 root=/dev/sda19
    }
    menuentry "Ubuntu 9.04 (9.04) (on /dev/sda20)" {
    	insmod ext2
    	set root=(hd0,20)
    	search --no-floppy --fs-uuid --set 1a8f8477-1d35-4ea1-9d6b-b79a6c551dd5
    	linux /boot/vmlinuz-2.6.28-11-generic root=/dev/sda20
    	initrd /boot/initrd.img-2.6.28-11-generic
    }
    menuentry "Ubuntu 9.04 (9.04) (on /dev/sda20)" {
    	insmod ext2
    	set root=(hd0,20)
    	search --no-floppy --fs-uuid --set 1a8f8477-1d35-4ea1-9d6b-b79a6c551dd5
    	linux /boot/vmlinuz-2.6.28-8-generic root=/dev/sda20
    	initrd /boot/initrd.img-2.6.28-8-generic
    }
    menuentry "Debian GNU/Linux (5.0) (on /dev/sda25)" {
    	insmod ext2
    	set root=(hd0,25)
    	search --no-floppy --fs-uuid --set 2b6302dd-47d4-4d3a-af8d-42e6e3ecec3a
    	linux /boot/vmlinuz-2.6.28-5.slh.3-sidux-686 root=/dev/sda25
    	initrd /boot/initrd.img-2.6.28-5.slh.3-sidux-686
    }
    menuentry "Frugalware 1.0 (Anacreon) (on /dev/sda28)" {
    	insmod ext2
    	set root=(hd0,28)
    	search --no-floppy --fs-uuid --set 41c4739e-6cea-46cd-9056-69487e50e74e
    	linux /boot/vmlinuz-2.6.28-fw5 root=/dev/sda28
    }
    menuentry "Linux (on /dev/sda29)" {
    	insmod ext2
    	set root=(hd0,29)
    	search --no-floppy --fs-uuid --set 4c9a3608-80a9-46f7-9c43-a929a8d823b9
    	linux /boot/vmlinuz root=/dev/sda3 ro  vt.default_utf8=0 vga = 773
    }
    menuentry "Windows NT/2000/XP (loader) (on /dev/sda31)" {
    	insmod ntfs
    	set root=(hd0,31)
    	search --no-floppy --fs-uuid --set 70a4ff53a4ff19f4
    	drivemap -s (hd0) ${root}
    	chainloader +1
    }
    menuentry "Windows NT/2000/XP (loader) (on /dev/sda33)" {
    	insmod ntfs
    	set root=(hd0,33)
    	search --no-floppy --fs-uuid --set 70a4ff53a4ff19f4
    	drivemap -s (hd0) ${root}
    	chainloader +1
    }
    menuentry "Absolut (on /dev/sda35)" {
    	insmod ext2
    	set root=(hd0,35)
    	search --no-floppy --fs-uuid --set d2b0044d-a64d-4ac4-83db-615b48f5359f
    	linux /boot/vmlinuz root=/dev/sda35 ro vga = 773
    }
    menuentry "Debian GNU/Linux (5.0) (on /dev/sda36)" {
    	insmod reiserfs
    	set root=(hd0,36)
    	search --no-floppy --fs-uuid --set 3e2219fd-020d-4972-92f2-4b0a56d6f049
    	linux /boot/vmlinuz-2.6.28.7 root=/dev/sda36
    	initrd /boot/initrd.img-2.6.28.7
    }
    menuentry "Slackware Linux (Slackware 12.2.0) (on /dev/sda37)" {
    	insmod ext2
    	set root=(hd0,37)
    	search --no-floppy --fs-uuid --set 416595ae-e0bc-4788-8dd0-5496d09df118
    	linux /boot/vmlinuz root=/dev/sda37
    }
    menuentry "Slackware Linux (Slackware 12.2.0) (on /dev/sda37)" {
    	insmod ext2
    	set root=(hd0,37)
    	search --no-floppy --fs-uuid --set 416595ae-e0bc-4788-8dd0-5496d09df118
    	linux /boot/vmlinuz root=/dev/sda37
    }
    menuentry "Zenwalk (on /dev/sda43)" {
    	insmod ext2
    	set root=(hd0,43)
    	search --no-floppy --fs-uuid --set 751890c6-9fca-4aa7-ab19-f67a488d9fec
    	linux /boot/vmlinuz root=/dev/sda58 ro resume=/dev/sda5 splash=silent  vga = 775
    	initrd /boot/initrd.splash
    }
    menuentry "Linux (on /dev/sda45)" {
    	insmod ext2
    	set root=(hd0,45)
    	search --no-floppy --fs-uuid --set 8aa84056-aaa5-4d4e-9de4-ee3b6f429f17
    	linux /boot/vmlinuz root=/dev/sda45 ro  vt.default_utf8=0 vga = 773
    }
    menuentry "Mandriva Linux 2009.1 (2009.1) (on /dev/sda47)" {
    	insmod ext2
    	set root=(hd0,47)
    	search --no-floppy --fs-uuid --set bced517e-f1bd-48ee-8f3d-9a0f7fa6bf5a
    	linux /boot/vmlinuz-2.6.29-desktop586-1mnb root=/dev/sda47
    }
    menuentry "PCLinuxOS release 2009 (PCLinuxOS) for i586 (on /dev/sda49)" {
    	insmod ext2
    	set root=(hd0,49)
    	search --no-floppy --fs-uuid --set f3ec3b23-6ab3-4650-8595-5d43dd722c06
    	linux /boot/vmlinuz-2.6.26.8.tex3 root=/dev/sda49
    }
    menuentry "Ubuntu jaunty (development branch) (9.04) (on /dev/sda53)" {
    	insmod ext2
    	set root=(hd0,53)
    	search --no-floppy --fs-uuid --set 26b0929c-e1b2-4f34-8352-80ed0b780bc1
    	linux /boot/vmlinuz-2.6.28-11-generic root=/dev/sda53
    	initrd /boot/initrd.img-2.6.28-11-generic
    }
    menuentry "BigLinux (5.0alpha) (5.0alpha) (on /dev/sda54)" {
    	insmod ext2
    	set root=(hd0,54)
    	search --no-floppy --fs-uuid --set e5b760d6-930c-4bfc-bcd8-2f1023131e76
    	linux /boot/vmlinuz-2.6.28-11-generic root=/dev/sda54
    	initrd /boot/initrd.img-2.6.28-11-generic
    }
    menuentry "arch (on /dev/sda55)" {
    	insmod ext2
    	set root=(hd0,55)
    	search --no-floppy --fs-uuid --set 7ac6831d-1793-468c-9e37-6b50564ad427
    	linux /boot/vmlinuz26 root=/dev/hda3 ro
    	initrd /boot/kernel26.img
    }
    menuentry "arch-fallback (on /dev/sda55)" {
    	insmod ext2
    	set root=(hd0,55)
    	search --no-floppy --fs-uuid --set 7ac6831d-1793-468c-9e37-6b50564ad427
    	linux /boot/vmlinuz26 root=/dev/hda3 ro
    	initrd /boot/kernel26-fallback.img
    }
    menuentry "Debian GNU/Linux (5.0) (on /dev/sda56)" {
    	insmod ext2
    	set root=(hd0,56)
    	search --no-floppy --fs-uuid --set 38d4cdfc-e2d5-464f-aad4-f1fe1be7744b
    	linux /boot/vmlinuz-2.6.28-5.slh.3-sidux-686 root=/dev/sda56
    	initrd /boot/initrd.img-2.6.28-5.slh.3-sidux-686
    }
    menuentry "Ubuntu jaunty (development branch) (9.04) (on /dev/sda57)" {
    	insmod ext2
    	set root=(hd0,57)
    	search --no-floppy --fs-uuid --set 3b0bb9a2-3ba8-4fa5-8f03-9fe548822c1c
    	linux /boot/vmlinuz-2.6.28-11-generic root=/dev/sda57
    	initrd /boot/initrd.img-2.6.28-11-generic
    }
    menuentry "Debian GNU/Linux (5.0) (on /dev/sda9)" {
    	insmod ext2
    	set root=(hd0,9)
    	search --no-floppy --fs-uuid --set 9b669750-5ca8-4eb2-90f3-083547934355
    	linux /boot/vmlinuz-2.6.26-1-686 root=/dev/sda9
    	initrd /boot/initrd.img-2.6.26-1-686
    }
    ### END /etc/grub.d/30_os-prober ###
    
    ### BEGIN /etc/grub.d/40_custom ###
    # This file is an example on how to add custom entries
    ### END /etc/grub.d/40_custom ###
    If there is a bug in Grub2 then it isn't in my current kernel version as I can boot Ubuntu 9.10's Grub 2 up with

    (1) Grub legacy 0.97 sourced from an earlier version of Ubuntu and Mandriva

    (2) Grub legacy 0.91 from the oldest version of Grub I have

    In both the above case Ubuntu 9.10 Grub2 menu can be booted manually by commands
    Code:
    root (hd0,15)
    chainloader +1
    boot
    Once I have Grub2 of Ubuntu 9.10 I can boot up Ubuntu. However if I drop into a Grub prompt I can use Ubuntu's Grub2 to boot it up again manually using either
    Code:
    root = (hd0,16)
    chainloader +1
    boot
    or
    Code:
    root = (hd0,16)
    configfile /boot/grub/grub.cfg
    boot
    My conclusion is any Grub legacy should be able to boot Grub2 by chainloading. To use Grub2 to chainload another Grub2 then a correct version with compatible signature may be needed.
    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"

  6. #36
    Join Date
    Dec 2009
    Posts
    6
    My conclusion is any Grub legacy should be able to boot Grub2 by chainloading.
    That would be what I would expect too, but I will have to take your word for it, as it just will not work for me. I will continue to play with it as time allows, but it's not so important now that it is possible to boot into core.img and get to the menu.
    Just annoying, combined with the fact that Ubuntu won't install without re-formatting swap. I was only installing it to test the chainloader and it screwed my Mandriva install when the swap UUID changed, took a while to edit fstab, menu.lst and recreate initrd. I won't be recommending Ubuntu in a hurry!

  7. #37
    Join Date
    Jan 2010
    Posts
    1

    haven't done anything yet

    hey, just came across this thread ..
    i am currently running ubuntu karmic and linux mint as dual boot .. both use grub2.
    i am wanting to install mandriva or fedora on a third partition, both use grub legacy (just for kicks and to check them out).

    i'm newby with grub, but have read enough to see that grub1 & 2 dont care for each other - which seems ridiculous to me, whos writing this .. ??

    anyway. maybe best to just not mix the grubs on one disc .. ? or is there a good way to add a new install partition and minimize/work around this conflict? thx for any advice.

  8. #38
    Join Date
    Jun 2004
    Location
    Newcastle upon Tyne
    Posts
    2,978
    woodnymph,

    Welcome to Justlinux!


    Don't worry about mixing Grub2 with Grub legacy.

    The majority partitions used in a PC by default leave the front end with a boot sector for the residence of the boot loader. You can have any PC operating system installed with its boot loader in a reserved location. That boot sector will not be used for any other purpose.

    If you want Grub2 to be booted by another boot loader, say Lilo, NTLDR (from Xp and Win2k) or bootmgr (from Vista or Win7) or Grub legacy all you need is to ensure the boot loader is "replicated" or "installed" or "duplicated" inside the boot sector using the command "grub-install" which is identical for both Grub2 and Grub legacy. Thereafter that OS will be "chainloadable" by any boot loader.

    In chainloading you use one boot loader to boot up another boot loader. Every OS will become chainloadable if you arrange its boot loader inside the boot sector the OS resides.

    You can mix Grub2 and Grub legacy in the same way of mixing Linux and MS systems inside the same hard disk.

    You can have say 10 OSes installed and everyone has its boot loader inside its boot sector (generally referred as having the boot loader installed in its root partition) then you can select anyone of them to control the MBR and boot all the rest. This is your God given right! Even MS systems can do this but it is a lot easier and simple with Linux.
    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"

  9. #39
    Join Date
    Dec 2009
    Posts
    6
    It is generally preferable to install Mandriva from the "Free" DVD, but the "One" live CD has all the drivers for virtually all hardware on the disk and includes an installer. "One" comes in two flavours, KDE4 and Gnome. "Free" includes both of these and more, plus lots more software.
    During the installation, towards the end, Mandriva offers choces of where to install the boot loader.
    If you opt for the MBR then you will boot into Mandriva grub and need to manually add entries to that for any grub2 systems like Ubuntu.
    If you select the root partition for the boot loader, then you will need to chainload into Mandriva from your existing boot manager.
    Either way will work, however it's worth re-reading this thread several times in conjunction with the grub and grub2 manuals first, just to get familiarized with the differences.
    Have Fun!

  10. #40
    Join Date
    Jan 2008
    Location
    canada
    Posts
    11

    converting system from direct to indirect booting and grub2

    hi saikee and all,

    i haven't been around the justlinux.com website in sometime, but when it comes to multi-booting and writing the menu.lst file, as per grub legacy, or now the grub.cfg file, as per grub2 i've found you are the indisputable expert. so here goes:

    i've got an ok linux desktop with 6 installed distros (2 using legacy grub with ext3 fs and 4 using grub2 with ext4 fs) using the direct booting method.

    my question: is it possible to convert this system to indirect booting with chainloader +1 without disturbing the already installed distros, and if so how would one go about writing the grub.cfg file? would a fat16 data-only partition
    still be used?

    thanks for any help.

  11. #41
    Join Date
    Jun 2004
    Location
    Newcastle upon Tyne
    Posts
    2,978
    Indirect booting is a lot easier than direct booting.

    There are two steps.

    Step 1 : Grub-install either Grub1 (legacy grub) or Grub2 within the distro partition.

    Say you want Grub1 inside partition sda3 the command in Linux is
    Code:
    grub-install /dev/sda3
    for Grub2 it is
    Code:
    grub-install -force /dev/sda3

    Step 2 : Amend the menu.lst (for Grub1) or grub.cfg (for Grub2)

    Say you have a distro installed in sda3 which will be known as (hd0,2) in Grub1 but (hd0,3) in Grub2, so the lines to boot in in Grub1 are just
    Code:
    title Distro in sda3 known to Grub1 as (hd0,2)
    root (hd0,2)
    chainloader +1
    For Grub2 it is just
    Code:
    menuentry 'Distro in sda3 known to Grub2 as (hd0,3)' {
    set root=(hd0,3)
    chainloader +1
    }
    In the indirect booting the Grub (can be either Grub1 or Grub2) in MBR simply boot up anther Grub (which can be Grub1 or Grub2 also or Lilo or a MS Windows) in the partition specified. The second Grub then boot up its own master "directly".
    Last edited by saikee; 10-13-2010 at 07:23 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"

  12. #42
    Join Date
    Jan 2008
    Location
    canada
    Posts
    11
    saikee,

    ok, this is great. but, 2 more 3 related questions occur to me:
    --how do you change the grub.cfg file since it is not editable, as the menu.lst file is? can you give some details.
    --and is the small fat16 data partition containing the edited grub.cfg file rather than the menu.lst file no longer necessary?

    thanks again.

  13. #43
    Join Date
    Jun 2004
    Location
    Newcastle upon Tyne
    Posts
    2,978
    grub.cfg can be edited just like menu.lst.

    It is just a text file. Some distros like Ubuntu make a meal out of it by saying not to touch it.

    Every operating system must be booted directly eventually. This means if you have a distro having its Grub occupying the MBR then you cannot chainload that distro. It is like asking a dog to chase its own tail. If you think about it then the logic makes sense.

    My purpose of using a data-only, say a fat16, partition to house Grub that controls the MBR is to have every operating system booted by chainloading. The data-only fat16 partition has no operating system inside and no need to boot it. This makes it easy to compile a menu.lst by just repeating the chainloading commands as many times as the number of partitions.

    The new Grub2 is more versatile in that it can read a NTFS partition. Therefore you can put Grub2 inside any Win2k, Xp, Vista or Win7 now to boot every system in the box. Vista and Win7 also have a \boot subdirectory ideally suitable for adding \boot\grub to it for this trick.
    Last edited by saikee; 10-14-2010 at 06:15 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"

  14. #44
    Join Date
    Oct 2010
    Posts
    20
    greeting,

    I have just started learning Linux.
    And currently learning multi boot with grub.

    So I navigated to here and want to start here.
    As there are so many type of Linux OS, so far I have come across Lilo, grub and grub2 boot loader on those OS I read and played with. So I would like to learn a good, long term method to boot all of them in multi-boot environment.
    The other thing I would like to learn is, some computers I have do not have CD/DVD or its old CDROM/DVD are no longer working. I hope I can learn also the proper way to prepare bootable USB stick, bootable USB external drives and boot iso directly from hard disk.

    I have not yet navigate this forum, so I just start here, if this is not appropriate kindly let me know and channel me to the right place
    thank you.

  15. #45
    Join Date
    Jan 2008
    Location
    canada
    Posts
    11
    saikee,

    great, that does it all for me.

    i'm amazed that something so simple when one finally understands it eluded so many seasoned linux users and "experts" for years until you cam along.

    i nominate you for the noble prize in linux!!

    thanks again.

Posting Permissions

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