/dev/hda overwritten on local cygwin mirror
list-subscriber@hq.astra.ph
list-subscriber@hq.astra.ph
Tue Feb 1 09:12:00 GMT 2005
Hello Cygwin Gurus,
Before anyone starts flaming me, I'd like to say that the question I have
does not concern any particular app in cygwin but the whole of cygwin (as
in literally) on our local mirror...(If this is better discussed in
cygwin-talk, please point it out.)
Here's the problem:
Our cygwin mirror is on a linux box running trustix secure linux version
2.0. I decided to upgrade to trustix secure linux 2.2 and as I was about
to created a bootdisk for a network install, I inadvertently typed:
dd if=bootnet.img of=/dev/hda
Then, as soon as I pressed enter, it was too late to realize that I
should've typed /dev/fd0
instead of /dev/hda.
This server we have, thank goodness, has not crashed. The size of
bootnet.img is just 1474560 bytes and I was relieved that it was just that
size. I'm sure the partition table got messed up.
I'd like to know how I could rewrite back the partition table to the
correct values. I've attached the output of /proc/partitions since
pasting the text here results in a line wrap.
Here's the output of fdisk -l
# fdisk -l /dev/hda
Disk /dev/hda: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 ? 37025 28907 2082274171+ e1 DOS access
Partition 1 does not end on cylinder boundary.
/dev/hda2 ? 205730 157209 1757737216 6 FAT16
Partition 2 does not end on cylinder boundary.
/dev/hda3 ? 92987 13629 1510045103+ b8 BSDI swap
Partition 3 does not end on cylinder boundary.
/dev/hda4 ? 87045 154994 545800106+ 5e Unknown
Partition 4 does not end on cylinder boundary.
Partition table entries are not in disk order
As you can see, the partition table is messed up. However, I'm lucky to
have all the partitions mounted so the output of df makes much more sense:
# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda1 4200828 1495504 2705324 36% /
/dev/hda10 8499136 6305520 1761872 79% /home
/dev/hda5 4134900 3612280 312572 93% /var
/dev/hda7 8262036 7273616 568724 93% /var/ftp
/dev/hda6 4134900 2430408 1494444 62% /var/log
/dev/hda8 8262036 5231308 2611032 67% /var/www
I've noticed that the "blocks" fields displayed with `cat
/proc/partitions' and `df' are
not the same. (Which of the two is correct).
Could someone point out how to restore my partition table (or how to
restore the first 1.44 MB that had been overwritten on /dev/hda).
Please save our cygwin mirror!
Thanks in advance.
Best Regards,
Carlo
--
Carlo Florendo
Astra Philippines Inc.
www.astra.ph
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: partition.txt
URL: <http://cygwin.com/pipermail/cygwin/attachments/20050201/48b42580/attachment.txt>
-------------- next part --------------
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
More information about the Cygwin
mailing list