You are not logged in.

#1 2010-01-13 03:49:49

zcal
Member
Registered: 2010-01-13
Posts: 57

[SOLVED]Less disk space on standard (sda) install vs Legacy IDE (hda)?

Hello, everyone.

I am having some trouble installing Arch (2009.08) on my IBM ThinkPad R40.  At first I was unable to do a standard install because cfdisk hit an error when trying to partition.  This thread - http://bbs.archlinux.org/viewtopic.php?id=42258 - outlines that problem, which I was able to solve by booting Legacy IDE on the CD instead.  However, installing with Legacy defines the hard disk as hda, which leads to the problem outlined in this thread - http://bbs.archlinux.org/viewtopic.php?id=85934.  To fix that, I booted Legacy, used cfdisk to delete all of my partitions, wrote the partition table, and rebooted to do a standard install.

The problem I have now is that the standard install shows me far less disk space than is actually on my drive.  Since I only have a 20GB hard drive, this is very frustrating!

Here's what fdisk has to say when I boot Legacy IDE:

[root@archiso ~]# fdisk -l

Disk /dev/hda: 20.0 GB, 20003880960 bytes
15 heads, 63 sectors/track, 41344 cylinders
Units = cylinders of 945 * 512 = 483840 bytes
Disk identifier: 0x90909090

And here's what I get when I boot standard:

[root@archiso ~]# fdisk -l

Disk /dev/sda: 16.8 GB, 16820529664 bytes
255 heads, 63 sectors/track, 2044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x90909090

I am frankly baffled by this and would greatly appreciate it if anyone could offer some help/suggestions.

Thanks!

---------------------------------------------------------------------------------------------------------------------------------

[SOLVED]

I partitioned my hard drive and installed Arch using the standard installation just to see if maybe there was a glitch and it just wasn't showing me all of the space.  I guess I was hoping that it might just tack the 3.2 gigs I was missing onto the end of my last partition.  No such luck.  fdisk even reported the same amount of space on the drive as the Live CD.  Even worse, if I booted the Live CD with Legacy IDE, cfdisk would show the unused space at the end of the disk!

I drew a couple of conclusions in the several evenings I struggled with this.

1 - The standard Arch installation did not see my ThinkPad's Hidden Protected Area - http://www.thinkwiki.org/wiki/Hidden_Protected_Area, even though it was set to "Disabled" in the BIOS.  I've run Ubuntu and Debian for close to five years on this laptop and never have I had a problem accessing the HPA.  I'm still not sure why I couldn't originally write to it with Arch.

2 - Rebuilding the boot image with mkinitcpio and using the ide hook without pata and sata does nothing to fix this problem.  I figured doing so might recreate what the Legacy IDE option on the Live CD does.  Guess not.

The solution is to use hdparm to manually reclaim the space in the HPA.  Issuing hdparm -N /dev/sda yielded the following:

/dev/sda:
max sectors   = (can't remember the number)/39070080, HPA is enabled

This is the report showing that the number of available sectors (the number I can't remember) is less than the total number on the disk.  I was also confused as to why it listed my HPA as enabled, because it certainly was not.  Anyway, I was then able to reclaim the space by issuing:

hdparm -N p39070080 /dev/sda

This command permanently set the available number of sectors on the disk to equal the total, thus allowing me to get at the space in the HPA when partitioning.

WARNING: If you run into a similar issue, be careful with the HPA!  It contains the necessary files to restore your laptop to its out-of-the-box conditions.  You may wish to back it up in some way before reclaiming it.  Also, note that using hdparm to forcibly reclaim it should probably be your last resort since disabling it in the BIOS ought to do the trick.  If you do need to use hdparm, first read the manpage!  Make sure that you enter the correct number of sectors (the maximum reported by hdparm -N /dev/sd*) when issuing hdparm -N p(number of sectors) /dev/sd*.  You could really mess up your hard disk if you don't get it right.

Last edited by zcal (2010-01-16 20:03:16)

Offline

Board footer

Powered by FluxBB