Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

help with partition table

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
Ilix
Posts: 5
Joined: 2017-10-25 18:11

help with partition table

#1 Post by Ilix »

Hi everyone!

I missed the partition table of my disk by giving a wrong command (dd to clone two disks).
I gave
dd if = / dev / sda of / dev / sdb bs = 4096 conv = notrunc, noerror

I immediately noticed the error and immediately gave a CTRL-C. Meanwhile, however, dd had copied the partition table.
The computer is on and then I continue to see the disk with the old partition table.

Is it possible to retrieve somehow the old damned configuration? I do not lose datas because I see them apparently normally. Maybe I lost a partition with Windows 10 (but I'm not even sure (maybe I've already deleted it some time ago).

Currently fdisk -l shows me:

# fdisk -l
Disk / dev / sda: 238.5 GiB, 256060514304 bytes, 500118192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical / physical): 512 bytes / 512 bytes
I / O size (minimum / optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00042ad4

Device Start Start Ends Sectors Size Id Type
/ dev / sda1 * 2048 122882047 122880000 58,6G 83 Linux
/ dev / sda2 122882048 500117503 377235456 179,9G 83 Linux

Disk / dev / sdb: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical / physical): 512 bytes / 4096 bytes
I / O size (minimum / optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x00042ad4

Device Start Start Ends Sectors Size Id Type
/ dev / sdb1 * 2048 122882047 122880000 58,6G 83 Linux
/ dev / sdb2 122882048 500117503 377235456 179,9G 83 Linux

And gpart ...

# sudo gpart / dev / sdb

Begin scan ...
Possible partition (Linux ext2), size (99253mb), offset (1mb)
Possible partition (Linux ext2), size (1508475mb), offset (99254mb)
Possible partition (Windows NT / W2K FS), size (299149mb), offset (1607729mb)
Possible partition (Windows NT / W2K FS), size (849mb), offset (1906879mb)
Possible partition (Windows NT / W2K FS), size (299999mb), offset (1907728mb)

*** Fatal error: dev (/ dev / sdb): search failure.


To be sure, I'm not on the way of madness ...

# df -h
Dim File System Used Dispon. Use% Mounted on
udev 3,9G 0,9G 0% / dev
tmpfs 785M 79M 706M 10% / run
/ dev / sda1 58G 16G 40G 28%
tmpfs 3,9G 3,1M 3,9G 1% / dev / shm
tmpfs 5.0M 4.0K 5.0M 1% / run / lock
tmpfs 3.9G 0 3.9G 0% / sys / fs / cgroup
/ dev / sda2 177G 158G 11G 94% / home
/ dev / sdb1 96G 19G 73G 21% / var
cgmfs 100K 0 100K 0% / run / cgmanager / fs
tmpfs 785M 92K 784M 1% / run / user / 1000
/ dev / sdb2 1.5T 190G 1.2T 14% / home / Ilic / Documents

I could understand that at the moment (before restart) partitions are still viewed differently from the partition table.

And now?
Tips?

I have the backup. Indeed, I have two.
I would like to avoid the blunder of reloading everything.

Is there a way to recover the partition table that is currently in use?

Hello. Ilic

Segfault
Posts: 993
Joined: 2005-09-24 12:24
Has thanked: 5 times
Been thanked: 17 times

Re: help with partition table

#2 Post by Segfault »

If your fdisk still sees the old table just write it from fdisk, or I'm missing something here?

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: help with partition table

#3 Post by p.H »

My reply may come a bit late.
In addition to using tools such as gpart or testdisk to retrieve partition information from the disk at any time, you can get old information from the kernel until you reboot or reload the partition table :
- You can see the partitions which were detected by the kernel and their sizes (in 1024-byte blocks) in the pseudo-file /proc/partitions.
- You may also find information about the partitions in pseudo-files within /sys/block/sdb.

Post Reply