grub-devel
[Top][All Lists]
Advanced

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

[PATCH] Skip partitions during OS probing


From: Axel Kellermann
Subject: [PATCH] Skip partitions during OS probing
Date: Sat, 09 Jul 2011 23:43:34 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110516 Thunderbird/3.1.10

Hello devels,

I attached a patch I use on my machine to skip certain predefined
partitions during OS probing by grub-mkconfig/30_os-prober. I started to
work on this as grub2 adds the Win7 system partition of my dual-booted
laptop to the boot menu, although only Win7s boot partition is actually
needed. Not a big error, but it bugged me... ;)
But apart from this special case on my machine, I think it is handy to
have a standardized way to exclude certain partitions from being
auto-probed during execution of update-grub.

The patch updates two files. grub-mkconfig.in now exports an additional
user variable called GRUB_SKIP_PARTITIONS, 30_os-prober.in adds a few
lines to check whether the currently probed partition is contained in
GRUB_SKIP_PARTITIONS, and if so, skips addition of the boot menu entry.

To skip one ore more partitions during OS probing, the user has to add
the variable GRUB_SKIP_PARTITIONS to the grub config file
(/etc/default/grub) and provide it with a space delimited list of
partition names (e.g. GRUB_SKIP_PARTITIONS="sda2 sdb3").

I created the patch with the command 'bzr patch -p1'. If that is not the
correct way, please let me know. I'm also open for suggestions on
improving the patch.


Please let me know what you think,
thanks for the good work,

Axel

Attachment: skip_partitions.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]