Re: IDE HPA

From: Alan Cox (alan_at_lxorguk.ukuu.org.uk)
Date: 09/03/05

  • Next message: H. Peter Anvin: "Re: [RFC] Splitting out kernel<=>userspace ABI headers"
    To: pjones@redhat.com
    Date:	Sat, 03 Sep 2005 01:05:24 +0100
    
    

    On Gwe, 2005-09-02 at 17:14 -0400, Peter Jones wrote:
    > > You installed it on Red Hat 7 ? I think 7, may have been 6.x or earlier.
    >
    > You may be right -- it's likely that I shrank my windows partition on
    > some other OS or Distro that wasn't designed with to screw up the disk.

    If you shrink existing partitions it won't ever screw you up. The
    geometry data for the partition table spans only the non HPA area.

    > Yes, it did have a partition table -- but the partition table did (and
    > still does) not include partitions which overlap the HPA. Right now it
    > still appears as unused space.

    But they are also on the IBM I looked at are obvious because the
    geometry in the partition table does not span the HPA so the problem
    doesn't arise as confusion.

    > > Not really practical. You'd have to list most older PC systems.
    >
    > Most older PC systems use HPA? Really?

    Many of those "magic windows drive/bios fixup" type programs work by
    having the jumper on the drive set the HPA and the drive report a
    smaller size, then the windows magic driver undoes this.

    > Both of these suck. Have I missed something?

    I fear not.

    > So where would you envision this code to check the partition table, the
    > HPA/host default disk size, and guess how things should be set up?

    fdisk and friends already have to parse and process the existing
    partition tables.

    > they'll be screwing themselves by partitioning the entire disk, so we
    > really should be leaving HPA enabled if the protected area is indeed not
    > for consumption.

    Define "not for consumption". It should be *hard* to use it, and it
    should not occur by accident. Deliberately is a different matter. And
    that should be a run time not boot time action.

    > (as a side note, I know one user who, at OLS, noticed we fail to
    > re-initialize HPA after unsuspend, so on at least t40 the disk gets
    > smaller when you suspend. This may or may not be fixed, I haven't
    > checked. But it's one more sort of pain we get into by disabling it,
    > whether justified or not.)

    Known problem. ACPI provides the correct infrastructure for much of this
    but the IDE layer doesn't support it. Send patches to Bartlomiej. The
    core infrastructure is there because Andre saw the need for the ACPI
    taskfile support coming. The HPA restore is just another step in the
    state machine for resume and quite doable. Good little project for
    someone wanting to play with the IDE layer.

    > I think if we go the heuristic route, then the *safest* option is to
    > leave it enabled by default and let userland installers/initrd do fixups
    > by telling the kernel to change the state.

    Assuming we are talking about hda1/2/... then the partitions are already
    clipped by the OS to the volume size. We could conceivably make the size
    of the disk itself writable. We don't need to get into programming drive
    HPA when we can do it ourselves, and we can clip non HPA capable drives
    too should someone find a cause for it.

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/


  • Next message: H. Peter Anvin: "Re: [RFC] Splitting out kernel<=>userspace ABI headers"

    Relevant Pages

    • Re: Replace SCSI Drive
      ... from there you can manipulate other hard drives attached to the machine. ... It should 'just work' but watch out that you keep disk devices ... vi-a) Write a BSD partition table into the slice, then set up your required FreeBSD partitions: ... items under the 'Custom Install' to achieve the desired result. ...
      (freebsd-questions)
    • Re: Transfering XP system files into a larger HDD
      ... If both drives are connected, ... If *only* your working drive (the source disk) is connected at the time the computer is running, insert the Acronis bootable CD in your CD/DVD device and shutdown your computer. ... I have the USB external drive in two partitions, one with nothing and the same size as the partition I am using for XP and programs. ...
      (microsoft.public.windowsxp.general)
    • Re: Windows RAID
      ... or in a format Windows doesn't understand. ... There has been for a long time now a check box in Disk Management ... Safely remove is for physical devices, not for partitions. ... The most obvious example is when cloning hard drives. ...
      (comp.sys.ibm.pc.hardware.storage)
    • Re: Windows RAID
      ... It should also work with removable drives ... I haven't tried this with a USB device with multiple partitions, as I don't have one handy, but it would be interesting to see what happens then. ... Of course, you may well ask /why/ someone would want to attach a device and not mount the filesystems on it, or unmount a filesystem without removing the device. ... I use dd to copy the whole partition to an image file on another disk. ...
      (comp.sys.ibm.pc.hardware.storage)
    • Re: gmirror disks vs partitions
      ... Apart from potentially avoiding a whole disk from being copied ... You divide a couple of identical drives proportionally ... in two partitions each, place a couple of the first ... partitions into gmirror and a couple of the second ...
      (freebsd-stable)