Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I had lost my boot partition. This happened quite frequently. I used to boot for recovery and rewrite the existing partioning. Last time I missed the correct option and installed LVM by mistake. Is it possible to get the previous partioning table back?

share|improve this question
2  
How the heck are you frequently loosing a boot partition? –  Zoredache Mar 2 '12 at 20:32

1 Answer 1

You just need to change the partition type with fdisk. It was created as LVMwith the same start and end cylinders, right?

To begin modifying the partition table. (Replace the below block device if applicable.)

# fdisk /dev/sda

Then, set the type for the applicable partition number. (Probably #1.)

Command (m for help): t
Partition number (1-4): 1
Hex code (type L to list codes): 83
Changed system type of partition 1 to 83 (Linux)      
Command (m for help): w

Reboot.

If the file system hasn't been clobbered every thing should be intact. Otherwise, you may need to restore the contents of the partition from backup.

Also, count me in for explanation on why this was a problem in the first place.

share|improve this answer
    
I had a f13 partioned as: /dev/sda1 - 300M boot /dev/sda2 - 50G root /dev/sda3 - swap /dev/sda4 - home. And I installed lvm by my mistake. How to go back my previous partions? Thank you. –  Marcio Carneiro Mar 9 '12 at 19:44

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.