Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Something [probably: obvious] I'm missing from a grub install

0 views
Skip to first unread message

Andrew Gideon

unread,
Dec 16, 2006, 6:15:26 PM12/16/06
to

I just installed CentOS 4u4 x86_64 on a supermicro based system. I do
this a lot, and typically have zero problem.

This time, something odd is occurring. I'm not sure how to interpret it.

This is a system with a pair of SATA1 drives. As I usually do in this
case, I installed with 1 small /boot partition and a larger partition
which is a physical volume for LVM. Both of these "partitions" are
actually mirrored over both drives using /dev/md (ie. software mirroring).

The kickstart file includes: "bootloader --location=mbr".

The weird symptom is that the system wouldn't boot after the install. It
progressed as far as displaying GRUB on the console, and then nothing more.

When, in the BIOS, I swapped the order in which disks are used for
booting, the system did boot w/o a problem. Note: I did not reinstall;
this was after the one install that I did. It seemed to install at least
part of the boot process on drive1 but not drive0.

Once the machine was booted, I did the following in grub:

root (hd0,0)
setup (hd0)
root (hd1,0)
setup (hd01)

Once that had been done, it would boot from either drive. So apparently
the MBR wasn't installed on both drives. Is that normal? I'd expect an
installation with /boot as a mirror to install the MBR on both drives. Is
there something special that needs to be added to the kickstart script to
achieve this?

And why would it install only on hd1 and not hd0 (as opposed to the other
way around)?

I wonder if I'd be better off with "bootloader --location=partition".

Anyone have any insight into this to share?

Thanks...

Andrew

Andrew Gideon

unread,
Dec 16, 2006, 7:41:57 PM12/16/06
to
On Sat, 16 Dec 2006 18:15:26 -0500, Andrew Gideon wrote:

>
> I wonder if I'd be better off with "bootloader --location=partition".

Yes, that worked. When I installed using this directive in the kickstart
file, I could boot from either disk w/o a problem.

I don't recall why I ever used mbr instead of partition. Is there some
advantage to the former?

- Andrew

John-Paul Stewart

unread,
Dec 16, 2006, 7:58:19 PM12/16/06
to
Andrew Gideon wrote:
>
>
> I just installed CentOS 4u4 x86_64 on a supermicro based system. I do
> this a lot, and typically have zero problem.
>
> This time, something odd is occurring. I'm not sure how to interpret it.
>
> This is a system with a pair of SATA1 drives. As I usually do in this
> case, I installed with 1 small /boot partition and a larger partition
> which is a physical volume for LVM. Both of these "partitions" are
> actually mirrored over both drives using /dev/md (ie. software mirroring).
>
> The kickstart file includes: "bootloader --location=mbr".
>
> The weird symptom is that the system wouldn't boot after the install. It
> progressed as far as displaying GRUB on the console, and then nothing more.
>
> When, in the BIOS, I swapped the order in which disks are used for
> booting, the system did boot w/o a problem. Note: I did not reinstall;
> this was after the one install that I did. It seemed to install at least
> part of the boot process on drive1 but not drive0.
>
> Once the machine was booted, I did the following in grub:
>
> root (hd0,0)
> setup (hd0)
> root (hd1,0)
> setup (hd01)
>
> Once that had been done, it would boot from either drive. So apparently
> the MBR wasn't installed on both drives. Is that normal?

GRUB has no concept of software RAID so this behaviour is normal, AFAIK.

> I'd expect an
> installation with /boot as a mirror to install the MBR on both drives.

You'd have to do that manually, since GRUB doesn't understand that
(some) /dev/md* devices are actually mirror pairs. Remember that the
MBR lies outside the partitions and that software RAID works at the
partition level. That should make the situation easier to understand.

Andrew Gideon

unread,
Dec 16, 2006, 10:24:31 PM12/16/06
to
On Sat, 16 Dec 2006 19:58:19 -0500, John-Paul Stewart wrote:

> You'd have to do that manually, since GRUB doesn't understand that (some)
> /dev/md* devices are actually mirror pairs.

I didn't think GRUB would do it; I expected the installer to do so. It
seems to be sufficiently smart in other boot-related ways (ie. /boot is
placed on the 0th partition regardless of when it is defined). So I guess
I just assumed...

Ah, well.

So is there any reason to use the mbr, then, rather than a partition? I'm
trying to recall why I ever switched to mbr (once upon a time, I used
partition).

- Andrew

Andrew Gideon

unread,
Dec 17, 2006, 1:29:07 PM12/17/06
to
On Sat, 16 Dec 2006 22:24:31 -0500, Andrew Gideon wrote:

> I'm
> trying to recall why I ever switched to mbr (once upon a time, I used
> partition).

I think I've recreated the problem.

I installed Fedora Core 5 (location=partition). It is now no longer
possible for me to install CentOS. I've tried installing
location=partition, and booting from either drive. It never boots. I've
tried installing location=mbr and booting from either drive. It never
boots.

It's the same symptom as before.

I'm futzing around with things like "bootloader --driveorder=...", but I'm
not really understanding what's occurring. It's as if something is left
over between installations that's causing problems.

I've a feeling that a low-level delete of the disks' data would solve the
problem, but that requires physical presence (to install a rescue CD) so
that's not immediately available to me.

Any suggestions?

Thanks...

- Andrew

Andrew Gideon

unread,
Dec 17, 2006, 9:28:44 PM12/17/06
to
On Sun, 17 Dec 2006 13:29:07 -0500, Andrew Gideon wrote:


> I'm futzing around with things like "bootloader --driveorder=...", but I'm
> not really understanding what's occurring. It's as if something is left
> over between installations that's causing problems.
>
> I've a feeling that a low-level delete of the disks' data would solve the
> problem, but that requires physical presence (to install a rescue CD) so
> that's not immediately available to me.

I could not get CentOS to boot regardless of the combination I tried. It
either did pretty much nothing, or it printed an infinite number of "GRUB".

But I then installed Fedora again (which worked w/o a problem). I then:

[root@168 ~]# dd if=/dev/zero of=/dev/sda bs=512 count=1
1+0 records in
1+0 records out
512 bytes (512 B) copied, 2.9e-05 seconds, 17.7 MB/s
[root@168 ~]# dd if=/dev/zero of=/dev/sdb bs=512 count=1
1+0 records in
1+0 records out
512 bytes (512 B) copied, 2.6e-05 seconds, 19.7 MB/s

Then I installed CentOS again, and it booted w/o a problem.

- Andrew

joseph2k

unread,
Dec 28, 2006, 9:33:28 AM12/28/06
to
Andrew Gideon wrote:

IIRC something is required in the MBR for a machine to boot at all, after
that where the bulk of GRUB is placed is pretty much user choice.

--
JosephKK
Gegen dummheit kampfen die Gotter Selbst, vergebens.  
--Schiller

Andrew Gideon

unread,
Jan 2, 2007, 11:43:05 AM1/2/07
to
On Thu, 28 Dec 2006 14:33:28 +0000, joseph2k wrote:

> IIRC something is required in the MBR for a machine to boot at all, after
> that where the bulk of GRUB is placed is pretty much user choice.

I don't *know* that to be true either, but it certainly makes sense to me.
After all, does BIOS understand ext2?

On the other hand, I ran a little test that seemed to indicate otherwise.
I installed with the Kickstart script told to put the boot information
into the /boot partition instead of the MBR. I also installed with
software mirroring of /boot.

This was on a system with a BIOS that permitted me to specify the order of
the drives used for booting. Either order worked.

I didn't take the logical next step, which was to try booting with one or
the other drive powered off. So I'm not *sure*. But it certainly seems
like mirroring of /boot was enough to have either disk be bootable.

Beyond all this, however, there must be something wrong with the CentOS
installer. It is not clearing out something left by Fedora, and that
something is breaking CentOS. Clearing the MBR manually cleared out that
"something" left by Fedora.

I'm happy to have this as a work around, but it's still a little odd to me.

- Andrew

0 new messages