Hi, I have the same problem, update-grub adds a backup partition to
the grub.cfg.

Even if the os-prober gets a blacklisting option, I think the grub
config updater should also be able to blacklist devices that the user
explicitly don't want to be added.

I've made a small patch for the 30_os-prober script that allows you to
blacklist devices by adding an option in /etc/default/grub
As an example, to blacklist sda3 and sda1:

GRUB_DEV_BLACK_LIST="/dev/sda3 /dev/sda1"


Hope it can be useful.

-- 
Linux Registered User # 386081
A menudo unas pocas horas de "Prueba y error" podrĂ¡n ahorrarte minutos
de leer manuales.
--- 30_os-prober.orig	2010-03-11 16:21:15.000000000 -0500
+++ 30_os-prober	2010-03-11 17:30:41.000000000 -0500
@@ -22,6 +22,14 @@
 
 . ${libdir}/grub/grub-mkconfig_lib
 
+# for some reason the grub config doesn't load here so we
+# add it again
+
+sysconfdir=/etc
+if test -f ${sysconfdir}/default/grub ; then
+  . ${sysconfdir}/default/grub
+fi
+
 if [ "x${GRUB_DISABLE_OS_PROBER}" = "xtrue" ]; then
   exit 0
 fi
@@ -94,6 +102,12 @@
   LABEL="`echo ${OS} | cut -d ':' -f 3 | tr '^' ' '`"
   BOOT="`echo ${OS} | cut -d ':' -f 4`"
 
+  if $(echo ${GRUB_DEV_BLACK_LIST} | grep -q "\B${DEVICE}\b"); then
+    # skip this device
+    echo "Skipping device: ${DEVICE}" >&2
+    continue
+  fi
+
   if [ -z "${LONGNAME}" ] ; then
     LONGNAME="${LABEL}"
   fi

Reply via email to