From owner-freebsd-questions@FreeBSD.ORG Mon Aug 6 06:12:49 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2725C1065674 for ; Mon, 6 Aug 2012 06:12:49 +0000 (UTC) (envelope-from navarre.matthew@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id F07DE8FC08 for ; Mon, 6 Aug 2012 06:12:48 +0000 (UTC) Received: by pbbrp2 with SMTP id rp2so746943pbb.13 for ; Sun, 05 Aug 2012 23:12:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=q+v0g8itzpXU3Gt4/tdgFbsVhsalsIWrresQhretDTU=; b=jBcGL4w9yUbz1HJzNfM/s5FcbyY6rI5WkUSNx/KIu5pPG0fLm2kLvZmDLVcczAMgTy 9S6Q9Y8YVfjX+AhNJ+tfqy6aNKTS9aPMJamSWNxG8nY/8fuDI9LRW7teTySiWIjyhG7J VO0PiLl1HBwr6AUDffVqJvNHy301x6N70z7cGp1ayOZZF2+HGOcP3G1spenTnbwoIEku UgiYM6S2cs3bgWbH9eA6MwXdAn/g+e6sF+1Dy5Kio5eNmvoEdfoaLvef2XXXucOCqHRq YOUCyT5QqUZwYmkVKeH/W9ENW0iuVicRG323I/eQKS84zPc7v/eK0hO/Vf7QvFIPCMwb o4BA== MIME-Version: 1.0 Received: by 10.68.238.68 with SMTP id vi4mr16328000pbc.123.1344233568122; Sun, 05 Aug 2012 23:12:48 -0700 (PDT) Received: by 10.68.52.197 with HTTP; Sun, 5 Aug 2012 23:12:48 -0700 (PDT) Date: Sun, 5 Aug 2012 23:12:48 -0700 Message-ID: From: Matthew Navarre To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Mounting raw disk backup file. X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Aug 2012 06:12:49 -0000 HI, I had a drive fail recently, it was working fine until I rebooted. After that the partition map was corrupt and I can't mount either partition on the disk. So I made a copy of the whole disk using dd to an old USB drive. There were several IO errors while dd was copying the disk, so I think the disk is starting to go. I can probably fix the partition table using testdisk, but now that I've got this image file I'd rather work with that instead of the physical disk. I've read the Handbook section on using mdconfig, but that assumes the image file is of a filesystem, not a whole disk. I think I've found instructions for how to do it on linux, but if there's a way to mount it on FreeBSD I'd rather do that. So, any suggestions? Here's what file says about the file: mnavarre@pcbsd-1810] /# file /mnt/ada1_backup /mnt/ada1_backup: x86 boot sector; partition 1: ID=0xa5, active, starthead 1, startsector 63, 167766732 sectors; partition 2: ID=0xa5, starthead 254, startsector 167766795, 144809910 sectors, code offset 0x3c, BSD disklabel And just for grins, what fdisk says about the actual disk: mnavarre@pcbsd-1810] /# fdisk ada1 ******* Working on device /dev/ada1 ******* parameters extracted from in-core disklabel are: cylinders=310098 heads=16 sectors/track=63 (1008 blks/cyl) Figures below won't work with BIOS for partitions not in cyl 1 parameters to be used for BIOS calculations are: cylinders=310098 heads=16 sectors/track=63 (1008 blks/cyl) Media sector size is 512 Warning: BIOS sector numbering starts with sector 1 Information from DOS bootblock is: The data for partition 1 is: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) start 63, size 167766732 (81917 Meg), flag 80 (active) beg: cyl 0/ head 1/ sector 1; end: cyl 1023/ head 254/ sector 63 The data for partition 2 is: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) start 167766795, size 144809910 (70707 Meg), flag 80 (active) beg: cyl 1023/ head 255/ sector 63; end: cyl 1023/ head 254/ sector 63 The data for partition 3 is: The data for partition 4 is: Thanks, Matt Navarre