LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-02-2012, 04:41 PM   #1
GloW_on_dub
LQ Newbie
 
Registered: Dec 2012
Posts: 3

Rep: Reputation: Disabled
Grub2 Chainloading / Multiple Distros


Hello

I would like to know what is the right way to manage multiple distros on my computer with Grub2 without the need of a "primary" distro.


I Have Debian, Linux Mint and Windows. Right Now i can boot in these three because i've run update-grub on my debian wich is the bootable one.

But i know it is not the right way.

I have created a separate grub partition.
If i copy the grub.cfg urrently in use on my debian et make the grub partition bootable, it works.

But i've been trough different tutos on internet and it appears there is two solutions :

1. Chainloading from grub partiton to distros specific grub, as it is done with windows.
2. run update-grub on the grub partition in order to let it find all distros wich allow to boot directly into it.


I've tried the first solution, but it appears that this kind of configuration :
menuentry "Debian" {
set root='(hd0,1)'
chainloader +1
}

give me only "Invalid Signature error" , except for the windows one, wich work perfectly.

Does chainloading from grub 2 to grub2 working? is it the right way to achieve what i want?

I've tried the second way but i don't know how ot execute the update-grub command in the grub partition.

any help will be gratefully accepted.
 
Old 12-02-2012, 05:29 PM   #2
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,499

Rep: Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489
I have the following entry in an Ubuntu grub.cfg file which boots by chainloading Mint 13:

Quote:
menuentry 'Mint 13' {
insmod ext2
set root=(hd0,12)
chainloader +1
}
Since you are able to boot Debian and windows, you could just move your Mint entry from the Mint partition in /boot/grub/grub.cfg to the Debian /etc/grub.d/40_custom file and re-run update-grub command Debian uses. Take a look at the link below from LQ which has several suggestions:

http://www.linuxquestions.org/questi...tition-909761/
 
Old 12-02-2012, 07:58 PM   #3
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,346

Rep: Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589
Another option is to create the entries for chainloading in /etc/grub.d/40_custom, make /etc/grub.d/30_0s-prober not executable then run update-grub in the primary distro you boot from. This will avoid problems later when future updates run update-grub.
 
Old 12-03-2012, 12:59 PM   #4
GloW_on_dub
LQ Newbie
 
Registered: Dec 2012
Posts: 3

Original Poster
Rep: Reputation: Disabled
I've made it work.

In my version of grub (grub-install (GRUB) 1.98+20100804-14+squeeze1), it appears that chainloading grub2 from grub2 does not work, but "multiboot" does the trick.
however chainloading work at least from grub2 to windows bootloader.

Here is my manually created grub.cfg located in sda13 and installed on the MBR:


Code:
#  grub.cfg
#  This is my custom boot menu, called /boot/grub/grub.cfg, located in my dedicated Grub2 partition /dev/sda13.

#  Set the timeout
set		timeout=8

#  Set the default boot entry
set		default=0

#  Set the colors
set		menu_color_normal=light-magenta/magenta
set		menu_color_highlight=white/magenta


menuentry	"Debian Grub on sda1" {
    set root=(hd0,1)
    multiboot /boot/grub/core.img
}

menuentry "Linux Mint 14 Grub on sda7" {
	set root=(hd0,7)
    multiboot /boot/grub/i386-pc/core.img
}

menuentry "Windows 7 loader on sda4" {
	insmod part_msdos
	insmod ntfs
	set root='(hd0,msdos4)'
	search --no-floppy --fs-uuid --set 53cb72821da0f169
	chainloader +1
}
when i select for example "Debian Grub on sda1" it load another grub located sda1 which allow me to choose different version of debian kernel or recovery mode.

Thx to this thread.
 
Old 12-03-2012, 01:57 PM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,125

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Which might work until a grub refresh (on your Debian) comes along.
Better to set up set up custom entries which update-grub will incorporate, rather than (update-grub) just blowing all your hard work away.
 
Old 12-04-2012, 05:29 AM   #6
GloW_on_dub
LQ Newbie
 
Registered: Dec 2012
Posts: 3

Original Poster
Rep: Reputation: Disabled
this grub with it grub.cfg is located in an seperated partition, and will not be updated by debian. that's the point of it.

However if debian update its own grub and indeed modify the location of core.img, i will not be able to boot into debian without modifying the grub.cfg, but i see no way to incorporate this multiboot grub configuration in any update system.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] How to create chainloading in GRUB2? michalng Debian 9 12-05-2011 12:47 AM
Chainloading from Grub2 to syslinux on a USB drive Yotefn Linux - Newbie 7 04-04-2011 04:15 AM
Success: Multiple live distros in a single external HDD with GRUB2 d3249 LinuxQuestions.org Member Success Stories 0 12-31-2010 12:34 AM
[SOLVED] chainloading with grub and grub2 houndhen Linux - General 3 12-20-2010 01:39 PM
Need help with chainloading grub2 for a multiboot setup streams &dragonflies Linux - General 2 11-24-2010 03:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:04 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration