On Tue, 2002-07-16 at 05:40, Sameer Shinde wrote:
Thanks Sameer,
From the replies I get, I think only U get my problem correctly.
[snip]
Also, since the error messages already mention that you need to reinitialize the partition tables, I think that is the most likely solution for your problem. Running scan-disk on the partitions from windows is no use - its the partition table that is corrupted, not the FAT or disk space.
If it were my system, I would definitely back up all my data on a new disk and the check this disk. Standard DISCLAIMERS apply ...
Will it be safer to re-initialize the pratition table? Is that the only option I left with. If I free up the space by deleting the linux partitions using 'fdisk' then, I can very well recollect the space in windows without any problem. Again, I know there is a risk in reinitializing the partition table & I do not want to go for this option due to my valuable data
BTW, How to reinitialize the partition table (in safer way)? Where can I get info about it?
[snip]
Sameer(ds) seems to have touched upon right issue (?). It can be a corrupt partition table or it might be something else altogether. If I remember well, first release of Red Hat 7.0 had a installer bug at same stage of installation, but again that is not the trouble here as that was fixed. On 7.2 as far as I know, the disk druid uses GNU parted as its back-end partitioning tool. I had partitioning troubles with my large HDD (40GB), though they were due to an old bios and incorrect geometry. During that I noticed that parted does not necessarily end you partition on a cylinder boundry (there is no reason that it must be so). Other partitioning tools like fdisk will however crib about this.
All of the following assumes that your partition table is corrupt and need to be fixed. If the real issue turns out to be something else this mail be ignored. It is however interesting from points of partition rescue and this cool tool called GNU parted.
If your partition table is corrupt, both parted and linux fdisk will barf when you start them or ask them to verify partition table.
Considering your situation here, I think it is best to rebuild your partition table from scratch. You can do this in following ways using parted. Though I propose this scheme of things, ALL STANDARD DISCLAIMERS ABOUT BACKING UP YOUR DATA APPLY.
1. Read parted user guide on www.gnu.org properly and all of it. It is excellent and will help you.
2. Get a estimate of how much data you need to save from your windows partition.
3. Will the data fit on CD(s) ?, if yes, well burn CD(s) right away, by any means possible, (like taking your disk to a friend who has a CD-BURNER, boot windows, burn your CD.) Initialise your disk using DOS fdisk or linux fdisk/parted/disk druid. Proceed with installation.
4. It won't fit on CD(s)/ you do not want to do it. Get a HDD from some one that has enough FREE UNPARTITIONED disk space to contain your windows partition. Put the second disk as slave. Boot redhat install cd, choose rescue mode, that should leave you with a shell prompt. You have access to GNU parted from shell. Use parted to create a partition in the UNPARTITIONED AREA on the second disk. You can either do this or use the native OS (windows ?) on the second hard drive to partition the free area. (Sticking to native partitioning tools for respective OSes is always the safest route.) This new partition that you create should be of the __same size or larger__ than your Windows partition. It should not be of smaller size. Further do __not__ format the new partition. Now use the partition copying ability of parted to copy you windows partition to the newly created partition on the second disk.
e.g. (parted) cp /dev/hda1 /dev/hdb2
check the exact syntax and more examples in parted USER manual. Be careful not to copy /dev/hda, which is your entire HDD. We only want /dev/hda1 or whatever partition you have.
Once your windows partition(s) is(are) out of the way, reinitialize your partition table recreating exactly the same way your first partition that you saved. You might want make it a few MB more just to be totally safe, however if you had enough free MBs in your initial partition that is not necessary. Again do not format the new partitions.
Once you are sure that the partition table is clean (i.e. fdisk, parted, cfdisk and junta does not barf on it), use parted again to copy back your original partition,
(parted) cp /dev/hdb2 /dev/hda1
Finish your installs and leave happily.
5. This ones least effort and might work. IF AND ONLY IF you have NOT created additional DOS/Windows partitions using linux fdisk and have NOT used them under Windows for some time now, without DOS fdisk knowing about it, can you do the stuff said below. If you do not understand what I just wrote, read again. Once your are dead sure and the situation is as below,
You installed windows with certain number of partitions lets say, 1 primary (c:) 1 extended | `--> 1 logical (d:) 2 . . . If this was the way that DOS fdisk initially initialized your MBR+Partition table. You DID NOT add extra logical DOS drives using Linux and then used them under Windows to store data.
If all of the above conditions result in true,then
boot in "safe mode command prompt only" (Press F8 as windows starts to boot, this needed to be done just before the logo comes up.)
do "fdisk /mbr", this will wipe any boot loader like lilo from MBR as well as put back original partition table as it was when Windows was installed.
Make sure Windows boots properly and you see all your windows partitions as well as data. Proceed with Linux install.
6. Now the most dangerous one, we have no access to any CD-BURER / additional HDD, we can not do instruction 5, then,
-1. Read all HOWTOs related to Partitioning, fdisk etc. 0. take a deep breath and pop in that RHL CD. 1. Boot RHL cd, go in rescue mode, get a shell 2. fdisk -l /dev/hda 3. Note down _all_ that fdisk said it sees, particularly start/ end cylinders for each partition and the associated blocks. 4. Make sure you understand what any and all those numbers mean we don't care for linux partitions right now as we want to reinstall. 5. Delete all of your partitions with linux fdisk. THE IMPORTANT THING TO NOTE HERE IS THAT EVEN IF YOU DELETE YOUR PARTITION, YOUR DATA IS STILL AS IT IS ON THE DISK. 6. Write the blank partition table to disk using the 'w' command of fdisk. With out doing anything else Reboot and come back in rescue mode. 7. Now use linux fdisk again to recreate your previous windows partitions __exactly__ as they were in original fdisk listing that you wrote down. (If you didn't you are dead). Make sure you give the right partition/filesystem id to the partitions. e.g. 83 --> Linux, 82--> Linux Swap, c --> Win95 FAT32, f--> Win95 extended. For full listing see, fdisk's 'l' command.
You might want to use GNU parted instead of fdisk, as fdisk has this thing about DOS partitions, see fdisk's man page. In this case you should have saved the entries for the initial partition table as parted sees them.
8. Write partition table to disk and reboot. 9. Get back in rescue mode. use fdisk -l to see partitions, now try and mount the partition. Peek in to see if you data is still there. It should be there safe and sound. 10. Reboot and proceed with Linux install ahead.
All in all if it works let us know. Others please comment if I am incorrect anywhere in this listing. Suggestions welcome. GNU parted is a excellent tool for partition rescue and related things. I highly recommend all to read the USER manual.
Best regards,
Rajesh