Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Nov 2000 22:30:47 +1100
From:      Zero Sum <count@shalimar.net.au>
To:        dmp@aracnet.com, freebsd-questions@FreeBSD.ORG
Subject:   Re: Disklabel lost
Message-ID:  <00112222304707.00531@shalimar.net.au>
In-Reply-To: <3A1BA94B.D4E268DD@aracnet.com>
References:  <3A1BA94B.D4E268DD@aracnet.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday 22 November 2000 22:08, dmp@aracnet.com wrote:
> I did something really stupid, I tried installing Windows 2000 on the
> same disk as FreeBSD, after I had installed FreeBSD.  (What can I say
> sometimes I put my mind in gear before the hampster is in the wheel).
> Win2k barfed on my UDMA/66 controller, so it wouldn't install, but when
> I tried going back to FreeBSD, it barfed on me saying it couldn't find
> any of my partitions (not even the root partition).
> 
> So I load the fixit shell off the CD (using the live filesystem disc).
> dmesg output says my disk is ad4, so I set to poking at the thing:
> 
> Fixit# fdisk -1 ad4
> The data for partition 1 is:
> sysid 165,(FreeBSD/NetBSD/386BSD)
>     start 63, size 40088097 (19574 Meg), flag 80 (active)
>         beg: cyl 0/ sector 1/ head 1;
>         end: cyl 1023/ sector 63/ head 15
> Fixit# disklabel -r ad4
> disklabel: bad pack magic number (label is damaged, or pack is unlabeled)
> Fixit# disklabel ad4
> # /dev/ad4:
> type: unknown
> disk: amnesiac
> label: fictitious
> flags:
> bytes/sector: 512
> sector/track: 63
> sectors/cylinder: 1008
> cylinders: 39770
> sectors/unit: 40088160
> rpm: 3600
> interleave: 1
> trackskew: 0
> cylinderskew: 0
> headswitch: 0           # milliseconds
> track-to-track seek: 0  # milliseconds
> drivedata: 0
> 	8 partitions:
> #        size   offset    fstype   [fsize bsize bps/cpg]
>   c: 40088160        0    unused        0     0         # (Cyl.    0 - 
39769
> 
> So if I'm reading this correctly, the disklabel is gone?  Is this where
> I reinstall FreeBSD, or do I have a chance of restoring?
> 
I'm not an expert here, but I have been in your position, and no, all is 
not lost.  You can create a file with a new disklabel and work from that.

Recreating your partions is not impossible.  I had my information written 
down and used /stand/sysinstall to relabel.

However, that should not be necessary.  Changing the fstype to ufs and 
creating the a partion oversized should get you back to single user mode. 
If you can glean enough information from the root filesystem to work out 
what the rest of the information should be, you modify your disklabel again 
(with a correctly sized root [a] partition).  Next, try and recreate the b 
partion (swap), and keep going.  Remember, if you mount each recreated 
partion as ro, then you are not going to destroy any information currently 
on the disk.  So you even have room for some "trial and error".  When you 
can mount all your filesystems, and they all fsck ok, you are home and 
hosed.

Mind you, while I'd like to do this out of interest, I'd hate to have to do 
it.  long slow and worrying job.

That's the best I can do, so I would bide a while and see if the experts 
come up with a better solution.

Geoff
-- 
count@shalimar.net.au
Nihil curo de ista tua stulta superstitione


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




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