[Smaug] Grub problems

Rick Moen rick at linuxmafia.com
Fri Jun 18 12:30:41 PDT 2004


Quoting Jacob Hunter (jmhunter83 at yahoo.ca):

> Hey all
> I compiled my own kernel for my xbox.  I am having trouble getting Grub 
> to start it

Hmm, it might be useful to know the failure symptom more precisely.
It could make a really big difference, in narrowing down what's causing
the problem.  You have that information in front of you, on-screen, when
you attempt to boot, but the rest of us can't see it, so you really
ought to include it (selectively) along with your question.

> It lives in /boot/bzImage

By the way -- just as an aside -- you probably want to rename the kernel
image file to something more descriptive, e.g., /boot/vmlinuz-2.4.20-xbox .

> this is what I have, what am i doing wrong
> 
> # grub.conf generated by anaconda
> #
> # Note that you do not have to rerun grub after making changes to this 
> file
> # NOTICE:  You have a /boot partition.  This means that
> #          all kernel and initrd paths are relative to /boot/, eg.
> #          root (hd0,0)
> #          kernel /vmlinuz-version ro root=/dev/hda3
> #          initrd /initrd-version.img
> #boot=/dev/hda
> default=0
> timeout=10
> splashimage=(hd0,0)/grub/splash.xpm.gz
> title Red Hat Linux (2.4.20-8)
>         root (hd0,0)
>         kernel /vmlinuz-2.4.20-8 ro root=LABEL=/
>         initrd /initrd-2.4.20-8.img
> title X-Box Linux 2.4.20
>         root (hd0,0)
>         kernel /boot/bzImage ro root=LABEL=/
>         initrd /boot/initrd-2.4.20-xbox.img

If it'll help, I see nothing wrong with your GRUB setup, so I infer that
there must be something problematic with the kernel images, initial
RAMdisk, and/or modules you compiled.  

Don't get discouraged, though!  It's really, really, _really_ common for
your first few efforts at compiling a kernel to produce a setup that
crashes and burns.  I can't tell you how many times I've done that,
usually through omitting crucial drivers from the kernel image or
initrd[1] or just not compiling them at all.

Here's what looks to be a decent tutorial on compiling kernels for
modern Red Hat systems using GRUB:
http://www.start-linux.com/articles/article_140.php

[1] E.g., you have an IDE system, but compiled the IDE HD driver as a
module.  Sounds good if you don't stop to think about one uncomfortable
question:  How's the kernel going to find and load it, given that you've 
just set up a situation where the kernel needs IDE support to load IDE
support.

There are innumerable other ways to shoot yourself in the foot.  E.g.,
generic VGA console _used_ to be automatically built into the kernel;
then, one day, it was a separate driver that you could easily omit by
accident -- and I immediately did so.  I wondered for a good long while
why I was seeing no screen output!

At least you're ahead of the game because you've retained the ability to
boot your old, known-good kernel that Red Hat furnished precompiled.
Burning your bridges is a common mistake among people new to kernel
compilation.

-- 
Cheers,        "A raccoon tangled with a 23,000 volt line, today.  The results
Rick Moen       blacked out 1400 homes and, of course, one raccoon."
rick at linuxmafia.com                                  -- Steel City News



More information about the Smaug mailing list