Bug 241288

Summary: Systems with partitions extending into host protected area can't be upgraded
Product: [Fedora] Fedora Reporter: Jarod Wilson <jarod>
Component: anacondaAssignee: Anaconda Maintenance Team <anaconda-maint-list>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: jim.cornette, lists, mishu, raytodd
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-05-24 18:12:52 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Bug Depends On:    
Bug Blocks: 220535, 229745    

Description Jarod Wilson 2007-05-24 16:55:33 EDT
Description of problem:
Systems installed back in the FC6 and earlier days can have partitions that
extend into the host protected area of hard drives. The new libata drivers in F7
(and later) actually respect the HPA, resulting in being unable to upgrade
systems to F7 without some trickery.

The only options at the moment appear to be:

1) add 'options libata libata.ignore_hpa=1' to modprobe.conf under FC6 and
upgrade via yum

2) use setmax[1] under FC6 to destroy the hpa

Ideally, users should be able to pass in the ignore_hpa option at install time,
or we could try reloading libata with that option if we encounter disks with
partitions extending into the hpa.

How reproducible:
Install FC6 on a drive with a host protected area. Make sure one of the
partitions extends into that area. Try upgrading to F7.

Additional info:
[1] http://www.win.tue.nl/~aeb/linux/setmax.c and for a bit of info on usage,
http://www.niiconsulting.com/checkmate/2006/09/hiding-data-with-hpahost-protected-area-in-linux/
Comment 1 Jeremy Katz 2007-05-24 17:24:54 EDT
Added support for handling libata.ignore_hpa=1 on the kernel command line to
anaconda; hacky, but it'll work.  There's the bigger problem kernel-side that
really HPA needs to be per-drive, but let's not track that here :)
Comment 2 Jarod Wilson 2007-05-24 18:12:34 EDT
Fix tested, works a treat.
Comment 3 Jim Cornette 2007-06-04 17:41:56 EDT
*** Bug 220535 has been marked as a duplicate of this bug. ***
Comment 4 Nobel 2007-06-09 09:08:35 EDT
(In reply to comment #0)
> Description of problem:
> Systems installed back in the FC6 and earlier days can have partitions that
> extend into the host protected area of hard drives. The new libata drivers 
in F7
> (and later) actually respect the HPA, resulting in being unable to upgrade
> systems to F7 without some trickery.
> The only options at the moment appear to be:
> 1) add 'options libata libata.ignore_hpa=1' to modprobe.conf under FC6 and
> upgrade via yum

We want to remove or ignore HPA. Now we are using F7 after adding 'options 
libata libata.ignore_hpa=1' to modprobe.conf and upgrading via yum.
Should we use 'options libata libata.ignore_hpa=0' on /etc/modprobe.conf to 
ignore hpa ?
And which Fedora version is good for ignoring the hpa ?
I tried F6 but it respects the hpa.
Thanks a lot,
Nobel

> 2) use setmax[1] under FC6 to destroy the hpa
> Ideally, users should be able to pass in the ignore_hpa option at install 
time,
> or we could try reloading libata with that option if we encounter disks with
> partitions extending into the hpa.
> How reproducible:
> Install FC6 on a drive with a host protected area. Make sure one of the
> partitions extends into that area. Try upgrading to F7.
> Additional info:
> [1] http://www.win.tue.nl/~aeb/linux/setmax.c and for a bit of info on usage,
> http://www.niiconsulting.com/checkmate/2006/09/hiding-data-with-hpahost-
protected-area-in-linux/

Comment 5 Jeremy Katz 2007-10-11 07:50:18 EDT
*** Bug 322441 has been marked as a duplicate of this bug. ***
Comment 6 Ray Todd Stevens 2007-10-11 08:14:36 EDT
If you have this problem under fc7 and are doing a cdrom boot, then to fix it.

Boot to the menu on the rescue cd (which is also the install cd)

Then highlight the top option (install upgrade), but don't press return.   
Select edit and then e to edit the line that is highlighted.
add libata.ignore_hpa=1 to the end of the line and press return to complete edit
then press b to boot with this need configuration.


Comment 7 Elias Humbolt 2008-07-01 17:41:04 EDT
What is the correct way to fix that? I find the ignore_hpa option wrong by
principle. I don't want to ignore but fix.

Is there a way to correct the partition table to respect hpa?

I ran into a problem with anaconda, which seems to derive from this bug here.
Have a look at:  http://bugs.centos.org/view.php?id=2940
Comment 8 Jim Cornette 2008-07-02 07:26:05 EDT
I was able to delete the partition up to the end of the drive and recreate it
using fdisk and then recreate it again. The drive was fine afterward.
In my case, the drive was referring to something not critical, like swap.
It worked fine after the partition recreation.

A backup of the system and a reformatting of the drive would probably be needed
if it is configured as a small /boot and the rest as an LVM as is default for
intallations.