fusebad.blogg.se

Ubuntu recover lost partition
Ubuntu recover lost partition






We'd try to re-create partition of bigger size and verify the block count and block size and it should not change, if it changes then we'd need to create a bigger partition and verify again. Now, let’s try to read “Block size” and “Block count” from “/dev/sdb1” using “dumpe2fs” command. So, let’s create a partition of size 1GB first and check.

ubuntu recover lost partition

In this case, I knew that it was size of 600MB, however, in real-time we’d not know or remember the actual size of partition.

ubuntu recover lost partition

This partition should be of any size and should greater than the original size of the first partition before it was erased. So, let’s create first partition of any size on “/dev/sdb” and then try to detect “Block size” & “Block count” using the “dumpe2fs” command (need to use xfs_info command for XFS file systems). Step 2: Identify the ‘Block size’ and ‘Block count’. If mounted details are not available by any chance in “/etc/fstab” file, then we’d need to detect those partitions and recover it. If system needs a reboot then comment the respective lines in “/etc/fstab”, otherwise system may fail to boot-up and throws up “Ctrl+D error” goes into emergency mode. They are “/dev/sdb1” for which the mount point was “/data1” and “/dev/datavg/datalv” lvm for which the mount point was “/data2”. We could understand by reading “/etc/fstab” file that there were two partitions created on “/dev/sdb”. Step 1: Identify number of partitions which were created on the device. The situation that I’m going to cover here is wherein a hard drive partition table is erased, however, no re-formatting has been done yet. NOTE: If a hard drive is extremely damaged (physically) or if it is re-formatted (making a file system) or if meta-data itself is gone corrupted or severely damaged then there are very less chances of recovering data, in such cases users may have to rely on some sophisticated third party tools which may recover some or part of data.

ubuntu recover lost partition

So, let’s see how could we get this achieved. There are at times that we could not use those third party tools, hence, we’ve to go with native way of restoring partition table data. There are a few third party tools (many from open-source) available which could get this job done, however, I wanted to show how this could be done using native tools/commands in Linux operating system. Yes, “how to recover or repair corrupted or deleted partition table of a hard drive” or “how can I recreate hard drive partition table without losing data” are some of the keywords that we hit on Internet to find out a solution. T here are many a times that we’ve come across this situation where an “hard drive partition table has been erased accidentally” or “partition data is missing or corrupted” and hence, unable to mount respective block devices.








Ubuntu recover lost partition