Hello, I'd like to report a problem I recently encountered with the RedHat 5.1 distribution on Intel. I'd like to know if anyone else has ever experienced the problem, and if it can be fixed in any way. I recently installed Linux on a rather small (ext2 fs) partition for a Unix tutorial/demo purposes at work. There were no place for a swap partition, but my fat/fat32 drives had plenty of space left on them, so I figured I'd use a swap file on one of these drive. There was a fat32 drive available as /mnt/c and a fat on available as /mnt/f. (I believe both of them were mounted as vfat rather than msdos). I first tried on the /mnt/f partition. I created a file (might not have done it correctly using dd first.), then mkswap on it, and finally, swapon on it. Things appeared correct, until I started getting errors regarding the swapfile. At this point, things started getting bad. I couldn't access the fat partition at all. I didn't try to find the exact cause of the problem, and redid the same thing on the fat32 partition (probably creating the swapfile correctly from the start then). Same problem happened. After the system tried to use the file (I guess), the whole fat32 partition was unreadeable. Worst, I couldn't even boot from the fat32 partition. If I'd boot from a diskette, the fat32 partition was accessible fine. I had less chance with the fat partition, as I've not been able to read anything from it since then. From Linux, none of these partitions are now mountable. Closer look at the information on the disk revealed that the boot sectors of the partitions appeared to have been totally blanked. Any help in recovering the data/restoring the drive would be greatly appreciated! Thanks! Martin
We need to know what parameters you used with the dd command to create the swap file. It is possible with the wrong paramters that you may have corrupted your partition table or master boot record. Any other commands entered after the dd command would also be appreciated.
I was able to successfully do this with the following commands. # dd if=/dev/zero of=swapfile bs=1024 count=8192 # mkswap swapfile 8192 # sync # swapon swapfile I was not able to replicate the problem mentioned by the reporter.