• The forum software that supports hummy.tv will be upgraded to XenForo 2.3 on Wednesday the 20th of November 2024 starting at 7pm

    There will be some periods where the forum is unavailable, please bear with us. More details can be found in the upgrade thread.

Fix-disk didn't fix disk errors 197 / 198 / sda1 - Unrecognised partition type

texarkana

Member
The web interface shows my (circa 12 month old) HDR Fox T2 has 197 + 198 disk errors. I'm running 1.0.32/2.21. I've tried fix-disk, but when it attempts to repair a sector, it thinks it has succeeded, then realises it hasn't? (See below). I've also tried re-formatting the disk (via the Humax's menu). Didn't help. (Other half not impressed at loosing all recordings!)

Various details below, some from following suggestions in another thread.
Hopefully someone suggest "what next", since I am at a loss.

Jon

Running /bin/fix-disk
Custom firmware version 2.21


Checking disk sda

Unmounted /dev/sda1
Unmounted /dev/sda2
Unmounted /dev/sda3

Running short disk self test
Waiting... 62
Waiting... 61
Waiting... 60

Error at LBA 4216
Do you wish to attempt repair of the bad block? [Y/N]: Y

/dev/sda:
re-writing sector 4216: succeeded

Running short disk self test
Waiting... 62
Waiting... 61
Waiting... 60

Error at LBA 4216
Do you wish to attempt repair of the bad block? [Y/N]: Y

/dev/sda:
re-writing sector 4216: succeeded

Running short disk self test
Waiting... 62
Waiting... 61
Waiting... 60

Error at LBA 4216
Do you wish to attempt repair of the bad block? [Y/N]: Y

/dev/sda:
re-writing sector 4216: succeeded

Running short disk self test
Waiting... 62
Waiting... 61
Waiting... 60

Error at LBA 4216
Do you wish to attempt repair of the bad block? [Y/N]: Y

/dev/sda:
re-writing sector 4216: succeeded

Running short disk self test
Waiting... 62
Waiting... 61
Waiting... 60

Error at LBA 4216
Do you wish to attempt repair of the bad block? [Y/N]: N
Skipped repair of LBA 4216
Partition sda1 - Unrecognised partition type, aborting...

humax# fdisk -lu

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes

Device Boot Start End Blocks Id System
/dev/sda1 2 2104514 1052256+ 83 Linux
/dev/sda2 2104515 1932539174 965217330 83 Linux
/dev/sda3 1932539175 1953520064 10490445 83 Linux
humax# hdparm --read-sector 4216 /dev/sda

/dev/sda:
reading sector 4216: succeeded
0000 0000 0000 0000 0000 0000 0000 0000
<<< snip >>>
0000 0000 0000 0000 0000 0000 0000 0000
humax# exit
 
That's a strange one. All I can suggest is to try a long test (may take a few hours).
Code:
fix-disk -l -B
The -B option should skip over the test that is producing the "Partition sda1 - Unrecognised partition type, aborting..." message.
 
Thanks for the link MontysEvilTwin, and for the fix-disk suggestion xyz123. Am away from box this weekend, but will give it a try when I return.
 
Well I've tried "fix-disk -l -B" and I still get the LBA 4216 "fix loop" and "sda1 - Unrecognised partition".
I also tried with "-3" (to test just the third partition?) and the transcript is the same?!

Perhaps I've got a corrupt partion table? (Straw... clutch...)

I am happy to try re-partitoning and "low level" re-formating the drive if it might help, if someone can point me at the correct commands.
(I have already run Humax's disk reformat command, so I've no recordings left to loose!)

Jon

humax# fix-disk -l -BRunning /bin/fix-disk
Custom firmware version 2.21


Checking disk sda

Partition /dev/sda1 is already unmounted
Partition /dev/sda2 is already unmounted
Partition /dev/sda3 is already unmounted

Running long disk self test
Waiting... 7862
Waiting... 7861
Waiting... 7860

Error at LBA 4216
Do you wish to attempt repair of the bad block? [Y/N]: Y

/dev/sda:
re-writing sector 4216: succeeded

Running select disk self test
Waiting... 7861
Waiting... 7860
Waiting... 7859

Error at LBA 4216
Do you wish to attempt repair of the bad block? [Y/N]: Y

/dev/sda:
re-writing sector 4216: succeeded

Running select disk self test
Waiting... 7861
Waiting... 7860
Waiting... 7859

Error at LBA 4216
Do you wish to attempt repair of the bad block? [Y/N]: Y

/dev/sda:
re-writing sector 4216: succeeded

Running select disk self test
Waiting... 7861
Waiting... 7860
Waiting... 7859

Error at LBA 4216
Do you wish to attempt repair of the bad block? [Y/N]: N
Skipped repair of LBA 4216
Partition sda1 - Unrecognised partition type, aborting...
humax#

humax# fix-disk -3 -l -B
Running /bin/fix-disk
Custom firmware version 2.21


Checking disk sda

Partition /dev/sda1 is already unmounted
Partition /dev/sda2 is already unmounted
Partition /dev/sda3 is already unmounted

Running long disk self test
Waiting... 7862
Waiting... 7861
Waiting... 7860

Error at LBA 4216
Do you wish to attempt repair of the bad block? [Y/N]: Y

/dev/sda:
re-writing sector 4216: succeeded

Running select disk self test
Waiting... 7861
Waiting... 7860
Waiting... 7859

Error at LBA 4216
Do you wish to attempt repair of the bad block? [Y/N]: N
Skipped repair of LBA 4216
Partition sda1 - Unrecognised partition type, aborting...
humax#
 
SMART attributes 187 and 189 are cause for concern also.
Your disk is ****ed. Get a new one.
 
Since you have already formatted the disk, you have probably nothing to lose.
Here's a long shot which may or may not fix the problem - not to be recommended if you have anything of value on the hard disk since it will wipe everything on it.
Code:
# <Enter maintenance mode>
umount /dev/sda1
umount /dev/sda2
umount /dev/sda3
hdparm --security-erase NULL --yes-i-know-what-i-am-doing /dev/sda
Exit maintenance mode and let the Humax reformat the disk
 
Okay, will give that a go. Thanks xyz321.
Any idea why fix-disk complains about sda1 having an unrecognised partition type, when the box seems to be working fine (apart from the SMART status info)?
If that partition really was "dead" I should have no EPG etc?
 
Ah, I see, Thanks Martin. Just out of interest then, I'll try power cycling the box and look to see if the EPG seems "slow" to populate.
(Its normally switched itself on well before I get home in the evening, so would have had plenty of time to update the EPG from the broadcast data).
 
Result 1 : Turned box off via power switch on rear; turned back on again 20 minutes later; as soon as box would let me, went in to EPG and was able to see all channels up to 7 days ahead. So, I guess that means sda1 is fine, even though fix-disk says otherwise?(!)

Result 2 : Can't get "hdparm --security-erase NULL --yes-i-know-what-i-am-doing /dev/sda" to work.
Doesn't seem to like the "--yes-i-know..." switch(?), and without it I get a "SECURITY_ERASE: Input/output error".

Suggestions? :confused:

Thanks
Jon

humax# hdparm --security-erase NULL --yes-i-know-what-i-am-doing /dev/sda
security_password=""

hdparm - get/set hard disk parameters - version v9.43, by Mark Lord.

Usage: hdparm [options] [device ...]

Options:
-a Get/set fs readahead
-A Get/set the drive look-ahead flag (0/1)
-b Get/set bus state (0 == off, 1 == on, 2 == tristate)
-B Set Advanced Power Management setting (1-255)
-c Get/set IDE 32-bit IO setting
-C Check drive power mode status
-d Get/set using_dma flag
-D Enable/disable drive defect management
-E Set cd/dvd drive speed
-f Flush buffer cache for device on exit
-F Flush drive write cache
-g Display drive geometry
-h Display terse usage information
-H Read temperature from drive (Hitachi only)
-i Display drive identification
-I Detailed/current information directly from drive
-J Get/set Western DIgital "Idle3" timeout for a WDC "Green" drive (DANGEROUS)
-k Get/set keep_settings_over_reset flag (0/1)
-K Set drive keep_features_over_reset flag (0/1)
-L Set drive doorlock (0/1) (removable harddisks only)
-m Get/set multiple sector count
-M Get/set acoustic management (0-254, 128: quiet, 254: fast)
-n Get/set ignore-write-errors flag (0/1)
-N Get/set max visible number of sectors (HPA) (VERY DANGEROUS)
-p Set PIO mode on IDE interface chipset (0,1,2,3,4,...)
-P Set drive prefetch count
-q Change next setting quietly
-Q Get/set DMA queue_depth (if supported)
-r Get/set device readonly flag (DANGEROUS to set)
-R Get/set device write-read-verify flag
-s Set power-up in standby flag (0/1) (DANGEROUS)
-S Set standby (spindown) timeout
-t Perform device read timings
-T Perform cache read timings
-u Get/set unmaskirq flag (0/1)
-U Obsolete
-v Use defaults; same as -acdgkmur for IDE drives
-V Display program version and exit immediately
-w Perform device reset (DANGEROUS)
-W Get/set drive write-caching flag (0/1)
-x Obsolete
-X Set IDE xfer mode (DANGEROUS)
-y Put drive in standby mode
-Y Put drive to sleep
-z Re-read partition table
-Z Disable Seagate auto-powersaving mode
--dco-freeze Freeze/lock current device configuration until next power cycle
--dco-identify Read/dump device configuration identify data
--dco-restore Reset device configuration back to factory defaults
--direct Use O_DIRECT to bypass page cache for timings
--drq-hsm-error Crash system with a "stuck DRQ" error (VERY DANGEROUS)
--fallocate Create a file without writing data to disk
--fibmap Show device extents (and fragmentation) for a file
--fwdownload Download firmware file to drive (EXTREMELY DANGEROUS)
--fwdownload-mode3 Download firmware using min-size segments (EXTREMELY DANGEROUS)
--fwdownload-mode3-max Download firmware using max-size segments (EXTREMELY DANGEROUS)
--fwdownload-mode7 Download firmware using a single segment (EXTREMELY DANGEROUS)
--idle-immediate Idle drive immediately
--idle-unload Idle immediately and unload heads
--Istdin Read identify data from stdin as ASCII hex
--Istdout Write identify data to stdout as ASCII hex
--make-bad-sector Deliberately corrupt a sector directly on the media (VERY DANGEROUS)
--offset use with -t, to begin timings at given offset (in GiB) from start of drive
--prefer-ata12 Use 12-byte (instead of 16-byte) SAT commands when possible
--read-sector Read and dump (in hex) a sector directly from the media
--security-help Display help for ATA security commands
--trim-sector-ranges Tell SSD firmware to discard unneeded data sectors: lba:count ..
--trim-sector-ranges-stdin Same as above, but reads lba:count pairs from stdin
--verbose Display extra diagnostics from some commands
--write-sector Repair/overwrite a (possibly bad) sector directly on the media (VERY DANGEROUS)

humax#
humax# hdparm --security-help

ATA Security Commands:
Most of these are VERY DANGEROUS and can destroy all of your data!
Due to bugs in older Linux kernels, use of these commands may even
trigger kernel segfaults or worse. EXPERIMENT AT YOUR OWN RISK!

--security-freeze Freeze security settings until reset.

--security-set-pass PASSWD Lock drive, using password PASSWD:
Use 'NULL' to set empty password.
Drive gets locked if user-passwd is selected.
--security-unlock PASSWD Unlock drive.
--security-disable PASSWD Disable drive locking.
--security-erase PASSWD Erase a (locked) drive.
--security-erase-enhanced PASSWD Enhanced-erase a (locked) drive.

The above four commands may optionally be preceded by these options:
--security-mode LEVEL Use LEVEL to select security level:
h high security (default).
m maximum security.
--user-master WHICH Use WHICH to choose password type:
u user-password (default).
m master-password
humax#
humax# hdparm --security-erase NULL /dev/sda
security_password=""

/dev/sda:
Issuing SECURITY_ERASE command, password="", user=user
SECURITY_ERASE: Input/output error
humax#
humax# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/root 17600 17600 0 100% /
tmpfs 62492 44 62448 0% /tmp
tmpfs 62492 0 62492 0% /media
/dev/mtdblock1 2048 604 1444 29% /var/lib/humaxtv
/dev/mtdblock2 2048 1312 736 64% /var/lib/humaxtv_backup
humax
 
How about this, for fairly obvious reasons I haven't tested this :-
Code:
humax# hdparm --security-set-pass PASSWD
 
humax# hdparm --security-erase PASSWD /dev/sda
 
Sorted!
After some hdparm research (try googling "ATA Secure Erase") I ran the following :-

hdparm -I /dev/sda and checked that it said "not frozen"
hdparm --security-set-pass PASSWD /dev/sda then hdparm -I /dev/sda and checked that it said "enabled" two lines under "Master password"
hpdparm --security-erase PASSWD /dev/sda and waited for it to finish
hdparm -I /dev/sda and noticed that it still said "enabled" two lines under "Master password":(
hdparm --security-disable PASSWD /dev/sda then hdparm -I /dev/sda and checked that it said "not enabled" two lines under "Master password":)

Rebooted : Humax prompted to re-format disk. Did this. Ran Humax HDD test and it passed :).
Re-installed CF so could re-install full web interface.
Smart Status shows Reallocated Sector Count unchanged; 197+198 errors = zero; Short offline completed without error.

So, many thanks to xyz321 and Ezra Pound!
 
Nice - I might have to try that with mine which is stuck on 7 pending sectors.
 
Back
Top