LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   Need help with chainloading grub2 for a multiboot setup (http://www.linuxquestions.org/questions/linux-general-1/need-help-with-chainloading-grub2-for-a-multiboot-setup-846219/)

streams &dragonflies 11-24-2010 03:28 AM

Need help with chainloading grub2 for a multiboot setup
 
1 Attachment(s)
Hi! Don't know if I should have posted in Ubuntu specific section but since it involves grub2 and a quirk in my bios, I beleive...

I have attempted to multiboot 3 Windows versions and the problem I had was intalling a second Ubuntu. (Don't ask!) I had success multibooting with grub legacy on an older computer but this computer has a tricky mb which won't let me install grub to the second drive on an IDE port. What I mean by this is that since I already had boot files to the older drive in mbr- it won't allow me to install to mbr of the other drive in IDE port even if set first in bios boot order, my old computer allowed me to do so, exept perhaps its because 2 HDD were SCSI... (I have other HDD installed in RAID 0 on the other sata ports supported by mb (fakeraid) but I will use these for video editing as scratch disks later. One other HDD used for data is on the Raid port but not in an array).

I succeeded in installing Ubuntu desktop only after realising that I had to first switch my disk order in bios- otherwise the system would just hang. U. Desktop grub had sucessfully found Win bootloader links to both XP and Vista. I then installed Win 7 and used easy BCD and grub2 boot entry to link back to my Ubuntu Desktop grub 2 menu.

The problem occured when installing Ubuntu Studio ( for which I created a separate /boot partition) and I decided to install grub2 to mbr since it had correctly detected all my OSes! But then it seems it never installed correctly to the mbr. I still had Win 7 BCD bootloader in MBR! I tried to link easy BCD boot entry to the /boot drive but that didn't work and I ended up having to reinstall Win7 because I had overrid the BCD with faulty neogrub mapping entries- which I then removed and kept the orginal neogrub that still points to Ubuntu Desktop grub menu.

I also now realise that because I installed Ubuntu Desktop before I switched the HDD boot order in bios- U. Desktop's grub.cfg sees root of Desktop grub differently than neogrub BCD does root=(hd4,7) vs multiboot kludge (hd3,6) and at first I tried to install grub in the wrong hdds and partitions- I based mapping on neogrub's to find /Boot (hd3,2) and (hd3, 1) which is wrong!

What I am attempting to do now is to chainload grub2 from my Ubuntu studio located in /Boot with what I thought was the right mapping but still no success:

menuentry 'Chainloader' {
insmod chain
set root=(hd4,2)
chainloader +1
}

yielded error: hd 4,2 cannot get C/H/S values press any key to continue, also when in terminal in Ubuntu Desktop in
grub> find /grub/core.img
Error 15: File not found



Can someone guide me in identifying the right mapping of my boot drive to chainload and also force install-grub there as well in the hopes that that is all I need to boot into U. Studio!

I will attach Boot_info_script; at this point I am too tired and afraid that I will keep on installing grub to the wrong drive!



Note: I somehow got a problem loading into XP after all these failed attempts and a system 32 file seems to have gotten lost-haven"t attempted to fix yet. Just wondering in passing what happens if I chainloaded into Windows by error- if that could have corrupted it? Right now 3 out of 5 OS are bootable. I hope I can repair it without messing up my mbr again. Another issue is that some devices are on busy IRQs and then suddenly its resolved and my onboard LAN suddenly stops working at times so I don't know if any of this could cause XP to get stuck at loading screen....

syg00 11-24-2010 06:32 AM

This sounds like you need to check the jumpers on the IDE drives. Make sure you have decent ("80-wire") cables, and use cable select. May make your problem(s) change, but at least they'll be predictable.
Too late now, but I'll look at that RESULTS.txt in the morning - should be rerun if you change as suggested above.

streams &dragonflies 11-24-2010 03:47 PM

thanks sg00 for looking into this!

That's the quirkyness of my mb; I have flashed to the latest bios, my HDDs are all Sata 2! The 2 HDDs which I installed my OSes to are kept in 'IDE mode' in port 4 and 5 as selected from bios - partly to avoid loading Raid drivers from floppy (XP) partly to avoid having to re-intall Vista and XP (I still have apps. and uses in each OS, as overkill at it may seem...) All my other sata drives are controlled by the other chip on the mb, set to raid mode. I have called the mb tech support (Gigabyte GA-790XTA-UD4) to make sure I was doing things right but they were convinced that I could switch the boot order of my drives any which way. Also I was told that I could leave the jumpers as set by the manufacturer (never even looked at the jumpers ever since I have Sata drives...)

And I am actually re-installing Ubuntu and windows 7 again! Its a long story, but one of the 2 drives was shown to have some bad sectors acc. to Ubuntu's drive utility (can't remember the name right now) and since I couldn't boot from it, was told the drive must be at fault so I got another one with a longer warranty, just to be safe and now still can't boot from it. Is it something in the mbr of the smaller drive?

Just wait until you read my txt.- I installed grub on other drives instead! And what happened to grub from U. Studio? It claimed it installed successfuly to the mbr... I just want to be sure of the mapping this time and try to install grub2 to /Boot chainload the first grub2 to it and leave everything else be, if possible. Note: All my OS are otherwise fine exept for XP- which I hope just needs one file to add back to the registry (cross my fingers).


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