Re: Grub boots from command line but not menu



On Fri, 24 Feb 2006 06:30:25 -0800, andrew.bell.ia wrote:

Douglas Mayne wrote:
On Thu, 23 Feb 2006 14:20:54 -0800, andrew.bell.ia wrote:

Thanks for your reply.

I don't have grub installed on the slackware distro. Does grub need to
be installed on each OS that it boots? I *thought* that it went to one
location to get its config file and the stage<n> stuff that was needed
to boot. I guess that I assumed once the kernel started loading, grub
was out of the picture. No?

Cheers,

Yes, once grub shows its menu it has enough info to load any file on _its_
root partition. There will be no problems if all of the files necessary
for booting every linux distribution on your machine are also located on
that partition. But, assuming your slackware kernel is on another
partition (with the slackware distro), then grub might not be able to
load it. This is because grub has the ability to read filesystems, but
only as setup. For example, if one distro is using ext2 and another is
using reiserFS, then they need separate grub stage2 files.

In this case, they are using different filesystems, so this could be
the culprit, but I still don't understand why the IDENTICAL commands
typed from the command line would work and the commands coming from the
menu on the puppy filesystem wouldn't work.

<snip>

Here's why I think it could work from the command line, and not the
menu. Note: entering WAG mode.

Assume your Puppy linux has one boot/root partition formatted ext2. The
grub loader is setup properly on that partition. When you boot it
proceeds as it should to display the grub menu. As part of the boot to
the menu, grub obtains the ability to read ext2 filesystems. It can boot
straight away into Puppy, because it's setup properly.

Assume your Slackware linux has one boot/root partition formatted ext2.
The grub loader has never been setup on the partition, partly because lilo
is the default loader for Slackware. When you try to select it from
grub's menu, grub assumes it will need to reload the stage2 file
necessary to read the type of filesystem on the partition. It
fails with the error you are seeing because that partition's BPB has never
been initialized with grub's loader (stage2). As soon as you install grub
properly on the target partition, the problem disappears.

But grub's command line works...
When you drop to grub's command line, it doesn't "forget" how to access
ext2. It tries to read the disc using whatever tools it has at that
moment

I wrote about grub and an idea for the layout of multibooting with more
than one Linux distribution here:
http://groups.google.com/group/comp.os.linux.setup/msg/17d3cfcff0cf2d0f

Notice: That link is the start of the thread.

--
Douglas Mayne
.



Relevant Pages

  • Re: Fedora Core 2/Windows XP dual boot: selecting Linux doesnt work
    ... grub is installed on the /root partition, which is the first partition on hdc: hdc1, or in grub notation. ... Stage1 is the unpatched 512-byte file, that is patched and copied to the boot record during setup. ... This byte is initialized to 0xff in the stage1 file, but patched to 0x81 in your setup, to say "we are booting from disk." ...
    (comp.os.linux.setup)
  • Re: [opensuse] Yast & Grub bootloader different.
    ... My Grub bootup menu is different than the bootloader ... that shows up on the logon screen aat boot time. ... any boot loader for that matter, can only operate on one /boot partition at ... Grub doesn't scour the all hard drives on each install ...
    (SuSE)
  • Re: [Fwd: Re: [opensuse] Boot magic]
    ... Since I installed some milestones I can no longer boot the partition I want. ... I installed on part3 milestone 6 with its own boot directory in the rootdir. ... I only use the milestone 6 grub environment against my will. ...
    (SuSE)
  • Re: Boot manager for Windows only
    ... And also is GRUB capable of booting any ... > Windows partition or will it always hand over to the XP boot loader? ...
    (comp.os.linux.setup)
  • Re: Howto fix grub after converting to reiserfs
    ... The initial load of grub is done by the BIOS, which reads the boot sectors for additional information for the boot process. ... If you still have problems, and can come up with a small bit of additional disk space, near the beginning of the disk, create a separate partition for /boot and format it as ext3, move all the files from your existing subdirectory into this new partition, edit the menu.lst file to remove all references to '/boot', edit fstab to do a mount of this partition on /boot, and reboot. ... it will perform a full install presuming the Stage 2 or Stage 1.5^10 is in its final install location. ... 0, Filesystem type is fat, partition type 0x16 ...
    (Debian-User)