From nobody Tue Jan 11 14:04:33 2022 X-Original-To: questions@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 C995A19412C2 for ; Tue, 11 Jan 2022 14:04:51 +0000 (UTC) (envelope-from tomek@cedro.info) Received: from mail-ot1-x336.google.com (mail-ot1-x336.google.com [IPv6:2607:f8b0:4864:20::336]) (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 4JYCBC4jYPz4bpG for ; Tue, 11 Jan 2022 14:04:51 +0000 (UTC) (envelope-from tomek@cedro.info) Received: by mail-ot1-x336.google.com with SMTP id a12-20020a0568301dcc00b005919e149b4cso622008otj.8 for ; Tue, 11 Jan 2022 06:04:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cedro.info; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=c2cfJvCFwDJVc62YGGl+luqqAZNiobnbuEpvjgqNh44=; b=T8oUC4N+IIKVXc9hemccIgRBsT57vC8DnVpvghctTVzz/PJ7J+4/MifVzzKKTymGgh 6qUz5rAFenj1LNLXS3fmmLA5zuefgRm6Ho7s5BgEQtlXFwP5+RqGOZVigB4lVtmWkbbI qLmQMXkNmT3ldAC87lnoiNufXccmpWpVc+5tdhVd2mZPzpHjiu6mZceYTRG6FMX3GYBN lug3lk+LabN99gEu5CflZ8aZxAJdZXfvcFFLjZIQyKya3I4y4VHvRUbaSe0LyiGZIOhm T+kF6cEY5F3Ycv4iRj2KavXyk8JzlYsmtHcRVPpbyHl/4XTa5aYwoZDa0L/fR2lBjGYN phEA== 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; bh=c2cfJvCFwDJVc62YGGl+luqqAZNiobnbuEpvjgqNh44=; b=ixV3dUaAoIrMfjovTBU/TTjljr54K6Hvy0MiWnStts3GYYFzpLFH77ty34mOkUT3IF z0FkWUADIYF+qqDuw+Bz0qtqokBpsFUraEmkeeZNZQ4igst74z/nFSsm8t+icjXPcbw4 MtUKkM6nWkqyTGInllPiwbnDLJD0CQQu7znaI6CnX6ERjMCRQ3CKV0An2/B4rS8u3Ldo pdxj1bHxAUCDFpK8iZyo+Ks8iPUq+07/lRW5cVu5Zcn4pfahzMh4vH9xNVBmz0CGxXfU YvmINwUBWlZyzR7mpxKrFxNPe0AaGH1lZDMP7m3A9mFxdwXUiRiTjlta/f2Y0kwC2C0D +3SQ== X-Gm-Message-State: AOAM532D6D8zR7HAWAVxt2/FDKBc+rMYBJgzKD2NtFDzvNpXQTB6Q09I tbaoYBJVocjSPSAMfv40J73M6uOjlL0Z730VL4Eb7Q== X-Google-Smtp-Source: ABdhPJwU6u6E0SstJ/4uXauZ5nGzxm+wXnQM6xJbgZVKtssgdRDWwqfhBYuqk3GpQH++0ebE87oSXpCKHneFMSi2bdw= X-Received: by 2002:a9d:710c:: with SMTP id n12mr3550865otj.22.1641909884983; Tue, 11 Jan 2022 06:04:44 -0800 (PST) List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 References: <4af920fc-eff1-a92e-d36e-1ba97079864c@gmail.com> In-Reply-To: <4af920fc-eff1-a92e-d36e-1ba97079864c@gmail.com> From: Tomasz CEDRO Date: Tue, 11 Jan 2022 15:04:33 +0100 Message-ID: Subject: Re: dd and mbr To: Roderick Cc: FreeBSD Questions List Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4JYCBC4jYPz4bpG X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N On Tue, Jan 11, 2022 at 11:05 AM Roderick wrote: > The command: > dd if=/dev/zero of=/dev/da0 > does not delete the mbr, I still see the partition table with > fdisk. My questions: > (1) What does this command do? > (2) How to delete the mbr with dd? How to address the whole disk with dd? > In OpenBSD is simply > dd if=/dev/zero of=/dev/rsd0c > with perhaps a count argument. > Rod. There seems to be a tricky sysctl introduced some time ago that prevents some operations on mbr.. I got into that issuse some time ago but don't remember details sorry.. I also do not like that FreeBSD system hides something from me like Linux then requires searching for a magic solution.. I would prefer to stay OpenBSD way you presented :-( Check for mbr related warnings in dmesg. Try: sysctl kern.geom.debugflags=16 sysctl kern.geom.part.check_integrity=0 Hope that helps / hints the direction :-) -- CeDeROM, SQ7MHZ, http://www.tomek.cedro.info