Jump to content

Dual Booting Mandriva 2010 with Grub2


mhbell
 Share

Recommended Posts

Dual Booting Mandriva 2010 with Grub2 As some of you have found out, (Me included), Ubuntu 9.10 and some other modern Distro's use Grub 2. I ran into the following problem while trying to boot Mandriva using the Grub 2 boot manager in Ubuntu 9.10. The Prober found Mandriva Which uses a older version of Grub. But I could not boot into it from Grub 2. After much searching I found the answer. It is my hope that this will help someone else who is trying to dual boot Mandriva using Grub 2. I have removable hard drive racks in my computers so that I can change hard drives very fast and not have to open the case when I want to change hard drives. This way I can test different OS's with a minimum of trouble. My main Hard drive and OS is Ubuntu 9.10 I have a second hard drive that contains several Distro's on it. Grub 2 is located on the (hd0) first hard drive which only contains Ubuntu 9.10. I installed Mandriva on (hd1,8) The second hard drive and 8th partition and ran "update-grub" which it did. *** note the numbering has changed in Grub 2. (Hard drives start with 0 zero for the first hard drive and 1 one for the second hard drive, But the partitions start with 1 one for the first partition and not 0 zero). It found Mandriva on the 8th partition and put the particulars in the grub.cfg. But it would not boot. I managed to boot into it manually from the grub prompt. You can do that with grub. Here is what to do. In the /etc/grub.d/40_custom file I inserted the following entry. code

menuentry "Mandriva-Gnome 2010" { insmod ext2 set root=(hd1,8) linux (hd1,8)/boot/vmlinuz initrd (hd1,8)/boot/initrd.img }
now when I run "update-grub" It won't change the Mandriva entry because it is in the Custom file of /etc/grub.d/40_custom. Note the brackets and the entry between them. The brackets have to be there. Also there is no space between the (hd1,8) and the /boot/vmlinuz. if you put a space there it will not boot.Mel B) Edited by mhbell
Link to comment
Share on other sites

securitybreach

Thanks for the information. Archlinux uses grub1 right now but I am trying to install grub2. I actually use grub-gfx from Arch which lets you use graphics in the grub menu, but I want to install Grub2. So seeing more info about Grub2 is always helpful. Thanks for the post.Thanks

Link to comment
Share on other sites

Thanks for the information. Archlinux uses grub1 right now but I am trying to install grub2. I actually use grub-gfx from Arch which lets you use graphics in the grub menu, but I want to install Grub2. So seeing more info about Grub2 is always helpful. Thanks for the post.Thanks
I also use grub-gfx and have a beautiful Menu with a picture of a lake and custom menu entrys.It is controlled by 05_debian_theme file in /etc/grub.d/05_debian_theme.Here is the config file. #!/bin/bash -esource /usr/lib/grub/grub-mkconfig_libset_mono_theme(){ cat << EOFset menu_color_normal=white/blackset menu_color_highlight=black/whiteEOF}# check for usable backgroundsuse_bg=falseif [ "$GRUB_TERMINAL_OUTPUT" = "gfxterm" ] ; then for i in {/boot/grub,/usr/share/images/desktop-base,/usr/share/images/grub}/Lake_mapourika_NZ.{png,tga} ; do if is_path_readable_by_grub $i ; then bg=$i case ${bg} in *.png) reader=png ;; *.tga) reader=tga ;; *.jpg|*.jpeg) reader=jpeg ;; esac if test -e /boot/grub/${reader}.mod ; then echo "Found Debian background: `basename ${bg}`" >&2 use_bg=true break fi fi donefi# set the background if possibleif ${use_bg} ; then prepare_grub_to_access_device `${grub_probe} --target=device ${bg}` cat << EOFinsmod ${reader}if background_image `make_system_path_relative_to_its_root ${bg}` ; then set color_normal=black/black set color_highlight=magenta/blackelseEOFfi# otherwise, set a monochromatic theme for Ubuntuif ${use_bg} ; then set_mono_theme | sed -e "s/^/ /g" echo "fi"else set_mono_themefi
Link to comment
Share on other sites

V.T. Eric Layton

I don't go for all that new-fangled stuff. I still get my TV programming off the airwaves. indoor_tv_antenna1.jpgI still have a plain ol' telephone and no cell phone.AEGIS2510ASH.jpgI drive an old truck.myprettychevytruck927nk.jpgI'm old. I don't like new things. B)

Link to comment
Share on other sites

ok.i'm planning on installing mandriva 2010 very soon, like tonight?if i install mandriva first, then debian 5 second, is debian not going to know what to do with grub2?

Link to comment
Share on other sites

V.T. Eric Layton

Don't install any bootloader (or install it in Mandriva's /boot partition NOT the MBR), then install Debian and allow its bootloader to install and control the MBR. It should auto-magically pick up Mandriva's installation. If not, you can manually edit it (the way I prefer) to boot the Mandriva.At least I hope that's correct. Because if it's not, I'm wasting my time downloading 2010 Free right now. :hysterical:

Link to comment
Share on other sites

ok.i'm planning on installing mandriva 2010 very soon, like tonight?if i install mandriva first, then debian 5 second, is debian not going to know what to do with grub2?
If Debian (lenny) Uses Grub 2 then you will have to manually edit the 40_custom file to boot into Mandriva.Mandriva still uses the old grub boot loader modified. So when "update-grub" is run the grub 2 prober finds the wrong information and puts it in grub.cfg. you will have to make the following changes in /etc/grub.d/40_custom file. then run "update-grub" by putting the entry in the custom file it won't get overwritten everytime you run update-grub. if debian 5 does not run grub 2, and runs the old grub, then the entry will be different and will be put in the menu.lstMelcode
menuentry "Mandriva-Gnome 2010" { insmod ext2 set root=(hd1,8) linux (hd1,8)/boot/vmlinuz initrd (hd1,8)/boot/initrd.img}
change the settings to match what you have. Edited by mhbell
Link to comment
Share on other sites

I don't go for all that new-fangled stuff. I still get my TV programming off the airwaves. I still have a plain ol' telephone and no cell phone.I drive an old truck.I'm old. I don't like new things. :o
And now for my rebuttalI get my TV programming off the airwaves too.sat2.jpgand I have a nice phone that's portable no landlines neededVerizon-LG.jpgOf course when I travel I like my comforts of homepace1.jpgOf course I like modern things Old and New BTW I am just turned 71 Nov 10th so you are not so old Eric.Mel :hysterical:
Link to comment
Share on other sites

  • 1 year later...

hi guys this thread made me register here - hope you help me...as mentioned in the /etc/grub.d/40_custom file (xubuntu) I inserted the following entry:menuentry "Mandriva 2010" { insmod ext2 set root=(sd1,6) linux (sd1,6)/boot/vmlinuz initrd (sd1,6)/boot/initrd.img}the hdd is secondary in my laptop so i put sd1then i receive that mandriva cannot find that partition and that it has to boot kernel ;)

Link to comment
Share on other sites

hi guys this thread made me register here - hope you help me...as mentioned in the /etc/grub.d/40_custom file (xubuntu) I inserted the following entry:menuentry "Mandriva 2010" { insmod ext2 set root=(sd1,6) linux (sd1,6)/boot/vmlinuz initrd (sd1,6)/boot/initrd.img}the hdd is secondary in my laptop so i put sd1then i receive that mandriva cannot find that partition and that it has to boot kernel ;)
Be sure that you have the correct numbering and that you run update-grub after making and saving any changes.note *** note the numbering has changed in Grub 2. (Hard drives start with 0 zero for the first hard drive and 1 one for the second hard drive, But the partitions start with 1 one for the first partition and not 0 zero).Also you might try this.
menuentry "Mandriva-Gnome 2010" {insmod ext2set root=(hd1,6)linux (hd1,6)/boot/vmlinuzinitrd (hd1,6)/boot/initrd.img}

Mel

Link to comment
Share on other sites

Be sure that you have the correct numbering and that you run update-grub after making and saving any changes.note *** note the numbering has changed in Grub 2. (Hard drives start with 0 zero for the first hard drive and 1 one for the second hard drive, But the partitions start with 1 one for the first partition and not 0 zero).Mel
the numbering i gave i took from gparted so i assume it should be ok (sdb = sd1)before trying that i accidentally installed mandriva's grub at sda- windows and worked but then in order to boot windows(sda) i had to go from xubuntu-grub (sdb) and that was a little mess - but in that mess i could boot all three systems ;)
Link to comment
Share on other sites

guys i found it !although the hdd is secondary and so appears in xubuntu, gparted, nevertheless for grub is primary !!!it worked when i put hd0 :teehee: "people talk backwards, walk backwards and fart backwards" Mozart

Link to comment
Share on other sites

i also found this bug : if i boot windows sda then grub "remembers" that sda is windows hdd, and having set sd0 i cannot boot mandriva - i receive cannot find partitiononly after having boot xubuntu in sdb can i boot mandriva

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...