From owner-freebsd-questions@FreeBSD.ORG Mon Oct 4 14:32:28 2010 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 756F810656B1 for ; Mon, 4 Oct 2010 14:32:28 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx01.qsc.de (mx01.qsc.de [213.148.129.14]) by mx1.freebsd.org (Postfix) with ESMTP id 3631A8FC12 for ; Mon, 4 Oct 2010 14:32:28 +0000 (UTC) Received: from r55.edvax.de (port-92-195-226-229.dynamic.qsc.de [92.195.226.229]) by mx01.qsc.de (Postfix) with ESMTP id D60313CFA7; Mon, 4 Oct 2010 16:32:25 +0200 (CEST) Received: from r55.edvax.de (localhost [127.0.0.1]) by r55.edvax.de (8.14.2/8.14.2) with SMTP id o94EWPQI002342; Mon, 4 Oct 2010 16:32:25 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Mon, 4 Oct 2010 16:32:25 +0200 From: Polytropon To: Robert Message-Id: <20101004163225.34099bb8.freebsd@edvax.de> In-Reply-To: <20101004070858.3a101fa3@asus64> References: <201010031319.o93DJaDE005892@mail.r-bonomi.com> <20101003100051.23e2cc77@asus64> <20101003194045.849d6419.freebsd@edvax.de> <20101003142935.3d751862@asus64> <20101004123413.8e7cf859.freebsd@edvax.de> <20101004070858.3a101fa3@asus64> Organization: EDVAX X-Mailer: Sylpheed 2.4.7 (GTK+ 2.12.1; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: OT: fdisk X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Polytropon List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Oct 2010 14:32:28 -0000 On Mon, 4 Oct 2010 07:08:58 -0700, Robert wrote: > I have now a free 1TB drive for use. It is formatted as UFS. Should I > remove formatting before I dd the 500GB drive to it? Not needed, as you're going to use it under the control of FreeBSD. After formatting and mounting it, let's say as /mnt, use dd (or ddrescue) to first get an 1:1 copy of the source disk. > I tried the above process and here is what I have. > > [root@asus64] ~# mdconfig -a -t vnode -u 10 -f /250extra/disk.img > [root@asus64] ~# mount -o ro /dev/md10 /mnt > mount: /dev/md10 : Invalid argument Of course. :-) > [root@asus64] ~# mount_ntfs -o ro /dev/md10 /mnt > mount_ntfs: /dev/md10: Input/output error This indicates that the NTFS seems to be damaged and prevents mount_ntfs from mounting it. Start with "baby steps": Is there a valid partition table? # fdisk /dev/md10 You should now get a partition table. Did you create disk.img by dd'ing da0 or da0s1? This may matter. > [root@asus64] ~# ls -l /dev/md* > crw-r----- 1 root operator 0, 129 Oct 4 06:43 /dev/md10 > crw-r----- 1 root operator 0, 130 Oct 4 06:43 /dev/md10s1 > crw------- 1 root wheel 0, 66 Oct 1 14:43 /dev/mdctl > [root@asus64] ~# mount -o ro /dev/md10s1 /mnt Good. At least a bit. > [root@asus64] ~# ls -l /mnt > total 0 > [root@asus64] ~# df -h > Filesystem Size Used Avail Capacity Mounted on > > /dev/ad12s1d 226G 59G 149G 28% /250extra > /dev/md10s1 451G 32G 383G 8% /mnt > ^^^^ ^^^ > [root@asus64] ~# ls -la /mnt > total 0 Hmmm... you dd'ed the WHOLE disk to disk.img? Does the size look reasonable? > > Warren wrote: > > It will give an exact copy of the first 250G, which also means it > > will not resize the 500G filesystem into a working 250G version. > > Same questions as above. Can I dd to a 1TB? And what format on the > drive? Format the target disk as UFS, as you do with any disk you want to use for FreeBSD. Then dd (or ddrescue) the source disk to a file on that target disk. Then "connect" this file to a memory disk (md) device. Check the fdisk output for that device. Mount it. Get your data off. > I apologize again if I am coming off as dense. I have not used "dd" > before as I have always used dump for backups. Correct: dump + restore are used for UFS backups, but in this case, you need to deal with "Windows" stuff that does not support such standard means. That's why you need dd to make an 1:1 copy to work with it as you would work on the original disk. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...