Followers

Saturday, February 26, 2011

How to fix your partition tables in ubuntu

User Mac-n-me asked how to fix partition tables in ubuntu.  Heres how to do it.

The first thing you need to do is install gparted with the live CD.  That takes a few steps, but the best tutorial I found is right here.

Once you finish with that, we want to check our current partition table.  Open up terminal and use the command
cat/proc/partitions
You can view the details about the disk by using this command:
 sudo fdisk -l /dev/sda
Now we need gparted to guess what it thinks the partition table used to be.
sudo gpart /dev/sda
After a while, it will output it's guess.  Take a look at it.  If it looks reasonable, then go ahead and accept it by using this command.
sudo gpart -W /dev/sda /dev/sda
For most cases, your partition table should be repaired.

:)

16 comments:

  1. I'll keep this in mind in case any of my partition tables go bad ;)

    ReplyDelete
  2. Thanks, my friend uses Ubuntu, I'll pass this on to him.

    ReplyDelete
  3. Always good to know, I screwed it up once.

    ReplyDelete
  4. hmm if I follow this blog, I might actually be able to dual boot without messing up my computer

    ReplyDelete
  5. I have been using windows for a long while now because its the only os for gaming :<

    ReplyDelete
  6. Haven't used it much but this seems like a very informative blog, followed :)

    ReplyDelete
  7. Nice tutorial! Ubuntu can be a bit tricky at times xD

    ReplyDelete
  8. Actually quite interesting. Followed

    ReplyDelete
  9. Brillant thanks! Most straightforward fix i've found!

    ReplyDelete
  10. thank you, one of my remote debian servers is broken and i need to fix it
    i will try this right now

    ReplyDelete
  11. I haven't had this problem yet, but now I'll know what to do! Thanks!

    ReplyDelete
  12. Thanks for the update!

    ReplyDelete
  13. Cheers for this, I'm sure that it'll come in useful for a future date!

    ReplyDelete
  14. well thank god i know how to do that now

    ReplyDelete