Bug 470730 - Grub won't install in 'silent mode' with 'grub-install'
Grub won't install in 'silent mode' with 'grub-install'
Product: Fedora
Classification: Fedora
Component: grub (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Peter Jones
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2008-11-09 13:06 EST by Corentin Perard-Gayot
Modified: 2008-11-12 08:58 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-11-12 08:58:44 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Corentin Perard-Gayot 2008-11-09 13:06:44 EST
Description of problem:
After having reinstalled grub with the "grub-install /dev/sda" command,
grub works fine except for the 'silent mode' that is not triggered : grub still displays 'booting Fedora ( in xx s"

I can see the 'solar' grub background behind the letters but not around.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.open a terminal window, enter su - mode
2.type 'grub-install /dev/your_hd'
Actual results:
grub displays "booting Fedora ( in xx s"

Expected results:
'silent mode' described there : http://fedoraproject.org/wiki/Features/BetterStartup#Tasks

Additional info:
Comment 1 Mads Kiilerich 2008-11-11 19:57:54 EST
Is this a new installation or an upgrade?

Could you attach your /etc/grub.conf?
Comment 2 Corentin Perard-Gayot 2008-11-12 06:03:33 EST
(In reply to comment #1)
> Is this a new installation or an upgrade?
> Could you attach your /etc/grub.conf?

It is a fresh install. But I made a mistake in the first bug report. the exact command I typed was "grub-install /dev/sda2" where /dev/sda2 contains the fedora 10 install (WITH /boot, it is not a separate patition), and the command was run from this install.

It is unlikely that a grub-install /dev/sda changed anything, right ?

maybe grub-install have changed something in my /boot directory that led to this ?

here is my grub.conf :

# grub.conf generated by anaconda
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You do not have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /, eg.
#          root (hd0,1)
#          kernel /boot/vmlinuz-version ro root=/dev/sda2
#          initrd /boot/initrd-version.img
title Fedora (
        root (hd0,1)
        kernel /boot/vmlinuz- ro root=UUID=3034eca0-ba4d-4ec9-bef4-399b1c6a18f6 rhgb quiet vga=791
        initrd /boot/initrd-
Comment 3 Mads Kiilerich 2008-11-12 06:43:34 EST
Are you sure you want to install grub to /dev/sda2? Usually /dev/sda is used. Are you sure anaconda installed bootloader on sda2?

And why do you want to run grub-install at all?

How is your disk layout? Output of "fdisk -l"? Where do you have and want which bootloader?

But ... as far as I know then anaconda uses booty to write grub.conf. And as far as I can see it will always insert a chaintimeout line. So something is not what it pretends to be ...

AFAIK booty also defaults to timeout=0, and that is what makes grub not display the "Booting %s in %d seconds..." message.
Comment 4 Corentin Perard-Gayot 2008-11-12 07:00:59 EST
That's the scenario :

* I installed F10 beta with the DVD on /dev/sda2. I let anaconda install the bootloader, and grub into /boot
* I installed another distro on /dev/sda1 that erased the MBR. I managed to boot my F10 part with this distro's grub.
* Then I wanted to reinstall the mbr but I made a mistake and typed grub-install /dev/sda2 . I know I shouldn't have done that but it also shouldn't have messed up with the 'silent mode' as it should install an F10 grub.
* the reason why there is timeout=3 is because I changed it manually when grub used to run without errors (before the grub-install), and it worked, I mean, at least,it didn't make grub display anything.

now : fdisk -l
Disque /dev/sda: 120.0 Go, 120034123776 octets
255 heads, 63 sectors/track, 14593 cylinders
Units = cylindres of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000a271d

Périphérique Amorce    Début         Fin      Blocs    Id  Système
/dev/sda1   *           1        3265    26226081   83  Linux
/dev/sda2            3397        5446    16466625   83  Linux
/dev/sda3            3266        3396     1052257+  82  Linux swap / Solaris
/dev/sda4            5447       14593    73473277+  83  Linux

Les entrées de la table de partitions ne sont pas dans l'ordre du disque
Comment 5 Mads Kiilerich 2008-11-12 07:41:43 EST
I am pretty sure that running grub-install on sda2 didn't change anything if you also have installed on sda (unless you have a chainloader to sda2).

But timeout=3 is really what causes the messages in grub:

      int print_message = grub_timeout != 0;
      if (print_message)
        grub_printf("\rPress any key to enter the menu\n\n\n");
              if (print_message)
                grub_printf ("\rBooting %s in %d seconds...",

What happens if you set timeout=0 ?
Comment 6 Corentin Perard-Gayot 2008-11-12 08:12:02 EST
Duh... It works.

my grub.conf originally had timeout=5 (I guess the beta installer put it this way) and it used to work. I just changed to timeout=3 because I used to do the same with older releases of fedora. I saw no change in the boot sequence until I ran grub-install.

So I guess this is not a bug anymore...apart from making sure anaconda now puts timeout=0.... And this strange behavior (no background, except around the letters, but I guess this has to do with the grub_printf function)

thanks !
Comment 7 Mads Kiilerich 2008-11-12 08:45:43 EST
If are feel like it you can set the status to close/worksforme. (I can't)

Note You need to log in before you can comment on or make changes to this bug.