From owner-freebsd-questions@FreeBSD.ORG Sun Jan 2 07:19:20 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 CA6ED1065729 for ; Sun, 2 Jan 2011 07:19:20 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from sola.nimnet.asn.au (paqi.nimnet.asn.au [115.70.110.159]) by mx1.freebsd.org (Postfix) with ESMTP id 213328FC08 for ; Sun, 2 Jan 2011 07:19:19 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by sola.nimnet.asn.au (8.14.2/8.14.2) with ESMTP id p027JHSe000190; Sun, 2 Jan 2011 18:19:18 +1100 (EST) (envelope-from smithi@nimnet.asn.au) Date: Sun, 2 Jan 2011 18:19:17 +1100 (EST) From: Ian Smith To: Chris Brennan In-Reply-To: Message-ID: <20110102172125.J49334@sola.nimnet.asn.au> References: <20110101033922.BBE051065783@hub.freebsd.org> <20110102130224.O49334@sola.nimnet.asn.au> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: freebsd-questions@freebsd.org Subject: Re: a new hard-drive in a 2y/o laptop 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: Sun, 02 Jan 2011 07:19:20 -0000 On Sun, 2 Jan 2011 01:15:35 -0500, Chris Brennan wrote: > On Sat, Jan 1, 2011 at 10:20 PM, Ian Smith wrote: [..] > > The bsdlabel lives in sector 1 (counting from 0) of the slice concerned, > > specifically the first 0x114 (276d) bytes, in the second sector of the > > boot blocks. As noted above, in unsliced disks such as memstick.img > > that's sector 1 of the entire disk, but in ordinary sliced disks it's in > > sector 1 of the _slice_, so if you'd used (here using Chris' ad4) > > > > dd if=/dev/zero of=/dev/ad4s1 oseek=1 bs=512 count=1 > > > > > I would happily run this, but ad4s1 doesn't exist, and hasn't (that I know > of), I did do oseek=0 and oseek=1 on /dev/ad4 tho and that didn't change > anything, it still says it can't find /dev/ad4s1b (swap obviously) On /dev/ad4, oseek=0 zeroes sector 0, the MBR including DOS partition (FreeBSD slice) table, so that would kill all the slice data, so sure, ad4s1 won't exist. oseek=1 just zeroes an unused sector as we've seen. What you _can_ do from that state is: dd if=/dev/zero of=/dev/ad4 oseek=63 count=8 which will remove the first 4K of (what will be) slice 1, in case there's a misconfigured bsdlabel there, for later. I'm not convinced this is likely your problem, but it can't hurt before slice 1 exists (by virtue of having an entry in the MBR, when it should show up in /dev) > > At 6.x (and 7.x, I think) it could have been 'dangerously dedicated' ie > > unsliced .. which option has been removed in 8.x _except_ regarding the > > memstick.img (appearing as /dev/daXa) .. not half confusing, eh? > > > > > I actually noticed this today, I had issues writing 8.2BETA1 to a 2GB > MicroSD card, so I used a 2.5" external hard-drive and from the fixit prompt > I noticed that it wrote a 1gb partition for the BETA1 image and left the > rest of the desk untouched (ann 59gb of it). Do you mean you dd'd the memstick.img to the external USB drive? And that booted ok? And sysinstall found it ok, as /dev/ad0a? Details! > > sysctl kern.geom.debugflags=16 > > dd if=/dev/zero of=/dev/ad4s1 bs=512 count=8 > > > > will remove slice 1's boot blocks entirely, including the bsdlabel. Given you've shown previously that s1 starts at sector 63, so will: sysctl kern.geom.debugflags=16 dd if=/dev/zero of=/dev/ad4 oseek=63 count=8 > > [excuse broken threading, but unless cc'd I have to reply to the digest] > > I've been trying to keep you in my replies Getting yours fine; that was re my reply to Mike's message. > but your down-under, so I don't get your replies till after 1am my > time... Anywho, it's late and I need to be up in 8hrs, hopefully this Yeah North America is so yesterday from here (well, 16 hours for you :) > can be figured out ... I would hate for the disk to be defective in > some way. Of course that's not impossible, but you did say you'd installed some linux on it ok? Clutching at straws, is there anything in your BIOS regarding different SATA modes you can play with? (No SATA disks here) Something else you could try is W)riting the slice table + MBR out from the fdisk menu, then quit sysinstall and reboot. You can do the same after labelling but before newfs'ing .. not generally recommended, but safe enough on a blank disk. If you do the latter, you'll have to reenter your mount points later, so make a note of the order and size of partitions that you specified. Hopefully somebody else has a take on all this, I'm out of ideas .. cheers, Ian