From owner-freebsd-hackers@FreeBSD.ORG Sun Oct 31 14:46:25 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B0FE416A4CE for ; Sun, 31 Oct 2004 14:46:25 +0000 (GMT) Received: from smtp2.dnainternet.net (smtp2.dnainternet.net [62.240.72.111]) by mx1.FreeBSD.org (Postfix) with ESMTP id C6B5F43D48 for ; Sun, 31 Oct 2004 14:46:24 +0000 (GMT) (envelope-from erik.u@dnainternet.net) Received: from b-204-211.cable.kpy.customers.dnainternet.fi ([212.149.204.211]:61001smtp2.dnainternet.net with ESMTP id S1228844AbUJaOqX (ORCPT ); Sun, 31 Oct 2004 16:46:23 +0200 Message-ID: <4184FABF.7070906@dnainternet.net> Date: Sun, 31 Oct 2004 16:46:23 +0200 From: Erik Udo User-Agent: Mozilla Thunderbird 0.8 (X11/20041024) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-hackers@freebsd.org References: <20041031114210.GA46741@kukulies.org> In-Reply-To: <20041031114210.GA46741@kukulies.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: finding alternate superblocks in ffs X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Oct 2004 14:46:25 -0000 What if you repartition & slice the disk exactly the way it was in sysinstall, and then Toggle Newfs off, and write changes. It worked fine for me. Christoph P. Kukulies wrote: > Yesterday a major desaster happened: I stumbled across the power cable of my > Dell Inspiron notebook. The notebook fell to the floor. FreeBSD was running > at that time. Nothing seemed to got damaged, just a palm rest popped off. > > Ah yes, the HD bay sprung off and in a moment of reflex I pushed it > in again in the running system. After that I tried to mount the > disk (which had not been mounted at that point of time). Anyway, > trying to > > # fsck_ffs /dev/ad2s1e > ** /dev/ad2s1e > Cannot find file system superblock > > LOOK FOR ALTERNATE SUPERBLOCKS? [yn] y > > 32 is not a file system superblock > 89808 is not a file system superblock > 179584 is not a file system superblock > 269360 is not a file system superblock > 359136 is not a file system superblock > 448912 is not a file system superblock > 538688 is not a file system superblock > 628464 is not a file system superblock > 718240 is not a file system superblock > 808016 is not a file system superblock > > .... > 20813728 is not a file system superblock > 20903504 is not a file system superblock > 20993280 is not a file system superblock > 21083056 is not a file system superblock > 21172832 is not a file system superblock > 21262608 is not a file system superblock > SEARCH FOR ALTERNATE SUPER-BLOCK FAILED. YOU MUST USE THE > -b OPTION TO FSCK TO SPECIFY THE LOCATION OF AN ALTERNATE > SUPER-BLOCK TO SUPPLY NEEDED INFORMATION; SEE fsck(8). > # > > Any idea what I can do now? > > I wrote a little program that opens /dev/ad2s1e > > #include > #include > #include > #include > #include > #include > #include > #include > #include > > #include > #include > #include > > > #include > #include > main(){ > int fd; > int k,i=0; > int buf[512/(sizeof (int))]; > if((fd=open("/dev/ad2s1e",O_RDONLY)) < 0) > printf("error opening device\n"),exit(2); > printf("opened device\n"); > while(read(fd,buf,512)>0){ > for(k=0;k<(512/(sizeof (int)));k++){ > /*if(buf[k]==FS_UFS1_MAGIC) > printf("UFS1 * %d\n",i),fflush(stdout); */ > if(buf[k]==FS_UFS2_MAGIC) > printf("UFS2 * %d\n",i),fflush(stdout); > i++; > } > } > } > > > I'm not sure whether my approach is correct. > Anyway, the blocks I find with that method > aren't recognized as superblocks either. > > > -- > Chris Christoph P. U. Kukulies kuku_at_kukulies.org > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" >