Bug#560415: grub-common: /etc/grub.d/30_os-prober detects and creates entries for an external backup disk!

Francesco Poli (t1000) frx at firenze.linux.it
Thu Dec 10 23:34:22 UTC 2009


Package: grub-common
Version: 1.97~beta3-1
Severity: normal

Hello and thanks for maintaining GRUB in Debian.

On a recently installed Debian testing box, I had the first Linux kernel
upgrade the other day, due to the testing-security update
(linux-image-2.6.30-2-amd64/2.6.30-8squeeze1).

During the upgrade, upgrade-grub was apparently invoked, as it should.

After the reboot I found two additional spurious entries in the GRUB menu.
By inspecting /boot/grub/grub.cfg , I see that the two entries were
added by 30_os-prober:

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Debian GNU/Linux, Linux 2.6.30-2-amd64 (on /dev/sdc1)" {
        linux /boot/vmlinuz-2.6.30-2-amd64 root=/dev/md0 ro quiet
        initrd /boot/initrd.img-2.6.30-2-amd64
}
menuentry "Debian GNU/Linux, Linux 2.6.30-2-amd64 (recovery mode) (on /dev/sdc1)" {
        linux /boot/vmlinuz-2.6.30-2-amd64 root=/dev/md0 ro single
        initrd /boot/initrd.img-2.6.30-2-amd64
}
### END /etc/grub.d/30_os-prober ###

The problem is that /dev/sdc1 is a partition on an external USB hard drive,
where I complete backup of the system is performed nightly with rsync.

It seems that os-prober inspected this external USB disk (that was not
mounted during the package upgrades) and found the backup of the Linux kernel
image:

  # os-prober 
  /dev/sdc1:Debian GNU/Linux (squeeze/sid):Debian:linux

I seem to remember that grub even complained about not finding /dev/sdc
in the device.map...

Well, IMHO /etc/grub.d/30_os-prober is being overzealous here: it even
wants to create entries for a backup disk...

I don't know if it can become smart enough to distinguish between backup
partitions and other actual OSes.

Anyway, is it possible to disable one device or, at least, to disable
30_os-prober entirely?
I cannot find the Right Way™ to do so.




-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (800, 'testing'), (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.30-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages grub-common depends on:
ii  base-files             5.0.0             Debian base system miscellaneous f
ii  libc6                  2.10.2-2          GNU C Library: Shared libraries
ii  libfreetype6           2.3.11-1          FreeType 2 font engine, shared lib
ii  libncurses5            5.7+20090803-2    shared libraries for terminal hand
ii  zlib1g                 1:1.2.3.3.dfsg-15 compression library - runtime

Versions of packages grub-common recommends:
ii  os-prober                     1.35       utility to detect other OSes on a 

Versions of packages grub-common suggests:
pn  multiboot-doc                 <none>     (no description available)

-- no debconf information





More information about the Pkg-grub-devel mailing list