Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Jan 2022 08:41:07 +1100
From:      Greg 'groggy' Lehey <grog@FreeBSD.org>
To:        Roderick <hruodr@gmail.com>
Cc:        FreeBSD Questions List <questions@freebsd.org>
Subject:   Re: dd and mbr
Message-ID:  <20220112214107.GI61872@eureka.lemis.com>
In-Reply-To: <f0814445-d026-30-8956-84e36db9b7a6@gmail.com>
References:  <4af920fc-eff1-a92e-d36e-1ba97079864c@gmail.com> <CAM8r67By518wp_1p9%2BJ5p7CE6Zj1M97Rm%2BaA-CSA-qtSVgyidw@mail.gmail.com> <20220112010402.GG61872@eureka.lemis.com> <f0814445-d026-30-8956-84e36db9b7a6@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--/GPgYEyhnw15BExa
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Wednesday, 12 January 2022 at  9:34:31 +0000, Roderick wrote:
>
> On Wed, 12 Jan 2022, Greg 'groggy' Lehey wrote:
>> As others have said, at the very
>> least you should have limited the length, otherwise you would
>> overwrite the entire disk, one sector at a time.
>
> That is what I wanted. I was deleting some old disks. I filled it
> with zeroes and not random in order not to make the process
> slower.

Ah, I guessed wrong.  Yes, in that case your sysctl would allow you to
overwrite the MBR as well.  Even without it, you *would* overwrite the
(rest of) the entire disk.

> Perhaps there is a faster tool than dd.

As others have suggested, use bs=64k.  Otherwise dd does an IO for
every single sector.  The speedup is really in the order of 100x.

Greg
--
When replying to this message, please copy the original recipients.
If you don't, I may ignore the reply or reply to the original recipients.
For more information, see http://www.lemis.com/questions.html
Sent from my desktop computer.
See complete headers for address and phone numbers.
This message is digitally signed.  If your Microsoft mail program
reports problems, please read http://lemis.com/broken-MUA.php

--/GPgYEyhnw15BExa
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iEYEARECAAYFAmHfSvMACgkQIubykFB6QiN7+gCgi5m1U2VoyzLapTgnljToQTHo
JCoAn3VacxhsxND4Mp2HJTctYuE6uJGh
=UdyL
-----END PGP SIGNATURE-----

--/GPgYEyhnw15BExa--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20220112214107.GI61872>