[Cialug] Aligning blocks with fdisk
Mike Hughes
mike at visionary.com
Fri Sep 25 20:02:02 UTC 2020
Thanks for the responses!
I also reached out to Rod Smith, programmer of the fdisk replacement gdisk who has actually helped me in the past. He responded this morning. I'll share his response below.
From: Kyle H <khamil8686 at gmail.com>
You need to worry about start and end blocks, new partitions start at num
blocks +1. you have them overlapping by a shared block is what im seeing.
you have multiple partitions sdb starting at block 1131. Hope this helps,
im usually good with partitioning and data recovery and i enjoy it :)
kyle
Thanks Kyle. I am mostly comfortable with some data recovery and partitioning. Apparently just enough to jump into this without any reservation about deleting and re-creating a partition table. I've done this tens of time and granted, the first five times had me sweating. But I've gotten used to the success and did not anticipate getting bit this time.
--
From: Andrew Denner <linux-list at upeke.com>
The categorical first question, do you have a backup of the information on
the disk?

LOL! Thanks for the tip Andrew! 😂😂😂
--
From: Rod Smith <rodsmith at rodsbooks.com>
On 9/23/20 5:49 PM, Mike Hughes wrote:
> Hi Rod,
>
> You helped me in the past and I was hoping this one might be recoverable
> too. Is there a method to specify partitions based on blocks rather than
> sectors?
No, at least not with any tool with which I'm familiar; however, all is
not lost....
> [Cent-5:root at larry2 ~]# fdisk -l
>
> Disk /dev/sdb: 21.4 GB, 21474836480 bytes
> 255 heads, 63 sectors/track, 2610 cylinders
> Units = cylinders of 16065 * 512 = 8225280 bytes
Note this message ("Units = cylinders of..."). The concept of disk
"cylinders" was once meaningful, but it's transitioned from meaningful
to a convenient fiction to an inconvenient fiction to worse than
useless. I don't know why fdisk is even using cylinders in your case,
unless it's a very old version of fdisk -- AFAIK, fdisk switched from
cylinders to sectors long ago, even on MBR disks. In any event, if fdisk
is using cylinders internally, that may be the source of the problem.
However you recover, be sure your tools use sectors, not cylinders.
...
...
At this point, your best bet for recovery is to use TestDisk (or
something similar):
https://www.cgsecurity.org/wiki/TestDisk
This software will scan your disk for filesystem signatures and create
new partition(s) around the filesystem(s) that it finds. You may need to
delete the partition(s) you've created that reside over the existing
ones in order for this tool to work.
--
Rod Smith
rodsmith at rodsbooks.com
http://www.rodsbooks.com
I was not successful with testdisk either so we ended up extracting the data from preprod.
Have a great weekend all!
Michael Hughes // System Administrator
Visionary Services, Inc.
300 East Locust St., Suite 250
Des Moines, IA 50309
Phone: 515.369.3545 ext.116<tel:515-369-3545,116>
Toll-free: 888.303.2848 ext.116<tel:888-303-2848,116>
Cell 515.661.4343<tel:515-661-4343>
Website: visionary.com
More information about the Cialug
mailing list