repair partition table
Posted
by m.sr
on Server Fault
See other posts from Server Fault
or by m.sr
Published on 2010-05-31T17:01:09Z
Indexed on
2010/05/31
17:03 UTC
Read the original article
Hit count: 462
Hallo.
I've just overwritten my partition table of my system's hard disk. i made a cfdisk on the wrong device (/dev/sda instead of /dev/sdd), deleted all partitions, made one new primary spanning over the whole device, set its type to 07 (NTFS) and hit write.
So here i am with my system running. Until i reboot, i hope/guess nothing will change - meaning: all my data is accessible (I'm currently making a dd-backup of the whole device and plan to make a .tar.gz-backup of the most important data later). I also backed up /proc/partitions, /proc/diskstats (even though i guess this is more about throughput and stuff like this ...) and /sys/block/sda/sda?/{start,size}.
Some further things i know:
- 4 primary partitions
- 1st partition: ~100Mb, ext3, /boot
- 2nd partition: ~100Mb, "Win7 Boot Partition", ntfs(?)
- 3rd partition: ~20...30GB, Win7, ntfs
- 4th partition: ~20...30GB, luks-encrypted device
- The luks- de crypted device is a LVM-PV
- The
/,/home&swap-partitions are all LVs on the (VG on the) above noted PV
So my questions:
- What is the simplest way to just write the kernels partition table to the disk?
- What is the simplest way to take the above mentioned (and perhaps other I don't know of ...) data and generate the partition table?
- Are there any problems to take care of regarding to luks and/or lvm?
- Is there any data I should backup before rebooting (meanig stuff from kernel [ /sys/..., /proc/...] and so on, which could help me regenerate the partition table)?
Thanks a lot!
P.S.: debian sid, Kernel 2.6.34-1-amd64 from debian-experimental, 80GB Intel SSD
© Server Fault or respective owner