# Calculate format=diff
Исключить дублирование записей, при использовании одного и того же файла grub.cfg
diff --git a/linux-boot-probes/mounted/common/40grub2 b/linux-boot-probes/mounted/common/40grub2
index 885614e..e5064fb 100755
--- a/linux-boot-probes/mounted/common/40grub2
+++ b/linux-boot-probes/mounted/common/40grub2
@@ -97,7 +97,7 @@ if [ -e "$mpoint/boot/grub/grub.cfg" ] && \
    ([ ! -e "$mpoint/boot/grub/menu.lst" ] || \
     [ "$mpoint/boot/grub/grub.cfg" -nt "$mpoint/boot/grub/menu.lst" ]); then
 	debug "parsing grub.cfg"
-	parse_grub_menu "$mpoint" "$partition" "$bootpart" < "$mpoint/boot/grub/grub.cfg"
+	sed -r '/BEGIN.*os-prober/,/END.*os-prober/d' "$mpoint/boot/grub/grub.cfg" | parse_grub_menu "$mpoint" "$partition" "$bootpart"
 elif [ -e "$mpoint/boot/grub2/grub.cfg" ]; then
 	debug "parsing grub.cfg"
 	parse_grub_menu "$mpoint" "$partition" "$bootpart" < "$mpoint/boot/grub2/grub.cfg"
