a new hard-drive in a 2y/o laptop

Chris Brennan xaero at xaerolimit.net
Mon Jan 3 21:31:39 UTC 2011

I was not around the computer yesterday to reply to these in a timely matter
and replying to each one just got confusing since gmail appends all of my
replies to the bottom of the thread and not after the person I replied to. I
got the reply header to each person and went that route

| Reply header, who said what.
| > Their reply
| My Reply

On Sun, Jan 2, 2011 at 1:39 AM, Michael Powell <nightrecon at hotmail.com>
> No. I used the of=/dev/ad4 as described above. However, I think you've hit
> the nail on the head on one aspect. I believe that 6.2 disk was originally
> set up as "dangerously dedicated". It was so long ago and I had forgotten
> all about it, but this does dovetail with what your are getting at.

That may be so for you, but nothing less then FreeBSD8.1 or a Gentoo LiveCD
touched this drive. Gentoo only yo prove to myself that a sucessful ext4
filesystem could be created. GPT/GEOM wasn't used, I used all standard
disk-creation methods as described in the gentoo handbook. I also used
gpart utilities to independatly verify that any artifacts of GPT/GEOM were
removed (which they were).

> The machine that disk went into had been upgraded completely through the
> series and on to 8.0-Release before it's disk went up in smoke(literally).
> was attempting to do a fresh 'minimal' install of 8.0-Release to the old
> disk pulled off a shelf prior to doing restore(s) of a dump from just the
> day before. It was only done because it could be done immediately, and a
> newer, larger, better replacement procured after the fact.

This is actually something I fear in reinstalling my other FreeBSD system,
is currently 7.3, which has been upgraded successfully from 6.1. But ports
gotten out of hand and I'm rather tired of trying to fix each port, one at a

time when there are prolly hundreds currently installed.

> Exact copy of error from my notes here:

> "Unable to find device node for /dev/ad4s1b in /dev! The creation of
> filesystems will be aborted." Then pressing "OK" brings this: "Couldn't
> filesystems properly. Aborting."

Yes, this is exactly the same error I get. While that is the same, I think
is an underlying issue here that is causing my issue that doesn't exactly
to 'dangerously dedicated'.

> This from sysinstall and occurs after fdisk, labeling, at the point when
> sysinstall then tries to write out the config to the disk and newfs.

Yerp, sysinstalls pukes at newfs/swap creation, when it can't find
(which is swap)

> Or any other form of 'garbage'. I'd use the 8.1 LiveFS CD myself just as a
> personal preference - but either approach should do the job.

Well, the garbage I reported was because of a typo on my part.

> Yes - I agree. Would also be nice to examine it afterward with a hex
> to actually see *if* all writes were zero.  Any 'ones' sprinkled in there,
> especially in the region of the disk we are talking about would indicate
> corruption. And my wild guess if this is the situation it may possibly
> indicate some form of subtle hardware incompatibility most likely a clash
> firmwares, e.g. controller and disk(s).  Some form of non-standard
> controller implementation, especially wrt to its firmware being buggy.

If someone provides the command for this, I will happily run it and see if
output is all zero's...

> In the OEM world of the likes of HP, DELL, etc, when this happens a lot of
> times they kludge together a work around driver that you can get from
> tech support. It masks the hardware/firmware problem in software, and is
> almost always a Windows-centric thing.

*shudder* that's all, just *shudder*

> Bad thing here is the old: "but it worked in 7.x, only fails with 8.x...".
> Whenever I see _that_ I think "developer involvement/smarter people than
> required...".

Well, the irony here, the failing drive is *ALSO* 8.1, I can slap that back
and fire it up, it still boots and works, I just didn't want to take the
of the drive's cheese sliding off it's cracker.

> I use knode and gmane. I also know that (IIRC) you're supposed to reply by
> email and CC: the list. There is a set of configs which allow one to
> configure knode to do just this, however, the last two times I've tried it
> knode crashed horribly. That was a couple of small revisions of KDE ago,
> I should soon revisit this myself and see if the bug has ever gotten any
> love.

GMail's (Google for Domains) threadding is a bit awkwards to get used to at
first but works out rather nicely once you get used to it.

On Sun, Jan 2, 2011 at 2:19 AM, Ian Smith <smithi at nimnet.asn.au> wrote:
> 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)

I'll give this a shot and let the list know what I find.

> 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!

Haha! yes, I dd'd the memstick image to the external USB drive. It did boot
just fine, but not ad /dev/ad0a, it booted the drive as /dev/da0a. Which is
a 1gb partition, the other 59gb remained unused/unsliced. I don't have and
media where I could write a 1GB image to w/o wasting a DVD and just couldn't

justify that loss of space lol.

> 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

Fixit# sysctl kern.geom.debugflags=16
sysctl kern.geom.debugflags: 0 -> 16
Fixit# dd if=/dev/zero of=/dev/ad4 oseek=63 count=8
8+0 Records in
8+0 records out
4096 bytes transferred in 0.431880 secs (9484 bytes/sec)

> Getting yours fine; that was re my reply to Mike's message.


> 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)

Yes, as I said in Mike's reply above, I did write a simple ext4 partition
to the drive just to prove to myself that it could be done (and it worked).
No, I've checked and rechecked, this laptop's BIOS menu is very limited in
detail and changable options. But nothing about SATA modes.

> 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.

>From the FDISK Partition Editor in sysinstall, I don't see a means to
actually write the slice to disk, immediatly from that menu. Same for the
slice editor.

> 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.

See above :P

> Hopefully somebody else has a take on all this, I'm out of ideas ..

No worries, I appreciate yours and everyone elses help.

On Sun, Jan 2, 2011 at 5:19 AM, Bruce Cran <bruce at cran.org.uk> wrote:
> This can happen if you've had it partitioned using GPT at some point -
> in that case you need to use dd to zero the first _and_ last sectors of
> the disk.

So this is two dd operations, one for the first 63 bytes and one for the
last 63 bytes? Can you ellaborate a little? dd's more advanced operations
are still new to me :D

On Sun, Jan 2, 2011 at 5:22 AM, Bruce Cran <bruce at cran.org.uk> wrote:
> See my post later in the thread: this most likely has nothing to do
> with the partition layout but the fact that FreeBSD is finding an old
> partition scheme.

Later in the thread suggests a post after this one, this is none, or are
you referring to another thread? If so, which one?

On Sun, Jan 2, 2011 at 10:15 AM, Ian Smith <smithi at nimnet.asn.au> wrote:
> Hmm, should we bet against a gentoo install using GPT these days?

gpart is part of the gentoo LiveCD, I didn't use it to create any
just to make sure fbsd deleted anything that might have been present. I used
cfdisk to slice the drive and mkfs.ext4 and mkswap to create and write the

> Finding out about the actual disk layout in gpt(8), gpart(8) etc proving
> fruitless and finding nothing in Handbook, FAQ or wiki, I resorted to
> http://en.wikipedia.org/wiki/GUID_Partition_Table for hopefully correct
> information.  I hadn't even known that sectors 1-33 were used for the
> GPT (making Mike's zeroing of sector 1 sensible even on sliced disks),
> nor that the last 33 sectors were for its backup table, thanks.  So:

>  dd if=/dev/zero of=/dev/da4 seek=N

> where N is the known total number of sectors minus 34, should do it?

I think you mean ad4 and not da4 here .... si that's (ST)-34?
1465149168-34? I'm just trying to make sure I understand what you want me
to do here.

> If not, we can't rule out Mike's concerns about BIOS incompatibility
> or such, but this sure sounds like the next thing Chris should try.

A BIOS incompatibility has been in the back of my mind. But given that the
is of a recently modern make, switching to a larger hard-drive shouldn't be
big of an issue.

More information about the freebsd-questions mailing list