Hendrik Friedel posted on Sat, 23 Jul 2016 13:15:50 +0200 as excerpted: > this morning I had to face an unusual prompt on my machine. > > I found that the partition table of /dev/sda had vanished. > > I restored it with testdisk. It found one partition, but I am quite sure > there was a /boot partition in front of that which was not found. > > Now, running btrfsck fails: > > root@homeserver:~# fdisk -l /dev/sda > > WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util > fdisk doesn't support GPT. Use GNU Parted.
There are two partition types in common usage on x86, the older MBR type and the newer GPT type, which you're running. As it says, fdisk doesn't support the latter well, tho it does warn about it (and I think new fdisk /might/ actually support it, but if so you're not using new enough, obviously). But you're in luck, because gpt stores a second copy of the partition table at the /end/ of the device, as well as the primary copy at the beginning, and good gpt tools will be able to restore the primary copy from the secondary one. Try gdisk, aka gptfdisk. It both supports gpt partition tables and has functionality that allows you to restore the primary from the secondary as above. It has a good manpage, and there's more info about it on the home page as well. http://www.rodsbooks.com/gdisk/ -- Duncan - List replies preferred. No HTML msgs. "Every nonfree program has a lord, a master -- and if you use the program, he is your master." Richard Stallman -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html