LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Grub Error13 Question (https://www.linuxquestions.org/questions/linux-newbie-8/grub-error13-question-398143/)

PipeDreams 12-31-2005 10:08 AM

Grub Error13 Question
 
Hi,
I use Mandriva 2006 and installed DSL linux in another partition.

If I use the Grub v0.91 that came with DSL it will boot.

If I add DSL to Mandriva's Grub v0.97 menu.lst and try to Boot DSL I get an "error 13:invalid or unsupported executable format" message.

Are the two versions not compatible?

Thank you.

pixellany 12-31-2005 03:56 PM

More info needed:
Did Mandriva boot before you put in DSL?
Where did you install grub during DSL install?
When you boot into DSL, so you see a grub screen or does it go straight to DSL?
Can you still boot into Mandriva?

saikee 12-31-2005 04:22 PM

Sound like you are booting DSL indirectly by chainloading but has not arranged DSL to replicate its Grub inside its root partition.

PipeDreams 12-31-2005 05:41 PM

Quote:

Did Mandriva boot before you put in DSL?
Where did you install grub during DSL install?
When you boot into DSL, so you see a grub screen or does it go straight to DSL?
Can you still boot into Mandriva?
Yes Mandriva always boots.So does Kate2.2,puppy,and as of 20 minutes ago the shiny new Mandriva 2006.1 :D

I installed grub into the DSL partition using the installer.

When first installed/rebooted and I saw the grub screen with DSL and xp available.Both booted.

I used the disc1 of mandriva in rescue mode and reinstalled bootloader to switch back to my old menu.lst

Quote:

Sound like you are booting DSL indirectly by chainloading but has not arranged DSL to replicate its Grub inside its root partition.
Yes I am.
The other distros I installed grub to the distros partition then used rescue cd to switch back to mandrakes menu.lst and add:
title name (hd?,?)
root (hd?,?)
chainloader +1
No I dont think I know how to replicate grub in DSL?I dont think I had to do this before.Is it easy to do?

Thank you.

saikee 12-31-2005 06:08 PM

I use chainloading to boot 85 out of 103 systems and can tell you chainloading only works if the system has a boot loader inside its root partition.

You can replicate any Linux's boot loader, say with root at partition hdc9 by
Code:

grub-install /dev/hdc9
if it uses Grub as the boot loader.

For Lilo as boot loader the instruction is
Code:

lilo -b /dev/hdc9
You can save a lot of hassle by pre-arranging one Grub menu.lst to boot all empty partitions you got. (take a look at my menu.lst in above link which still have 20 empty partitions).

Also you should learn to get into an unbootable Linux by Live CD instead of relying on the installlation CD. Detail again in Section C3 of the above link.

Happy Multi-booting

PipeDreams 12-31-2005 07:02 PM

WOW,what a menu.lst!
Thanks for the link also.Thats a lot of information for me to absorb.
That is a very good idea.pre partition and arrange the menu.lst in advance.
I will go to the mandriva I edit the /grub/menu.lst with and from console, grub-install /dev/hdb5(DSL=hdb5).Hopefully it will boot.If not i'll keep reading. :study:

Thank you

pixellany 12-31-2005 08:37 PM

Hats off to Saikee for the most in-depth material that I have seen on GRUB and multi-booting. You deserve some sort of prize....!!!!!

saikee 12-31-2005 09:30 PM

I am passing on information I learn from the forum, no different to any of you guys.

Happy new year to all

PipeDreams 01-01-2006 07:15 PM

I am almost embarrassed to admit after all the excellent info I have been given I still cant get it to boot.AAARRRGGGHHH.

I am using a knoppix live cd now and tried to install grub as per saikee instruction in C3.I get the following response in a console.I dont know what it means.

knoppix@ttyp0[knoppix]$ su
root@ttyp0[knoppix]# mkdir /mnt/hdb9
mkdir: cannot create directory `/mnt/hdb9': File exists
root@ttyp0[knoppix]# mount /dev/hdb9 /mnt/hdb9
root@ttyp0[knoppix]# chroot /mnt/hdb9
root@Knoppix:/# grub-install /dev/hdb9
df: /: can't find mount point.
df: /boot: can't find mount point.
: Not found or not a block device.

Thank you for any information

UPDATE:I forgot to say after I typed "grub-install /dev/hdb9" from mandriva console I no longer get a grub 13 error.When I choose dsl to boot, screen blanks for a second and returns to boot screen with timer reset?

saikee 01-02-2006 07:18 AM

Lets get one thing clear first

You must nominate one Grub in the MBR. I was under the impression that was Mandriva's Grub 0.97. So stick to it.

Issuing grub-install /dev/hdb9 inside Mandriva = ask Grub there to install itself in device partition hdb9. So when you choose to boot to hdb9 Grub boots istelf back!!! It is like two mirrors glued back to back. Whichever way you turn it you only see yourself. Got it?

Now the cure
----------------------------
Since your DSL has been identified in hdb9. The alternative of using grub-install is the Grub shell.

You can invoke the Grub shell in Mandriva and ask the Grub 0.97 to do the leg work for you as follow
Code:

grub
root (hd1,8)
setup (hd1,8)
exit

If hdb is your 2nd disk then hdb9 is (hd1,8) to Grub, as it counts from 0.

The above commands instruct Mandriva's Grub 0.97 to use the version 0.91 information from (hd1,8) root partition and setup the Grub 0.91 inside it. (I know DSL uses Grub 0.91 and Mandriva uses 0.97 version as I got them both)

grub-install is not as robust as the Grub shell. I usually go for the latter when the first one has difficulties.

PipeDreams 01-02-2006 07:53 PM

That worked!
I am using at the moment DSL which I just booted from mandrivas menu.lst at start-up.

I understand what I did now.I'm laughing at myself.The DSL partition DID boot but it booted an exact copy of mandrivas grub that I just put there.How funny.

Saikee,your last reply answered a few more questions for me also.
My mystery of the GRUB bootloader is starting to fade away.

Thank you very much.

saikee 01-03-2006 02:19 AM

You are welcome.

I enjoyed the back-to-back mirror too as I have committed the same mistake before.


All times are GMT -5. The time now is 12:08 PM.