From owner-freebsd-questions@freebsd.org Thu Jun 21 16:41:06 2018 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 86D7710238E1 for ; Thu, 21 Jun 2018 16:41:06 +0000 (UTC) (envelope-from kudzu@tenebras.com) Received: from mail-qk0-x22b.google.com (mail-qk0-x22b.google.com [IPv6:2607:f8b0:400d:c09::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1946E8444B for ; Thu, 21 Jun 2018 16:41:06 +0000 (UTC) (envelope-from kudzu@tenebras.com) Received: by mail-qk0-x22b.google.com with SMTP id a195-v6so2109112qkg.3 for ; Thu, 21 Jun 2018 09:41:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tenebras-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=8f883DrE45q9veANIAbcvoUrMUItv8N9av+WA4465ME=; b=exthN8AuntX9zcCbis8yCjTm1/xYt5dnCl6+bpWDQfJyaresMGSy0wuu8VWLUenc1U t048otv785S7gwQobmeBiBhbo+t9rotQuBEYVmY2OAlp3EVTTGWqDkp+6FYBozAkTH3f eF1R84zzZdWVGZBF2QPAtYSrfBhy7aXiEZEwbUULE3uqO6cK9tOKXEZ8z+lU8S0Sxqxc y63voGkPqerv8OMRzix0KQxsAi56t5O6ArNN9RrBsx1GyhP4urAFT6GVEZTD2kCx+4a0 KBIapiJl2WkAZvBJeP1ZwYkdnG+38H7Q7efr2xes9zcma4xDb755TiKsCxL9ox6AhIGS oRIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=8f883DrE45q9veANIAbcvoUrMUItv8N9av+WA4465ME=; b=lNi+2cAbzVXwawtxDHLSoAMgKfLrsmj7eE5WvAYSwDRWZ58pU8K0wDkYxaVJB08GK4 gf+OkUTrZKTPcDLcfsJoaiQUunkB0BZEJq4MlpKu7CONaz5whVUn3w4EtBig8tWxXqgw 8jN8u0ICO0RKPqehIrtOE/MVS72xkiAQSZd2/2/p5fYbjocM10MQ/HMHG09Xqlb5zcQ0 Q0zeWTOWvTMLmUBsWvZL3rzwM/lVgn4dpHYpZO1iMUP73bku3rIcteoguAROoCcmEHa3 v1Cz3vQkjoJhHqe0qZT6Vn0d8Tse3hVLH1pGlYawJ6rGWFn5TAkgZLs8jWpfWIXSQ3hV WTaQ== X-Gm-Message-State: APt69E0khwY4ad1m8WlSZqdWDZO2LsTMAPjAr7Au6ewTuTZLm8XOknCf KhAfVP7BGZhgRk5CcA57kMmWN4JaSGpgHFqyQ8cMgDwpT5I= X-Google-Smtp-Source: ADUXVKJBEsNR0p5jBbpVBGDH/7U8CW/2c88FZ2B8twRitoiJJW2xJEgTy2OKrgjseL0Rg4ape8rXpLdJVNCKS4bkMLU= X-Received: by 2002:ae9:eb89:: with SMTP id b131-v6mr21304793qkg.60.1529599265174; Thu, 21 Jun 2018 09:41:05 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:ac8:297d:0:0:0:0:0 with HTTP; Thu, 21 Jun 2018 09:41:04 -0700 (PDT) In-Reply-To: References: <024a7da5-4d80-960c-9479-34fef887ff35@yandex.com> From: Michael Sierchio Date: Thu, 21 Jun 2018 09:41:04 -0700 Message-ID: Subject: Re: Minimum size of freebsd-boot To: FreeBSD Questions Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jun 2018 16:41:06 -0000 It's worth mentioning that if you're going to reuse a disk with a gpart table already on the disk, do something to remove it offset=3D`diskinfo $DISK | awk '{ print $4 - 129 }'` dd if=3D/dev/zero of=3D/dev/$DISK bs=3D64k count=3D1 dd if=3D/dev/zero of=3D/dev/$DISK seek=3D$offset On Thu, Jun 21, 2018 at 9:39 AM, Michael Sierchio wrote: > > > On Thu, Jun 21, 2018 at 9:15 AM, Manish Jain > wrote: > > >> >> > Under GPT, FreeBSD needs a freebsd-boot partition of max size 512 KB..= . > > Not so. 64k works just fine. The binary /boot/gptboot is 60258 bytes. A > snippet of the code I use to build hosts. Note that subsequent partitions > are forced to be aligned on 64k boundaries. > > # add boot partition > > # p1 > > gpart add -t freebsd-boot -l ${PFX}-boot -s 64k ${DISK} > > > # put boot code in boot partition > > gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 ${DISK} > > > # add root, make sectors aligned > > # p2 > > gpart add -t freebsd-ufs -l ${PFX}-root -a 64k -s ${ROOTSIZ} ${DISK} > > > > > > -- > "Well," Brahma said, "even after ten thousand explanations, a fool is no > wiser, but an intelligent person requires only two thousand five hundred.= " > > - The Mah=C4=81bh=C4=81rata > --=20 "Well," Brahma said, "even after ten thousand explanations, a fool is no wiser, but an intelligent person requires only two thousand five hundred." - The Mah=C4=81bh=C4=81rata