Respecting the Host Protected Area

Ben Collins ben.collins at canonical.com
Fri May 23 07:30:51 BST 2008


On Thu, 2008-05-22 at 15:01 -0400, Phillip Susi wrote:
> Ben Collins wrote:
> > Without that patch, HPA could not be ignored at all. We defaulted it to
> 
> The patch just set the default to ignore HPA.  In the vanilla kernel you 
> can force it to be ignored with a parameter.
> 
> > Fewer and fewer disks are using this. It used to be a way for OEM's to
> > protect recovery and diagnostic tools, but given the easy and frequent
> > replacement of harddrives, having these tools on a disk is becoming less
> > and less common, and protecting them with HPA, even less so.
> 
> There seems to still be several OEMs out there that are using it, and 
> even if nobody does use it, then there is no reason to ignore it by 
> default, since the only people that it helps are those with systems that 
> use HPA but already formatted the disk using the broken legacy ide driver.
> 
> As a side question, is the HPA configured every boot by the bios, or is 
> it stored in nvram on the disk?  If the latter, is there some utility to 
> reconfigure it?

It's entirely in the harddrive. There are utilities that can configure
it to remove it permanently, or modify the HPA.

> >>From my understanding, HPA is close to being a legacy type feature. This
> > is the first time I've heard of someone being affected by the alternate
> > issue (ignoring it when it needs to be honored), but we had literally
> > dozens of people sub'd to the bug where not ignoring HPA was causing
> > them problems. It was actually an RC bug. We couldn't release Gutsy
> > without this "feature".
> 
> It is interesting that these people had systems that were trying to 
> protect an area of the disk, but didn't mind when that area was 
> overwritten.  If their systems were hosed up by the previous release, 
> and they saw the issue only when upgrading, that does suck, but I don't 
> think it justifies continuing to produce a broken driver that will cause 
> more people to have invalidly formatted disks in the future.  If these 
> same people do a clean install now, then upgrade to a vanilla kernel ( 
> or try to dual boot with another distro ) they will have the same 
> problem.  May as well bite the bullet once and get it over with rather 
> than continue to cause problems in the future.

It is interesting that the IDE driver has been like this since forever,
and it was never changed upstream. True, they got things right the
second time, nearly a decade later, with libata, but that doesn't negate
the problem we, as a distribution, have to account for.

> > The person in that bug report can very easily set the HPA to be honored,
> > and be on their way.
> 
> How exactly?  It seems that passing the option on the kernel command 
> line does not work since libata is loaded as a module.

Add break=top to the kernel command line:

# echo options libata ignore_hpa=0 > /etc/modprobe.d/libata-options
# exit

When the system boots, perform the same command, and then run "sudo
update-initramfs -u" to make it permanent.




More information about the ubuntu-devel mailing list