Bug#560417: #560417 grub-legacy: update-grub failure

Apollon Oikonomopoulos apoikos at gmail.com
Wed May 11 10:29:04 UTC 2011


On 14:12 Wed 17 Mar     , Axel Beckert wrote:
> Hi,
> 
> I just ran into the very same problem, but with different start and
> workaround:

Hi, just ran into the same problem. The problem originates in line 330 
of /usr/sbin/update-grub (grub-legacy 0.97-64):

-----
echo -n "Searching for default file ... " >&2
if [ -f "$default_file" ] ; then
  echo "found: $default_file" >&2
else
  echo "Generating $default_file file and setting the default boot entry to 0" >&2
  if [ -f /usr/lib/grub-legacy/grub-set-default ] ; then
    /usr/lib/grub-legacy/grub-set-default $1
  else
    grub-set-default $1
  fi
fi
----

Notice that update-grub calls grub-set-default passing the first positional
argument instead of 0 (as per the log message). This part of the code lies in
update-grub's main body, so it actually passes the first positional argument of
update-grub itself to grub-set-default.

In other words, running `update-grub 0' works. I don't know if this was
intentional or not, but it is clearly a behaviour change from lenny's version
and also not documented anywhere.

Thanks,
Apollon





More information about the Pkg-grub-devel mailing list