From owner-freebsd-questions@FreeBSD.ORG Sun Jul 13 03:50:04 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EF89937B401 for ; Sun, 13 Jul 2003 03:50:03 -0700 (PDT) Received: from imul.math.uni.lodz.pl (imul.math.uni.lodz.pl [212.191.65.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id CBD8143F3F for ; Sun, 13 Jul 2003 03:50:02 -0700 (PDT) (envelope-from mg@fork.pl) Received: from localhost (localhost.math.uni.lodz.pl [127.0.0.1]) by imul.math.uni.lodz.pl (Mail Transport Agent) with ESMTP id 706CB23CB; Sun, 13 Jul 2003 12:51:12 +0200 (CEST) Received: from by localhost (amavisd-new, port ) id vF6jEdxD; Sun, 13 Jul 2003 12:51:11 +0200 (CEST) Received: from fork.pl (imul.math.uni.lodz.pl [212.191.65.2]) by imul.math.uni.lodz.pl (Mail Transport Agent) with ESMTP id 126BB1F89; Sun, 13 Jul 2003 12:51:11 +0200 (CEST) Message-ID: <3F113968.1060309@fork.pl> Date: Sun, 13 Jul 2003 12:50:16 +0200 From: Marcin Gryszkalis Organization: fork.pl User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en, pl MIME-Version: 1.0 To: Malcolm Kay References: <3F10AE01.7010003@fork.pl> <200307131418.22378.malcolm.kay@internode.on.net> In-Reply-To: <200307131418.22378.malcolm.kay@internode.on.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at math.uni.lodz.pl cc: freebsd-questions@freebsd.org Subject: Re: partition recovery X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jul 2003 10:50:04 -0000 sorry for swapping slices/partitions - it was too late yesterday and I had too much work... Here's more explanation: On 2003-07-13 06:48, Malcolm Kay wrote: >>there was windows 2000 >>[ ntfs ] >>I made some place for FreeBSD > How? I used partition magic, I resized first dos-partition and created second primary dos-partition (without extended dos-partition). > In FreeBSD terminalogy this is now 2 slices:- >>[ ntfs ][ ufs=ad0s2 ] >>I created slices > In FreeBSD terminology "created partitions" or > more specifically "BSD partitions". right, that's what I did :) >>[ ntfs ][( s2a )( s2b )... ] >>after some time I removed win2000 - and just >>did newfs on first partition (no repartitioning, >>no slices - only newfs) > On the first "slice" -- no "BSD partitioning". right, the question is - is that ok, to do that? I mean - to newfs without bsd-partitioning? >>[ ufs=ad0s1 ][( s2a )( s2b )... ] > The MBR (master boot record) table will still have > the first slice marked as ntfs unless you ran fdisk to > change it. do you mean - the main dos-partition table? I *think* I fixed it using gpart. The linux sfdisk says now: fake:~# sfdisk -d /dev/hda # partition table of /dev/hda unit: sectors /dev/hda1 : start= 63, size=125821017, Id=a5 /dev/hda2 : start=125821080, size= 3903795, Id=82 /dev/hda3 : start=129724875, size= 30346784, Id=83, bootable /dev/hda4 : start= 0, size= 0, Id= 0 >>after some time I wanted to install debian GNU/Linux >>(this is test-box) >>[ ufs=ad0s1=hda1 ][swap=hda2][ext2=hda3] >>and here something bad happened during installation >>(few reboots/kernel panics and so on) > It seems you have now assigned all "slices" to Linux > at least in your mind. But what types does fdisk think they are? I didn't touch the ad0s1 when installing linux, I just removed ad0s2 and placed two linux-partitions there. (hda2 - linux swap and hda3 - linux system) (I wanted to use ad0s1 to move some data to the new system, I expected linux to be able to mount UFS - at least r/o) >>it CAN mount it as NTFS (and I can even see >>some windows files!) >> - freebsd can see it as UFS but cannot mount > Where is FreeBSD? -- it appeared you had given the FreeBSD slice > ad0s2 over to Linux swap -- but then I'm not knowledgable with > respect to exactly what Linux means by hda2. I run freebsd from live-cd now (as I explained above I removed freebsd slice (ad0s2) with all bsd-partitions inside). >>('bad magic number' or bad superblock), >>using backup superblock >>(-b 32) doesn't work. >> >>What can I do to recover data from the first partition??? > > What data? -- the original ntfs data or what Linux may have installed? > I suspect that in either case it is now pretty much corrupted. The semblance > of windows files will have a scattering of blocks over written by newfs. I want to recover files from UFS filesystem on ad0s1. It was NTFS before but as I mentioned before - I did newfs, so It became UFS. I think the windows files that can be seen are just shadows of old days (blocks that were not overwritten during using the slice with FreeBSD). I looked at the slice with lde (linux disk editor, I don't like the tool but I couldn't find anything more user-friendly) and it seems that the files I saved to UFS are in good condition. I hope the case is more clear now :) What do you advice to do now? regards -- Marcin Gryszkalis http://fork.pl <><