Original dual system hard disk WindowsXP and RedHat9.0. Boot from MBR with GRUB. The partition information is as follows:
Disk / dev / hda: 4865 Cylinders, 255 Heads, 63 Sectors / Track
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
Device boot start end #cyls #blocks id system
/ DEV / HDA1 0 1019 1020-8193118 b Win95 FAT32
/ DEV / HDA2 1020 4864 3845 30884962 f Win95 ext'd (lba)
/ dev / hda3 0 - 0 0 0 EMPTY
/ dev / hda4 0 - 0 0 0 EMPTY
/ DEV / HDA5 1020 2305 1286- 10329763 83 linux
/ DEV / HDA6 2306 2816 511- 4104576 83 Linux
/ DEV / HDA7 2817 2889 73-586341 82 Linux swap
/ DEV / HDA8 2890 3569 680-5462068 83 linux
/ DEV / HDA9 3570 4864 1295- 10402056 B Win95 FAT32
The original Windows is some of the people's installed, C, D, E3 logic disk, HDA6 partition is previously separated from the D disk before the D
4G
Later, it was found that the more the procedures under Linux were more, and / usr space has reached
4.6G
The usage rate with DF is 99%, and the entire D disk is removed to do a separate / usr partition throughout the entire D. WindowsXP is installed in front of which has been installed with an incomplete disc. It has been unstable. When it is playing CS and fighting games, the VC is not installed, and it is not used. The day before yesterday, because of the experimental environment for a DSP, install CCE needs to reload Windows under Windows. Get a engraved XP disk, use NTFS to set the C drive after installation. Restart, found GRUB boot error. This situation is used to it, it is not to reload GRUB. Habitual action, take out the top of the sword - Linux installation disk, enter the rescue mode, let the installation disc automatically find the root partition. ! ! ! I actually prompt to find any Linux partitions, which is strange, is the partition form error? Enter the shell,
# / sfdisk -l / dev / hda
It was found that the HDA6 partition for the original EXT2 partition was disappeared.
/ DEV / HDA6 2817 2889 73-586341 82 Linux swap
/ DEV / HDA7 2890 3569 680-5462068 83 linux
/ DEV / HDA8 3570 4864 1295- 10402056 b Win95 FAT32 This situation has never seen, MOUNT is partitioned by HDA7, and the data is found normally. Then, the partitioned table is wrong. Fortunately, I used to study the data of each partition 0 track 1 sector when studying MBR.
DD if = / dev / hdax of = / home / MBR / PX BS = 512 count = 1 x is the corresponding partition number.
In any case, you will be restored to the guidance partition. Also use the DD command to restore / HDA6 and / HDA7 boot information. After restarting, use the Linux installation disk into the rescue mode, find the root partition and reload GRUB, because / usr is not hung by a separate partition, so / sbin / grub command is invalid, first Mount GRUB partition.
#mkdir / rescue
# / Rescue / Sbin / Grub
#root (HD0, 7)
#setup (HD0)
Modify the corresponding grub.conf file, and / etc / fstab. After restart, it is basically returned to normal, but the original HDA6 partition can no longer see. The 98 repair disk that is started with a disc is not found in the partition table between the cylinders between the 2305 and 2817. Perhaps PQ Magic can find what, exit Diskman, run the PQ Magic6.0 on the disk, and then pop up the information saying that the partition table has an error, and ask if it is needed. Well, I can find mistakes, play. . I will press it in hand, because of the moment, the disaster begins, after the information is repaired, the screen crashes. .
After restart, the hard disk starts can't find the startup information, start with the 98 repair disk, after selecting from the CDROM, the cursor is parked above the left side, keep flashing, flashing, flashing, it is not reflected. Change classic 98 mounting dish Select the above situation from the disc or the above. I am anxious here, never heard of the situation that cannot be started from the disc, the start-up CD can automatically load a small DOS system. Try to start with Linux installation dishes, yeah, i love linux! Enter the Rescue mode, look at the SFDisk, day. 160 partitions, starting from HDA6 is a repetitive partition, pointing to partition cylinders 2305 to 289. There are also 15 partitions with FDISK. No way, you will only delete the back partitions, now there is only one HDA1 FAT32 partition, an extension partition and a HDA5 Linux (/ usr) partition, the root partition is gone. The dead PQ, my hard disk partition table backup is placed in the Linux root partition,
. After restarting, it is finally booted with a 98 repair disk, running the Diskman, try to rebuild the partition table. Results have been found four partitions,
Sub-cylindrical start cylindrical termination type
0 0 1019 FAT
1 1020 2305 Extend
2 2892 3569 Linux
3 3570 4864 FAT
4 1020 2305 Linux
It seems that Diskman has used the previous partition as the main partition in order to find the partition. Not only there
4G
The space did not find it back and lost a swap partition. Hey, the revolution has not been successful, and comrades need to work hard. Take a closer look, find that the first partition, Linux's primary partition, is actually the 91th track. In theory, a partition start-guided track is between the magnetrics, the data is on the 1 head, so continued View 0 cylindrical, 0 track, 1 sector, MBR partition table, from the number 66 byte, found that partitions of the second partition is 00 5B C1
4C
83 Fe
7f
F4 09
6F
C4 02 69 B
0 a
600
The 5b, 10%, 91, indicates the starting track, change it to 01, restart, use the Linux boot disk to enter the RESCUE mode and find it or not find the Linux root partition, Mount 2 partition error. Is the partition information or wrong? Suddenly think of a few days ago, I've calculated the information of MBR using a pen may leave any clues. So I went back to the cabinet, but the best did not abandon me, finally found a little information on a crumpled draft paper.
16386363 30041550 = 46427913, 46427913 10924200 = 57352113, these data seem to be part of the origin of the original partition.
#SFDisk -l -us / dev / hda
There is a problem, 16386363 is now the starting sector of the No. 4 partition, and the starting sector of the No. 2 partition is 46460043, and the 46427913 is a bit gap, calculated, a cylinder 255 tracks, one track 63 sectors
(46427913-46460043) / 255/63 = 2, just offset 2 tracks, then change the starting sector of the No. 2 partition, restart. . Rescue mode. Long live, finally found the root Linux partition,
The partition table is really a dangerous thing, can't play, or honestly rebuild the partition table, find the previous partition information backup, rebuild the partition table according to the backup information. Everything comes back to write the repair process. .
After this surprisingly affected partition repair process, I have drawn a few experiences. Sharing 1. Back up your partition table, and it is best to back up in a floppy disk, a U disk, CD, and other non-hard disk media, in case The problem can also be rebuilt accordingly, because the partition table is MBR or the virtual MBR is mostly in the 0 track 1 sector, it will not affect your data area, so if the partition table is wrong, you still want to retrieve the data, thousands Do not override information or format in the data area.
2. This partition is still good. Just use shortly recorded the starting magnetic head of Linux root partition, or you want to cry, no tears.
This shows that the people can be lucky :)
3.pq Magic is a unstable and dangerous tool, caution. There is a similar tool parted under Linux, but I haven't used it yet, in the study, but the tool under Linux is stabilized, it should be better than PQ, personal point of view.
4. If there is Linux and Window dual system. It is often necessary to reload Windows to make GRUB in a non-MBR area and set it to an active partition.
ICEFOX_YIC 6th Apr 05