Need help trying to recompile kernel with EBR functionality

Thomas Mueller mueller6722 at twc.com
Wed Jan 1 06:19:11 UTC 2020


> I am a long time user of FreeBSD but have never recompiled my kernel.


> I am trying to compile a custom 12.1 amd64 kernel with the ability to add/delete EBR partitions, but the online documentation did not help and I ended up losing EBR functionality entirely.


> The steps I followed were as under :


> 1) copied [/usr/src/sys/amd64/conf/]GENERIC as EBRKERNEL

> 2) commented out GEOM_PART_EBR_COMPAT in [/usr/src/sys/amd64/conf/]DEFAULTS

> 3) inserted 'options GEOM_PART_EBR' into my kernel configuration file EBRKERNEL

> 4) cd /usr/src

> 5) make buildkernel KERNCONF=EBRKERNEL

> 6) make installkernel KERNCONF=EBRKERNEL


> When I shutdown the system and rebooted into the new kernel, the boot process halted complaining that it could find any device /dev/ada0s5 (the EBR partition).


> What am I doing wrong ? Any help in getting me a good custom kernel with the ability to add/delete EBR partitions would be greatly appreciated.

> Thank you & Regards,
> Manish Jain

I am rather confused here.  My first inclination would be to suggest you switch to GPT.

Using MBR, you get up to 4 partitions, of which one may be an extended boot record.  That partition is a container for logical-partition data, not a partition that can be mounted or copied to or from.

It seems to me the EBR partition would be s1, s2, s3, or s4 but no higher.  I'd need to see your full partition table data, such as you get with "fdisk -lu" in Linux, or you can use gpart with "show" in FreeBSD.

Maybe you have the wrong partition name (ada0s5)?  You can go to the loader prompt and get a rough idea of what's in the partitions, and change the root partition to boot into.

I have created logical partitions with Linux fdisk but never any BSD fdisk.  I believe there is a linuxfdisk in FreeBSD ports, category would be sysutils to the best of my memory.

Tom



More information about the freebsd-questions mailing list