From owner-freebsd-questions@freebsd.org Wed Sep 30 18:23:24 2020 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5B03742DA73 for ; Wed, 30 Sep 2020 18:23:24 +0000 (UTC) (envelope-from dpchrist@holgerdanske.com) Received: from holgerdanske.com (holgerdanske.com [IPv6:2001:470:0:19b::b869:801b]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "www.holgerdanske.com", Issuer "www.holgerdanske.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C1l4W2CYVz4cHv for ; Wed, 30 Sep 2020 18:23:23 +0000 (UTC) (envelope-from dpchrist@holgerdanske.com) Received: from 99.100.19.101 (99-100-19-101.lightspeed.frokca.sbcglobal.net [99.100.19.101]) by holgerdanske.com with ESMTPSA (TLS_AES_128_GCM_SHA256:TLSv1.3:Kx=any:Au=any:Enc=AESGCM(128):Mac=AEAD) (SMTP-AUTH username dpchrist@holgerdanske.com, mechanism PLAIN) for ; Wed, 30 Sep 2020 11:23:19 -0700 Subject: Re: concluding from dd raw dump size to disk mfgr To: freebsd-questions@freebsd.org References: <876b79ff-b781-fede-a4de-cb58becd557c@kukulies.org> From: David Christensen Message-ID: Date: Wed, 30 Sep 2020 11:23:18 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: <876b79ff-b781-fede-a4de-cb58becd557c@kukulies.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4C1l4W2CYVz4cHv X-Spamd-Bar: ++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of dpchrist@holgerdanske.com has no SPF policy when checking 2001:470:0:19b::b869:801b) smtp.mailfrom=dpchrist@holgerdanske.com X-Spamd-Result: default: False [2.26 / 15.00]; RCVD_TLS_ALL(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; AUTH_NA(1.00)[]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_SPAM_MEDIUM(0.62)[0.623]; ARC_NA(0.00)[]; NEURAL_HAM_SHORT(-0.18)[-0.178]; NEURAL_SPAM_LONG(0.91)[0.912]; DMARC_NA(0.00)[holgerdanske.com]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-questions] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Sep 2020 18:23:24 -0000 On 2020-09-30 00:40, Christoph Kukulies wrote: > I made a dd dump of a raw disk device the other day. The size of the > dump is exactly > > 500107862016 bytes in size, corresponding to 997773168 sectors > (512bytes). > > I would like to dump this file back to a physical device. Best would > be the one which fits exactly that size. Unfortunately I presently > don't know what drive mfgr./type this corresponds to. Is there a way > to find out? On 2020-09-30 05:59, Christoph Kukulies wrote: > ... I didn’t have physical access nor any access to > the system I took the dd dump from. I thought just to identify the > drive from the calculation of the dump size. > > But meanwhile I identified a device that fits and that probably must > have the type of drive I took the dump from: > > Toshiba MQ01ABF050 I am unable to find an WWW database of drive specifications. STFW "500107862016": https://sourceforge.net/p/clonezilla/bugs/256/ ~# sfdisk -l /dev/sda Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disklabel type: dos Disk identifier: 0x6c6583c4 Diskinfo: Model Family: Western Digital Blue Mobile Device Model: WDC WD5000LPVX-22V0TT0 Serial Number: WD-WXB1A45580UJ LU WWN Device Id: 5 0014ee 605ce1d84 Firmware Version: 01.01A01 User Capacity: 500,107,862,016 bytes [500 GB] Sector Sizes: 512 bytes logical, 4096 bytes physical Another option is to copy the image to a larger device. If the original image used GPT partitioning, you would then need to repair the backup GPT table. I did this recently using sfdisk(8): https://www.mail-archive.com/debian-user@lists.debian.org/msg760783.html gdisk(8) was also suggested: https://www.mail-archive.com/debian-user@lists.debian.org/msg760803.html David