From owner-freebsd-questions@FreeBSD.ORG Tue Jan 18 23:01:22 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 39E39106564A for ; Tue, 18 Jan 2011 23:01:22 +0000 (UTC) (envelope-from ml@netfence.it) Received: from cp-out9.libero.it (cp-out9.libero.it [212.52.84.109]) by mx1.freebsd.org (Postfix) with ESMTP id BE7358FC0C for ; Tue, 18 Jan 2011 23:01:21 +0000 (UTC) X-CTCH-Spam: Unknown X-CTCH-RefID: str=0001.0A0B0205.4D361BC0.00B5,ss=1,re=0.000,fgs=0 X-libjamoibt: 1555 Received: from soth.ventu (151.51.130.48) by cp-out9.libero.it (8.5.133) id 4D35A953000FC6DA for freebsd-questions@freebsd.org; Wed, 19 Jan 2011 00:01:20 +0100 Received: from alamar.ventu (alamar.ventu [10.1.2.18]) by soth.ventu (8.14.4/8.14.4) with ESMTP id p0IN1ERW084899 for ; Wed, 19 Jan 2011 00:01:14 +0100 (CET) (envelope-from ml@netfence.it) Message-ID: <4D361BBA.808@netfence.it> Date: Wed, 19 Jan 2011 00:01:14 +0100 From: Andrea Venturoli User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; it-IT; rv:1.9.2.13) Gecko/20101211 Thunderbird/3.1.7 MIME-Version: 1.0 To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.68 on 10.1.2.13 Subject: Mounting a recovered disk 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: Tue, 18 Jan 2011 23:01:22 -0000 Hello. I'm trying a rescue on a failing drive. I used ddrescue to get an image (which showed a single unreadable sector). > # file myimage > myimage: x86 boot sector, LInux i386 boot LOader; GRand Unified Bootloader, stage1 version 0x3, stage2 address 0x2000, stage2 segment 0x200; partition 1: ID=0x7, active, starthead 1, startsector 63, 40965687 sectors; partition 2: ID=0x82, starthead 254, startsector 40965750, 2104515 sectors; partition 3: ID=0x83, starthead 254, startsector 43070265, 36965565 sectors, code offset 0x48 Then i used "mdconfig -f myimage" and now I have > # ls -l /dev/|grep md0 > crw-r----- 1 root operator 0, 111 Jan 18 23:42 md0 > crw-r----- 1 root operator 0, 112 Jan 18 23:42 md0s1 > crw-r----- 1 root operator 0, 113 Jan 18 23:42 md0s2 > crw-r----- 1 root operator 0, 114 Jan 18 23:42 md0s3 Fdisk gives: > # fdisk /dev/md0 > ******* Working on device /dev/md0 ******* > parameters extracted from in-core disklabel are: > cylinders=4982 heads=255 sectors/track=63 (16065 blks/cyl) > > Figures below won't work with BIOS for partitions not in cyl 1 > parameters to be used for BIOS calculations are: > cylinders=4982 heads=255 sectors/track=63 (16065 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 7 (0x07),(NTFS, OS/2 HPFS, QNX-2 (16 bit) or Advanced UNIX) > start 63, size 40965687 (20002 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 130 (0x82),(Linux swap or Solaris x86) > start 40965750, size 2104515 (1027 Meg), flag 0 > beg: cyl 1023/ head 254/ sector 63; > end: cyl 1023/ head 254/ sector 63 > The data for partition 3 is: > sysid 131 (0x83),(Linux native) > start 43070265, size 36965565 (18049 Meg), flag 0 > beg: cyl 1023/ head 254/ sector 63; > end: cyl 1023/ head 254/ sector 63 > The data for partition 4 is: > Now I'd expect to mount as follows, but I get errors: > # mount -r -t ntfs /dev/md0s1 /mnt/ > mount_ntfs: /dev/md0s1: Invalid argument > # mount -r -t ext2fs /dev/md0s3 /mnt/ > mount: /dev/md0s3 : Invalid argument Instead the following works, which surprises me (and is useless, anyway): > # mount -t ext2fs /dev/md0s1 /mnt/ > # find /mnt/ > /mnt/ > /mnt/lost+found Just in case: > # kldstat > Id Refs Address Size Name > 1 20 0xc0400000 5cc790 kernel > 2 1 0xc09cd000 353c splash_bmp.ko > 3 1 0xc46c3000 10000 geom_eli.ko > 4 1 0xc46d3000 23000 crypto.ko > 5 1 0xc46f7000 a000 zlib.ko > 6 2 0xc4fc3000 b000 ntfs.ko > 7 1 0xc501c000 10000 ext2fs.ko > 8 1 0xc5041000 2000 ntfs_iconv.ko > 9 1 0xc5043000 4000 libiconv.ko Am I doing something wrong? bye & Thanks av.