You are not logged in.
Hi all,
I did a big silly. I was trying to set up a USB FreeDos environment to update my laptop's BIOS, and the first instruction I found was to relabel it as msdos using parted
sudo parted /dev/sdc mklabel msdosBut i accidentally wrote sdb, relabeling my harddrive (and yes I absentmindedly went through the warnings thinking it was because the usb was mounted)
Is there any way to undo that process and get all my hard drive data back?
Offline
Was this a GPT or MBR disk before that mklabel?
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |
Offline
I'm fairly certain it was GPT
Offline
I though maybe the backup GPT might be still there, but In my quick tests (with gdisk recovery options and testdisk) that doesn't seem the case.
Did you do a parted "print" and still have the output somewhere?
Last edited by progandy (2020-12-30 11:45:32)
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |
Offline
I did not I'm afraid
Offline
If the partitions are still present in the running system, you should be able to read
/sys/block/sda/sdb1/start
/sys/block/sdb/sdb1/size
/sys/block/sdb/sdb2/start
/sys/block/sdb/sdb2/size
...DO NOT REBOOT. Note everything down (on paper and maybe on the USB if it is still plugged in) and read this:
https://superuser.com/questions/217248/ … 392#217392
http://realtechtalk.com/Linux_How_To_Re … 2-articles
You should be able to use parted instead of fdisk, use "unit s" to switch to sector mode and create a gpt partition table if you want to use that.
And also note the filesystem types from e.g. lsblk so you can enter them again.
lsblk -o +PARTTYPE,PARTTYPENAME,PTTYPE,PARTUUID,PARTLABELLast edited by progandy (2020-12-30 12:34:01)
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |
Offline
Unfortunately ended up rebooting before I realised the mistake. Is there anything I can do from the install media, or am I scuppered?
I'm fine with having to reinstall, it's just inconvenient
Offline
You can give TestDisk a try. It may be able to locate the partitions and recreate the partition table. It is included on LiveCDs such as grml or the GParted LiveCD. You maybe also can install it via pacman after booting the Arch installation CD.
Last edited by Bevan (2020-12-30 13:00:03)
Offline
I'll give it a go. If it doesn't work then I'll probably go for a full reinstall.
Want to set up a dual boot with windows anyway because some games that I wanna play arent playing nice and I think it's a driver issue
Offline