Sample Header Ad - 728x90

I set the cylinder head sector count to 0, how do I undo this?

0 votes
1 answer
84 views
I was playing around with testdisk, gdisk and fdisk, and I set the cylinder head sector count to zero by mistake, and the system now reports "no medium". I tried opening the drive with gdisk, fdisk, cfdisk, sfdisk, cgdisk, sgdisk, fixparts, testdisk, parted, gparted, partx, mkfs. mke2fs, fsck e2fsck, and badblocks and all of those returned "no medium" or simular response as well. hdparm and sdparm seemed to offer hope, but none of the changes I tried worke:
# hdparm /dev/sda 
was 
4000000/64/32, sectors=8192000008, start=0
is
1024/0/62, sectors=0, start=0

# sdparm /dev/sda warning: mode page seems malformed
The page number field should be 0x01,0x02,etc... 
but is 0x00
Hereafter field position exceeds mode page length=2
My OS
# uname -a
Linux debian 5.10.0-22-amd64 #1 SMP Debian 5.10.178-3 (2023-04-22) x86_64 GNU/Linux
My VM environment
# systemd-detect-virt
none
How can I fix this? As far as how i set my chs to 0/0/0 I don't know. at the time i was playing around with testdisk gdisk fdisk I was rearranging the geometry for absolutely no reason. I was going back and forth from windows to Linux. Various identifiers changed such as the pid now reads pid:2010. I can’t remember what it was but it wasn’t that. size changed while not tinkering, “windows”. at some point heads read zero. the disk use to have a “real” name but it kept changing. went from Disk model: ??? to Disk model: USB Disk ... now it's Disk model: Generic Flash Disk 2.0
Asked by aaron Purifoy (1 rep)
Feb 1, 2025, 04:47 PM
Last activity: Feb 10, 2025, 07:19 AM