From nobody Sat Jan 29 21:49:19 2022 X-Original-To: freebsd-stable@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 2652A1984D20 for ; Sat, 29 Jan 2022 21:49:38 +0000 (UTC) (envelope-from uspoerlein@gmail.com) Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JmSf90NRrz4mwR; Sat, 29 Jan 2022 21:49:37 +0000 (UTC) (envelope-from uspoerlein@gmail.com) Received: by mail-wr1-f48.google.com with SMTP id h21so17785560wrb.8; Sat, 29 Jan 2022 13:49:37 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=SAIf0rx/S18phRIUAYf7RrEMERdJWQRJCaKEA6YTxp0=; b=Ugrm4kfOGNLIdxoe5nlZ+56z//1pJHS5ElLbzmL8bhw21mQ2yykZXvfFAfYfNss9Iw fNie2VMP/f39NAM6nBa0h6rQnm+RK1/LGQzM4JsiU15pBgJP2jBj/lDQ+ZMop67jEZFG z9MTzBJvhjAEXVy+mva03YI8i19OgQ6Lc471rP3dAU3zTyC1h/BIi5djkKUM2xZQKDLu JWCAPhEaQ91sQLyJiGc+e9OLCAxQzdXF2uri5FUqAK++B4CS7j4aqDOduoLjDVwi6lBL 37xBBa4soNobrRJH8cK6BNb75IOx/iUOX+CxTm9+gHLWxtL5FHi1vKWk01cENoFKeWMt k0HQ== X-Gm-Message-State: AOAM530/Ktd9FDgNqCaP9dLXHM+VUXQm3PQWJgSezK5MR7wZvbUElUIz yqHqHY8nNnBEjzRrUU0NeVtKLuLpOdBVDWa42/8+x6Hw X-Google-Smtp-Source: ABdhPJx54uLMvtrAbCVFeTY80g8c5Cp4tC693d350q1f4TInCOSgWKo3dx68nJroTpYsY3/y6e+YBYkjdsWZfIB5zWs= X-Received: by 2002:a5d:47cd:: with SMTP id o13mr11896289wrc.300.1643492970412; Sat, 29 Jan 2022 13:49:30 -0800 (PST) List-Id: Production branch of FreeBSD source code List-Archive: https://lists.freebsd.org/archives/freebsd-stable List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-stable@freebsd.org X-BeenThere: freebsd-stable@freebsd.org MIME-Version: 1.0 References: <212cfd90-056f-d294-ae9c-fd2b632ae679@FreeBSD.org> <20220130030618.dd46cf514f98cdfa6caa1ad4@dec.sakura.ne.jp> In-Reply-To: <20220130030618.dd46cf514f98cdfa6caa1ad4@dec.sakura.ne.jp> From: =?UTF-8?Q?Ulrich_Sp=C3=B6rlein?= Date: Sat, 29 Jan 2022 22:49:19 +0100 Message-ID: Subject: Re: gptzfsboot can't boot from 4TB SSD To: Tomoaki AOKI Cc: Eugene Grosbein , freebsd-stable@freebsd.org, Andriy Gapon Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4JmSf90NRrz4mwR X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of uspoerlein@gmail.com designates 209.85.221.48 as permitted sender) smtp.mailfrom=uspoerlein@gmail.com X-Spamd-Result: default: False [-0.44 / 15.00]; RCVD_TLS_ALL(0.00)[]; R_MIXED_CHARSET(0.56)[subject]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[freebsd.org]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_SPAM_SHORT(1.00)[1.000]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.221.48:from]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; MLMMJ_DEST(0.00)[freebsd-stable]; FORGED_SENDER(0.30)[uqs@freebsd.org,uspoerlein@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.221.48:from]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[uqs@freebsd.org,uspoerlein@gmail.com]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RCVD_COUNT_TWO(0.00)[2] X-ThisMailContainsUnwantedMimeParts: N On Sat, Jan 29, 2022 at 7:06 PM Tomoaki AOKI wr= ote: > On Sat, 29 Jan 2022 13:24:06 +0100 > Ulrich Sp=E3=80=93rlein wrote: > > Thanks everyone, I managed to repurpose the swap partition to a root > > UFS partition and > > managed to copy everything over. What's puzzling is that I still get > > zio_read errors. > > > > It looks like so now: > > root@coyote:~# gpart show > > =3D> 40 7814037088 ada0 GPT (3.6T) > > 40 1024 1 freebsd-boot (512K) > > 1064 16777216 2 freebsd-ufs [bootme] (8.0G) > > 16778280 16778200 4 freebsd-swap (8.0G) > > 33556480 7780478976 3 freebsd-zfs (3.6T) > > 7814035456 1672 - free - (836K) > > > > and I ran this to replace gptzfsboot with gptboot (or so I thought): > > # gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 ada0 > > > > But after rebooting, I get these errors on the console still. Why > > would gptboot try to read zfs metadata? > > > > /boot/config: -Dh > > Consoles: internal video/keyboard serial port > > BIOS drive C: is disk0 > > zio_read error: 5 > > zio_read error: 5 > > zio_read error: 5 > > zio_read error: 5 > > ZFS: i/o error - all block copies unavailable > > ZFS: failed to read pool tank directory object > > BIOS 628kB/523264kB available memory > > > > FreeBSD/x86 bootstrap loader, Revision 1.1 > > Loading /boot/defaults/loader.conf > > Loading /boot/defaults/loader.conf > > Loading /boot/device.hints > > Loading /boot/loader.conf > > Loading /boot/loader.conf.local > > / > > Loading kernel... > > > > Cheers > > Uli > > > > > > Do you still have > > vfs.root.mountfrom=3D"zfs:your/tank/dataset" > > line in /boot/loader.conf on UFS? > And/or having /boot.config (or /boot/config) having configuration > touching your ZFS pool? This output is from _before_ loader is loaded, and I don't have any mountfrom settings in loader.conf anyway. ISorry, I wasn't clear, but the system boots just fine, it finds the loader, loader finds the kernel, and after I added a root entry in /etc/fstab, the kernel was also mounting the right root partition. So everything is working, but boot0 still seems to find gptzfsloader and then seems to fall back to loading from UFS? I inspected the start of the disk with xxd and it indeed looks like gptloader is embedded near the beginning, and not gptzfsloader. Guess I'm sitting on another timebomb here... Cheers all Uli