No. Keeping this away from Microsoft.
fdevname memory leak
fdevname memory leak
Not a real issue with anything. The memory involved is tiny, and everything is freed when the program exits.
Try that and report back.
--- hdparm-9.65/hdparm.c 2022-09-06 13:02:56.000000000 -0400 +++ hdparm/hdparm.c 2024-03-25 20:30:28.873285139 -0400 @@ -2,7 +2,7 @@ * hdparm.c - Command line interface to get/set hard disk parameters. * - by Mark Lord (C) 1994-2022 -- freely distributable. */ -#define HDPARM_VERSION "v9.65" +#define HDPARM_VERSION "v9.65+" #define _LARGEFILE64_SOURCE /*for lseek64*/ #define _BSD_SOURCE /* for strtoll() */ @@ -3040,16 +3040,18 @@ static void get_security_password (int h } else if (!handle_NULL ||...
I get this output even when using -q (quite) when setting the SATA drive password or similar when issuing the erase command. Issuing SECURITY_SET_PASS command, password=...
Prevent password in output
I had the same issue both with a Toshiba and a Seagate driver. In the end I ended using the tool openSeaChest_FormatUnit and with that I was able to correctly change the logical sector size on both HDDs. You can download the tool from here: https://github.com/Seagate/ToolBin (binaries avail here: https://github.com/Seagate/ToolBin/tree/master/openSeaChest/bin-build/22.07.26/ ) And there is a quick guide on how to use it here: https://wiki.archlinux.org/title/Advanced_Format#Seagate The tool its from...
hdparm -t does not display accurate bandwidth for fast SSD
fdevname memory leak
Dear @hdparm team, @ideguy, It is possible to put the project on GitHub? Thanks in advance.
Hi, Is it anywhere hdparm VCS repo? If not .. is it possible to create such repo best on github/giltlab? (because SF git interface sucks)
Add missing SATA and ACS/AST/APT revisions to identify
Please close/delete this ticket, I have created an entry in patches.
Patch to add missing ssd form factors on NOMINAL FORM FACTOR
Add missing SSD Form Factor values on the NOMINAL FORM FACTOR
sanitize crypto scramble not correct
hdparm -C Update to display EPC check power mode states
set-sector-size and -Istdout woes with TOSHIBA MG09ACA18TE
Security as a background process
Sleep Now and Stand By Now.
I have no idea what you are asking. Both '-y' and '-Y' work as intended for me -- I use them regularly, and one can even verify them by using '-C' afterward to read back the (new) drive state.
I have no idea what you are asking. Both '-y' and '-Y' work as intended for me -- I use them regularly, and one can even verify them by using '-C' afterward to read back the (new) drive state.
Sleep Now and Stand By Now.
Parsing in other software: https://github.com/doug-gilbert/sg3_utils/blob/main/lib/sg_lib.c#L1840 Note about incorrect byte order i fixed there: https://github.com/doug-gilbert/sg3_utils/pull/25
Fix parsing sense data
hdparm-9.65 is released
Fix built with glibc 2.36
Okay, I'll put that #ifndef in place for v9.65 and hope that it does more good than harm. Thanks
`set-sector-size` out of range
Yes, that got fixed ages ago! :)
oh , debian stable provided hdparm version is 9.60, update to newest hdparm everything is good :)
`set-sector-size` out of range
one option is to make an ifdef around the include of linux/fs.h: #ifndef FSCONFIG_SET_FLAG #include <linux/fs.h> #endif
if at all this depends on the glibc version I think. the patch looks good to me. I have tested the following patch against glibc 2.19 and gcc 4.8, which is the oldest I still have around, and it compiles flawless. I have removed all linux/ includes as they should come via glibc (via sys/) instead: --- hdparm-9.64/hdparm.c +++ hdparm-9.64/hdparm.c @@ -24,9 +24,6 @@ #include <sys/mount.h> #include <sys/mman.h> #include <sys/user.h> -#include <linux/types.h> -#include <linux/fs.h> -#include <linux/major.h>...
This shouldn't have anything to do with GCC(?). At least for my tests hdparm 9.64 with the patch applied compiled fine on two systems, one with glibc 2.35 and one with glibc 2.36 where it failed to build without the patch.
Thanks. But doing this will break builds with older versions. Can you make it conditional upon the version of GCC ?
proposed fix
Fix built with glibc 2.36
hdparm-9.64 is released
Issue trying to secure erase.
Fix for some unit formatting issues
hdparm-9.63 is released
I have renamed the new flag to be "--sanitize-overwrite-passes" to avoid confusion with existing flags where "-pass" refers to a password. Otherwise, applied for hdparm-9.63.
Hi Mark, did you have a time to look at the path bellow ?
adding patch adding option to specify the pass count
hdparm --sanitize-overwrite do not have an option to change the count parameter and default value
Not a bug. It does what one asks it to do. If one wants just a single-pass erase, then use "--security-erase" instead. But I'm totally open to anyone who wants to submit a patch which adds a command-line option to specify the exact number of sanitize cycles. Cheers
I'm looking through the source code, and I see provisions such as: switch (sanitize_feature) { case SANITIZE_STATUS_EXT: printf("Sanitize status:\n"); sanitize_state = get_sanitize_state(r.hob.nsect); sanitize_normal_output(sanitize_state, &r); break; When I run an enhanced secure erase command, I simply get nothing, it states that it's performing the erase, but nothing changes, then eventually at 30 minutes the process ends. Am I doing something wrong? How do I monitor this process?
hdparm --sanitize-overwrite do not have an option to change the count parameter and default value
addendum, this looks mpt3sas specific, the sata interfaces aren't timing out after all
scsi timeouts in latest ubuntu kernels
On 22/09/2021, Mark Lord ideguy@users.sourceforge.net wrote: Applied, thanks. I especially like how it nicely handles "0" as well as "1". :) Oh yes :) The second case instead always has plural hours and never 1 minute. If it ever gets internationalized this will all need reworking, but for now... Blessings & thanks M
Applied, thanks. I especially like how it nicely handles "0" as well as "1". :)
hdparm -I 12 says "(1 minutes)" and -I 242 "(1 hours)"
"I have no idea why the compiler is treating bit shift output as signed value performing sign extension instead of zero extension." The reason is that unsigned short promotes to signed int unless short and int have the same length. ISO C language standard, section 6.3.1.1. Mr. Lord fixed hdparm but C is unfixable.
hdparm -I 12 says "(1 minutes)" and -I 242 "(1 hours)"
hdparm -I /dev/sda crashes device
Kernel (libata) bug, not hdparm.
The error still exists in versoin 9.62.
hdparm --dco-identify reports invalid value for Real max sectors
Fix this and similar bugs elsewhere in the code. hdparm-9.62 now available.
hdparm-9.62 is released
hdparm --dco-identify reports invalid value for Real max sectors
hdparm-9.61 is released
-J Get/set Western DIgital "Idle3" timeout for a WDC "Green" drive (DANGEROUS) There is support in there, but this was written many years ago, and WD may have changed the protocol. So it might still work, or it might brick your drive. Your call. WD doesn't tell us how it works, so that's the best shot at it for now.
This should have been added in version 9.38. Though documentation claims it's not somehow as good as it could. Is idle3ctl also lacking in this regard?
hdparm-9.60 is released
hdparm-9.59 is released
identify.c: Decode word 69 lower bits properly
Looks good. Applied. Thanks.
identify.c: Decode word 69 lower bits properly
Once the drive firmware has been programmed to "spin down" after inactivity (which is what -B does), then it will spin down so long as it is not being accessed by the system. So.. if you want it to spin-down, hack your copy of veracrypt to STOP continually accessing the drive.
hdparm + mounted veracrypt/truecrypt drive never spinning down with -B
I just had the same issue , now the disk is not detectable in BIOS . Could you please tell me the fix and a way to recoved the disk, or is th HDD bricked for good ?
Can you provide exact line what need to be added to sudoers file that allow to launch hdparm without being asked for password? nevermind, checked and works: administrator ALL = (ALL) NOPASSWD: /bin/hdparm
Can you provide exact line what need to be added to sudoers file that allow to launch hdparm without being asked for password?
close file handle before exit
Pointless and unneeded code bloat. Invoking exit(2) closes all open descriptors already, so there is no need to waste code to do it separately.
close file handle before exit
Add support for Cygwin
I want to detect whether a drive is external or internal. I have an SATA drive connected to a USB port through an SATA-USB adapter. hdparm -I reports it as: ATA device, with non-removable media Transport: Serial, ATA8-AST, SATA 1.0a, SATA II Extensions, SATA Rev 2.5, SATA Rev 2.6, SATA Rev 3.0. It apparently gets this data directly from the drive. Is it possible for hdparm to detect the actual transport layer, instead of the one the drive reports?
allow passing of custom LDFLAGS
Is that error referencing the obsolete IDE standard for hard drives? This is a SATA drive connected through a MegaRAID controller in JBOD mode. I suspect maybe the MegaRAID is causing this issue, but I have done this successfully in the past with the same hardware. I will report it to Red Hat.
I see the same error with a Samsung 850 Pro after upgrading to RHEL 7.7 (3.10.0-1062.1.1.el7.x86_64) hdparm version 9.56 I haven't had this problem before on older CentOS versions.
"The running kernel lacks CONFIG_IDE_TASK_IOCTL support for this device." Perhaps complain to your distro provider about that.
I see the same error with a Samsung 850 Pro after upgrading to RHEL 7.7 (3.10.0-1062.1.1.el7.x86_64) hdparm version 9.43 I haven't had this problem before on older CentOS versions.
This is not documented in the man page. I was scouring the source code at first, which led me to a variable called binary_passwd. Then I looked for when this was introduced. Turns out the feature is documented in the changelog file, Changelog. A partial copy of the changelog for that version is also in the project news: https://sourceforge.net/p/hdparm/news/2015/06/hdparm-946-released/ hdparm-9.46: … - added "hex:aabbcc.." for binary security passwords.
Hey, thanks. Was this documented anywhere? My first thought was that the manual on linux.die.net was out of date (was doing this from clonezilla), but even the one from hdparm 9.51 on my jessie system doesn't mention it.
Good news! hdparm version 9.46 (released on 2015-06-14) added support for binary security passwords by accepting the input in the form of a hex string. This also includes support for left-padded null bytes. Usage example: hdparm --user-master u --security-set-pass hex:8e0580838985672bc6c3c12a9cefd52a446390e7000000000000000000000000 /dev/sdc (Note that the password shown in the output of the command will be garbage if the input is binary and be blank if your password begins with a null byte, so you...