From owner-freebsd-questions@freebsd.org Wed Jan 1 15:39:59 2020 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E300F1D888F for ; Wed, 1 Jan 2020 15:39:59 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.135]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.kundenserver.de", Issuer "TeleSec ServerPass Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47nwMy6MjSz425J for ; Wed, 1 Jan 2020 15:39:58 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from r56.edvax.de ([178.5.227.248]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.167]) with ESMTPA (Nemesis) id 1Ml3ym-1jRBuX1xme-00lXMP; Wed, 01 Jan 2020 16:39:05 +0100 Date: Wed, 1 Jan 2020 16:39:02 +0100 From: Polytropon To: "Thomas Mueller" Cc: freebsd-questions@freebsd.org Subject: Re: Need help trying to recompile kernel with EBR functionality Message-Id: <20200101163902.60776151.freebsd@edvax.de> In-Reply-To: <202001011526.001FQUeA001903@r56.edvax.de> References: <202001011526.001FQUeA001903@r56.edvax.de> Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:EGyGaO7AlnOgFEV/RtsFKnSY8jkIPV2lSdIZP2otOZ8dAJz+rJ1 4gZBLRO4JQsnRpvxfZ6vRQc5R9d3U9aD6WzDvtrXgqOvBfntKJVgTGMffADOA/co2YXXjRf yTuYjePMJ9UEex7vR37LXkEqmCBMBY+YpbeTaRf7GmTsnPFbRezzEyp3QtblaT+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org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of freebsd@edvax.de has no SPF policy when checking 212.227.126.135) smtp.mailfrom=freebsd@edvax.de X-Spamd-Result: default: False [4.48 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; HAS_REPLYTO(0.00)[freebsd@edvax.de]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; HAS_ORG_HEADER(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; FREEMAIL_TO(0.00)[twc.com]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:8560, ipnet:212.227.0.0/16, country:DE]; MIME_TRACE(0.00)[0:+]; RECEIVED_SPAMHAUS_PBL(0.00)[248.227.5.178.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.11]; ARC_NA(0.00)[]; REPLYTO_EQ_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[edvax.de]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.83)[0.832,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(0.94)[0.936,0]; MID_CONTAINS_FROM(1.00)[]; RCVD_IN_DNSWL_NONE(0.00)[135.126.227.212.list.dnswl.org : 127.0.5.0]; R_SPF_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; IP_SCORE(0.32)[ip: (0.53), ipnet: 212.227.0.0/16(-1.17), asn: 8560(2.23), country: DE(-0.02)] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jan 2020 15:39:59 -0000 On Wed, 01 Jan 2020 06:19:33 +0000, Thomas Mueller wrote: > > 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 A little sidenote: Do not change that file. All your kernel configurations should be in the kernel configuration file. In order to deviate from the defaults, use "nooption " to disable an existing option, and (as shown correctly) "option " to add an additional one; same for "device" and "nodevice". > > 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. This often is not an option for multi-OS settings because it lacks boot selection (through FreeBSD's boot manager), and the support across different operating systems (for example, read partition of of OS 1 from OS 2) sometimes causes trouble when GPT is involved. > 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. The "DOS extended partition" (which contains "logical volumes") is not to be addressed directly; instead the "logical volumes" inside it are. And that's completely okay for non-bootable partitions (such as data partitions). So basically there are 3 "DOS primary partitions" (bootable - 3 systems), one "slot" for the "DOS extended partition", and inside it, any further partitions needed, for example shared /home partitions for Linux. FreeBSD itself does not need any of this. ;-) > 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. If I remember the numbering system correctly, s1 - s4 are reserved for "DOS primary partitions" - slices. The "logical volumes" as well as the "DOS extended partition" containing them have a higher "s value". > 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. So if ada0s5 is the "DOS extended partition", it's absolutely understandable that no partition (read: slice) can be found. I think the problem here is that the number is wrong. It's worth verifying the correct numbers with gpart. The "logical volumes" that need to be addressed (as a "slice equivalent") then probably should be ada0s6 and so on. > 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. In the past, I used FreeBSD's ye olde fdisk for partition creation, it worked, but the common suggestion was to use the OS that would be _using_ the partition for initializing it, and adding the required file systems. WIth goart, however, this should basically work. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...