Broken partition table

2006-10-18 Thread Kyrre Nygård

Hello!

My partition table is messed up. I have a 150 gigabyte S-ATA hard drive, with a 
single NTFS partition running Windows XP. I've been running gpart /dev/ad0 for 
the last 14 hours now and it's not saying anything. I just want to get my data 
back. I don't care if I have to reinstall everything.

How it all came about is a long story. I ran a second hard disk drive, with 
FreeBSD, and GRUB so it could do my dual booting. But I needed the space, so I 
formatted it to NTFS from Windows XP. That's it really, after that, it wouldn't 
boot. Couldn't load NTLDR.

That's when I tried a lot of different things. boot0cfg, fixmbr and fixboot. I 
even managed changing its system ID type to FAT using fdisk -- I wasn't 
thinking clearly -- I was in deep shock. I have also tried gpart from Knoppix, 
but all its guesses came out as zero. I've also tried running gpart from 
Insert, another Linux distribution, but it totally freaked out about some I/O 
stuff. Linux uses SCSI drivers for S-ATA though. 

Is my only choice now to keep running gpart, even if it will run forever?

All suggestions welcome, please!

Best regards,
Kyrre


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


broken partition table

2004-03-29 Thread Roberto Nunnari
Hi all.

Please also reply to my mailbox as I'm not on the list.
Thank you.
I was installing a new drive on my 5.2.1-p3 and I believe
I made some mistake while using fdisk and bsdlabel.. in
fact the partition table for my bootable disk has changed.
this was my fdisk amrd0 before:

web.dti.supsi.ch# cat fdisk.amrd0
*** Working on device /dev/amrd0 ***
parameters extracted from in-core disklabel are:
cylinders=4420 heads=255 sectors/track=63 (16065 blks/cyl)
Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=4420 heads=255 sectors/track=63 (16065 blks/cyl)
Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
start 63, size 71007237 (34671 Meg), flag 80 (active)
beg: cyl 0/ head 1/ sector 1;
end: cyl 1023/ head 254/ sector 63
The data for partition 2 is:

The data for partition 3 is:

The data for partition 4 is:

and this is how it looks now..

web.dti.supsi.ch# fdisk amrd0
*** Working on device /dev/amrd0 ***
parameters extracted from in-core disklabel are:
cylinders=4420 heads=255 sectors/track=63 (16065 blks/cyl)
Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=4420 heads=255 sectors/track=63 (16065 blks/cyl)
Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
start 0, size 70766325 (34553 Meg), flag 0
beg: cyl 0/ head 0/ sector 1;
end: cyl 308/ head 254/ sector 63
The data for partition 2 is:

The data for partition 3 is:

The data for partition 4 is:

as you can see, it is no longer bootable, and it doesn't
start at sect 63 like before but at 0
How can I fix it? I was about to give the following command
but thought I'd better ask first here...
web.dti.supsi.ch# fdisk -B -f fdisk.conf.amrd0

I expect the above to reinstall the boot code and to correct
the partition table.. I expect I'll be able to give that
command while the system and running and so the filesystem
mounted.
also.. with the -t option the results are almost identical
to the original state, but end cyl is different.. See..
is that important?
web.dti.supsi.ch# fdisk -t -B -f fdisk.conf.amrd0
*** Working on device /dev/amrd0 ***
fdisk: WARNING line 2: number of cylinders (4420) may be out-of-range
(must be within 1-1024 for normal BIOS operation, unless the entire 
disk
is dedicated to FreeBSD)
parameters extracted from in-core disklabel are:
cylinders=4420 heads=255 sectors/track=63 (16065 blks/cyl)

Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=4420 heads=255 sectors/track=63 (16065 blks/cyl)
Information from DOS bootblock is:
1: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
start 63, size 71007237 (34671 Meg), flag 80 (active)
beg: cyl 0/ head 1/ sector 1;
end: cyl 323/ head 254/ sector 63
2: 
3: 
4: 
and here is the fdisk.conf.amrd0 file
web.dti.supsi.ch# cat fdisk.conf.amrd0
# values extacted from old fdisk.amrd0
g   c4420   h255s63
p   1   165 63  71007237
p   2   0   0   0
p   3   0   0   0
p   4   0   0   0
a   1
--
  Roberto Nunnari -software engineer-
   mailto:[EMAIL PROTECTED]
 Scuola Universitaria Professionale della Svizzera Italiana
 Dipartimento Tecnologie Innovative
  http://www.dti.supsi.ch
 SUPSI-DTI
 Via Cantonaletel: +41-91-6108561
 6928 Manno """   fax: +41-91-6108570
 Switzerland   (o o)
===oOO==(_)==OOo
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"