bug-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Suggestion for Grub 2


From: Luiz alberto Medaets
Subject: Suggestion for Grub 2
Date: Sun, 11 Apr 2010 18:50:32 -0300

Suggestion:
- I found out that
GRUB_HIDDEN_TIMEOUT=X is very confusing
and
GRUB_HIDDEN_TIMEOUT_QUIET=true is useless as it make no sense to show a countdown without the menu

- My I suggest the replacement of commands
GRUB_HIDDEN_TIMEOUT=X and
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT="X"

with

GRUB_HIDE_MENU="true" (false)  #(Show / don't show menu)
GRUB_DEFAULT_TIMEOUT="X"   #(0=no countdown; -1=stop countdown; >0=effective countdown)
GRUB_FAULT_TIMEOUT="X"   #(0=no countdown; -1=stop countdown; >0=effective countdown)

As an example:
With: 00_header:
.
.
.
if [ -s /boot/grub/grubenv ]; then
  have_grubenv=true
  load_env
fi

set default="${GRUB_DEFAULT}"
set hidemenu="${GRUB_HIDE_MENU}"

if [ \${prev_saved_entry} ]; then
  saved_entry=\${prev_saved_entry}
  save_env saved_entry
  prev_saved_entry=
  save_env prev_saved_entry
fi
.
.
.
if [ \${recordfail} = 1 ]; then
  set timeout=${FAULT_TIMEOUT}
  set hidemenu=false
else
  set timeout=${DEFAULT_TIMEOUT}
fi

if [ \${timeout} = -1 ]; then
    set hidemenu=false
fi

As you can see in this example:

If recordfail=0 (normal BOOT)

   - timeout will be = DEFAULT_TIMEOUT
    - menu isn't displayed If GRUB_HIDE_MENU="true" and DEFAULT_TIMEOUT=NOT(-1)

If recordfail=1 (BOOT after BOOT fail)

- timeout will be = FAULT_TIMEOUT
    - menu is displayed regardless of GRUB_HIDE_MENU="true"


With:
GRUB_HIDE_MENU="true"
GRUB_DEFAULT_TIMEOUT="0"
GRUB_FAULT_TIMEOUT="10"

you will have:

If recordfail=0 (normal BOOT)

   - timeout will be = 0
    - menu isn't displayed

If recordfail=1 (BOOT after BOOT fail)

- timeout will be = 10 (unattended retry after 10 sec)
    - menu is displayed regardless of GRUB_HIDE_MENU="true"

With:
GRUB_HIDE_MENU="true"
GRUB_DEFAULT_TIMEOUT="0"
GRUB_FAULT_TIMEOUT="-1"

you will have:

If recordfail=0 (normal BOOT)

   - timeout will be = 0
    - menu isn't displayed

If recordfail=1 (BOOT after BOOT fail)

- timeout will be halted and wait for user to choose what kernel to BOOT with
    - menu is displayed regardless of GRUB_HIDE_MENU="true"

Modifications on 30_os_prober has to be done to suit this sugestion


-- 
Regars,
Luiz Alberto Medaets
address@hidden


reply via email to

[Prev in Thread] Current Thread [Next in Thread]