Laptop Happy

After another session of troubleshooting I got my laptop up and running again. Here the story goes…Collecting a bunch of first HD sectors around my boxes convinced me that every first sector was different from the others. Scaring thoughts of trying all the 65535 values with a reboot in the middle were hitting my mind… but I had no better idea than this… Well to be honest I had a better idea – internetting to find the data structure of the first HD sector in order to put some proper values at offset 506.
This would have require an evening spent in front of my desktop in the other room, and neither my wife nor me would have appreciated 🙂 So I went the experimental way.
I started with 0x0000 value, anything magic with that, just a starting point, and rebooted.
The boot went fine and it happened to get over the ‘remounting root filesystem’ line just to produce a bunch of warnings such as: invalid swap partition, can’t activate swap and the like.
Anyway the system reached a usable state and I was able to login. First I launched fdisk and when issuing a ‘p’ command (print partitions) I was greet with a warning – logical end for partition /dev/hd4 different from physical end; plus some digits intended to help me in understanding the problem … I guess.
Well, if the problem is in the swap partition, maybe the best way to fix it is just to remove and re-create the swap partition. All this can be done without a reboot therefore it is worth a try.
After the reboot the box come up fine, and at last I stop holding my breath (my face should have been about blue in the face at the moment).
This morning while commuting I flipped just a couple of bits. I forgot to set the partition type to ‘Linux swap’ and to run the mkswap command on the partition. Lesson learned – don’t touch and watch astonished the blinken lights.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.