Quote Originally Posted by please_try_again View Post
May I ask why you are hiding partitions? I actually happen to do the same thing "on the fly" with Legacy Grub. Actually I do worse, I rewrite partitions entries, so that the primary partitions have different offset and size depending on the operating system to boot. It allows me to "overlapp" BSD partitions in order to use different BSD disklabels. The purpose is to have the same BSD slices in all four BSD disklabels for data or other partitions to share between FreeBSD, NetBSD, openBSD and DragonFly BSD. I don't know how many people in the world do this. We might probably be 6 or 7. It has worked for years. Actually it still does, except that Linux (Grub2) doesn't install anymore on these machines. I think it is trying to be too clever, follow the BSD disklabels and gets confused because mine are 'unconventional' or simply gets confused with BSD disklabels in general. If I delete the partitions entries in the partition table (write 00 in each BSD primary partition 16 bytes entry), I can install any Linux which uses Grub2 without problems. Thus that's what I have to do to install Linux nowadays. Next I install my os-prober version, which supports UFS2 (unlike any other os-prober version which tries to mount these partitions read-only as UFS1 and fails) and I don't have problems. I wouldn't have "problems" with another os-prober version, just lots of errors. But I don't think the installation issue is related to os-prober. I think it is a grub2-probe issue. Your problem is probably totally different. However grub2 is very picky while scanning partitions, and you said that you're hiding partitions. If I would hide partitions by just changing their partition IDs, it wouldn't work. That's of course the first thing I tried - because changing a partition ID is easier than deleting and rewriting the entire partition entry.



I agree. I would like not to have to apply such tricks some day. I would suggest the Linux installation kernel doesn't have support for BSD disklabels (although I'm not 100% it does). That's nothing interesting it can do with that ... except completely confusing grub2-probe.



It tries to be clever. I didn't have problems at the beginning (under Ubuntu, which has been using Grub2 for a couple years). It started with Grub2 version 1.99. I wrote a post here a long time ago, as I still couldn't explain what exactly happened.

----------------------------------------------

* The disklabel (= the equivalent of the partition table) in each BSD is different and BSD disklabels are (more or less) incompatible with each other. The Linux kernel has support for the different BSD disklabels, which means that it is able to read these partition tables and create the device special files, which will allow you to mount BSD partitions (or slices) under Linux.
I hide partitons because Acronis OSS provides this feature and when I boot into an operating system I only want that system to see the partitions I make available to it. What I have found out is that Linux completely ignores the partition type when it needs to mount a partition, so hiding partitions under Linux, by changing its partition type to something other than the standard Linux 0x83 normally does nothing for me on Linux distributions. I even hid a partition which was a copy of another partition, with the same UUID, and Linux mounted the hidden partition instead of it original !!!

I do find it discouraging that grub2 would pay any attention to partition types given the situation mentioned jusrt above, especially when those partition types are not any partition currently being mounted.