From owner-freebsd-hackers Mon Mar 23 14:34:13 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id OAA28269 for freebsd-hackers-outgoing; Mon, 23 Mar 1998 14:34:13 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from computer.eng.mindspring.net (computer.eng.mindspring.net [207.69.183.4]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id OAA28030 for ; Mon, 23 Mar 1998 14:33:21 -0800 (PST) (envelope-from ahobson@computer.eng.mindspring.net) Received: (from ahobson@localhost) by computer.eng.mindspring.net (8.8.8/8.8.4) id RAA12310; Mon, 23 Mar 1998 17:32:48 -0500 (EST) From: Andrew Hobson To: freebsd-hackers@FreeBSD.ORG Subject: Re: Finding an FS on the disk References: <85afahf5xn.fsf@stiegl.niksun.com> Mime-Version: 1.0 (generated by tm-edit 7.108) Content-Type: text/plain; charset=US-ASCII Date: 23 Mar 1998 17:32:47 -0500 In-Reply-To: Andrew Heybey's message of "23 Mar 1998 16:33:40 -0500" Message-ID: Lines: 37 X-Mailer: Quassia Gnus v0.29/XEmacs 20.5(beta30) - "Moxoto" X-Face: (e_H,)"'M4u!E!3"|XVHJ=[/_.:z73Z^oGf")[Payuf said: > Here is some code I wrote when I had a similar problem under SunOS. I > just modified it to compile and (apparently) work under FreeBSD. I did just about the same thing, except I used a shell script: #!/usr/local/bin/zsh for x in {0..1024}; do dd if=/dev/sd0 bs=1m skip=$x count=1 of=/tmp/ddfile 2>/dev/null echo "$x:" hexdump /tmp/ddfile | grep '1954 0001$' done exit 0 All of the information below is gleaned from experience and not from reading the code, so I hope it's accurate for more than just my computer. When you see two magic numbers separated by 8k: 128: 000a350 0001 0000 0000 0000 0000 0000 1954 0001 000c350 0001 0000 0000 0000 0000 0000 1954 0001 You should have found a partition. Of course, then you have to figure out how to construct your disklabel appropriately. In my case, it found the block at 128M (if your partitions are aligned on MB boundaries, then you should see the magic numbers at offsets a350 and c350 like I do above), so this partition would be at offset 128*1024*2 = 262114. Drew -- "Joe, release me from your Kung-Fu grip." -- Stacy Lavelle To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message