Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 23 Jul 2005 20:23:52 -0700
From:      garys@opusnet.com (Gary W. Swearingen)
To:        Ima Camper <ima_camper@yahoo.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Syntax for fdisk?
Message-ID:  <zw8xzwzy2f.xzw@mail.opusnet.com>
In-Reply-To: <20050723181901.79329.qmail@web30001.mail.mud.yahoo.com> (Ima Camper's message of "Sat, 23 Jul 2005 11:19:01 -0700 (PDT)")
References:  <20050723181901.79329.qmail@web30001.mail.mud.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Ima Camper <ima_camper@yahoo.com> writes:

> While trying to solve another problem, a suggested fix
> was to issue the following command:
>
> bsdlabel -B da0s1a

I'm no expert, but I'll give it a shot.

(I'll be using disk for disk, partition for slice (like the rest of
the world), and sub-partiton for FreeBSD-partition.)

AFAIK, you should never try to label a subpartion like da0s1a (or da0a
for a D.D. disk), but only a partition like da0s1 or a D.D. disk like
da0.

You say that you set it up as a DD disk, so yes, you should have used
"bsdlabel -B /dev/da0"

> I've booted using the 5.4 IS0 CD and selected fixit
> from the sysinstall program.  Using fdisk to check
> /dev/da0 I see all 4 slices marked as "UNUSED". 
> However on /dev/da1 that was fdisked the same, the
> first slice has information.  

I don't remember what a DD disk looks like in fdisk, but I wouldn't be
suprised if a disk with one partition looked the same whether it had
a partition table with one used entry or a truly DD disk with no
partition table.

> At the fixit prompt, I can mount /dev/da0 and see all
> my data.  Is there a way to use fdisk from the command
> line to restore slice 1 without losing all my data? 
> What would be the correct syntax?  Am I on the right
> track?

You shouldn't be able to mount /dev/da0, just /dev/da0a, and whatever
other subpartitions da0 has.  Assuming that you meant that, then if
you can mount it, I'd guess it probably has an OK disklabel.  Look
(with "bsdlabel ad0").  My guess is that the previous labeling attempt
wrote something where the first non-DD partition should be located and
messed up one of your boot files.  If that's the case, you're going to
need another disk with a running OS to re-install the OS to the
corrupted disk.  I hope I'm wrong.

Or could it be that you did a "boot0cfg" so the boot loader thinks
the OS is on da0s1 instead of da0?  Maybe try running that correctly
from fixit.

Finally, I also wouldn't be suprised if use of a DD disk has been
utterly broken, since there seems to be great antipathy towards use of
it, in the documentation and installer.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?zw8xzwzy2f.xzw>