From nobody Fri May 5 16:29:05 2023 X-Original-To: bugs@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 4QCbjZ1z3gz49WVK for ; Fri, 5 May 2023 16:29:06 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QCbjY70kmz4CMx for ; Fri, 5 May 2023 16:29:05 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683304146; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7xZQeAQhzMjRvRYefD94bWUryJ+uZkN4pu7LXt0k9GE=; b=iQY8rEVPEyVXtq3g6t7tTzfqIs/1u7F6haCkndG2vEntEChmmWeev7V8OpFWLoT9FcjBj9 eFkC+X8iEyCuPGaJVY7AVQQOjKAaa7Qt0P0N2jCEaBof3h0KZ39NxWZE8uPMPZTzAzbUSW geGItu4NMBHF0HYm7SoNVkxrAh5w2uHFFs/GboDj1MAJnzwDAHtDyGkHnmlvZOAP7mGxsf LxVzLHQPb82EQMqFe5FeAo0HpL0JVkzQNGvMwcBaGoxROJC6w5uOkMvjEAj46H4QyOzbhn KfP9CuSArj2Z1TTbE6gvC3RNLRKhYEankhOpVAAM11feFx5n5xuqd0xnhqT7kQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683304146; a=rsa-sha256; cv=none; b=dUfCDP16v4/dAfxXhI7d+28GGgzlpCOReml5BpK7vzfGKMotoc/CJVfWENQWO3/w2hkgRn RARvgbbChmWSvlGfkfzpG6Yz3FRF/HSVLTQZ2ZM3BKGtso6SYxM4j7+8oGrJH2Cgb4tzZ3 sYqeuEnT0CtFo3lZ1O1hhy1v4rnqJ3cIOFrZf/eaAPcS92TiB5p8xVbHujDpBW6kmkS1/8 GvQChxOMtnoYPkBTwAfYZMhkEIjp1lD3fMaG6aXWkT0fh2zMnC9NJggMhhUKsuExlhy/W8 2fgsDrFvxF2NVBydr0lFuZqq87ZouPV+JMpC1MIebsEKOS4kp9X17UfqIYinQQ== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QCbjY64bVz12B3 for ; Fri, 5 May 2023 16:29:05 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 345GT5VN000351 for ; Fri, 5 May 2023 16:29:05 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 345GT5Vp000350 for bugs@FreeBSD.org; Fri, 5 May 2023 16:29:05 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 271262] bsdinstaller in AutoZFS + MBR mode always wipes disklabel - rendering system non-bootable Date: Fri, 05 May 2023 16:29:05 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 13.2-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: hpaluch@seznam.cz X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D271262 Bug ID: 271262 Summary: bsdinstaller in AutoZFS + MBR mode always wipes disklabel - rendering system non-bootable Product: Base System Version: 13.2-RELEASE Hardware: amd64 OS: Any Status: New Severity: Affects Only Me Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: hpaluch@seznam.cz Created attachment 241996 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D241996&action= =3Dedit Installation log for AutoZFS on MBR layout that will destroy disklabel While trying several time this installation: - FreeBSD-13.2-RELEASE-amd64-disc1.iso When I select this layout: - AutoZFS - MBR It always ends up in broken - Non-bootable system (famous error "Missing operating system" Analysis of such system (booting CD in Shell mode) has shown that somehow w= hole disklabel is missing. Only primary FreeBSD partition exists. I traced down the problem that this command (from bsdinstall_log): # this works disklabel da0s1 # this command wipes 1st 4KB of da0s1a thus destroying disklabel! zpool create -o altroot=3D/mnt -m "/bootpool" -f "bootpool" da0s1a # the command below will now end with error! disklabel da0s1 Tracing above "zpool create" command I have found that it really wipes 1st 4KB of "da0s1a" thus destroying disklabel that occupies offset from 512= to 1024 bytes. Here is relevant excerpt from truss tracing: 702: fstatat(AT_FDCWD,"/dev/da0s1a",{ mode=3Dcrw-r----- ,inode=3D104,size=3D0,blksize=3D4096 },0x0) =3D 0 (0x0) 702: openat(AT_FDCWD,"/dev/da0s1a",O_WRONLY|O_EXCL,00) =3D 6 (0x6) 702: write(6,"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...,4096) =3D 4096 (0x1000) 702: fdatasync(6) =3D 0 (0x0) 702: close(6) =3D 0 (0x0) 702: open("/mnt/bootpool",O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC,015) ERR#2 'No such file or directory' You can clearly see that device da0s1a is opened and immediately wiped with 4096 bytes of zeroes thus liquidating disklabel (!). --=20 You are receiving this mail because: You are the assignee for the bug.=