You are not logged in.

#1 2024-04-01 08:04:09

raphaelabb
Member
From: France
Registered: 2021-02-03
Posts: 35

[SOLVED] Is it possible to restore partition table with system inside?

Hello,

Using parted, I have changed the partition table of /dev/sda from gpt to msdos by mistake (instead of /dev/sdd).
/dev/sda is an arch install (sda1 --> /boot, sda2 --> /).

I am writing from my second arch system. I have back up and can reinstall easily, but is there a quick way to restore the content of those 2 partitions? Or is reinstallation the better way?

Last edited by raphaelabb (2024-04-01 12:28:33)

Offline

#2 2024-04-01 09:34:52

shulamy
Member
From: israel
Registered: 2010-09-11
Posts: 468

Re: [SOLVED] Is it possible to restore partition table with system inside?

i think testdisk can do it

https://www.cgsecurity.org/wiki/TestDisk_Download

ezik

Offline

#3 2024-04-01 09:50:24

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: [SOLVED] Is it possible to restore partition table with system inside?

It is possible to re-create the table manually but you would have to know the exact sectors at which the partitions start and end.


Jin, Jîyan, Azadî

Offline

#4 2024-04-01 12:27:31

raphaelabb
Member
From: France
Registered: 2021-02-03
Posts: 35

Re: [SOLVED] Is it possible to restore partition table with system inside?

shulamy wrote:

It did the job! Used as root from another arch installation on another disk, It recreated the altered GPT table and my Arch boots fine.
testdisk is available in Arch Extra Repository. Cool software...

Thank you.

Last edited by raphaelabb (2024-04-01 12:30:20)

Offline

Board footer

Powered by FluxBB