
I have an old Compaq laptop I'm trying to fix for the son of friends. I'm the one who gave him the laptop, with Damn Small Linux installed on the machine's only hard disk, so that he could use the thing for browsing, email, instant messaging, etc. When I set it up, I had four partitions: 1. hda1 was the boot partition. It started at cylinder 5 and went to 483. I put a regular Linux filesystem on it, ID 83. 2. hda2 started at cylinder 484 and went to 961. I put a regular Linux filesystem on it too, ID 83. 3. hda3 started at cylinder 1 and went to 4. I put a Compaq diagnostics filesystem on it, ID 12. I have a vague memory of learning at the time I was setting up the laptop that the BIOS for the computer was on the hard disk and that's why I had hda3. 4. hda4 started at cylinder 962 and went to 993. I put a Linux swap filesystem on it, ID 82. When I took the computer back to try to fix it, I was aware that there were lots of filesystem problems being reported. At the same time, I thought I'd take the opportunity to upgrade to the latest version of DSL for the boy. I thought the best way to proceed was to boot up using a Knoppix live cd in text mode, delete the existing partions 1, 2 and 4 and add new partitions 1,2 and 4 with the same filesystems as the original partitions had had before. I did that using fdisk and was told I'd have to reboot before my changes took effect. I did that and then tried to run fsck /dev/hda1. I thought there'd be no problem reported by fsck, because I thought that replacing the partitions as I'd done would have overwritten everything on them. However, that doesn't seem to be right. fsck found errors and asked me to confirm every change it suggested as it went along. I didn't want to have to do that, so I exited and ran fsck -p /dev/hda1 instead. However, that didn't work either. It kept telling me that because of unexpected inconsistencies, I had to proceed manually. How do I obliterate everything on hda but hda3 and create my other partitions and filesystems afresh, in a way that puts an end to existing filesystem errors?