Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <36566.192.168.10.32.1107251557.squirrel@www.hq.astra.ph> Date: Tue, 1 Feb 2005 17:52:37 +0800 (PHT) Subject: /dev/hda overwritten on local cygwin mirror From: list-subscriber AT hq DOT astra DOT ph To: cygwin AT cygwin DOT com User-Agent: SquirrelMail/1.4.1-4_rh9 MIME-Version: 1.0 Content-Type: multipart/mixed;boundary="----=_20050201175237_88856" X-IsSubscribed: yes ------=_20050201175237_88856 Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: 8bit 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 ------=_20050201175237_88856 Content-Type: text/plain; name="partition.txt" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="partition.txt" major minor #blocks name rio rmerge rsect ruse wio wmerge wsect wuse running use aveq 3 0 39082680 hda 948782 6795238 61940676 11513870 872690 1386866 18096468 6577050 -1 6038100 10901089 3 1 4200966 hda1 37407 266270 2429434 352500 342963 381836 5813048 1102780 0 337700 1457290 3 2 1 hda2 0 0 0 0 0 0 0 0 0 0 0 3 5 4200966 hda5 37136 7698 358314 326270 214403 348550 4508512 835120 0 531150 1161510 3 6 4200966 hda6 107639 327316 3479274 1795720 261661 376088 5103736 1188160 0 484400 2984090 3 7 8393931 hda7 414644 4604479 40152618 4592460 19911 200487 1764968 2131410 0 2380960 6724290 3 8 8393931 hda8 238342 391818 5040914 734870 7379 22273 238024 632270 0 479010 1367580 3 9 1052226 hda9 924 4977 47208 17740 1002 4803 46944 44300 0 34840 62120 3 10 8634906 hda10 111216 1192446 10429498 3692690 25346 51412 618352 642510 0 1674230 4335540 ------=_20050201175237_88856 Content-Type: text/plain; charset=us-ascii -- 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/ ------=_20050201175237_88856--