Package: grub
Version: 0.97-27
Severity: important
Tags: patch

Hello,

on my machine, I have a separate /boot partition. I found that
update-grub did not recognize this fact, but wrote the complete path
/boot/vmlinuz... into the /boot/grub/menu.lst file.  Because of this,
the system did not boot after a call to update-grub.

I checked /sbin/update-grub. I found out that update-grub indeed looks
for mount points; nevertheless, it did not recognize it in my case. The
reason was found rather quickly: My /etc/fstab contained a line like

/dev/sda7       /boot/  ...

If I remove the trailing shlash from the mount point and make the line
look like follows, update-grub happily recognizes the mount point and
does not behave erroneously anymore:

/dev/sda7       /boot  ...

>From my understanding and what I have found so far, the original entry
in fstab is fully legal; thus, update-grub is wrong.


I rated this bug as "important" as it leaves the user's machine in a
non-booting state. In fact, my first "solution" was to replaced
update-grub with a tool that called the old update-grub and performed a
sed to fix the paths.

The attached patch fixes the problem in a straight-forward way. I am not
sure if it is the best way, however. It might be a better idea to fix
fix find_device(). I did not perform this change, as I am not sure about
any side-effects this might cause.

Note: I tested this problem with Debian Sarge, Debian Etch, and even
with a Ubuntu 6.10 system: All show the same behaviour.

Regards,
Spiro


-- System Information:
Debian Release: 4.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i586)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-4-486
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages grub depends on:
ii  libc6                       2.3.6.ds1-13 GNU C Library: Shared libraries
ii  libncurses5                 5.5-5        Shared libraries for terminal hand

grub recommends no packages.

-- debconf-show failed

Attachment: update-grub_boot.diff.gz
Description: Binary data

Reply via email to