bsdlabel, now no boot

David Kelly dkelly at
Tue Mar 18 12:05:49 PDT 2008

I was playing last night on my home FreeBSD system which is the only  
machine there that has internet access. And did something wrong.

Had added two new SATA HD's and was playing with gstripe, adjusting  
the stripe size. Default 4k stripe resulted in a filesystem that runs  
at only 10 MB/sec or so.

Had run gstripe, bsdlabel, and newfs, 4 or 5 times with different  
stripe sizes when suddenly the old was gone and I couldn't create a  
new. Nothing in /dev/stripe/. This is FreeBSD 6.2-STABLE circa July  
2007. "OK, something is messed up, lets reboot." Didn't do the usual  
"F1 FreeBSD" boot, fell back to a 0:ad(0,a)/boot/ prompt asking what  
to boot. I didn't *think* I was playing with the disk label on the  
PATA drive where FreeBSD is supposed to boot but clearly I've hosed  
something. Machine rebooted without problems earlier when the new  
drives were installed.

Booted the 6.1-RELEASE CD from which this system was originally  
installed. Fiddled with the FDISK and labeler sections and didn't do  
any good. Didn't do any harm. My original partition table is still  
there along with the BSD slices.

Wasn't getting anywhere with the CD so I installed a minimal binary  
6.1 on one of the SATA drives (ad4s1). While I was there I set mount  
points for the PATA drive ad0s1 under /old/. Told it to write the  
FreeBSD boot manager and everything. This works. Still can't boot the  
PATA drive. But have mounted the old partitions. Then umounted and ran  
"dump -0af" for each old filesystem into dump images.

The boot manager is back (at least on the SATA drive) as F1 for  
FreeBSD and F5 for another drive, but F5 beeps and doesn't change.

Think I have tried all the boot options in fdisk and bsdlabel, nothing  
seems to work.

Then tried sysinstall from the minimal 6.1 and used the "Write" option  
under fdisk to flush my update right now to disk and received an error  
that it could not write the disk. Nothing was mounted from that drive.  
Got same sort of error in the slice editor.

I don't think my Dell PowerEdge 400SC has any sort of protection for  
the MBR in BIOS. Will look again tonight.

Noticed the PATA drive was painfully slow under 6.1. Know I had DMA  
enabled manually in loader.conf under 6.2 and wondering if FreeBSD can  
write sector 0 via DMA but BIOS is blocking it if DMA is not used?

Cutting to the chase, my Windows-style partition table is sane (does  
the FreeBSD "partition" need to be marked bootable?), and my BSD slice  
table appears to be reasonable and sane. But the drive is not bootable.

"fdisk -B ad0" didn't hurt nor help. No error message.
"fdisk -Bi ad0" didn't hurt nor help. No error message.
"bsdlabel -B ad0s1" didn't hurt nor help. No error message.

The only error messages have been in sysinstall running from the 6.1  
minimal installation.

Is probably a good time for me to wipe this drive and install 7.0, but  
now that I have reached that conclusion and have nothing else to loose  
I'd like to learn how to recover from this situation.

David Kelly N4HHE, dkelly at
Whom computers would destroy, they must first drive mad.

More information about the freebsd-questions mailing list