[CentOS] Kernel panic after removing SW RAID1 partitions, setting up ZFS.

Wed Apr 10 16:33:26 UTC 2019
Warren Young <warren at etr-usa.com>

On Apr 10, 2019, at 9:38 AM, Benjamin Smith <lists at benjamindsmith.com> wrote:
> 
> For some reason, you *cannot* have a partition of type GPT and expect 
> Linux to boot. (WT F/H?!?) 

I believe you were trying to make use of a facility invented as part of the GPT Protective Partition feature without understanding it first:

   https://en.wikipedia.org/wiki/GUID_Partition_Table#Protective_MBR_(LBA_0)

As a normal user, there is no good cause to be changing an MBR partition’s type to GPT in this way.  It’s a feature that only GPT partitioning tools should be making use of, and then only to prevent legacy OSes from interfering with actual GPT partitioning schemes.

In other words, you’ve mislead the boot loader into trying to seek out an *actual* GPT partition table, which doesn’t exist, giving the symptom you saw.

I’ve never used ZFS with MBR partitions.  Normally I feed it whole disks, in which case the ZoL zpool implementation will create GPT partition tables and give the first partition code BF01.  That means type BF *might* be the correct value on MBR.

I suspect you could just as well use type 83 (Linux generic) for this, since that doesn’t refer to any specific file system.  Properly-written utilities do metadata probing to figure out what tools to use with it, so putting ZFS on a type 83 MBR partition should be harmless, since only ZFS tools will admit to being able to do anything with it.