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

Bug#1008204: os-prober: No need in probing ploop devices



Package: os-prober
Severity: normal

Dear Maintainer,

Ploop is a block device used by OpenVZ / Virtuozzo containers:

  https://wiki.openvz.org/Ploop
  https://manpages.ubuntu.com/manpages/xenial/man8/ploop.8.html

Currently on a system with running containers, os-prober
checks their ploop devices and thus analyzes OSes inside them. e.g:

  ...
  Found CentOS Linux release 7.7.1908 (Core) on /dev/ploop12024p1 
  ...

However, this has nothing to do with the main system and such entries
should not go tothe host grub menu.

Moreover, such a scan slows down os-prober work if we have many containers on the system.

This can be easily fixed by a patch like the following:2

diff --git a/os-prober b/os-prober
index ccfdf13..8e69c56 100755
--- a/os-prober
+++ b/os-prober
@@ -37,6 +37,10 @@ partitions () {
                # Exclude partitions on physical disks that are part of a
                # Serial ATA RAID disk.
                for part in /sys/block/*/*[0-9]; do
+                       if [ "${part:0:16}" = "/sys/block/ploop" ]; then
+                               # Skipping ploop devices
+                               continue
+                       fi
                        if [ -f "$part/start" ] && \
                           [ ! -f "$part/whole_disk" ] && ! on_sataraid $part; then
                                name="$(echo "${part##*/}" | sed 's,[!.],/,g')"


-- System Information:
Debian Release: 8.11
Architecture: amd64 (x86_64)

Kernel: Linux 3.16.0 (SMP w/48 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)


Reply to: