<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.thinkwiki.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Pebolle</id>
	<title>ThinkWiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://www.thinkwiki.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Pebolle"/>
	<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/wiki/Special:Contributions/Pebolle"/>
	<updated>2026-05-31T11:21:33Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.12</generator>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Talk:Hidden_Protected_Area&amp;diff=31505</id>
		<title>Talk:Hidden Protected Area</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Talk:Hidden_Protected_Area&amp;diff=31505"/>
		<updated>2007-07-24T23:13:54Z</updated>

		<summary type="html">&lt;p&gt;Pebolle: Span File Header checksum&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There is conflicting information on this page.  In the introductory paragraph it says &amp;quot;The HPA was introduced with the R/T/X 40 series of ThinkPads.&amp;quot;  But on the bottom the X3x models are also linked as having this technology.  What is right? --[[User:Rolf|Rolf]] 12:30, 19 October 2006 (CEST)&lt;br /&gt;
&lt;br /&gt;
Also I know an R50e machine, that has Rescue and Recovery on a Compaq Diagnostics partition. So it shouldn't be listed either on the bottom of the page. I'm just not too sure, if I understand those technologies correctly, so I hesitate to remove it.&lt;br /&gt;
&lt;br /&gt;
==Removing item &amp;quot;Accessing the HPA from Linux&amp;quot;==&lt;br /&gt;
I've checked the fwdir code (http://colimit.googlepages.com/fwdir.zip). This code works on a Hidden Partition (is that the same as a R and R or yet another Predesktop variant?). This code can not work with real HPAs.&lt;br /&gt;
&lt;br /&gt;
I suggest we remove this section in an week or so (or move it to the discussion section) unless further info regarding those Hidden Partition is provided.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 01:08, 4 January 2007 (CET)&lt;br /&gt;
&lt;br /&gt;
The fwdir page is quite clear that it does '''not''' access HPAs, but rather hidden partitions.  I don't know if an HPA and a phoenix HP partition have the same internal layout (they could, and it would make sense; a partition does not have to contain a filesystem, it could contain an HPA image just as easily).  Also, I have no idea if IBM ships the HPA as unpartitioned area, or as a hidden partition...&lt;br /&gt;
&lt;br /&gt;
If you know the answer to the two implied questions above, you know what to do.&lt;br /&gt;
&lt;br /&gt;
--[[User:Hmh|hmh]] 03:22, 5 January 2007 (CET)&lt;br /&gt;
&lt;br /&gt;
==FirstWare Image Backup span file format==&lt;br /&gt;
FWBACKUP creates an image set (a set of span files) of a Phoenix FirstWare HPA. FWRESTOR uses these span files to restore an HPA beckup image. (See the Predesktop Area white paper for usage information for FWBACKUP and FWRESTOR.) The format of a span file is straightforward.&lt;br /&gt;
&lt;br /&gt;
Each span file consists of a plain (not compressed, not encrypted) copy of a number of (512 byte) sectors of the HPA. It is preceded by a 512 byte header.&lt;br /&gt;
&lt;br /&gt;
The format of this 512 byte header is:&lt;br /&gt;
 bytes   description&lt;br /&gt;
  0-  7  magic (&amp;quot;fwbackup&amp;quot;)&lt;br /&gt;
  8-  9  1 (LSB first) # version number?&lt;br /&gt;
 10- 11  span file number, one based (LSB first)&lt;br /&gt;
 12- 13  number of span files in image set (LSB first)&lt;br /&gt;
 14- 17  number of sectors in span file (LSB first)&lt;br /&gt;
 18- 21  number of sectors in image set (LSB first)&lt;br /&gt;
 22- 25  last sector of HPA on the original hard drive, zero based (LSB first)&lt;br /&gt;
 26- 29  first sector of HPA on the original hard drive, zero based (LSB first)&lt;br /&gt;
 30- 37  unused&lt;br /&gt;
 38- 53  checksum&lt;br /&gt;
 54-511  unused&lt;br /&gt;
&lt;br /&gt;
Only bytes 10-11, 14-17 and 38-53 are unique for each span file. All other bytes of the header should be equal for all span files in an image set.&lt;br /&gt;
&lt;br /&gt;
This magic entry for {{cmdresult|file(1)}} can be used to identify the files part of an Phoenix FirstWare HPA backup image file set:&lt;br /&gt;
 # File magic for Phoenix FirstWare HPA backup image&lt;br /&gt;
 0       string          fwbackup        FirstWare HPA backup image&lt;br /&gt;
 # &amp;gt;8    leshort         # x             , version %d ???&lt;br /&gt;
 &amp;gt;26     lelong          x               (first disk sector of HPA: %d,&lt;br /&gt;
 &amp;gt;22     lelong          x               last disk sector of HPA: %d)&lt;br /&gt;
 &amp;gt;14     lelong          x               %d of&lt;br /&gt;
 &amp;gt;18     lelong          x                %d image sectors&lt;br /&gt;
 &amp;gt;10     leshort         x               (span file %d&lt;br /&gt;
 &amp;gt;12     leshort         x                of %d)&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 11:27, 7 January 2007 (CET)&lt;br /&gt;
&lt;br /&gt;
==Span File Header checksum==&lt;br /&gt;
Each FirstWare Image Backup span file has a 16 byte checksum in its header. This checksum is a md5sum derivative. It is calculated over the backup image in that span file (i.e. everything following the header). It differs from a md5sum in two (minor and related) aspects. (I'll describe it here using the well known md5 implementation of Colin Plumb, which one can find easily with a Google Code Search.) Those differences are:&lt;br /&gt;
-in MD5Transform you'll have to &amp;quot;swap&amp;quot; (0-&amp;gt;3, 1-&amp;gt;2, 2-&amp;gt;1, 3-&amp;gt;0) all 4 byte &amp;quot;in&amp;quot; values for all 64 invocations of MD5STEP;&lt;br /&gt;
- in MD5Final you'll have to also &amp;quot;swap&amp;quot; both &amp;quot;bit lenghts&amp;quot; (again 4 bytes long) that are used just before the final call of MD5Transform.&lt;br /&gt;
&lt;br /&gt;
These are trivial differences. Discovering these was absolutely non-trivial!&lt;br /&gt;
&lt;br /&gt;
Mail me if you'd like some code (in c).&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 23:13, 24 July 2007 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Migrating the HPA to a new hard drive (Windows) ==&lt;br /&gt;
&lt;br /&gt;
The white paper referred to in the article describes a procedure for moving the HPA when upgrading the hard drive.  The HPA partition can't be simply cloned because critical jump instructions used by the BIOS directly address sectors on the HDD, and thus depend on the drive geometry.  (Therefore, migration to an identical replacement drive should be possible by cloning, but not to a larger drive).&lt;br /&gt;
&lt;br /&gt;
The procedure involves running the system restore program residing on the HPA, interrupting it by using the (otherwise undocumented) F3 key, and copying FWBACKUP and FWRESTOR programs to a floppy disk.  This may work on A series systems with internal floppy drives (with UltraBay 2000 or UltraBay Plus), but it doesn't seem to work for USB floppy drives, which are the only kind available for the R series (which has the UltraBay Enhanced internal drive, for which no FDD devices have been made available).  The BIOS does recognize USB devices, and they are visible while running the system restore program, but any attempt to write to these devices fails (I've tried this with a USB floppy and a USB flash drive).&lt;br /&gt;
&lt;br /&gt;
Does anyone have any suggestions for a work around?  If not, I see no way to save the backup of the original system configuration when upgrading the hard drive on the R50p or similar machines. [[User:Slowthinker|Slowthinker]] 21:15, 23 July 2007 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
I succesfully used the method Fabrice Bellet described. It's elaborate. Send me an email if you'd like further guidance.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 22:50, 24 July 2007 (UTC)&lt;/div&gt;</summary>
		<author><name>Pebolle</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Talk:Hidden_Protected_Area&amp;diff=31503</id>
		<title>Talk:Hidden Protected Area</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Talk:Hidden_Protected_Area&amp;diff=31503"/>
		<updated>2007-07-24T22:51:10Z</updated>

		<summary type="html">&lt;p&gt;Pebolle: It really is a checksum&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There is conflicting information on this page.  In the introductory paragraph it says &amp;quot;The HPA was introduced with the R/T/X 40 series of ThinkPads.&amp;quot;  But on the bottom the X3x models are also linked as having this technology.  What is right? --[[User:Rolf|Rolf]] 12:30, 19 October 2006 (CEST)&lt;br /&gt;
&lt;br /&gt;
Also I know an R50e machine, that has Rescue and Recovery on a Compaq Diagnostics partition. So it shouldn't be listed either on the bottom of the page. I'm just not too sure, if I understand those technologies correctly, so I hesitate to remove it.&lt;br /&gt;
&lt;br /&gt;
==Removing item &amp;quot;Accessing the HPA from Linux&amp;quot;==&lt;br /&gt;
I've checked the fwdir code (http://colimit.googlepages.com/fwdir.zip). This code works on a Hidden Partition (is that the same as a R and R or yet another Predesktop variant?). This code can not work with real HPAs.&lt;br /&gt;
&lt;br /&gt;
I suggest we remove this section in an week or so (or move it to the discussion section) unless further info regarding those Hidden Partition is provided.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 01:08, 4 January 2007 (CET)&lt;br /&gt;
&lt;br /&gt;
The fwdir page is quite clear that it does '''not''' access HPAs, but rather hidden partitions.  I don't know if an HPA and a phoenix HP partition have the same internal layout (they could, and it would make sense; a partition does not have to contain a filesystem, it could contain an HPA image just as easily).  Also, I have no idea if IBM ships the HPA as unpartitioned area, or as a hidden partition...&lt;br /&gt;
&lt;br /&gt;
If you know the answer to the two implied questions above, you know what to do.&lt;br /&gt;
&lt;br /&gt;
--[[User:Hmh|hmh]] 03:22, 5 January 2007 (CET)&lt;br /&gt;
&lt;br /&gt;
==FirstWare Image Backup span file format==&lt;br /&gt;
FWBACKUP creates an image set (a set of span files) of a Phoenix FirstWare HPA. FWRESTOR uses these span files to restore an HPA beckup image. (See the Predesktop Area white paper for usage information for FWBACKUP and FWRESTOR.) The format of a span file is straightforward.&lt;br /&gt;
&lt;br /&gt;
Each span file consists of a plain (not compressed, not encrypted) copy of a number of (512 byte) sectors of the HPA. It is preceded by a 512 byte header.&lt;br /&gt;
&lt;br /&gt;
The format of this 512 byte header is:&lt;br /&gt;
 bytes   description&lt;br /&gt;
  0-  7  magic (&amp;quot;fwbackup&amp;quot;)&lt;br /&gt;
  8-  9  1 (LSB first) # version number?&lt;br /&gt;
 10- 11  span file number, one based (LSB first)&lt;br /&gt;
 12- 13  number of span files in image set (LSB first)&lt;br /&gt;
 14- 17  number of sectors in span file (LSB first)&lt;br /&gt;
 18- 21  number of sectors in image set (LSB first)&lt;br /&gt;
 22- 25  last sector of HPA on the original hard drive, zero based (LSB first)&lt;br /&gt;
 26- 29  first sector of HPA on the original hard drive, zero based (LSB first)&lt;br /&gt;
 30- 37  unused&lt;br /&gt;
 38- 53  checksum&lt;br /&gt;
 54-511  unused&lt;br /&gt;
&lt;br /&gt;
Only bytes 10-11, 14-17 and 38-53 are unique for each span file. All other bytes of the header should be equal for all span files in an image set.&lt;br /&gt;
&lt;br /&gt;
This magic entry for {{cmdresult|file(1)}} can be used to identify the files part of an Phoenix FirstWare HPA backup image file set:&lt;br /&gt;
 # File magic for Phoenix FirstWare HPA backup image&lt;br /&gt;
 0       string          fwbackup        FirstWare HPA backup image&lt;br /&gt;
 # &amp;gt;8    leshort         # x             , version %d ???&lt;br /&gt;
 &amp;gt;26     lelong          x               (first disk sector of HPA: %d,&lt;br /&gt;
 &amp;gt;22     lelong          x               last disk sector of HPA: %d)&lt;br /&gt;
 &amp;gt;14     lelong          x               %d of&lt;br /&gt;
 &amp;gt;18     lelong          x                %d image sectors&lt;br /&gt;
 &amp;gt;10     leshort         x               (span file %d&lt;br /&gt;
 &amp;gt;12     leshort         x                of %d)&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 11:27, 7 January 2007 (CET)&lt;br /&gt;
&lt;br /&gt;
== Migrating the HPA to a new hard drive (Windows) ==&lt;br /&gt;
&lt;br /&gt;
The white paper referred to in the article describes a procedure for moving the HPA when upgrading the hard drive.  The HPA partition can't be simply cloned because critical jump instructions used by the BIOS directly address sectors on the HDD, and thus depend on the drive geometry.  (Therefore, migration to an identical replacement drive should be possible by cloning, but not to a larger drive).&lt;br /&gt;
&lt;br /&gt;
The procedure involves running the system restore program residing on the HPA, interrupting it by using the (otherwise undocumented) F3 key, and copying FWBACKUP and FWRESTOR programs to a floppy disk.  This may work on A series systems with internal floppy drives (with UltraBay 2000 or UltraBay Plus), but it doesn't seem to work for USB floppy drives, which are the only kind available for the R series (which has the UltraBay Enhanced internal drive, for which no FDD devices have been made available).  The BIOS does recognize USB devices, and they are visible while running the system restore program, but any attempt to write to these devices fails (I've tried this with a USB floppy and a USB flash drive).&lt;br /&gt;
&lt;br /&gt;
Does anyone have any suggestions for a work around?  If not, I see no way to save the backup of the original system configuration when upgrading the hard drive on the R50p or similar machines. [[User:Slowthinker|Slowthinker]] 21:15, 23 July 2007 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
I succesfully used the method Fabrice Bellet described. It's elaborate. Send me an email if you'd like further guidance.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 22:50, 24 July 2007 (UTC)&lt;/div&gt;</summary>
		<author><name>Pebolle</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Talk:Hidden_Protected_Area&amp;diff=31502</id>
		<title>Talk:Hidden Protected Area</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Talk:Hidden_Protected_Area&amp;diff=31502"/>
		<updated>2007-07-24T22:50:23Z</updated>

		<summary type="html">&lt;p&gt;Pebolle: Rplying to Migrating the HPA ...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There is conflicting information on this page.  In the introductory paragraph it says &amp;quot;The HPA was introduced with the R/T/X 40 series of ThinkPads.&amp;quot;  But on the bottom the X3x models are also linked as having this technology.  What is right? --[[User:Rolf|Rolf]] 12:30, 19 October 2006 (CEST)&lt;br /&gt;
&lt;br /&gt;
Also I know an R50e machine, that has Rescue and Recovery on a Compaq Diagnostics partition. So it shouldn't be listed either on the bottom of the page. I'm just not too sure, if I understand those technologies correctly, so I hesitate to remove it.&lt;br /&gt;
&lt;br /&gt;
==Removing item &amp;quot;Accessing the HPA from Linux&amp;quot;==&lt;br /&gt;
I've checked the fwdir code (http://colimit.googlepages.com/fwdir.zip). This code works on a Hidden Partition (is that the same as a R and R or yet another Predesktop variant?). This code can not work with real HPAs.&lt;br /&gt;
&lt;br /&gt;
I suggest we remove this section in an week or so (or move it to the discussion section) unless further info regarding those Hidden Partition is provided.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 01:08, 4 January 2007 (CET)&lt;br /&gt;
&lt;br /&gt;
The fwdir page is quite clear that it does '''not''' access HPAs, but rather hidden partitions.  I don't know if an HPA and a phoenix HP partition have the same internal layout (they could, and it would make sense; a partition does not have to contain a filesystem, it could contain an HPA image just as easily).  Also, I have no idea if IBM ships the HPA as unpartitioned area, or as a hidden partition...&lt;br /&gt;
&lt;br /&gt;
If you know the answer to the two implied questions above, you know what to do.&lt;br /&gt;
&lt;br /&gt;
--[[User:Hmh|hmh]] 03:22, 5 January 2007 (CET)&lt;br /&gt;
&lt;br /&gt;
==FirstWare Image Backup span file format==&lt;br /&gt;
FWBACKUP creates an image set (a set of span files) of a Phoenix FirstWare HPA. FWRESTOR uses these span files to restore an HPA beckup image. (See the Predesktop Area white paper for usage information for FWBACKUP and FWRESTOR.) The format of a span file is straightforward.&lt;br /&gt;
&lt;br /&gt;
Each span file consists of a plain (not compressed, not encrypted) copy of a number of (512 byte) sectors of the HPA. It is preceded by a 512 byte header.&lt;br /&gt;
&lt;br /&gt;
The format of this 512 byte header is:&lt;br /&gt;
 bytes   description&lt;br /&gt;
  0-  7  magic (&amp;quot;fwbackup&amp;quot;)&lt;br /&gt;
  8-  9  1 (LSB first) # version number?&lt;br /&gt;
 10- 11  span file number, one based (LSB first)&lt;br /&gt;
 12- 13  number of span files in image set (LSB first)&lt;br /&gt;
 14- 17  number of sectors in span file (LSB first)&lt;br /&gt;
 18- 21  number of sectors in image set (LSB first)&lt;br /&gt;
 22- 25  last sector of HPA on the original hard drive, zero based (LSB first)&lt;br /&gt;
 26- 29  first sector of HPA on the original hard drive, zero based (LSB first)&lt;br /&gt;
 30- 37  unused&lt;br /&gt;
 38- 53  checksum # MD5? checksum of what exactly?&lt;br /&gt;
 54-511  unused&lt;br /&gt;
&lt;br /&gt;
Only bytes 10-11, 14-17 and 38-53 are unique for each span file. All other bytes of the header should be equal for all span files in an image set.&lt;br /&gt;
&lt;br /&gt;
This magic entry for {{cmdresult|file(1)}} can be used to identify the files part of an Phoenix FirstWare HPA backup image file set:&lt;br /&gt;
 # File magic for Phoenix FirstWare HPA backup image&lt;br /&gt;
 0       string          fwbackup        FirstWare HPA backup image&lt;br /&gt;
 # &amp;gt;8    leshort         # x             , version %d ???&lt;br /&gt;
 &amp;gt;26     lelong          x               (first disk sector of HPA: %d,&lt;br /&gt;
 &amp;gt;22     lelong          x               last disk sector of HPA: %d)&lt;br /&gt;
 &amp;gt;14     lelong          x               %d of&lt;br /&gt;
 &amp;gt;18     lelong          x                %d image sectors&lt;br /&gt;
 &amp;gt;10     leshort         x               (span file %d&lt;br /&gt;
 &amp;gt;12     leshort         x                of %d)&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 11:27, 7 January 2007 (CET)&lt;br /&gt;
&lt;br /&gt;
== Migrating the HPA to a new hard drive (Windows) ==&lt;br /&gt;
&lt;br /&gt;
The white paper referred to in the article describes a procedure for moving the HPA when upgrading the hard drive.  The HPA partition can't be simply cloned because critical jump instructions used by the BIOS directly address sectors on the HDD, and thus depend on the drive geometry.  (Therefore, migration to an identical replacement drive should be possible by cloning, but not to a larger drive).&lt;br /&gt;
&lt;br /&gt;
The procedure involves running the system restore program residing on the HPA, interrupting it by using the (otherwise undocumented) F3 key, and copying FWBACKUP and FWRESTOR programs to a floppy disk.  This may work on A series systems with internal floppy drives (with UltraBay 2000 or UltraBay Plus), but it doesn't seem to work for USB floppy drives, which are the only kind available for the R series (which has the UltraBay Enhanced internal drive, for which no FDD devices have been made available).  The BIOS does recognize USB devices, and they are visible while running the system restore program, but any attempt to write to these devices fails (I've tried this with a USB floppy and a USB flash drive).&lt;br /&gt;
&lt;br /&gt;
Does anyone have any suggestions for a work around?  If not, I see no way to save the backup of the original system configuration when upgrading the hard drive on the R50p or similar machines. [[User:Slowthinker|Slowthinker]] 21:15, 23 July 2007 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
I succesfully used the method Fabrice Bellet described. It's elaborate. Send me an email if you'd like further guidance.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 22:50, 24 July 2007 (UTC)&lt;/div&gt;</summary>
		<author><name>Pebolle</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Talk:Predesktop_Area&amp;diff=28456</id>
		<title>Talk:Predesktop Area</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Talk:Predesktop_Area&amp;diff=28456"/>
		<updated>2007-02-26T09:25:44Z</updated>

		<summary type="html">&lt;p&gt;Pebolle: typo and linkify&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Use the HPA for GNU/Linux?==&lt;br /&gt;
More interesting than removing the HPA (which includes a.o. Acces IBM Predesktop Area, some other tools and a backup of the pre-installed OS) would be to use this area for GNU/Linux too. At least, removing the HPA only saves 3,5 GB on my 60 GB hard disk. It would be worth a try to see whether the backup of the pre-installed OS on the largest PSA could be replaced by a backup of your favourite GNU/Linux distribution.&lt;br /&gt;
&lt;br /&gt;
Elaborating on my ideas a few days later, I'd guess the following could be tried:&lt;br /&gt;
* see whether GRUB can be made to boot the Access IBM Predekstop Area (I guess by &amp;quot;chainloading&amp;quot; the bootsector of its PSA). Right now GRUB refuses to load sectors outside the partioned area. I've got absolutely no idea if it's possible to write a hack to overcome that restriction. Need to contact the GRUB people about that ...&lt;br /&gt;
* write some userspace tools for the HPA/the SPAs (things like: dumpbeer, printDoS).&lt;br /&gt;
&lt;br /&gt;
It should be clear these are basically random ideas. Still feedback would be appreciated ...&lt;br /&gt;
----&lt;br /&gt;
Hei,&lt;br /&gt;
&lt;br /&gt;
interesting ideas, but i'd only see a point in it if one could keep Win and Linux rescue stuff in the HPA. That means it would need to be expandable or fit the stuff for both systems.&lt;br /&gt;
[[User:Wyrfel|Wyrfel]] 20:03, 15 Mar 2005 (CET)&lt;br /&gt;
---- &lt;br /&gt;
Thanks.&lt;br /&gt;
&lt;br /&gt;
Short answer: that should be possible.&lt;br /&gt;
&lt;br /&gt;
Long answer: I see little in the specs (as I understand them now) to stop one from adding (say) an extra 3 GB GNU/Linux-rescue PSA or something like that. We might try to do that first by changing the BEER and DoS manually. (Not sure whether Phoenix added some proprietary stuff to keep you from booting it. The PSA should always be accesable with the proper BIOS setting.) It might be mandatory to put it on a FAT filesystem. The hard part probably is to have it show up in the Access IBM Predesktop Area. (My guess is you need to regenerate the FirstSight &amp;quot;graphical shell&amp;quot;. If that's correct we probably only can use the FirstWare tools &amp;quot;hidden&amp;quot; on their little PSA. That's no fun. Well it might a little fun if we try FreeDOS). &lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle (not logged in)]]&lt;br /&gt;
----&lt;br /&gt;
Update: a trivial patch to grub allows it to also work outside the partioned area:&lt;br /&gt;
&lt;br /&gt;
 --- /var/tmp/rpm/BUILD/grub-0.95/stage2/disk_io.c.oud   2004-05-23 18:35:24.000000000 +0200&lt;br /&gt;
 +++ /var/tmp/rpm/BUILD/grub-0.95/stage2/disk_io.c       2005-03-18 22:38:30.050907408 +0100&lt;br /&gt;
 @@ -297,8 +297,8 @@&lt;br /&gt;
     *  Check partition boundaries&lt;br /&gt;
     */&lt;br /&gt;
    if (sector &amp;lt; 0&lt;br /&gt;
 -      || ((sector + ((byte_offset + byte_len - 1) &amp;gt;&amp;gt; SECTOR_BITS))&lt;br /&gt;
 -         &amp;gt;= part_length))&lt;br /&gt;
 +      /*|| ((sector + ((byte_offset + byte_len - 1) &amp;gt;&amp;gt; SECTOR_BITS))&lt;br /&gt;
 +         &amp;gt;= part_length)*/)&lt;br /&gt;
      {&lt;br /&gt;
        errnum = ERR_OUTSIDE_PART;&lt;br /&gt;
        return 0;&lt;br /&gt;
&lt;br /&gt;
I made a grub CD with a grub patched with the above. Now I can &amp;quot;cat&amp;quot; the bootsector of the Predesktop Area from the grub shell (when booting of that grub CD). But I haven't yet managed to boot the Predesktop Area (dangerous stuff!) To be continued ...&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] Fri Mar 18 22:42:43 CET 2005&lt;br /&gt;
----&lt;br /&gt;
Update: a quick test with the current development version of grub2 (grub-1.93) showed that grub2 can chainload a block outside the partitioned area &lt;br /&gt;
&amp;quot;out of the box&amp;quot;. That's nice. I still haven't been able to get passed the error messages generated by the boot sectors of the bootable PSAs. My guess is the BIOS provides those boot sectors with some (special) settings that grub doesn't use ...&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 00:40, 5 April 2006 (CEST)&lt;br /&gt;
----&lt;br /&gt;
GRUB cannot be expected to (chain)load the Predesktop Area. When showing the Predesktop Area the BIOS runs in a special mode (more specifically: using some very specific interrupts, behaving differently under normal circumstances). So this seems to be not something to merit further investigation.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 19:01, 11 June 2006 (CEST)&lt;br /&gt;
----&lt;br /&gt;
Hey there - I hope to be welcome here to since I've no ThinkPad but an Samsung X20 notebook. This notebook uses also the HPA for some kind of a predesktop area - a linux&lt;br /&gt;
based multimedia system called &amp;quot;AVStation Now&amp;quot; which is hidden there. I used dd to dump the hpa and read the BEER table to find out what is hidden inside.&lt;br /&gt;
&lt;br /&gt;
What I found out:&lt;br /&gt;
&lt;br /&gt;
*the first partition (ext3) contains the rootfilesystem (funny, cause they use libdvdcss for dvd playback)&lt;br /&gt;
&lt;br /&gt;
*the second partition (ext3) contained a /boot partition with a special kernel with the possibility to mount this partition (seems they use a special liloversion for booting)&lt;br /&gt;
&lt;br /&gt;
*the third partition (fat?) - some html files - the firstware menu&lt;br /&gt;
&lt;br /&gt;
*and at last a fourth partition i was unable to mount&lt;br /&gt;
&lt;br /&gt;
[http://www.christophmueller.org/stuff/beerdump.html A dump of my BEER ;-)]&lt;br /&gt;
&lt;br /&gt;
Does someone know weather it would be possible mounting souch an hpapartition without using dd - maybe kernelsupport for the BEER? - since im nither a C nor a kernelhacker im unable to continue, but there must be some kind of support cause this multimediasystem knows howto handle it.&lt;br /&gt;
&lt;br /&gt;
If you need some more information you could send me an email to christoph_at_christophmueller.org&lt;br /&gt;
&lt;br /&gt;
[[User:Christophmueller.org|Christoph MÃ¼ller]]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
I've been playing around with the predesktop area tonight.  I was simply trying to just leave the diagnostics stuff and remove the windows part.  I wrote some programs to read/write the BEER data and stuff, but I wasn't able to get the system to boot it, it kept erroring &amp;quot;Authentication of System Services failed&amp;quot; (or something along those lines).  I will play around with this some more later&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[User:Invisi|Tim Nordell]]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A quick look with a hexeditor gave me two instances of &amp;quot;Application authentication has failed!&amp;quot; in the FirstSight application. Does that sound familair? &lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] Fri Apr 1 19:35:30 CEST 2005&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Actually it wasn't that.  I did a search of that too, the message itself was not in the predesktop area at all.  What also is interesting is the fw*.exe utilities for manipulating the predesktop area, contains the string &amp;quot;MD5&amp;quot; which makes me wonder if there is an md5 hash of each &amp;quot;predesktop&amp;quot; partition.  I know on the IBM whitepaper it states there being a signature so that non-signed applications can not be run.  Could a simple &amp;quot;md5&amp;quot; be the signature?&lt;br /&gt;
&lt;br /&gt;
[[User:Invisi|Tim Nordell]] 12:01, 3 Apr 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*What is it that you were trying to do (what did trigger the error you saw)?&lt;br /&gt;
&lt;br /&gt;
*About ten of the fw*.exe utilities contain the phrase &amp;quot;MD5 Checksums do not match&amp;quot;. So they could very well be using MD5 sums for some sort of validation. But they could use the MD5 sums in a lot of ways actually, so I won't yet speculate ...&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] Sun Apr  3 15:11:10 CEST 2005&lt;br /&gt;
----&lt;br /&gt;
OK, roughly two years later I finally found the courage to really mess with the BEER in my T41. Copied the BEER and the few related sections at the end of /dev/hda (using dd), analyzed those (I have some unreleased code to parse the BEER and the DOS stuff) _hand edited_ the BEER to &amp;quot;remove&amp;quot; the OS backup data, checked again, and copied the new BEER etc. to /dev/hda (using dd again, extremely tricky!). That worked like a charm: my new HPA is now about 3G smaller. No complaints whatsoever (even when booting my T41 is &amp;quot;secure&amp;quot; mode). &lt;br /&gt;
&lt;br /&gt;
So, I can't really reproduce Tims problems.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 01:24, 4 January 2007 (CET)&lt;br /&gt;
&lt;br /&gt;
== Predesktop Area ==&lt;br /&gt;
&lt;br /&gt;
I made a program that takes the BEER record at the end, parses it out to a &amp;quot;.cfg&amp;quot; file, lets you modify it, recalibrate the start spots for the records, and write it out to disk again.  It doesn't directly access hda, 'cept for reading the original beer record.  It makes a script file to go with the files you have, to read in the HPA data, and to write it out again with the new record.&lt;br /&gt;
&lt;br /&gt;
Anyways, I tried simply removing the last record from the BEER, which is the windows recovery partition.  It didn't like that.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Did you update the two's complement checksum at the end of the BEER?&lt;br /&gt;
&lt;br /&gt;
[[user:Pebolle|Paul Bolle]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Yep, I updated that.  If I don't update that, it doesn't even say that failed message.  I also made a seperate program to update the checksum so you can also modify the beer record by hand with a hex editor and have valid checksums.&lt;br /&gt;
&lt;br /&gt;
== Linux kernel support ==&lt;br /&gt;
{{Todo|research and add to article}}&lt;br /&gt;
* Add a section on dmesg and hdparm -I output:&lt;br /&gt;
 (...)&lt;br /&gt;
 Commands/features:&lt;br /&gt;
        Enabled Supported:&lt;br /&gt;
 (...)&lt;br /&gt;
           *    Host Protected Area feature set&lt;br /&gt;
 (...)&lt;br /&gt;
                SET MAX security extension&lt;br /&gt;
                Address Offset Reserved Area Boot&lt;br /&gt;
 (...)&lt;br /&gt;
&lt;br /&gt;
* Recent (2.6.10 and up?) kernels disable HPAs automatically (in drivers/ide/ide-disk.c). Dmesg example:&lt;br /&gt;
&lt;br /&gt;
 hda: Host Protected Area detected.&lt;br /&gt;
        current capacity is 110194034 sectors (56419 MB)&lt;br /&gt;
         native  capacity is 117210240 sectors (60011 MB)&lt;br /&gt;
 hda: Host Protected Area disabled.&lt;br /&gt;
&lt;br /&gt;
This should be (further researched and) added to this section (maybe with some pointers to the unexpected consequences of this new approach ...)&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 22:06, 6 Sep 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
In 2.6.11, I was able to re-enable HPA by commenting out the section in drivers/ide/ide-disk.c under the comment &amp;quot;Some maxtor support LBA48 but not accept LBA48 set max...&amp;quot;.  I suppose that wouldn't be a good idea with a Maxtor drive but it worked fine for my R50.&lt;br /&gt;
&lt;br /&gt;
--[[User:Rkilian|Robert Kilian]] 21:13, 22 March 2006 (CET)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* SRCMOS24.EXE&lt;br /&gt;
&lt;br /&gt;
In the PSA used by the Predesktop Area I found a &amp;quot;hidden&amp;quot; executable: SRCMOS24.EXE (it is not mentioned in the FAT). This executable can capture and update CMOS data. It might only be used by the FirstSight program to display (part of) the BIOS info. It might be nice to see what it can do and if similar things are possible under GNU/Linux.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 22:01, 7 Sep 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
== Newer thinkpads don't use Phoenix Firstware? ==&lt;br /&gt;
&lt;br /&gt;
On my T42 that arrived yesterday, the predesktop area looks a lot like MS Windows. The widget set, the fonts, even the boot sequence looks exactly like Windows 2000. Debian-installer indentified it as &amp;quot;Microsoft Windows NT/2000/XP&amp;quot;, while it identified my XP partition as &amp;quot;Microsoft Windows XP Professional&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Has Lenovo/IBM changed their system, or is this Phoenix stuff really just Windows?&lt;br /&gt;
&lt;br /&gt;
-- [[Evan.Heidtmann]]&lt;br /&gt;
&lt;br /&gt;
Evan,&lt;br /&gt;
&lt;br /&gt;
Could it be that you're talking about the preinstalled version of Windows here? As far as I know (using information to be found on the internet, not personal research) the preinstalled OS will reformat its partition from FAT32 to NTFS at first boot. That could explain the difference in the identification by the Debian installer (which I never really used).&lt;br /&gt;
&lt;br /&gt;
Moreover the Predesktop Area is part of the HPA and the HPA is not an partition. It seems unlikely that the Debain installer notices the HPA. As far as I know there are at present no GNU/Linux tools with a (useful) support of HPAs.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 15:43, 4 Aug 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
My T42P (model 2373HSG) is using a cut-down version of Windows XP as the pre-desktop area.  I'm not sure whether it's a special IBM thing or just a [http://www.microsoft.com/licensing/programs/sa/benefits/winpe.mspx Windows PE] (preinstallation environment) setup.  It includes Java and Python, which are used by some of the IBM tools, and the Opera web browser.&lt;br /&gt;
&lt;br /&gt;
It's no longer an HPA but a 487MB hidden FAT32 called IBM_SERVICE located at the end of the disk.&lt;br /&gt;
&lt;br /&gt;
--[[User:Korourke|Korourke]]&lt;br /&gt;
&lt;br /&gt;
== Rescue and Recovery via grub? ==&lt;br /&gt;
&lt;br /&gt;
Did anyone get the Rescue and Recovery partition to boot via grub on recent models? On a T43 with&lt;br /&gt;
 rootnoverify (hd0,1)&lt;br /&gt;
 chainloader +1&lt;br /&gt;
the Rescue and Recovery partition starts booting nicely and then, a few seconds in the R&amp;amp;R loading sequence, chokes with a &lt;br /&gt;
 STOP: c000021a {Fatal System Error}&lt;br /&gt;
 The Session Manager Initialization system process terminated unexpectedly with a status of 0xc000003a (0x00000000 0x00000000).&lt;br /&gt;
 The system has been shut down. &lt;br /&gt;
The problem started right after installing grub into the MBR (I couldn't get the preinstalled MBR to boot grub from an active primary partition). It seems oblivious to the Predesktop BIOS setting.&lt;br /&gt;
&lt;br /&gt;
The same problem has been reported by others with other models (for example [http://forums.fedoraforum.org/archive/index.php/t-19433.html here] for a T42).&lt;br /&gt;
&lt;br /&gt;
[[User:Thinker|Thinker]] 11:35, 30 Sep 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
Your &amp;quot;Rescue and Recovery partition&amp;quot; seems not to be a HPA (which isn't a partition). Maybe we should open a new page for that system.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 21:54, 30 Sep 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
It may very well not be an HPA , but the BIOS stil calls it a &amp;quot;Predesktop Area&amp;quot;. Anyway, the partition is actually a VFAT partition (even though it has type 0x12, &amp;quot;Compaq Diagnostics&amp;quot;). It seems to boot into PC-DOS (using {{path|NTDETECT.EXE}} so it looks like Windows startup) and then its {{path|AUTOEXEC.BAT}} runs a fancy GUI.&lt;br /&gt;
--[[User:Thinker|Thinker]] 23:31, 30 Sep 2005 (CEST)&lt;br /&gt;
----&lt;br /&gt;
Right, there has been a lot of confusion about this, we should have a separate page. Introduced an edit link (called Rescue and Recovery) on the [[ThinkPad Technologies]] page for that purpose.&lt;br /&gt;
&lt;br /&gt;
== Suggestions for projects ==&lt;br /&gt;
&lt;br /&gt;
I'd guess it would be rather nice to have GNU/Linux tools (like sfdisk and parted) HPA aware. The most urgent change would be to have those programs at least recognize and respect a HPA (e.g.: do not write in or otherwise use the HPA area; unless the user gives a --force option or something similar).&lt;br /&gt;
&lt;br /&gt;
As for now, I realize I caused this error: ENOPATCH.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 22:56, 5 Nov 2005 (CET)&lt;br /&gt;
&lt;br /&gt;
== Keeping functionality of the blue AccessIBM button ==&lt;br /&gt;
&lt;br /&gt;
Somebody figured out [http://sharadware.com/2005/07/11/suse-linux-winxp-access-ibm-on-the-thinkpad-t43/|how to keep the AccessIBM functionality] when installing Linux, quite easy fix. How come nobody thought about it before? :)&lt;br /&gt;
(link got from [[Installing_Ubuntu_5.04_on_a_ThinkPad_T43_%281875%29 here]])&lt;br /&gt;
&lt;br /&gt;
--[[User:Micampe|Micampe]] 17:39, 9 Dec 2005 (CET)&lt;br /&gt;
&lt;br /&gt;
The relevant part of that page:&lt;br /&gt;
&lt;br /&gt;
''Set the IBM Predesktop Area (in the BIOS) to â€œSecureâ€. Boot using the SUSE DVD. Shrink the Windows partition as required. Follow the instructions and go through the regular installation process. Create a primary partition for /boot (the other stuff can go into the extended partitions) and when the time comes to install GRUB (you do prefer GRUB to LILO, donâ€™t you?), make sure you install it into the boot sector of the boot partition. Set this partition as active. Leave the MBR alone.''&lt;br /&gt;
&lt;br /&gt;
That's the first thing I tried on my T43. Didn't work: setting the active partition to /boot had no effect, it was still booting the first (Windows) partition. So I had to install Grub into MBR, thereby killing R&amp;amp;R. Anyway, there's another solution in the article page (didn't try it since I saw it only after purging my R&amp;amp;R partition).&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
--[[User:Thinker|Thinker]] 19:18, 9 Dec 2005 (CET)&lt;br /&gt;
&lt;br /&gt;
== Parsing the HPA information (BEER/DOS) ==&lt;br /&gt;
&lt;br /&gt;
I too have been writing a program to parse the BEER and DOS info. Sample output:&lt;br /&gt;
:{{cmdresult| beer.signature: 0xBEEF}}&lt;br /&gt;
:{{cmdresult| beer.size: 128}}&lt;br /&gt;
:{{cmdresult| beer.flags: 41}}&lt;br /&gt;
:{{cmdresult|    Read Only:}}&lt;br /&gt;
:{{cmdresult|    Generated Record:}}&lt;br /&gt;
:{{cmdresult|    Use Reserved Area Boot Code Address: yes}}&lt;br /&gt;
:{{cmdresult|    Configuration Time Stamp is valid:}}&lt;br /&gt;
:{{cmdresult|    Device Supports LBA:                 yes}}&lt;br /&gt;
:{{cmdresult|    Directory of Services is Present}}&lt;br /&gt;
:{{cmdresult|    Formatted Geometry Valid}}&lt;br /&gt;
:{{cmdresult|    Reported Geometry Valid              yes}}&lt;br /&gt;
:{{cmdresult| beer.reported_cylinders: 16383}}&lt;br /&gt;
:{{cmdresult| beer.reported_heads: 16}}&lt;br /&gt;
:{{cmdresult| beer.reported_sectors: 63}}&lt;br /&gt;
:{{cmdresult| beer.reported_bytes_sector: 512}}&lt;br /&gt;
:{{cmdresult| beer.reported_sectors_device: 117210240}}&lt;br /&gt;
:{{cmdresult| beer.formatted_cylinders: 16383}}&lt;br /&gt;
:{{cmdresult| beer.formatted_heads: 16}}&lt;br /&gt;
:{{cmdresult| beer.formatted_sectors: 63}}&lt;br /&gt;
:{{cmdresult| beer.formatted_bytes_sector: 512}}&lt;br /&gt;
:{{cmdresult| beer.formatted_sectors_device: 117210240}}&lt;br /&gt;
:{{cmdresult| year: 2004}}&lt;br /&gt;
:{{cmdresult| day: 313}}&lt;br /&gt;
:{{cmdresult| beer.timestamp: 1426063684}}&lt;br /&gt;
:{{cmdresult| beer.device_index: 0x80}}&lt;br /&gt;
:{{cmdresult| beer.hpa_start: 110194034}}&lt;br /&gt;
:{{cmdresult| beer.boot_code_address: 117002545}}&lt;br /&gt;
:{{cmdresult| beer.num_entries: 8}}&lt;br /&gt;
:{{cmdresult| beer.dir_length: 64}}&lt;br /&gt;
:{{cmdresult| beer.revision: 0}}&lt;br /&gt;
:{{cmdresult| dev_name: HTS726060M9AT00}}&lt;br /&gt;
:{{cmdresult| beer.checksum: -26982}}&lt;br /&gt;
:{{cmdresult| dos[0].flags: 3}}&lt;br /&gt;
:{{cmdresult|    Service area is available as B:}}&lt;br /&gt;
:{{cmdresult|    Diagnostic Service:}}&lt;br /&gt;
:{{cmdresult|    Service Area is Read Only:}}&lt;br /&gt;
:{{cmdresult|    This Boot:}}&lt;br /&gt;
:{{cmdresult|    Empty Service Area:}}&lt;br /&gt;
:{{cmdresult|    Hidden Service Area:                 yes}}&lt;br /&gt;
:{{cmdresult|    Service Area is bootable as A:       yes}}&lt;br /&gt;
:{{cmdresult| dos[0].service_area_start: 117005431}}&lt;br /&gt;
:{{cmdresult| dos[0].service_area_size: 204800}}&lt;br /&gt;
:{{cmdresult| dos[0].load_sectors: 1}}&lt;br /&gt;
:{{cmdresult| dos[0].load_address: 0x7:C000}}&lt;br /&gt;
:{{cmdresult| dos[0].service_area_id: 0}}&lt;br /&gt;
:{{cmdresult| dos[0] id_str: FirstWare Reserved Area}}&lt;br /&gt;
:{{cmdresult| dos[0].checksum: -22271}}&lt;br /&gt;
:{{cmdresult| [...]}}&lt;br /&gt;
&lt;br /&gt;
Very rough code. Send me an e-mail (at the address found at my user page) if you want a (GPL'd) copy, but only if you're willing to test and improve the code.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 01:15, 24 January 2006 (CET)&lt;br /&gt;
&lt;br /&gt;
== SET MAX Security Extensions ==&lt;br /&gt;
&lt;br /&gt;
I've hacked Andries Brouwer's setmax tool (see: Google) to support the SET MAX security extensions (SET MAX SET PASSWORD, SET MAX LOCK, SET MAX UNLOCK, SET MAX FREEZE). Very rough code once again. Mail me if you're willing to brick your HDD.&lt;br /&gt;
&lt;br /&gt;
A few random observations:&lt;br /&gt;
&lt;br /&gt;
- secure mode: the Phoenix BIOS probably sets a SET MAX password in the HDD, does a non-volatile SET MAX and LOCKs (or FREEZEs) the HDD.&lt;br /&gt;
&lt;br /&gt;
- normal mode: the Phoenix BIOS might set a SET MAX password in the HDD, does a (volatile?) SET MAX but does not LOCK the HDD. The HDD will accept another SET MAX, a new SET MAX SET PASSWORD, etc.&lt;br /&gt;
&lt;br /&gt;
- normal mode: Linux 2.6.x disables the HPA in normal mode (by doing a volatile SET MAX to maximum native address). After a suspend the HDD reenables the HPA (by returning to the latest non-volatile value of SET MAX). It thus treats the suspend cycle as a power cycle (it also discards a SET MAX password, unlocks or unfreezes the HPA etc). I'm not sure whether that is a correct implementation of the ATA spec. (The HDD doesn't do this in secure mode. I would like to know how the Phoenix BIOS and/or Hitachi HDD people have managed this.) &lt;br /&gt;
&lt;br /&gt;
This can lead to some problems if a partition ends within the limits of the HPA (which is then actually (partly) overwritten by that partition). Maybe the best solution would be to have the kernel do a non-volatile SET MAX to the native maximum address. Then a resume from suspend will in effect not reenable the HPA.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 01:40, 20 February 2006 (CET)&lt;br /&gt;
&lt;br /&gt;
== hpafs ==&lt;br /&gt;
&lt;br /&gt;
I've written a (read only) FUSE for the hpa: hpafs. Current release is hpafs-0.1.0 (24 February 2007, alpha, developers only). It can be found at http://home.tiscali.nl/pebolle/code/hpafs .&lt;br /&gt;
&lt;br /&gt;
hpafs will only work if the Predesktop Area is disabled (but that is more or less obvious). It basically turns each PSA into a file:&lt;br /&gt;
&lt;br /&gt;
{{cmdresult|$ sudo hpafs /dev/hda /mnt/hpa -o allow_other&amp;lt;br/&amp;gt;&lt;br /&gt;
$ ll /mnt/hpa/&amp;lt;br/&amp;gt;&lt;br /&gt;
total 0&amp;lt;br/&amp;gt;&lt;br /&gt;
-r--r--r--  1 root root    2097152 Jan  1  1970 BIOSWORKAREA&amp;lt;br/&amp;gt;&lt;br /&gt;
-r--r--r--  1 root root    7710720 Jan  1  1970 Create Diagnostic Diskettes&amp;lt;br/&amp;gt;&lt;br /&gt;
-r--r--r--  1 root root  104857600 Jan  1  1970 FirstWare Reserved Area&amp;lt;br/&amp;gt;&lt;br /&gt;
-r--r--r--  1 root root     7710720 Jan  1  1970 Rec Boot&amp;lt;br/&amp;gt;&lt;br /&gt;
-r--r--r--  1 root root 3459252224 Jan  1  1970 Rec Data&amp;lt;br/&amp;gt;&lt;br /&gt;
-r--r--r--  1 root root    1476096 Jan  1  1970 Restore from backup&amp;lt;br/&amp;gt;&lt;br /&gt;
-r--r--r--  1 root root    7710720 Jan  1  1970 Run Diagnostics&amp;lt;br/&amp;gt;&lt;br /&gt;
-r--r--r--  1 root root    1477632 Jan  1  1970 SIGHT}}&lt;br /&gt;
&lt;br /&gt;
This FUSE file can easily be copied with basic GNU tools (cat, dd, etc). Even more fun is to loop mount such a FUSE file (if the corresponding PSA is a bootable image). Then the PSA is a (read only) part of your mounted filesystems. So now you do not need to use dd on /dev/hda to copy the Predesktop Area: you can just mount it!&lt;br /&gt;
&lt;br /&gt;
{{cmdresult|$ sudo mount -o loop,ro,users  /mnt/hpa/Rec\ Data /mnt/tmp&amp;lt;br/&amp;gt;&lt;br /&gt;
$ ll /mnt/tmp/&amp;lt;br/&amp;gt;&lt;br /&gt;
total 1454&amp;lt;br/&amp;gt;&lt;br /&gt;
-rwxr-xr-x  1 root root      64 Sep 27  2002 bootcat.bin&amp;lt;br/&amp;gt;&lt;br /&gt;
-rwxr-xr-x  1 root root 1474560 Oct  3  2002 bootimg.bin&amp;lt;br/&amp;gt;&lt;br /&gt;
drwxr-xr-x  2 root root    2048 Mar 13  2004 country&amp;lt;br/&amp;gt;&lt;br /&gt;
drwxr-xr-x  2 root root    2048 Mar 13  2004 ibmwork&amp;lt;br/&amp;gt;&lt;br /&gt;
drwxr-xr-x  3 root root    8192 Mar 13  2004 recovery&amp;lt;br/&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
Check the [http://home.tiscali.nl/pebolle/code/hpafs/README README] for further information.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 14:12, 24 February 2007 (CET)&lt;/div&gt;</summary>
		<author><name>Pebolle</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Hidden_Protected_Area&amp;diff=28403</id>
		<title>Hidden Protected Area</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Hidden_Protected_Area&amp;diff=28403"/>
		<updated>2007-02-24T15:20:54Z</updated>

		<summary type="html">&lt;p&gt;Pebolle: reletated to FIXME just resolved&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=&amp;quot;100%&amp;quot;&lt;br /&gt;
|style=&amp;quot;vertical-align:top;padding-right:20px;width:10px;white-space:nowrap;&amp;quot; | __TOC__&lt;br /&gt;
|style=&amp;quot;vertical-align:top&amp;quot; |&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin: 0; margin-right:10px; border: 1px solid #dfdfdf; padding: 0em 1em 1em 1em; background-color:#F8F8FF; align:right;&amp;quot;&amp;gt;&lt;br /&gt;
=== The Hidden Protected Area ===&lt;br /&gt;
The Hidden Protected Area (also known as the Host Protected Area) is a special area (usually a few gigabytes in size) located at the end of a hard disk. It is preinstalled on the harddisks of some ThinkPads. It is normally hidden to the software running on your ThinkPad. It includes all the software and data needed to recover the preloaded state of the ThinkPad. The HPA also includes some diagnostic tools and a (MS Windows only) backup tool.&lt;br /&gt;
&lt;br /&gt;
The HPA was introduced with the R40, T40 and X30 series of ThinkPads. It is refered to as the Predesktop Area in the BIOS Setup Utility. Recent ThinkPads can have a (hidden) partition that is also called [[Predesktop Area|Predesktop Area]] in the BIOS Setup Utility. That (hidden) partition is not an HPA. More information can be found in [[Rescue and Recovery | Rescue and Recovery]],&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|style=&amp;quot;vertical-align:top;padding-right:10px;width:10px;white-space:nowrap;&amp;quot; | [[Image:hpa.jpg|IBM PreDesktop Area]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==General information about the HPA==&lt;br /&gt;
As opposed to [[Rescue and Recovery|Recovery Partitions]], Protected Service Areas (PSAs) such as the HPA are (let's say) images of partitions written to the end of a harddisk. They are only accessible through their BEER. The general idea is that, under control of the BIOS, the PSAs are totally hidden from all ordinary software, including malware (viruses, trojans, spyware). They are only accessible when permitted by the BIOS, and even then only through special HPA-aware tools. Under GNU/Linux they are only accessible with low level tools like dd.&lt;br /&gt;
&lt;br /&gt;
The HPA is based on [http://www.phoenix.com/en/Products/Trusted+Applications/Phoenix+FirstWare/default.htm Phoenix FirstWare]. FirstWare is (in short) an implementation of two technologies: BEER and PARTIES. (Yes, those names are correct!) BEER (Boot Engineering Extension Record) and PARTIES (Protected Area Run Time Interface Extension Services) are described in [http://t13.org/Documents/UploadedDocuments/project/d1367r3-PARTIES.pdf this T13 working draft]. There is a more general introduction to PARTIES on the [http://www-1.ibm.com/support/docview.wss?rs=0&amp;amp;uid=psg1MIGR-51248&amp;amp;loc=en_US IBM site]. FirstWare depends on certain [http://en.wikipedia.org/wiki/Advanced_Technology_Attachment#ATA_standards_versions.2C_transfer_rates.2C_and_features ATA-5] commands, so it won't work with lower ATA level (earlier) drives or even with all ATA-5 drives. Unfortunately, there is no public HPA compatibility tester or list of compatible drives.&lt;br /&gt;
&lt;br /&gt;
Basically, what's going on is that the Phoenix BIOS commands the drive to hide the last few gigabytes of the hard disk (the HPA). The to non-HPA aware software, the drive appears to have a smaller size. Note that this is just a setting in the BIOS and can be disabled. The HPA can be accessed by pressing {{ibmkey|Access IBM|#495988}} or {{key|Enter}} at boot time. The BIOS will then parse the BEER (128 bytes, situated in the last sector of 512 bytes of the harddisk) and the &amp;quot;Directory of Services&amp;quot; (consisting of directory entries of 64 bytes each, starting in the last sector and spilling over into the previous sectors) to see what part of the HPA should be launched. In (most?) ThinkPads the BEER tells the BIOS to launch the Access IBM Predesktop Area. The system will then actually be booting into a (minimal) DOS environment which is able to launch a graphical shell (called Phoenix FirstSight). IBM has simply rebranded this graphical shell to the Access IBM Predesktop Area. From this graphical shell one can launch several tools (BIOS Setup Utility, diagnostic tools, recovery tools).&lt;br /&gt;
&lt;br /&gt;
==Three BIOS options==&lt;br /&gt;
The BIOS has three settings for the &amp;quot;IBM Predesktop Area&amp;quot; (in the Security category):&lt;br /&gt;
*Secure: No user or SW-initiated changes; Contents hidden from OS&lt;br /&gt;
*Normal: Change allowed; Contents hidden from OS&lt;br /&gt;
*Disabled: Not Usable; Visible and Reclaimable&lt;br /&gt;
&lt;br /&gt;
Normal is the default setting. One can boot into the Predesktop Area when either Secure or Normal is set. When Disabled is set the Predesktop Area will not boot. According to the [http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-46023 Predesktop Area white paper] the HPA is both &amp;quot;locked&amp;quot;{{footnote|1}} and &amp;quot;hidden&amp;quot; when Secure is set and only &amp;quot;hidden&amp;quot; when normal is set. In practice the result seems to be that the HPA is totally unavailable to the Linux kernel (and therefore all applications) when Secure is set. (The HPA should be unavailable in &amp;quot;Secure mode&amp;quot; for all operating systems, MS Windows included.) One would expect the HPA to be only accessable to HPA aware tools when Normal is set. However, recent kernels disable the HPA by default when Normal is set. Note that [http://marc.theaimsgroup.com/?l=linux-ide&amp;amp;w=2&amp;amp;r=1&amp;amp;s=Host+protected+area&amp;amp;q=b recent threads on linux-ide] suggest that the ThinkPad will reenable the HPA on resume and thus causing (possibly serious) conflicts with the GNU/Linux system (that assumes the HPA is still available).&lt;br /&gt;
&lt;br /&gt;
With Disabled you should be able to safely reclaim the area used by the HPA (to GNU/Linux it basically is unallocated space on the harddisk).&lt;br /&gt;
&lt;br /&gt;
==Details of the HPA==&lt;br /&gt;
Fabrice Bellet describes a [http://bellet.info/laptop/t40.html#the_predesktop_area technique he used] to explore the HPA of his ThinkPad T40, using GNU/Linux tools. This technique is only for the more curious or more careless people. It uses &amp;quot;dd&amp;quot; to copy the sectors on the harddisk containing the HPA from &amp;quot;/dev/hda&amp;quot; to a new file: when using &amp;quot;dd&amp;quot; on &amp;quot;/dev/hda&amp;quot; you are only one small typo away from an unrecoverable disaster!&lt;br /&gt;
&lt;br /&gt;
Another option is the [http://home.tiscali.nl/pebolle/code/hpafs Hidden Protected Area FileSystem], a read-only [http://fuse.sf.net FUSE] (Filesystem in USErspace). hpafs allows to analyze, backup, etc. the HPA. The current release is hpafs-0.1.0 (alpha, developers only). Check the [http://home.tiscali.nl/pebolle/code/hpafs/README README] for further details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==How to reclaim the HPA==&lt;br /&gt;
After disabling the &amp;quot;IBM Predesktop Area&amp;quot; (with the BIOS option &amp;quot;Disabled&amp;quot;, see above) it's possible to reclaim the area used by the HPA. Then one can include that area in a partition with standard tools (i.e. fdisk, mkfs) as it will be treated just as regular free space of the hard disk.&lt;br /&gt;
&lt;br /&gt;
==Alternative uses?==&lt;br /&gt;
It might be possible to use the FirstWare tools included in the HPA to make the HPA more useful for GNU/Linux purposes. For instance, the copy of the preloaded OS could be replaced with an emergency backup of your GNU/Linux distribution. Maybe the Predesktop area could be even used to boot into a GNU/Linux rescue system. Whether the Phoenix proprietary tools really allow alternative uses and whether those tools do not make it too hard to accomplish those cannot yet be said. It seems realistic to assume that the benefits of those alternative uses aren't worth the effort to accomplish them. Still, it might be fun (altough possibly hazardous to your system) to try ...&lt;br /&gt;
&lt;br /&gt;
==Problems caused by the HPA==&lt;br /&gt;
As of Linux 2.6.18, having a HPA may cause errors when resuming the laptop from suspend-to-RAM or suspend-to-disk.  See the section called &amp;quot;SectorIdNotFound disk errors when laptop is resumed&amp;quot; in [[Problems with ACPI suspend-to-ram | ACPI suspend problems]].&lt;br /&gt;
&lt;br /&gt;
==External Sources==&lt;br /&gt;
*[http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-46023 Predesktop Area white paper]&lt;br /&gt;
*[http://www-3.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-46025 Predesktop Aministrator Utility (DOS)]&lt;br /&gt;
*[http://webstore.ansi.org/ansidocstore/product.asp?sku=ANSI+INCITS+346-2001 Protected Area Run Time Interface Extension Services (PARTIES) ANSI INCITS 346-2001 ($30)]&lt;br /&gt;
*[http://t13.org/Documents/UploadedDocuments/project/d1367r3-PARTIES.pdf The latest free draft of ANSI INCITS 346-2001 (BEER specs)]&lt;br /&gt;
*[http://www.phoenix.com/NR/rdonlyres/7465D3CF-B0E3-4F64-9122-47D9C83028D0/0/cme_firstware_wp.pdf Phoenix FirstWare White Paper]&lt;br /&gt;
*[http://www.win.tue.nl/~aeb/linux/Large-Disk-11.html Section 11 of the Large Disk HOWTO (Clipped disks)]&lt;br /&gt;
*[http://home.tiscali.nl/pebolle/code/hpafs/hpafs-0.1.0.tgz hpafs-0.1.0.tgz]&lt;br /&gt;
&lt;br /&gt;
==Models featuring this Technology==&lt;br /&gt;
*ThinkPad {{R40}}, {{R40e}}, {{R50}}, {{R50e}}, {{R50p}}, {{R51}}, {{R52}}&lt;br /&gt;
*ThinkPad {{T40}}, {{T40p}}, {{T41}}, {{T41p}}, {{T42}}, {{T42p}}, {{T43}}, {{T43p}}&lt;br /&gt;
*ThinkPad {{X31}}, {{X32}}, {{X40}}, {{X41}}, {{X41T}}&lt;br /&gt;
*ThinkPad {{Z61m}}&lt;br /&gt;
&lt;br /&gt;
{{footnotes|&lt;br /&gt;
# Presumably by having the BIOS use the SET MAX security extension. The BIOS seems to set a password for the HPA at boot (using the SETMAX-SET PASSWORD command) and after that use that password to issue a SETMAX-LOCK command. Since the password is unknown (and most likely changes at every Secure boot) the HPA is inaccessable to all programs running on the ThinkPad.&amp;lt;BR&amp;gt;&amp;lt;BR&amp;gt;Something similar would be possible running in Normal mode. Then a program could issue the SETMAX-SET PASSWORD command. At the moment there's no program running under GNU/Linux capable of doing that. Of course this is possibly less secure: it's (theoretically) possible that other (rogue) programs get hold of that password.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Glossary]]&lt;/div&gt;</summary>
		<author><name>Pebolle</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Predesktop_Area&amp;diff=28402</id>
		<title>Predesktop Area</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Predesktop_Area&amp;diff=28402"/>
		<updated>2007-02-24T15:19:28Z</updated>

		<summary type="html">&lt;p&gt;Pebolle: Resolve FIXME&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=&amp;quot;100%&amp;quot;&lt;br /&gt;
|style=&amp;quot;vertical-align:top;padding-right:20px;width:10px;white-space:nowrap;&amp;quot; | __NOTOC__&lt;br /&gt;
|style=&amp;quot;vertical-align:top&amp;quot; |&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin: 0; margin-right:10px; border: 1px solid #dfdfdf; padding: 0em 1em 1em 1em; background-color:#F8F8FF; align:right;&amp;quot;&amp;gt;&lt;br /&gt;
=== The Predesktop Area ===&lt;br /&gt;
Predesktop Area is the name used for two different technologies: [[Hidden Protected Area| Hidden Protected Area]] and [[Rescue and Recovery | Rescue and Recovery]].&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
== Hidden Protected Area ==&lt;br /&gt;
The [[Hidden Protected Area]] is a special area on your harddisk that can be hidden to the software running on your ThinkPad. It includes all the software and data needed to recover the preloaded state of the ThinkPad. The HPA also includes some diagnostic tools and a (MS Windows only) backup tool. The Hidden Protected Area was introduced with the R40, T40 and X30 series of ThinkPads. Current ThinkPads do not have Hidden Protected Areas.&lt;br /&gt;
&lt;br /&gt;
== Rescue and Recovery ==&lt;br /&gt;
Recent ThinkPads are shipped with the [[Rescue and Recovery]] technology. That technology uses a (hidden) partition for recovery of the preloaded state and diagnostic tools. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Glossary]]&lt;/div&gt;</summary>
		<author><name>Pebolle</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Hidden_Protected_Area&amp;diff=28400</id>
		<title>Hidden Protected Area</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Hidden_Protected_Area&amp;diff=28400"/>
		<updated>2007-02-24T14:22:07Z</updated>

		<summary type="html">&lt;p&gt;Pebolle: hpafs-0.1.0.tgz&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=&amp;quot;100%&amp;quot;&lt;br /&gt;
|style=&amp;quot;vertical-align:top;padding-right:20px;width:10px;white-space:nowrap;&amp;quot; | __TOC__&lt;br /&gt;
|style=&amp;quot;vertical-align:top&amp;quot; |&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin: 0; margin-right:10px; border: 1px solid #dfdfdf; padding: 0em 1em 1em 1em; background-color:#F8F8FF; align:right;&amp;quot;&amp;gt;&lt;br /&gt;
=== The Hidden Protected Area ===&lt;br /&gt;
The Hidden Protected Area (also known as the Host Protected Area) is a special area (usually a few gigabytes in size) located at the end of a hard disk. It is preinstalled on the harddisks of some ThinkPads. It is normally hidden to the software running on your ThinkPad. It includes all the software and data needed to recover the preloaded state of the ThinkPad. The HPA also includes some diagnostic tools and a (MS Windows only) backup tool.&lt;br /&gt;
&lt;br /&gt;
The HPA was introduced with the R/T/X 40 series of ThinkPads. It is refered to as the Predesktop Area in the BIOS Setup Utility. Recent ThinkPads can have a (hidden) partition that is also called [[Predesktop Area|Predesktop Area]] in the BIOS Setup Utility. That (hidden) partition is not an HPA. More information can be found in [[Rescue and Recovery | Rescue and Recovery]],&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|style=&amp;quot;vertical-align:top;padding-right:10px;width:10px;white-space:nowrap;&amp;quot; | [[Image:hpa.jpg|IBM PreDesktop Area]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==General information about the HPA==&lt;br /&gt;
As opposed to [[Rescue and Recovery|Recovery Partitions]], Protected Service Areas (PSAs) such as the HPA are (let's say) images of partitions written to the end of a harddisk. They are only accessible through their BEER. The general idea is that, under control of the BIOS, the PSAs are totally hidden from all ordinary software, including malware (viruses, trojans, spyware). They are only accessible when permitted by the BIOS, and even then only through special HPA-aware tools. Under GNU/Linux they are only accessible with low level tools like dd.&lt;br /&gt;
&lt;br /&gt;
The HPA is based on [http://www.phoenix.com/en/Products/Trusted+Applications/Phoenix+FirstWare/default.htm Phoenix FirstWare]. FirstWare is (in short) an implementation of two technologies: BEER and PARTIES. (Yes, those names are correct!) BEER (Boot Engineering Extension Record) and PARTIES (Protected Area Run Time Interface Extension Services) are described in [http://t13.org/Documents/UploadedDocuments/project/d1367r3-PARTIES.pdf this T13 working draft]. There is a more general introduction to PARTIES on the [http://www-1.ibm.com/support/docview.wss?rs=0&amp;amp;uid=psg1MIGR-51248&amp;amp;loc=en_US IBM site]. FirstWare depends on certain [http://en.wikipedia.org/wiki/Advanced_Technology_Attachment#ATA_standards_versions.2C_transfer_rates.2C_and_features ATA-5] commands, so it won't work with lower ATA level (earlier) drives or even with all ATA-5 drives. Unfortunately, there is no public HPA compatibility tester or list of compatible drives.&lt;br /&gt;
&lt;br /&gt;
Basically, what's going on is that the Phoenix BIOS commands the drive to hide the last few gigabytes of the hard disk (the HPA). The to non-HPA aware software, the drive appears to have a smaller size. Note that this is just a setting in the BIOS and can be disabled. The HPA can be accessed by pressing {{ibmkey|Access IBM|#495988}} or {{key|Enter}} at boot time. The BIOS will then parse the BEER (128 bytes, situated in the last sector of 512 bytes of the harddisk) and the &amp;quot;Directory of Services&amp;quot; (consisting of directory entries of 64 bytes each, starting in the last sector and spilling over into the previous sectors) to see what part of the HPA should be launched. In (most?) ThinkPads the BEER tells the BIOS to launch the Access IBM Predesktop Area. The system will then actually be booting into a (minimal) DOS environment which is able to launch a graphical shell (called Phoenix FirstSight). IBM has simply rebranded this graphical shell to the Access IBM Predesktop Area. From this graphical shell one can launch several tools (BIOS Setup Utility, diagnostic tools, recovery tools).&lt;br /&gt;
&lt;br /&gt;
==Three BIOS options==&lt;br /&gt;
The BIOS has three settings for the &amp;quot;IBM Predesktop Area&amp;quot; (in the Security category):&lt;br /&gt;
*Secure: No user or SW-initiated changes; Contents hidden from OS&lt;br /&gt;
*Normal: Change allowed; Contents hidden from OS&lt;br /&gt;
*Disabled: Not Usable; Visible and Reclaimable&lt;br /&gt;
&lt;br /&gt;
Normal is the default setting. One can boot into the Predesktop Area when either Secure or Normal is set. When Disabled is set the Predesktop Area will not boot. According to the [http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-46023 Predesktop Area white paper] the HPA is both &amp;quot;locked&amp;quot;{{footnote|1}} and &amp;quot;hidden&amp;quot; when Secure is set and only &amp;quot;hidden&amp;quot; when normal is set. In practice the result seems to be that the HPA is totally unavailable to the Linux kernel (and therefore all applications) when Secure is set. (The HPA should be unavailable in &amp;quot;Secure mode&amp;quot; for all operating systems, MS Windows included.) One would expect the HPA to be only accessable to HPA aware tools when Normal is set. However, recent kernels disable the HPA by default when Normal is set. Note that [http://marc.theaimsgroup.com/?l=linux-ide&amp;amp;w=2&amp;amp;r=1&amp;amp;s=Host+protected+area&amp;amp;q=b recent threads on linux-ide] suggest that the ThinkPad will reenable the HPA on resume and thus causing (possibly serious) conflicts with the GNU/Linux system (that assumes the HPA is still available).&lt;br /&gt;
&lt;br /&gt;
With Disabled you should be able to safely reclaim the area used by the HPA (to GNU/Linux it basically is unallocated space on the harddisk).&lt;br /&gt;
&lt;br /&gt;
==Details of the HPA==&lt;br /&gt;
Fabrice Bellet describes a [http://bellet.info/laptop/t40.html#the_predesktop_area technique he used] to explore the HPA of his ThinkPad T40, using GNU/Linux tools. This technique is only for the more curious or more careless people. It uses &amp;quot;dd&amp;quot; to copy the sectors on the harddisk containing the HPA from &amp;quot;/dev/hda&amp;quot; to a new file: when using &amp;quot;dd&amp;quot; on &amp;quot;/dev/hda&amp;quot; you are only one small typo away from an unrecoverable disaster!&lt;br /&gt;
&lt;br /&gt;
Another option is the [http://home.tiscali.nl/pebolle/code/hpafs Hidden Protected Area FileSystem], a read-only [http://fuse.sf.net FUSE] (Filesystem in USErspace). hpafs allows to analyze, backup, etc. the HPA. The current release is hpafs-0.1.0 (alpha, developers only). Check the [http://home.tiscali.nl/pebolle/code/hpafs/README README] for further details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==How to reclaim the HPA==&lt;br /&gt;
After disabling the &amp;quot;IBM Predesktop Area&amp;quot; (with the BIOS option &amp;quot;Disabled&amp;quot;, see above) it's possible to reclaim the area used by the HPA. Then one can include that area in a partition with standard tools (i.e. fdisk, mkfs) as it will be treated just as regular free space of the hard disk.&lt;br /&gt;
&lt;br /&gt;
==Alternative uses?==&lt;br /&gt;
It might be possible to use the FirstWare tools included in the HPA to make the HPA more useful for GNU/Linux purposes. For instance, the copy of the preloaded OS could be replaced with an emergency backup of your GNU/Linux distribution. Maybe the Predesktop area could be even used to boot into a GNU/Linux rescue system. Whether the Phoenix proprietary tools really allow alternative uses and whether those tools do not make it too hard to accomplish those cannot yet be said. It seems realistic to assume that the benefits of those alternative uses aren't worth the effort to accomplish them. Still, it might be fun (altough possibly hazardous to your system) to try ...&lt;br /&gt;
&lt;br /&gt;
==Problems caused by the HPA==&lt;br /&gt;
As of Linux 2.6.18, having a HPA may cause errors when resuming the laptop from suspend-to-RAM or suspend-to-disk.  See the section called &amp;quot;SectorIdNotFound disk errors when laptop is resumed&amp;quot; in [[Problems with ACPI suspend-to-ram | ACPI suspend problems]].&lt;br /&gt;
&lt;br /&gt;
==External Sources==&lt;br /&gt;
*[http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-46023 Predesktop Area white paper]&lt;br /&gt;
*[http://www-3.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-46025 Predesktop Aministrator Utility (DOS)]&lt;br /&gt;
*[http://webstore.ansi.org/ansidocstore/product.asp?sku=ANSI+INCITS+346-2001 Protected Area Run Time Interface Extension Services (PARTIES) ANSI INCITS 346-2001 ($30)]&lt;br /&gt;
*[http://t13.org/Documents/UploadedDocuments/project/d1367r3-PARTIES.pdf The latest free draft of ANSI INCITS 346-2001 (BEER specs)]&lt;br /&gt;
*[http://www.phoenix.com/NR/rdonlyres/7465D3CF-B0E3-4F64-9122-47D9C83028D0/0/cme_firstware_wp.pdf Phoenix FirstWare White Paper]&lt;br /&gt;
*[http://www.win.tue.nl/~aeb/linux/Large-Disk-11.html Section 11 of the Large Disk HOWTO (Clipped disks)]&lt;br /&gt;
*[http://home.tiscali.nl/pebolle/code/hpafs/hpafs-0.1.0.tgz hpafs-0.1.0.tgz]&lt;br /&gt;
&lt;br /&gt;
==Models featuring this Technology==&lt;br /&gt;
*ThinkPad {{R40}}, {{R40e}}, {{R50}}, {{R50e}}, {{R50p}}, {{R51}}, {{R52}}&lt;br /&gt;
*ThinkPad {{T40}}, {{T40p}}, {{T41}}, {{T41p}}, {{T42}}, {{T42p}}, {{T43}}, {{T43p}}&lt;br /&gt;
*ThinkPad {{X31}}, {{X32}}, {{X40}}, {{X41}}, {{X41T}}&lt;br /&gt;
*ThinkPad {{Z61m}}&lt;br /&gt;
&lt;br /&gt;
{{footnotes|&lt;br /&gt;
# Presumably by having the BIOS use the SET MAX security extension. The BIOS seems to set a password for the HPA at boot (using the SETMAX-SET PASSWORD command) and after that use that password to issue a SETMAX-LOCK command. Since the password is unknown (and most likely changes at every Secure boot) the HPA is inaccessable to all programs running on the ThinkPad.&amp;lt;BR&amp;gt;&amp;lt;BR&amp;gt;Something similar would be possible running in Normal mode. Then a program could issue the SETMAX-SET PASSWORD command. At the moment there's no program running under GNU/Linux capable of doing that. Of course this is possibly less secure: it's (theoretically) possible that other (rogue) programs get hold of that password.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Glossary]]&lt;/div&gt;</summary>
		<author><name>Pebolle</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Hidden_Protected_Area&amp;diff=28399</id>
		<title>Hidden Protected Area</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Hidden_Protected_Area&amp;diff=28399"/>
		<updated>2007-02-24T13:42:03Z</updated>

		<summary type="html">&lt;p&gt;Pebolle: Removeed, as discussed in Talk:. hpafs can now be used to access a real HPA&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=&amp;quot;100%&amp;quot;&lt;br /&gt;
|style=&amp;quot;vertical-align:top;padding-right:20px;width:10px;white-space:nowrap;&amp;quot; | __TOC__&lt;br /&gt;
|style=&amp;quot;vertical-align:top&amp;quot; |&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin: 0; margin-right:10px; border: 1px solid #dfdfdf; padding: 0em 1em 1em 1em; background-color:#F8F8FF; align:right;&amp;quot;&amp;gt;&lt;br /&gt;
=== The Hidden Protected Area ===&lt;br /&gt;
The Hidden Protected Area (also known as the Host Protected Area) is a special area (usually a few gigabytes in size) located at the end of a hard disk. It is preinstalled on the harddisks of some ThinkPads. It is normally hidden to the software running on your ThinkPad. It includes all the software and data needed to recover the preloaded state of the ThinkPad. The HPA also includes some diagnostic tools and a (MS Windows only) backup tool.&lt;br /&gt;
&lt;br /&gt;
The HPA was introduced with the R/T/X 40 series of ThinkPads. It is refered to as the Predesktop Area in the BIOS Setup Utility. Recent ThinkPads can have a (hidden) partition that is also called [[Predesktop Area|Predesktop Area]] in the BIOS Setup Utility. That (hidden) partition is not an HPA. More information can be found in [[Rescue and Recovery | Rescue and Recovery]],&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|style=&amp;quot;vertical-align:top;padding-right:10px;width:10px;white-space:nowrap;&amp;quot; | [[Image:hpa.jpg|IBM PreDesktop Area]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==General information about the HPA==&lt;br /&gt;
As opposed to [[Rescue and Recovery|Recovery Partitions]], Protected Service Areas (PSAs) such as the HPA are (let's say) images of partitions written to the end of a harddisk. They are only accessible through their BEER. The general idea is that, under control of the BIOS, the PSAs are totally hidden from all ordinary software, including malware (viruses, trojans, spyware). They are only accessible when permitted by the BIOS, and even then only through special HPA-aware tools. Under GNU/Linux they are only accessible with low level tools like dd.&lt;br /&gt;
&lt;br /&gt;
The HPA is based on [http://www.phoenix.com/en/Products/Trusted+Applications/Phoenix+FirstWare/default.htm Phoenix FirstWare]. FirstWare is (in short) an implementation of two technologies: BEER and PARTIES. (Yes, those names are correct!) BEER (Boot Engineering Extension Record) and PARTIES (Protected Area Run Time Interface Extension Services) are described in [http://t13.org/Documents/UploadedDocuments/project/d1367r3-PARTIES.pdf this T13 working draft]. There is a more general introduction to PARTIES on the [http://www-1.ibm.com/support/docview.wss?rs=0&amp;amp;uid=psg1MIGR-51248&amp;amp;loc=en_US IBM site]. FirstWare depends on certain [http://en.wikipedia.org/wiki/Advanced_Technology_Attachment#ATA_standards_versions.2C_transfer_rates.2C_and_features ATA-5] commands, so it won't work with lower ATA level (earlier) drives or even with all ATA-5 drives. Unfortunately, there is no public HPA compatibility tester or list of compatible drives.&lt;br /&gt;
&lt;br /&gt;
Basically, what's going on is that the Phoenix BIOS commands the drive to hide the last few gigabytes of the hard disk (the HPA). The to non-HPA aware software, the drive appears to have a smaller size. Note that this is just a setting in the BIOS and can be disabled. The HPA can be accessed by pressing {{ibmkey|Access IBM|#495988}} or {{key|Enter}} at boot time. The BIOS will then parse the BEER (128 bytes, situated in the last sector of 512 bytes of the harddisk) and the &amp;quot;Directory of Services&amp;quot; (consisting of directory entries of 64 bytes each, starting in the last sector and spilling over into the previous sectors) to see what part of the HPA should be launched. In (most?) ThinkPads the BEER tells the BIOS to launch the Access IBM Predesktop Area. The system will then actually be booting into a (minimal) DOS environment which is able to launch a graphical shell (called Phoenix FirstSight). IBM has simply rebranded this graphical shell to the Access IBM Predesktop Area. From this graphical shell one can launch several tools (BIOS Setup Utility, diagnostic tools, recovery tools).&lt;br /&gt;
&lt;br /&gt;
==Three BIOS options==&lt;br /&gt;
The BIOS has three settings for the &amp;quot;IBM Predesktop Area&amp;quot; (in the Security category):&lt;br /&gt;
*Secure: No user or SW-initiated changes; Contents hidden from OS&lt;br /&gt;
*Normal: Change allowed; Contents hidden from OS&lt;br /&gt;
*Disabled: Not Usable; Visible and Reclaimable&lt;br /&gt;
&lt;br /&gt;
Normal is the default setting. One can boot into the Predesktop Area when either Secure or Normal is set. When Disabled is set the Predesktop Area will not boot. According to the [http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-46023 Predesktop Area white paper] the HPA is both &amp;quot;locked&amp;quot;{{footnote|1}} and &amp;quot;hidden&amp;quot; when Secure is set and only &amp;quot;hidden&amp;quot; when normal is set. In practice the result seems to be that the HPA is totally unavailable to the Linux kernel (and therefore all applications) when Secure is set. (The HPA should be unavailable in &amp;quot;Secure mode&amp;quot; for all operating systems, MS Windows included.) One would expect the HPA to be only accessable to HPA aware tools when Normal is set. However, recent kernels disable the HPA by default when Normal is set. Note that [http://marc.theaimsgroup.com/?l=linux-ide&amp;amp;w=2&amp;amp;r=1&amp;amp;s=Host+protected+area&amp;amp;q=b recent threads on linux-ide] suggest that the ThinkPad will reenable the HPA on resume and thus causing (possibly serious) conflicts with the GNU/Linux system (that assumes the HPA is still available).&lt;br /&gt;
&lt;br /&gt;
With Disabled you should be able to safely reclaim the area used by the HPA (to GNU/Linux it basically is unallocated space on the harddisk).&lt;br /&gt;
&lt;br /&gt;
==Details of the HPA==&lt;br /&gt;
Fabrice Bellet describes a [http://bellet.info/laptop/t40.html#the_predesktop_area technique he used] to explore the HPA of his ThinkPad T40, using GNU/Linux tools. This technique is only for the more curious or more careless people. It uses &amp;quot;dd&amp;quot; to copy the sectors on the harddisk containing the HPA from &amp;quot;/dev/hda&amp;quot; to a new file: when using &amp;quot;dd&amp;quot; on &amp;quot;/dev/hda&amp;quot; you are only one small typo away from an unrecoverable disaster!&lt;br /&gt;
&lt;br /&gt;
Another option is the [http://home.tiscali.nl/pebolle/code/hpafs Hidden Protected Area FileSystem], a read-only [http://fuse.sf.net FUSE] (Filesystem in USErspace). hpafs allows to analyze, backup, etc. the HPA. The current release is hpafs-0.1.0 (alpha, developers only). Check the [http://home.tiscali.nl/pebolle/code/hpafs/README README] for further details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==How to reclaim the HPA==&lt;br /&gt;
After disabling the &amp;quot;IBM Predesktop Area&amp;quot; (with the BIOS option &amp;quot;Disabled&amp;quot;, see above) it's possible to reclaim the area used by the HPA. Then one can include that area in a partition with standard tools (i.e. fdisk, mkfs) as it will be treated just as regular free space of the hard disk.&lt;br /&gt;
&lt;br /&gt;
==Alternative uses?==&lt;br /&gt;
It might be possible to use the FirstWare tools included in the HPA to make the HPA more useful for GNU/Linux purposes. For instance, the copy of the preloaded OS could be replaced with an emergency backup of your GNU/Linux distribution. Maybe the Predesktop area could be even used to boot into a GNU/Linux rescue system. Whether the Phoenix proprietary tools really allow alternative uses and whether those tools do not make it too hard to accomplish those cannot yet be said. It seems realistic to assume that the benefits of those alternative uses aren't worth the effort to accomplish them. Still, it might be fun (altough possibly hazardous to your system) to try ...&lt;br /&gt;
&lt;br /&gt;
==Problems caused by the HPA==&lt;br /&gt;
As of Linux 2.6.18, having a HPA may cause errors when resuming the laptop from suspend-to-RAM or suspend-to-disk.  See the section called &amp;quot;SectorIdNotFound disk errors when laptop is resumed&amp;quot; in [[Problems with ACPI suspend-to-ram | ACPI suspend problems]].&lt;br /&gt;
&lt;br /&gt;
==External Sources==&lt;br /&gt;
*[http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-46023 Predesktop Area white paper]&lt;br /&gt;
*[http://www-3.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-46025 Predesktop Aministrator Utility (DOS)]&lt;br /&gt;
*[http://webstore.ansi.org/ansidocstore/product.asp?sku=ANSI+INCITS+346-2001 Protected Area Run Time Interface Extension Services (PARTIES) ANSI INCITS 346-2001 ($30)]&lt;br /&gt;
*[http://t13.org/Documents/UploadedDocuments/project/d1367r3-PARTIES.pdf The latest free draft of ANSI INCITS 346-2001 (BEER specs)]&lt;br /&gt;
*[http://www.phoenix.com/NR/rdonlyres/7465D3CF-B0E3-4F64-9122-47D9C83028D0/0/cme_firstware_wp.pdf Phoenix FirstWare White Paper]&lt;br /&gt;
*[http://www.win.tue.nl/~aeb/linux/Large-Disk-11.html Section 11 of the Large Disk HOWTO (Clipped disks)]&lt;br /&gt;
&lt;br /&gt;
==Models featuring this Technology==&lt;br /&gt;
*ThinkPad {{R40}}, {{R40e}}, {{R50}}, {{R50e}}, {{R50p}}, {{R51}}, {{R52}}&lt;br /&gt;
*ThinkPad {{T40}}, {{T40p}}, {{T41}}, {{T41p}}, {{T42}}, {{T42p}}, {{T43}}, {{T43p}}&lt;br /&gt;
*ThinkPad {{X31}}, {{X32}}, {{X40}}, {{X41}}, {{X41T}}&lt;br /&gt;
*ThinkPad {{Z61m}}&lt;br /&gt;
&lt;br /&gt;
{{footnotes|&lt;br /&gt;
# Presumably by having the BIOS use the SET MAX security extension. The BIOS seems to set a password for the HPA at boot (using the SETMAX-SET PASSWORD command) and after that use that password to issue a SETMAX-LOCK command. Since the password is unknown (and most likely changes at every Secure boot) the HPA is inaccessable to all programs running on the ThinkPad.&amp;lt;BR&amp;gt;&amp;lt;BR&amp;gt;Something similar would be possible running in Normal mode. Then a program could issue the SETMAX-SET PASSWORD command. At the moment there's no program running under GNU/Linux capable of doing that. Of course this is possibly less secure: it's (theoretically) possible that other (rogue) programs get hold of that password.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Glossary]]&lt;/div&gt;</summary>
		<author><name>Pebolle</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Hidden_Protected_Area&amp;diff=28398</id>
		<title>Hidden Protected Area</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Hidden_Protected_Area&amp;diff=28398"/>
		<updated>2007-02-24T13:40:22Z</updated>

		<summary type="html">&lt;p&gt;Pebolle: hpafs-0.1.0&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=&amp;quot;100%&amp;quot;&lt;br /&gt;
|style=&amp;quot;vertical-align:top;padding-right:20px;width:10px;white-space:nowrap;&amp;quot; | __TOC__&lt;br /&gt;
|style=&amp;quot;vertical-align:top&amp;quot; |&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin: 0; margin-right:10px; border: 1px solid #dfdfdf; padding: 0em 1em 1em 1em; background-color:#F8F8FF; align:right;&amp;quot;&amp;gt;&lt;br /&gt;
=== The Hidden Protected Area ===&lt;br /&gt;
The Hidden Protected Area (also known as the Host Protected Area) is a special area (usually a few gigabytes in size) located at the end of a hard disk. It is preinstalled on the harddisks of some ThinkPads. It is normally hidden to the software running on your ThinkPad. It includes all the software and data needed to recover the preloaded state of the ThinkPad. The HPA also includes some diagnostic tools and a (MS Windows only) backup tool.&lt;br /&gt;
&lt;br /&gt;
The HPA was introduced with the R/T/X 40 series of ThinkPads. It is refered to as the Predesktop Area in the BIOS Setup Utility. Recent ThinkPads can have a (hidden) partition that is also called [[Predesktop Area|Predesktop Area]] in the BIOS Setup Utility. That (hidden) partition is not an HPA. More information can be found in [[Rescue and Recovery | Rescue and Recovery]],&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|style=&amp;quot;vertical-align:top;padding-right:10px;width:10px;white-space:nowrap;&amp;quot; | [[Image:hpa.jpg|IBM PreDesktop Area]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==General information about the HPA==&lt;br /&gt;
As opposed to [[Rescue and Recovery|Recovery Partitions]], Protected Service Areas (PSAs) such as the HPA are (let's say) images of partitions written to the end of a harddisk. They are only accessible through their BEER. The general idea is that, under control of the BIOS, the PSAs are totally hidden from all ordinary software, including malware (viruses, trojans, spyware). They are only accessible when permitted by the BIOS, and even then only through special HPA-aware tools. Under GNU/Linux they are only accessible with low level tools like dd.&lt;br /&gt;
&lt;br /&gt;
The HPA is based on [http://www.phoenix.com/en/Products/Trusted+Applications/Phoenix+FirstWare/default.htm Phoenix FirstWare]. FirstWare is (in short) an implementation of two technologies: BEER and PARTIES. (Yes, those names are correct!) BEER (Boot Engineering Extension Record) and PARTIES (Protected Area Run Time Interface Extension Services) are described in [http://t13.org/Documents/UploadedDocuments/project/d1367r3-PARTIES.pdf this T13 working draft]. There is a more general introduction to PARTIES on the [http://www-1.ibm.com/support/docview.wss?rs=0&amp;amp;uid=psg1MIGR-51248&amp;amp;loc=en_US IBM site]. FirstWare depends on certain [http://en.wikipedia.org/wiki/Advanced_Technology_Attachment#ATA_standards_versions.2C_transfer_rates.2C_and_features ATA-5] commands, so it won't work with lower ATA level (earlier) drives or even with all ATA-5 drives. Unfortunately, there is no public HPA compatibility tester or list of compatible drives.&lt;br /&gt;
&lt;br /&gt;
Basically, what's going on is that the Phoenix BIOS commands the drive to hide the last few gigabytes of the hard disk (the HPA). The to non-HPA aware software, the drive appears to have a smaller size. Note that this is just a setting in the BIOS and can be disabled. The HPA can be accessed by pressing {{ibmkey|Access IBM|#495988}} or {{key|Enter}} at boot time. The BIOS will then parse the BEER (128 bytes, situated in the last sector of 512 bytes of the harddisk) and the &amp;quot;Directory of Services&amp;quot; (consisting of directory entries of 64 bytes each, starting in the last sector and spilling over into the previous sectors) to see what part of the HPA should be launched. In (most?) ThinkPads the BEER tells the BIOS to launch the Access IBM Predesktop Area. The system will then actually be booting into a (minimal) DOS environment which is able to launch a graphical shell (called Phoenix FirstSight). IBM has simply rebranded this graphical shell to the Access IBM Predesktop Area. From this graphical shell one can launch several tools (BIOS Setup Utility, diagnostic tools, recovery tools).&lt;br /&gt;
&lt;br /&gt;
==Three BIOS options==&lt;br /&gt;
The BIOS has three settings for the &amp;quot;IBM Predesktop Area&amp;quot; (in the Security category):&lt;br /&gt;
*Secure: No user or SW-initiated changes; Contents hidden from OS&lt;br /&gt;
*Normal: Change allowed; Contents hidden from OS&lt;br /&gt;
*Disabled: Not Usable; Visible and Reclaimable&lt;br /&gt;
&lt;br /&gt;
Normal is the default setting. One can boot into the Predesktop Area when either Secure or Normal is set. When Disabled is set the Predesktop Area will not boot. According to the [http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-46023 Predesktop Area white paper] the HPA is both &amp;quot;locked&amp;quot;{{footnote|1}} and &amp;quot;hidden&amp;quot; when Secure is set and only &amp;quot;hidden&amp;quot; when normal is set. In practice the result seems to be that the HPA is totally unavailable to the Linux kernel (and therefore all applications) when Secure is set. (The HPA should be unavailable in &amp;quot;Secure mode&amp;quot; for all operating systems, MS Windows included.) One would expect the HPA to be only accessable to HPA aware tools when Normal is set. However, recent kernels disable the HPA by default when Normal is set. Note that [http://marc.theaimsgroup.com/?l=linux-ide&amp;amp;w=2&amp;amp;r=1&amp;amp;s=Host+protected+area&amp;amp;q=b recent threads on linux-ide] suggest that the ThinkPad will reenable the HPA on resume and thus causing (possibly serious) conflicts with the GNU/Linux system (that assumes the HPA is still available).&lt;br /&gt;
&lt;br /&gt;
With Disabled you should be able to safely reclaim the area used by the HPA (to GNU/Linux it basically is unallocated space on the harddisk).&lt;br /&gt;
&lt;br /&gt;
==Details of the HPA==&lt;br /&gt;
Fabrice Bellet describes a [http://bellet.info/laptop/t40.html#the_predesktop_area technique he used] to explore the HPA of his ThinkPad T40, using GNU/Linux tools. This technique is only for the more curious or more careless people. It uses &amp;quot;dd&amp;quot; to copy the sectors on the harddisk containing the HPA from &amp;quot;/dev/hda&amp;quot; to a new file: when using &amp;quot;dd&amp;quot; on &amp;quot;/dev/hda&amp;quot; you are only one small typo away from an unrecoverable disaster!&lt;br /&gt;
&lt;br /&gt;
Another option is the [http://home.tiscali.nl/pebolle/code/hpafs Hidden Protected Area FileSystem], a read-only [http://fuse.sf.net FUSE] (Filesystem in USErspace). hpafs allows to analyze, backup, etc. the HPA. The current release is hpafs-0.1.0 (alpha, developers only). Check the [http://home.tiscali.nl/pebolle/code/hpafs/README README] for further details.&lt;br /&gt;
&lt;br /&gt;
==Accessing the HPA from Linux==&lt;br /&gt;
While Fabrice Bellet's method, described in the previous section, works in many cases, it has some serious flaws. The most important one -- is that each PSA has to be formated (i.e. has to posses a filesystem), and the size this filesystem has to be equal to the size of the PSA. If the HPA has some sort of a swap partition, or the filesystem size is a few megabytes less than the PSA's size, then we will not be able to find any following PSA(s).&lt;br /&gt;
&lt;br /&gt;
A more systematic approach would be just to use the BEER record to find the exact LBA addresses of all PSA(s). The idea is to use the [http://www.t13.org/project/d1367r3-PARTIES.pdf T13 working draft] of the BEER specs. There is some serious discussion on this matter going on in [[Talk:Predesktop_Area|Talk:Predesktop_Area]], but so far they didn't release any code to the public. As an interim solution, we can use a free open-source [http://colimit.googlepages.com clone of the Phoenix utility fwdir]. If we first disable the &amp;quot;IBM Predesktop Area&amp;quot; in BIOS (which, essentially, sends appropriate SETMAX command to the harddrive), then the whole harddrive will be accessible from the userspace. Now, if we run fwdir, a typical output of this utility would look like&lt;br /&gt;
&amp;lt;div&amp;gt;&lt;br /&gt;
 #   ID  Name                           1st Sector Sectors Sec Icon Flag&lt;br /&gt;
&lt;br /&gt;
 0 0000h FirstWare Reserved Area         234231736  204800   0  00h  03h&lt;br /&gt;
 1 0001h CONSOLE                         234170510   61226   0  FCh  01h&lt;br /&gt;
 2 0140h Recover Pro                     234088523   81987   0  00h  01h&lt;br /&gt;
 3 0104h Factory Restore                 234085638    2885   0  03h  03h&lt;br /&gt;
 4 0120h RADA Data                       234020102   65536   0  00h  02h&lt;br /&gt;
 5 0108h Factory Data                    230026502 3993600   0  00h  02h&lt;br /&gt;
 6 0141h Recover Pro Records             229616902  409600   0  00h  02h&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
Once we know all the LBA addresses of the first sectors of all PSA(s) and their sizes, we can extract any particular PSA. E.g. the &amp;quot;Factory Data&amp;quot; PSA in this example can be extracted with&lt;br /&gt;
&amp;lt;div&amp;gt;&lt;br /&gt;
 dd if=/dev/hda of=/tmp/FacDat.img skip=230026502 count=3993600&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
But if we are only interested in the contents of this PSA partition, there is no need to extract it to a file and later mount it through a loop-device. It can be done right away with&lt;br /&gt;
&amp;lt;div&amp;gt;&lt;br /&gt;
 mount /dev/hda /mnt/fwdata -t vfat -o ro,offset=`expr 512 &amp;quot;*&amp;quot; 230026502`&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
Of course, there is no way to know in advance which particular filesystem each PSA has (if any). This still has to be found by trial and error (because &amp;quot;mount -t auto&amp;quot; does not always work). In the above example, the &amp;quot;CONSOLE&amp;quot; PSA is formated in ext2.&lt;br /&gt;
&lt;br /&gt;
==How to reclaim the HPA==&lt;br /&gt;
After disabling the &amp;quot;IBM Predesktop Area&amp;quot; (with the BIOS option &amp;quot;Disabled&amp;quot;, see above) it's possible to reclaim the area used by the HPA. Then one can include that area in a partition with standard tools (i.e. fdisk, mkfs) as it will be treated just as regular free space of the hard disk.&lt;br /&gt;
&lt;br /&gt;
==Alternative uses?==&lt;br /&gt;
It might be possible to use the FirstWare tools included in the HPA to make the HPA more useful for GNU/Linux purposes. For instance, the copy of the preloaded OS could be replaced with an emergency backup of your GNU/Linux distribution. Maybe the Predesktop area could be even used to boot into a GNU/Linux rescue system. Whether the Phoenix proprietary tools really allow alternative uses and whether those tools do not make it too hard to accomplish those cannot yet be said. It seems realistic to assume that the benefits of those alternative uses aren't worth the effort to accomplish them. Still, it might be fun (altough possibly hazardous to your system) to try ...&lt;br /&gt;
&lt;br /&gt;
==Problems caused by the HPA==&lt;br /&gt;
As of Linux 2.6.18, having a HPA may cause errors when resuming the laptop from suspend-to-RAM or suspend-to-disk.  See the section called &amp;quot;SectorIdNotFound disk errors when laptop is resumed&amp;quot; in [[Problems with ACPI suspend-to-ram | ACPI suspend problems]].&lt;br /&gt;
&lt;br /&gt;
==External Sources==&lt;br /&gt;
*[http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-46023 Predesktop Area white paper]&lt;br /&gt;
*[http://www-3.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-46025 Predesktop Aministrator Utility (DOS)]&lt;br /&gt;
*[http://webstore.ansi.org/ansidocstore/product.asp?sku=ANSI+INCITS+346-2001 Protected Area Run Time Interface Extension Services (PARTIES) ANSI INCITS 346-2001 ($30)]&lt;br /&gt;
*[http://t13.org/Documents/UploadedDocuments/project/d1367r3-PARTIES.pdf The latest free draft of ANSI INCITS 346-2001 (BEER specs)]&lt;br /&gt;
*[http://www.phoenix.com/NR/rdonlyres/7465D3CF-B0E3-4F64-9122-47D9C83028D0/0/cme_firstware_wp.pdf Phoenix FirstWare White Paper]&lt;br /&gt;
*[http://www.win.tue.nl/~aeb/linux/Large-Disk-11.html Section 11 of the Large Disk HOWTO (Clipped disks)]&lt;br /&gt;
&lt;br /&gt;
==Models featuring this Technology==&lt;br /&gt;
*ThinkPad {{R40}}, {{R40e}}, {{R50}}, {{R50e}}, {{R50p}}, {{R51}}, {{R52}}&lt;br /&gt;
*ThinkPad {{T40}}, {{T40p}}, {{T41}}, {{T41p}}, {{T42}}, {{T42p}}, {{T43}}, {{T43p}}&lt;br /&gt;
*ThinkPad {{X31}}, {{X32}}, {{X40}}, {{X41}}, {{X41T}}&lt;br /&gt;
*ThinkPad {{Z61m}}&lt;br /&gt;
&lt;br /&gt;
{{footnotes|&lt;br /&gt;
# Presumably by having the BIOS use the SET MAX security extension. The BIOS seems to set a password for the HPA at boot (using the SETMAX-SET PASSWORD command) and after that use that password to issue a SETMAX-LOCK command. Since the password is unknown (and most likely changes at every Secure boot) the HPA is inaccessable to all programs running on the ThinkPad.&amp;lt;BR&amp;gt;&amp;lt;BR&amp;gt;Something similar would be possible running in Normal mode. Then a program could issue the SETMAX-SET PASSWORD command. At the moment there's no program running under GNU/Linux capable of doing that. Of course this is possibly less secure: it's (theoretically) possible that other (rogue) programs get hold of that password.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Glossary]]&lt;/div&gt;</summary>
		<author><name>Pebolle</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Talk:Predesktop_Area&amp;diff=28397</id>
		<title>Talk:Predesktop Area</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Talk:Predesktop_Area&amp;diff=28397"/>
		<updated>2007-02-24T13:12:24Z</updated>

		<summary type="html">&lt;p&gt;Pebolle: hpafs-0.1.0 &amp;quot;released&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Use the HPA for GNU/Linux?==&lt;br /&gt;
More interesting than removing the HPA (which includes a.o. Acces IBM Predesktop Area, some other tools and a backup of the pre-installed OS) would be to use this area for GNU/Linux too. At least, removing the HPA only saves 3,5 GB on my 60 GB hard disk. It would be worth a try to see whether the backup of the pre-installed OS on the largest PSA could be replaced by a backup of your favourite GNU/Linux distribution.&lt;br /&gt;
&lt;br /&gt;
Elaborating on my ideas a few days later, I'd guess the following could be tried:&lt;br /&gt;
* see whether GRUB can be made to boot the Access IBM Predekstop Area (I guess by &amp;quot;chainloading&amp;quot; the bootsector of its PSA). Right now GRUB refuses to load sectors outside the partioned area. I've got absolutely no idea if it's possible to write a hack to overcome that restriction. Need to contact the GRUB people about that ...&lt;br /&gt;
* write some userspace tools for the HPA/the SPAs (things like: dumpbeer, printDoS).&lt;br /&gt;
&lt;br /&gt;
It should be clear these are basically random ideas. Still feedback would be appreciated ...&lt;br /&gt;
----&lt;br /&gt;
Hei,&lt;br /&gt;
&lt;br /&gt;
interesting ideas, but i'd only see a point in it if one could keep Win and Linux rescue stuff in the HPA. That means it would need to be expandable or fit the stuff for both systems.&lt;br /&gt;
[[User:Wyrfel|Wyrfel]] 20:03, 15 Mar 2005 (CET)&lt;br /&gt;
---- &lt;br /&gt;
Thanks.&lt;br /&gt;
&lt;br /&gt;
Short answer: that should be possible.&lt;br /&gt;
&lt;br /&gt;
Long answer: I see little in the specs (as I understand them now) to stop one from adding (say) an extra 3 GB GNU/Linux-rescue PSA or something like that. We might try to do that first by changing the BEER and DoS manually. (Not sure whether Phoenix added some proprietary stuff to keep you from booting it. The PSA should always be accesable with the proper BIOS setting.) It might be mandatory to put it on a FAT filesystem. The hard part probably is to have it show up in the Access IBM Predesktop Area. (My guess is you need to regenerate the FirstSight &amp;quot;graphical shell&amp;quot;. If that's correct we probably only can use the FirstWare tools &amp;quot;hidden&amp;quot; on their little PSA. That's no fun. Well it might a little fun if we try FreeDOS). &lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle (not logged in)]]&lt;br /&gt;
----&lt;br /&gt;
Update: a trivial patch to grub allows it to also work outside the partioned area:&lt;br /&gt;
&lt;br /&gt;
 --- /var/tmp/rpm/BUILD/grub-0.95/stage2/disk_io.c.oud   2004-05-23 18:35:24.000000000 +0200&lt;br /&gt;
 +++ /var/tmp/rpm/BUILD/grub-0.95/stage2/disk_io.c       2005-03-18 22:38:30.050907408 +0100&lt;br /&gt;
 @@ -297,8 +297,8 @@&lt;br /&gt;
     *  Check partition boundaries&lt;br /&gt;
     */&lt;br /&gt;
    if (sector &amp;lt; 0&lt;br /&gt;
 -      || ((sector + ((byte_offset + byte_len - 1) &amp;gt;&amp;gt; SECTOR_BITS))&lt;br /&gt;
 -         &amp;gt;= part_length))&lt;br /&gt;
 +      /*|| ((sector + ((byte_offset + byte_len - 1) &amp;gt;&amp;gt; SECTOR_BITS))&lt;br /&gt;
 +         &amp;gt;= part_length)*/)&lt;br /&gt;
      {&lt;br /&gt;
        errnum = ERR_OUTSIDE_PART;&lt;br /&gt;
        return 0;&lt;br /&gt;
&lt;br /&gt;
I made a grub CD with a grub patched with the above. Now I can &amp;quot;cat&amp;quot; the bootsector of the Predesktop Area from the grub shell (when booting of that grub CD). But I haven't yet managed to boot the Predesktop Area (dangerous stuff!) To be continued ...&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] Fri Mar 18 22:42:43 CET 2005&lt;br /&gt;
----&lt;br /&gt;
Update: a quick test with the current development version of grub2 (grub-1.93) showed that grub2 can chainload a block outside the partitioned area &lt;br /&gt;
&amp;quot;out of the box&amp;quot;. That's nice. I still haven't been able to get passed the error messages generated by the boot sectors of the bootable PSAs. My guess is the BIOS provides those boot sectors with some (special) settings that grub doesn't use ...&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 00:40, 5 April 2006 (CEST)&lt;br /&gt;
----&lt;br /&gt;
GRUB cannot be expected to (chain)load the Predesktop Area. When showing the Predesktop Area the BIOS runs in a special mode (more specifically: using some very specific interrupts, behaving differently under normal circumstances). So this seems to be not something to merit further investigation.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 19:01, 11 June 2006 (CEST)&lt;br /&gt;
----&lt;br /&gt;
Hey there - I hope to be welcome here to since I've no ThinkPad but an Samsung X20 notebook. This notebook uses also the HPA for some kind of a predesktop area - a linux&lt;br /&gt;
based multimedia system called &amp;quot;AVStation Now&amp;quot; which is hidden there. I used dd to dump the hpa and read the BEER table to find out what is hidden inside.&lt;br /&gt;
&lt;br /&gt;
What I found out:&lt;br /&gt;
&lt;br /&gt;
*the first partition (ext3) contains the rootfilesystem (funny, cause they use libdvdcss for dvd playback)&lt;br /&gt;
&lt;br /&gt;
*the second partition (ext3) contained a /boot partition with a special kernel with the possibility to mount this partition (seems they use a special liloversion for booting)&lt;br /&gt;
&lt;br /&gt;
*the third partition (fat?) - some html files - the firstware menu&lt;br /&gt;
&lt;br /&gt;
*and at last a fourth partition i was unable to mount&lt;br /&gt;
&lt;br /&gt;
[http://www.christophmueller.org/stuff/beerdump.html A dump of my BEER ;-)]&lt;br /&gt;
&lt;br /&gt;
Does someone know weather it would be possible mounting souch an hpapartition without using dd - maybe kernelsupport for the BEER? - since im nither a C nor a kernelhacker im unable to continue, but there must be some kind of support cause this multimediasystem knows howto handle it.&lt;br /&gt;
&lt;br /&gt;
If you need some more information you could send me an email to christoph_at_christophmueller.org&lt;br /&gt;
&lt;br /&gt;
[[User:Christophmueller.org|Christoph MÃ¼ller]]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
I've been playing around with the predesktop area tonight.  I was simply trying to just leave the diagnostics stuff and remove the windows part.  I wrote some programs to read/write the BEER data and stuff, but I wasn't able to get the system to boot it, it kept erroring &amp;quot;Authentication of System Services failed&amp;quot; (or something along those lines).  I will play around with this some more later&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[User:Invisi|Tim Nordell]]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A quick look with a hexeditor gave me two instances of &amp;quot;Application authentication has failed!&amp;quot; in the FirstSight application. Does that sound familair? &lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] Fri Apr 1 19:35:30 CEST 2005&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Actually it wasn't that.  I did a search of that too, the message itself was not in the predesktop area at all.  What also is interesting is the fw*.exe utilities for manipulating the predesktop area, contains the string &amp;quot;MD5&amp;quot; which makes me wonder if there is an md5 hash of each &amp;quot;predesktop&amp;quot; partition.  I know on the IBM whitepaper it states there being a signature so that non-signed applications can not be run.  Could a simple &amp;quot;md5&amp;quot; be the signature?&lt;br /&gt;
&lt;br /&gt;
[[User:Invisi|Tim Nordell]] 12:01, 3 Apr 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*What is it that you were trying to do (what did trigger the error you saw)?&lt;br /&gt;
&lt;br /&gt;
*About ten of the fw*.exe utilities contain the phrase &amp;quot;MD5 Checksums do not match&amp;quot;. So they could very well be using MD5 sums for some sort of validation. But they could use the MD5 sums in a lot of ways actually, so I won't yet speculate ...&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] Sun Apr  3 15:11:10 CEST 2005&lt;br /&gt;
----&lt;br /&gt;
OK, roughly two years later I finally found the courage to really mess with the BEER in my T41. Copied the BEER and the few related sections at the end of /dev/hda (using dd), analyzed those (I have some unreleased code to parse the BEER and the DOS stuff) _hand edited_ the BEER to &amp;quot;remove&amp;quot; the OS backup data, checked again, and copied the new BEER etc. to /dev/hda (using dd again, extremely tricky!). That worked like a charm: my new HPA is now about 3G smaller. No complaints whatsoever (even when booting my T41 is &amp;quot;secure&amp;quot; mode). &lt;br /&gt;
&lt;br /&gt;
So, I can't really reproduce Tims problems.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 01:24, 4 January 2007 (CET)&lt;br /&gt;
&lt;br /&gt;
== Predesktop Area ==&lt;br /&gt;
&lt;br /&gt;
I made a program that takes the BEER record at the end, parses it out to a &amp;quot;.cfg&amp;quot; file, lets you modify it, recalibrate the start spots for the records, and write it out to disk again.  It doesn't directly access hda, 'cept for reading the original beer record.  It makes a script file to go with the files you have, to read in the HPA data, and to write it out again with the new record.&lt;br /&gt;
&lt;br /&gt;
Anyways, I tried simply removing the last record from the BEER, which is the windows recovery partition.  It didn't like that.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Did you update the two's complement checksum at the end of the BEER?&lt;br /&gt;
&lt;br /&gt;
[[user:Pebolle|Paul Bolle]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Yep, I updated that.  If I don't update that, it doesn't even say that failed message.  I also made a seperate program to update the checksum so you can also modify the beer record by hand with a hex editor and have valid checksums.&lt;br /&gt;
&lt;br /&gt;
== Linux kernel support ==&lt;br /&gt;
{{Todo|research and add to article}}&lt;br /&gt;
* Add a section on dmesg and hdparm -I output:&lt;br /&gt;
 (...)&lt;br /&gt;
 Commands/features:&lt;br /&gt;
        Enabled Supported:&lt;br /&gt;
 (...)&lt;br /&gt;
           *    Host Protected Area feature set&lt;br /&gt;
 (...)&lt;br /&gt;
                SET MAX security extension&lt;br /&gt;
                Address Offset Reserved Area Boot&lt;br /&gt;
 (...)&lt;br /&gt;
&lt;br /&gt;
* Recent (2.6.10 and up?) kernels disable HPAs automatically (in drivers/ide/ide-disk.c). Dmesg example:&lt;br /&gt;
&lt;br /&gt;
 hda: Host Protected Area detected.&lt;br /&gt;
        current capacity is 110194034 sectors (56419 MB)&lt;br /&gt;
         native  capacity is 117210240 sectors (60011 MB)&lt;br /&gt;
 hda: Host Protected Area disabled.&lt;br /&gt;
&lt;br /&gt;
This should be (further researched and) added to this section (maybe with some pointers to the unexpected consequences of this new approach ...)&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 22:06, 6 Sep 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
In 2.6.11, I was able to re-enable HPA by commenting out the section in drivers/ide/ide-disk.c under the comment &amp;quot;Some maxtor support LBA48 but not accept LBA48 set max...&amp;quot;.  I suppose that wouldn't be a good idea with a Maxtor drive but it worked fine for my R50.&lt;br /&gt;
&lt;br /&gt;
--[[User:Rkilian|Robert Kilian]] 21:13, 22 March 2006 (CET)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* SRCMOS24.EXE&lt;br /&gt;
&lt;br /&gt;
In the PSA used by the Predesktop Area I found a &amp;quot;hidden&amp;quot; executable: SRCMOS24.EXE (it is not mentioned in the FAT). This executable can capture and update CMOS data. It might only be used by the FirstSight program to display (part of) the BIOS info. It might be nice to see what it can do and if similar things are possible under GNU/Linux.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 22:01, 7 Sep 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
== Newer thinkpads don't use Phoenix Firstware? ==&lt;br /&gt;
&lt;br /&gt;
On my T42 that arrived yesterday, the predesktop area looks a lot like MS Windows. The widget set, the fonts, even the boot sequence looks exactly like Windows 2000. Debian-installer indentified it as &amp;quot;Microsoft Windows NT/2000/XP&amp;quot;, while it identified my XP partition as &amp;quot;Microsoft Windows XP Professional&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Has Lenovo/IBM changed their system, or is this Phoenix stuff really just Windows?&lt;br /&gt;
&lt;br /&gt;
-- [[Evan.Heidtmann]]&lt;br /&gt;
&lt;br /&gt;
Evan,&lt;br /&gt;
&lt;br /&gt;
Could it be that you're talking about the preinstalled version of Windows here? As far as I know (using information to be found on the internet, not personal research) the preinstalled OS will reformat its partition from FAT32 to NTFS at first boot. That could explain the difference in the identification by the Debian installer (which I never really used).&lt;br /&gt;
&lt;br /&gt;
Moreover the Predesktop Area is part of the HPA and the HPA is not an partition. It seems unlikely that the Debain installer notices the HPA. As far as I know there are at present no GNU/Linux tools with a (useful) support of HPAs.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 15:43, 4 Aug 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
My T42P (model 2373HSG) is using a cut-down version of Windows XP as the pre-desktop area.  I'm not sure whether it's a special IBM thing or just a [http://www.microsoft.com/licensing/programs/sa/benefits/winpe.mspx Windows PE] (preinstallation environment) setup.  It includes Java and Python, which are used by some of the IBM tools, and the Opera web browser.&lt;br /&gt;
&lt;br /&gt;
It's no longer an HPA but a 487MB hidden FAT32 called IBM_SERVICE located at the end of the disk.&lt;br /&gt;
&lt;br /&gt;
--[[User:Korourke|Korourke]]&lt;br /&gt;
&lt;br /&gt;
== Rescue and Recovery via grub? ==&lt;br /&gt;
&lt;br /&gt;
Did anyone get the Rescue and Recovery partition to boot via grub on recent models? On a T43 with&lt;br /&gt;
 rootnoverify (hd0,1)&lt;br /&gt;
 chainloader +1&lt;br /&gt;
the Rescue and Recovery partition starts booting nicely and then, a few seconds in the R&amp;amp;R loading sequence, chokes with a &lt;br /&gt;
 STOP: c000021a {Fatal System Error}&lt;br /&gt;
 The Session Manager Initialization system process terminated unexpectedly with a status of 0xc000003a (0x00000000 0x00000000).&lt;br /&gt;
 The system has been shut down. &lt;br /&gt;
The problem started right after installing grub into the MBR (I couldn't get the preinstalled MBR to boot grub from an active primary partition). It seems oblivious to the Predesktop BIOS setting.&lt;br /&gt;
&lt;br /&gt;
The same problem has been reported by others with other models (for example [http://forums.fedoraforum.org/archive/index.php/t-19433.html here] for a T42).&lt;br /&gt;
&lt;br /&gt;
[[User:Thinker|Thinker]] 11:35, 30 Sep 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
Your &amp;quot;Rescue and Recovery partition&amp;quot; seems not to be a HPA (which isn't a partition). Maybe we should open a new page for that system.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 21:54, 30 Sep 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
It may very well not be an HPA , but the BIOS stil calls it a &amp;quot;Predesktop Area&amp;quot;. Anyway, the partition is actually a VFAT partition (even though it has type 0x12, &amp;quot;Compaq Diagnostics&amp;quot;). It seems to boot into PC-DOS (using {{path|NTDETECT.EXE}} so it looks like Windows startup) and then its {{path|AUTOEXEC.BAT}} runs a fancy GUI.&lt;br /&gt;
--[[User:Thinker|Thinker]] 23:31, 30 Sep 2005 (CEST)&lt;br /&gt;
----&lt;br /&gt;
Right, there has been a lot of confusion about this, we should have a separate page. Introduced an edit link (called Rescue and Recovery) on the [[ThinkPad Technologies]] page for that purpose.&lt;br /&gt;
&lt;br /&gt;
== Suggestions for projects ==&lt;br /&gt;
&lt;br /&gt;
I'd guess it would be rather nice to have GNU/Linux tools (like sfdisk and parted) HPA aware. The most urgent change would be to have those programs at least recognize and respect a HPA (e.g.: do not write in or otherwise use the HPA area; unless the user gives a --force option or something similar).&lt;br /&gt;
&lt;br /&gt;
As for now, I realize I caused this error: ENOPATCH.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 22:56, 5 Nov 2005 (CET)&lt;br /&gt;
&lt;br /&gt;
== Keeping functionality of the blue AccessIBM button ==&lt;br /&gt;
&lt;br /&gt;
Somebody figured out [http://sharadware.com/2005/07/11/suse-linux-winxp-access-ibm-on-the-thinkpad-t43/|how to keep the AccessIBM functionality] when installing Linux, quite easy fix. How come nobody thought about it before? :)&lt;br /&gt;
(link got from [[Installing_Ubuntu_5.04_on_a_ThinkPad_T43_%281875%29 here]])&lt;br /&gt;
&lt;br /&gt;
--[[User:Micampe|Micampe]] 17:39, 9 Dec 2005 (CET)&lt;br /&gt;
&lt;br /&gt;
The relevant part of that page:&lt;br /&gt;
&lt;br /&gt;
''Set the IBM Predesktop Area (in the BIOS) to â€œSecureâ€. Boot using the SUSE DVD. Shrink the Windows partition as required. Follow the instructions and go through the regular installation process. Create a primary partition for /boot (the other stuff can go into the extended partitions) and when the time comes to install GRUB (you do prefer GRUB to LILO, donâ€™t you?), make sure you install it into the boot sector of the boot partition. Set this partition as active. Leave the MBR alone.''&lt;br /&gt;
&lt;br /&gt;
That's the first thing I tried on my T43. Didn't work: setting the active partition to /boot had no effect, it was still booting the first (Windows) partition. So I had to install Grub into MBR, thereby killing R&amp;amp;R. Anyway, there's another solution in the article page (didn't try it since I saw it only after purging my R&amp;amp;R partition).&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
--[[User:Thinker|Thinker]] 19:18, 9 Dec 2005 (CET)&lt;br /&gt;
&lt;br /&gt;
== Parsing the HPA information (BEER/DOS) ==&lt;br /&gt;
&lt;br /&gt;
I too have been writing a program to parse the BEER and DOS info. Sample output:&lt;br /&gt;
:{{cmdresult| beer.signature: 0xBEEF}}&lt;br /&gt;
:{{cmdresult| beer.size: 128}}&lt;br /&gt;
:{{cmdresult| beer.flags: 41}}&lt;br /&gt;
:{{cmdresult|    Read Only:}}&lt;br /&gt;
:{{cmdresult|    Generated Record:}}&lt;br /&gt;
:{{cmdresult|    Use Reserved Area Boot Code Address: yes}}&lt;br /&gt;
:{{cmdresult|    Configuration Time Stamp is valid:}}&lt;br /&gt;
:{{cmdresult|    Device Supports LBA:                 yes}}&lt;br /&gt;
:{{cmdresult|    Directory of Services is Present}}&lt;br /&gt;
:{{cmdresult|    Formatted Geometry Valid}}&lt;br /&gt;
:{{cmdresult|    Reported Geometry Valid              yes}}&lt;br /&gt;
:{{cmdresult| beer.reported_cylinders: 16383}}&lt;br /&gt;
:{{cmdresult| beer.reported_heads: 16}}&lt;br /&gt;
:{{cmdresult| beer.reported_sectors: 63}}&lt;br /&gt;
:{{cmdresult| beer.reported_bytes_sector: 512}}&lt;br /&gt;
:{{cmdresult| beer.reported_sectors_device: 117210240}}&lt;br /&gt;
:{{cmdresult| beer.formatted_cylinders: 16383}}&lt;br /&gt;
:{{cmdresult| beer.formatted_heads: 16}}&lt;br /&gt;
:{{cmdresult| beer.formatted_sectors: 63}}&lt;br /&gt;
:{{cmdresult| beer.formatted_bytes_sector: 512}}&lt;br /&gt;
:{{cmdresult| beer.formatted_sectors_device: 117210240}}&lt;br /&gt;
:{{cmdresult| year: 2004}}&lt;br /&gt;
:{{cmdresult| day: 313}}&lt;br /&gt;
:{{cmdresult| beer.timestamp: 1426063684}}&lt;br /&gt;
:{{cmdresult| beer.device_index: 0x80}}&lt;br /&gt;
:{{cmdresult| beer.hpa_start: 110194034}}&lt;br /&gt;
:{{cmdresult| beer.boot_code_address: 117002545}}&lt;br /&gt;
:{{cmdresult| beer.num_entries: 8}}&lt;br /&gt;
:{{cmdresult| beer.dir_length: 64}}&lt;br /&gt;
:{{cmdresult| beer.revision: 0}}&lt;br /&gt;
:{{cmdresult| dev_name: HTS726060M9AT00}}&lt;br /&gt;
:{{cmdresult| beer.checksum: -26982}}&lt;br /&gt;
:{{cmdresult| dos[0].flags: 3}}&lt;br /&gt;
:{{cmdresult|    Service area is available as B:}}&lt;br /&gt;
:{{cmdresult|    Diagnostic Service:}}&lt;br /&gt;
:{{cmdresult|    Service Area is Read Only:}}&lt;br /&gt;
:{{cmdresult|    This Boot:}}&lt;br /&gt;
:{{cmdresult|    Empty Service Area:}}&lt;br /&gt;
:{{cmdresult|    Hidden Service Area:                 yes}}&lt;br /&gt;
:{{cmdresult|    Service Area is bootable as A:       yes}}&lt;br /&gt;
:{{cmdresult| dos[0].service_area_start: 117005431}}&lt;br /&gt;
:{{cmdresult| dos[0].service_area_size: 204800}}&lt;br /&gt;
:{{cmdresult| dos[0].load_sectors: 1}}&lt;br /&gt;
:{{cmdresult| dos[0].load_address: 0x7:C000}}&lt;br /&gt;
:{{cmdresult| dos[0].service_area_id: 0}}&lt;br /&gt;
:{{cmdresult| dos[0] id_str: FirstWare Reserved Area}}&lt;br /&gt;
:{{cmdresult| dos[0].checksum: -22271}}&lt;br /&gt;
:{{cmdresult| [...]}}&lt;br /&gt;
&lt;br /&gt;
Very rough code. Send me an e-mail (at the address found at my user page) if you want a (GPL'd) copy, but only if you're willing to test and improve the code.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 01:15, 24 January 2006 (CET)&lt;br /&gt;
&lt;br /&gt;
== SET MAX Security Extensions ==&lt;br /&gt;
&lt;br /&gt;
I've hacked Andries Brouwer's setmax tool (see: Google) to support the SET MAX security extensions (SET MAX SET PASSWORD, SET MAX LOCK, SET MAX UNLOCK, SET MAX FREEZE). Very rough code once again. Mail me if you're willing to brick your HDD.&lt;br /&gt;
&lt;br /&gt;
A few random observations:&lt;br /&gt;
&lt;br /&gt;
- secure mode: the Phoenix BIOS probably sets a SET MAX password in the HDD, does a non-volatile SET MAX and LOCKs (or FREEZEs) the HDD.&lt;br /&gt;
&lt;br /&gt;
- normal mode: the Phoenix BIOS might set a SET MAX password in the HDD, does a (volatile?) SET MAX but does not LOCK the HDD. The HDD will accept another SET MAX, a new SET MAX SET PASSWORD, etc.&lt;br /&gt;
&lt;br /&gt;
- normal mode: Linux 2.6.x disables the HPA in normal mode (by doing a volatile SET MAX to maximum native address). After a suspend the HDD reenables the HPA (by returning to the latest non-volatile value of SET MAX). It thus treats the suspend cycle as a power cycle (it also discards a SET MAX password, unlocks or unfreezes the HPA etc). I'm not sure whether that is a correct implementation of the ATA spec. (The HDD doesn't do this in secure mode. I would like to know how the Phoenix BIOS and/or Hitachi HDD people have managed this.) &lt;br /&gt;
&lt;br /&gt;
This can lead to some problems if a partition ends within the limits of the HPA (which is then actually (partly) overwritten by that partition). Maybe the best solution would be to have the kernel do a non-volatile SET MAX to the native maximum address. Then a resume from suspend will in effect not reenable the HPA.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 01:40, 20 February 2006 (CET)&lt;br /&gt;
&lt;br /&gt;
== hpafs ==&lt;br /&gt;
&lt;br /&gt;
I've written a (read only) FUSE for the hpa: hpafs. Current release is hpafs-0.1.0 (24 Febraury 2007, alpha, developers only). It can be found at http://home.tiscali.nl/pebolle/code/hpafs .&lt;br /&gt;
&lt;br /&gt;
hpafs will only work if the Predesktop Area is disabled (but that is more or less obvious). It basically turns each PSA into a file:&lt;br /&gt;
&lt;br /&gt;
{{cmdresult|$ sudo hpafs /dev/hda /mnt/hpa -o allow_other&amp;lt;br/&amp;gt;&lt;br /&gt;
$ ll /mnt/hpa/&amp;lt;br/&amp;gt;&lt;br /&gt;
total 0&amp;lt;br/&amp;gt;&lt;br /&gt;
-r--r--r--  1 root root    2097152 Jan  1  1970 BIOSWORKAREA&amp;lt;br/&amp;gt;&lt;br /&gt;
-r--r--r--  1 root root    7710720 Jan  1  1970 Create Diagnostic Diskettes&amp;lt;br/&amp;gt;&lt;br /&gt;
-r--r--r--  1 root root  104857600 Jan  1  1970 FirstWare Reserved Area&amp;lt;br/&amp;gt;&lt;br /&gt;
-r--r--r--  1 root root     7710720 Jan  1  1970 Rec Boot&amp;lt;br/&amp;gt;&lt;br /&gt;
-r--r--r--  1 root root 3459252224 Jan  1  1970 Rec Data&amp;lt;br/&amp;gt;&lt;br /&gt;
-r--r--r--  1 root root    1476096 Jan  1  1970 Restore from backup&amp;lt;br/&amp;gt;&lt;br /&gt;
-r--r--r--  1 root root    7710720 Jan  1  1970 Run Diagnostics&amp;lt;br/&amp;gt;&lt;br /&gt;
-r--r--r--  1 root root    1477632 Jan  1  1970 SIGHT}}&lt;br /&gt;
&lt;br /&gt;
This FUSE file can easily be copied with basic GNU tools (cat, dd, etc). Even more fun is to loop mount such a FUSE file (if the corresponding PSA is a bootable image). Then the PSA is a (read only) part of your mounted filesystems. So now you do not need to use dd on /dev/hda to copy the Predesktop Area: you can just mount it!&lt;br /&gt;
&lt;br /&gt;
{{cmdresult|$ sudo mount -o loop,ro,users  /mnt/hpa/Rec\ Data /mnt/tmp&amp;lt;br/&amp;gt;&lt;br /&gt;
$ ll /mnt/tmp/&amp;lt;br/&amp;gt;&lt;br /&gt;
total 1454&amp;lt;br/&amp;gt;&lt;br /&gt;
-rwxr-xr-x  1 root root      64 Sep 27  2002 bootcat.bin&amp;lt;br/&amp;gt;&lt;br /&gt;
-rwxr-xr-x  1 root root 1474560 Oct  3  2002 bootimg.bin&amp;lt;br/&amp;gt;&lt;br /&gt;
drwxr-xr-x  2 root root    2048 Mar 13  2004 country&amp;lt;br/&amp;gt;&lt;br /&gt;
drwxr-xr-x  2 root root    2048 Mar 13  2004 ibmwork&amp;lt;br/&amp;gt;&lt;br /&gt;
drwxr-xr-x  3 root root    8192 Mar 13  2004 recovery&amp;lt;br/&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
Check the README for further information.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 14:12, 24 February 2007 (CET)&lt;/div&gt;</summary>
		<author><name>Pebolle</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Talk:Hidden_Protected_Area&amp;diff=27566</id>
		<title>Talk:Hidden Protected Area</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Talk:Hidden_Protected_Area&amp;diff=27566"/>
		<updated>2007-01-07T10:27:39Z</updated>

		<summary type="html">&lt;p&gt;Pebolle: Description of the files of a FirstWare HPA backup image file set&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There is conflicting information on this page.  In the introductory paragraph it says &amp;quot;The HPA was introduced with the R/T/X 40 series of ThinkPads.&amp;quot;  But on the bottom the X3x models are also linked as having this technology.  What is right? --[[User:Rolf|Rolf]] 12:30, 19 October 2006 (CEST)&lt;br /&gt;
&lt;br /&gt;
Also I know an R50e machine, that has Rescue and Recovery on a Compaq Diagnostics partition. So it shouldn't be listed either on the bottom of the page. I'm just not too sure, if I understand those technologies correctly, so I hesitate to remove it.&lt;br /&gt;
&lt;br /&gt;
==Removing item &amp;quot;Accessing the HPA from Linux&amp;quot;==&lt;br /&gt;
I've checked the fwdir code (http://colimit.googlepages.com/fwdir.zip). This code works on a Hidden Partition (is that the same as a R and R or yet another Predesktop variant?). This code can not work with real HPAs.&lt;br /&gt;
&lt;br /&gt;
I suggest we remove this section in an week or so (or move it to the discussion section) unless further info regarding those Hidden Partition is provided.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 01:08, 4 January 2007 (CET)&lt;br /&gt;
&lt;br /&gt;
The fwdir page is quite clear that it does '''not''' access HPAs, but rather hidden partitions.  I don't know if an HPA and a phoenix HP partition have the same internal layout (they could, and it would make sense; a partition does not have to contain a filesystem, it could contain an HPA image just as easily).  Also, I have no idea if IBM ships the HPA as unpartitioned area, or as a hidden partition...&lt;br /&gt;
&lt;br /&gt;
If you know the answer to the two implied questions above, you know what to do.&lt;br /&gt;
&lt;br /&gt;
--[[User:Hmh|hmh]] 03:22, 5 January 2007 (CET)&lt;br /&gt;
&lt;br /&gt;
==FirstWare Image Backup span file format==&lt;br /&gt;
FWBACKUP creates an image set (a set of span files) of a Phoenix FirstWare HPA. FWRESTOR uses these span files to restore an HPA beckup image. (See the Predesktop Area white paper for usage information for FWBACKUP and FWRESTOR.) The format of a span file is straightforward.&lt;br /&gt;
&lt;br /&gt;
Each span file consists of a plain (not compressed, not encrypted) copy of a number of (512 byte) sectors of the HPA. It is preceded by a 512 byte header.&lt;br /&gt;
&lt;br /&gt;
The format of this 512 byte header is:&lt;br /&gt;
 bytes   description&lt;br /&gt;
  0-  7  magic (&amp;quot;fwbackup&amp;quot;)&lt;br /&gt;
  8-  9  1 (LSB first) # version number?&lt;br /&gt;
 10- 11  span file number, one based (LSB first)&lt;br /&gt;
 12- 13  number of span files in image set (LSB first)&lt;br /&gt;
 14- 17  number of sectors in span file (LSB first)&lt;br /&gt;
 18- 21  number of sectors in image set (LSB first)&lt;br /&gt;
 22- 25  last sector of HPA on the original hard drive, zero based (LSB first)&lt;br /&gt;
 26- 29  first sector of HPA on the original hard drive, zero based (LSB first)&lt;br /&gt;
 30- 37  unused&lt;br /&gt;
 38- 53  checksum # MD5? checksum of what exactly?&lt;br /&gt;
 54-511  unused&lt;br /&gt;
&lt;br /&gt;
Only bytes 10-11, 14-17 and 38-53 are unique for each span file. All other bytes of the header should be equal for all span files in an image set.&lt;br /&gt;
&lt;br /&gt;
This magic entry for {{cmdresult|file(1)}} can be used to identify the files part of an Phoenix FirstWare HPA backup image file set:&lt;br /&gt;
 # File magic for Phoenix FirstWare HPA backup image&lt;br /&gt;
 0       string          fwbackup        FirstWare HPA backup image&lt;br /&gt;
 # &amp;gt;8    leshort         # x             , version %d ???&lt;br /&gt;
 &amp;gt;26     lelong          x               (first disk sector of HPA: %d,&lt;br /&gt;
 &amp;gt;22     lelong          x               last disk sector of HPA: %d)&lt;br /&gt;
 &amp;gt;14     lelong          x               %d of&lt;br /&gt;
 &amp;gt;18     lelong          x                %d image sectors&lt;br /&gt;
 &amp;gt;10     leshort         x               (span file %d&lt;br /&gt;
 &amp;gt;12     leshort         x                of %d)&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 11:27, 7 January 2007 (CET)&lt;/div&gt;</summary>
		<author><name>Pebolle</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Talk:Predesktop_Area&amp;diff=27479</id>
		<title>Talk:Predesktop Area</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Talk:Predesktop_Area&amp;diff=27479"/>
		<updated>2007-01-04T00:24:22Z</updated>

		<summary type="html">&lt;p&gt;Pebolle: managed to _hand edit_ a live BEER!&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Use the HPA for GNU/Linux?==&lt;br /&gt;
More interesting than removing the HPA (which includes a.o. Acces IBM Predesktop Area, some other tools and a backup of the pre-installed OS) would be to use this area for GNU/Linux too. At least, removing the HPA only saves 3,5 GB on my 60 GB hard disk. It would be worth a try to see whether the backup of the pre-installed OS on the largest PSA could be replaced by a backup of your favourite GNU/Linux distribution.&lt;br /&gt;
&lt;br /&gt;
Elaborating on my ideas a few days later, I'd guess the following could be tried:&lt;br /&gt;
* see whether GRUB can be made to boot the Access IBM Predekstop Area (I guess by &amp;quot;chainloading&amp;quot; the bootsector of its PSA). Right now GRUB refuses to load sectors outside the partioned area. I've got absolutely no idea if it's possible to write a hack to overcome that restriction. Need to contact the GRUB people about that ...&lt;br /&gt;
* write some userspace tools for the HPA/the SPAs (things like: dumpbeer, printDoS).&lt;br /&gt;
&lt;br /&gt;
It should be clear these are basically random ideas. Still feedback would be appreciated ...&lt;br /&gt;
----&lt;br /&gt;
Hei,&lt;br /&gt;
&lt;br /&gt;
interesting ideas, but i'd only see a point in it if one could keep Win and Linux rescue stuff in the HPA. That means it would need to be expandable or fit the stuff for both systems.&lt;br /&gt;
[[User:Wyrfel|Wyrfel]] 20:03, 15 Mar 2005 (CET)&lt;br /&gt;
---- &lt;br /&gt;
Thanks.&lt;br /&gt;
&lt;br /&gt;
Short answer: that should be possible.&lt;br /&gt;
&lt;br /&gt;
Long answer: I see little in the specs (as I understand them now) to stop one from adding (say) an extra 3 GB GNU/Linux-rescue PSA or something like that. We might try to do that first by changing the BEER and DoS manually. (Not sure whether Phoenix added some proprietary stuff to keep you from booting it. The PSA should always be accesable with the proper BIOS setting.) It might be mandatory to put it on a FAT filesystem. The hard part probably is to have it show up in the Access IBM Predesktop Area. (My guess is you need to regenerate the FirstSight &amp;quot;graphical shell&amp;quot;. If that's correct we probably only can use the FirstWare tools &amp;quot;hidden&amp;quot; on their little PSA. That's no fun. Well it might a little fun if we try FreeDOS). &lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle (not logged in)]]&lt;br /&gt;
----&lt;br /&gt;
Update: a trivial patch to grub allows it to also work outside the partioned area:&lt;br /&gt;
&lt;br /&gt;
 --- /var/tmp/rpm/BUILD/grub-0.95/stage2/disk_io.c.oud   2004-05-23 18:35:24.000000000 +0200&lt;br /&gt;
 +++ /var/tmp/rpm/BUILD/grub-0.95/stage2/disk_io.c       2005-03-18 22:38:30.050907408 +0100&lt;br /&gt;
 @@ -297,8 +297,8 @@&lt;br /&gt;
     *  Check partition boundaries&lt;br /&gt;
     */&lt;br /&gt;
    if (sector &amp;lt; 0&lt;br /&gt;
 -      || ((sector + ((byte_offset + byte_len - 1) &amp;gt;&amp;gt; SECTOR_BITS))&lt;br /&gt;
 -         &amp;gt;= part_length))&lt;br /&gt;
 +      /*|| ((sector + ((byte_offset + byte_len - 1) &amp;gt;&amp;gt; SECTOR_BITS))&lt;br /&gt;
 +         &amp;gt;= part_length)*/)&lt;br /&gt;
      {&lt;br /&gt;
        errnum = ERR_OUTSIDE_PART;&lt;br /&gt;
        return 0;&lt;br /&gt;
&lt;br /&gt;
I made a grub CD with a grub patched with the above. Now I can &amp;quot;cat&amp;quot; the bootsector of the Predesktop Area from the grub shell (when booting of that grub CD). But I haven't yet managed to boot the Predesktop Area (dangerous stuff!) To be continued ...&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] Fri Mar 18 22:42:43 CET 2005&lt;br /&gt;
----&lt;br /&gt;
Update: a quick test with the current development version of grub2 (grub-1.93) showed that grub2 can chainload a block outside the partitioned area &lt;br /&gt;
&amp;quot;out of the box&amp;quot;. That's nice. I still haven't been able to get passed the error messages generated by the boot sectors of the bootable PSAs. My guess is the BIOS provides those boot sectors with some (special) settings that grub doesn't use ...&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 00:40, 5 April 2006 (CEST)&lt;br /&gt;
----&lt;br /&gt;
GRUB cannot be expected to (chain)load the Predesktop Area. When showing the Predesktop Area the BIOS runs in a special mode (more specifically: using some very specific interrupts, behaving differently under normal circumstances). So this seems to be not something to merit further investigation.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 19:01, 11 June 2006 (CEST)&lt;br /&gt;
----&lt;br /&gt;
Hey there - I hope to be welcome here to since I've no ThinkPad but an Samsung X20 notebook. This notebook uses also the HPA for some kind of a predesktop area - a linux&lt;br /&gt;
based multimedia system called &amp;quot;AVStation Now&amp;quot; which is hidden there. I used dd to dump the hpa and read the BEER table to find out what is hidden inside.&lt;br /&gt;
&lt;br /&gt;
What I found out:&lt;br /&gt;
&lt;br /&gt;
*the first partition (ext3) contains the rootfilesystem (funny, cause they use libdvdcss for dvd playback)&lt;br /&gt;
&lt;br /&gt;
*the second partition (ext3) contained a /boot partition with a special kernel with the possibility to mount this partition (seems they use a special liloversion for booting)&lt;br /&gt;
&lt;br /&gt;
*the third partition (fat?) - some html files - the firstware menu&lt;br /&gt;
&lt;br /&gt;
*and at last a fourth partition i was unable to mount&lt;br /&gt;
&lt;br /&gt;
[http://www.christophmueller.org/stuff/beerdump.html A dump of my BEER ;-)]&lt;br /&gt;
&lt;br /&gt;
Does someone know weather it would be possible mounting souch an hpapartition without using dd - maybe kernelsupport for the BEER? - since im nither a C nor a kernelhacker im unable to continue, but there must be some kind of support cause this multimediasystem knows howto handle it.&lt;br /&gt;
&lt;br /&gt;
If you need some more information you could send me an email to christoph_at_christophmueller.org&lt;br /&gt;
&lt;br /&gt;
[[User:Christophmueller.org|Christoph MÃ¼ller]]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
I've been playing around with the predesktop area tonight.  I was simply trying to just leave the diagnostics stuff and remove the windows part.  I wrote some programs to read/write the BEER data and stuff, but I wasn't able to get the system to boot it, it kept erroring &amp;quot;Authentication of System Services failed&amp;quot; (or something along those lines).  I will play around with this some more later&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[User:Invisi|Tim Nordell]]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A quick look with a hexeditor gave me two instances of &amp;quot;Application authentication has failed!&amp;quot; in the FirstSight application. Does that sound familair? &lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] Fri Apr 1 19:35:30 CEST 2005&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Actually it wasn't that.  I did a search of that too, the message itself was not in the predesktop area at all.  What also is interesting is the fw*.exe utilities for manipulating the predesktop area, contains the string &amp;quot;MD5&amp;quot; which makes me wonder if there is an md5 hash of each &amp;quot;predesktop&amp;quot; partition.  I know on the IBM whitepaper it states there being a signature so that non-signed applications can not be run.  Could a simple &amp;quot;md5&amp;quot; be the signature?&lt;br /&gt;
&lt;br /&gt;
[[User:Invisi|Tim Nordell]] 12:01, 3 Apr 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*What is it that you were trying to do (what did trigger the error you saw)?&lt;br /&gt;
&lt;br /&gt;
*About ten of the fw*.exe utilities contain the phrase &amp;quot;MD5 Checksums do not match&amp;quot;. So they could very well be using MD5 sums for some sort of validation. But they could use the MD5 sums in a lot of ways actually, so I won't yet speculate ...&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] Sun Apr  3 15:11:10 CEST 2005&lt;br /&gt;
----&lt;br /&gt;
OK, roughly two years later I finally found the courage to really mess with the BEER in my T41. Copied the BEER and the few related sections at the end of /dev/hda (using dd), analyzed those (I have some unreleased code to parse the BEER and the DOS stuff) _hand edited_ the BEER to &amp;quot;remove&amp;quot; the OS backup data, checked again, and copied the new BEER etc. to /dev/hda (using dd again, extremely tricky!). That worked like a charm: my new HPA is now about 3G smaller. No complaints whatsoever (even when booting my T41 is &amp;quot;secure&amp;quot; mode). &lt;br /&gt;
&lt;br /&gt;
So, I can't really reproduce Tims problems.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 01:24, 4 January 2007 (CET)&lt;br /&gt;
&lt;br /&gt;
== Predesktop Area ==&lt;br /&gt;
&lt;br /&gt;
I made a program that takes the BEER record at the end, parses it out to a &amp;quot;.cfg&amp;quot; file, lets you modify it, recalibrate the start spots for the records, and write it out to disk again.  It doesn't directly access hda, 'cept for reading the original beer record.  It makes a script file to go with the files you have, to read in the HPA data, and to write it out again with the new record.&lt;br /&gt;
&lt;br /&gt;
Anyways, I tried simply removing the last record from the BEER, which is the windows recovery partition.  It didn't like that.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Did you update the two's complement checksum at the end of the BEER?&lt;br /&gt;
&lt;br /&gt;
[[user:Pebolle|Paul Bolle]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Yep, I updated that.  If I don't update that, it doesn't even say that failed message.  I also made a seperate program to update the checksum so you can also modify the beer record by hand with a hex editor and have valid checksums.&lt;br /&gt;
&lt;br /&gt;
== Linux kernel support ==&lt;br /&gt;
{{Todo|research and add to article}}&lt;br /&gt;
* Add a section on dmesg and hdparm -I output:&lt;br /&gt;
 (...)&lt;br /&gt;
 Commands/features:&lt;br /&gt;
        Enabled Supported:&lt;br /&gt;
 (...)&lt;br /&gt;
           *    Host Protected Area feature set&lt;br /&gt;
 (...)&lt;br /&gt;
                SET MAX security extension&lt;br /&gt;
                Address Offset Reserved Area Boot&lt;br /&gt;
 (...)&lt;br /&gt;
&lt;br /&gt;
* Recent (2.6.10 and up?) kernels disable HPAs automatically (in drivers/ide/ide-disk.c). Dmesg example:&lt;br /&gt;
&lt;br /&gt;
 hda: Host Protected Area detected.&lt;br /&gt;
        current capacity is 110194034 sectors (56419 MB)&lt;br /&gt;
         native  capacity is 117210240 sectors (60011 MB)&lt;br /&gt;
 hda: Host Protected Area disabled.&lt;br /&gt;
&lt;br /&gt;
This should be (further researched and) added to this section (maybe with some pointers to the unexpected consequences of this new approach ...)&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 22:06, 6 Sep 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
In 2.6.11, I was able to re-enable HPA by commenting out the section in drivers/ide/ide-disk.c under the comment &amp;quot;Some maxtor support LBA48 but not accept LBA48 set max...&amp;quot;.  I suppose that wouldn't be a good idea with a Maxtor drive but it worked fine for my R50.&lt;br /&gt;
&lt;br /&gt;
--[[User:Rkilian|Robert Kilian]] 21:13, 22 March 2006 (CET)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* SRCMOS24.EXE&lt;br /&gt;
&lt;br /&gt;
In the PSA used by the Predesktop Area I found a &amp;quot;hidden&amp;quot; executable: SRCMOS24.EXE (it is not mentioned in the FAT). This executable can capture and update CMOS data. It might only be used by the FirstSight program to display (part of) the BIOS info. It might be nice to see what it can do and if similar things are possible under GNU/Linux.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 22:01, 7 Sep 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
== Newer thinkpads don't use Phoenix Firstware? ==&lt;br /&gt;
&lt;br /&gt;
On my T42 that arrived yesterday, the predesktop area looks a lot like MS Windows. The widget set, the fonts, even the boot sequence looks exactly like Windows 2000. Debian-installer indentified it as &amp;quot;Microsoft Windows NT/2000/XP&amp;quot;, while it identified my XP partition as &amp;quot;Microsoft Windows XP Professional&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Has Lenovo/IBM changed their system, or is this Phoenix stuff really just Windows?&lt;br /&gt;
&lt;br /&gt;
-- [[Evan.Heidtmann]]&lt;br /&gt;
&lt;br /&gt;
Evan,&lt;br /&gt;
&lt;br /&gt;
Could it be that you're talking about the preinstalled version of Windows here? As far as I know (using information to be found on the internet, not personal research) the preinstalled OS will reformat its partition from FAT32 to NTFS at first boot. That could explain the difference in the identification by the Debian installer (which I never really used).&lt;br /&gt;
&lt;br /&gt;
Moreover the Predesktop Area is part of the HPA and the HPA is not an partition. It seems unlikely that the Debain installer notices the HPA. As far as I know there are at present no GNU/Linux tools with a (useful) support of HPAs.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 15:43, 4 Aug 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
My T42P (model 2373HSG) is using a cut-down version of Windows XP as the pre-desktop area.  I'm not sure whether it's a special IBM thing or just a [http://www.microsoft.com/licensing/programs/sa/benefits/winpe.mspx Windows PE] (preinstallation environment) setup.  It includes Java and Python, which are used by some of the IBM tools, and the Opera web browser.&lt;br /&gt;
&lt;br /&gt;
It's no longer an HPA but a 487MB hidden FAT32 called IBM_SERVICE located at the end of the disk.&lt;br /&gt;
&lt;br /&gt;
--[[User:Korourke|Korourke]]&lt;br /&gt;
&lt;br /&gt;
== Rescue and Recovery via grub? ==&lt;br /&gt;
&lt;br /&gt;
Did anyone get the Rescue and Recovery partition to boot via grub on recent models? On a T43 with&lt;br /&gt;
 rootnoverify (hd0,1)&lt;br /&gt;
 chainloader +1&lt;br /&gt;
the Rescue and Recovery partition starts booting nicely and then, a few seconds in the R&amp;amp;R loading sequence, chokes with a &lt;br /&gt;
 STOP: c000021a {Fatal System Error}&lt;br /&gt;
 The Session Manager Initialization system process terminated unexpectedly with a status of 0xc000003a (0x00000000 0x00000000).&lt;br /&gt;
 The system has been shut down. &lt;br /&gt;
The problem started right after installing grub into the MBR (I couldn't get the preinstalled MBR to boot grub from an active primary partition). It seems oblivious to the Predesktop BIOS setting.&lt;br /&gt;
&lt;br /&gt;
The same problem has been reported by others with other models (for example [http://forums.fedoraforum.org/archive/index.php/t-19433.html here] for a T42).&lt;br /&gt;
&lt;br /&gt;
[[User:Thinker|Thinker]] 11:35, 30 Sep 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
Your &amp;quot;Rescue and Recovery partition&amp;quot; seems not to be a HPA (which isn't a partition). Maybe we should open a new page for that system.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 21:54, 30 Sep 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
It may very well not be an HPA , but the BIOS stil calls it a &amp;quot;Predesktop Area&amp;quot;. Anyway, the partition is actually a VFAT partition (even though it has type 0x12, &amp;quot;Compaq Diagnostics&amp;quot;). It seems to boot into PC-DOS (using {{path|NTDETECT.EXE}} so it looks like Windows startup) and then its {{path|AUTOEXEC.BAT}} runs a fancy GUI.&lt;br /&gt;
--[[User:Thinker|Thinker]] 23:31, 30 Sep 2005 (CEST)&lt;br /&gt;
----&lt;br /&gt;
Right, there has been a lot of confusion about this, we should have a separate page. Introduced an edit link (called Rescue and Recovery) on the [[ThinkPad Technologies]] page for that purpose.&lt;br /&gt;
&lt;br /&gt;
== Suggestions for projects ==&lt;br /&gt;
&lt;br /&gt;
I'd guess it would be rather nice to have GNU/Linux tools (like sfdisk and parted) HPA aware. The most urgent change would be to have those programs at least recognize and respect a HPA (e.g.: do not write in or otherwise use the HPA area; unless the user gives a --force option or something similar).&lt;br /&gt;
&lt;br /&gt;
As for now, I realize I caused this error: ENOPATCH.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 22:56, 5 Nov 2005 (CET)&lt;br /&gt;
&lt;br /&gt;
== Keeping functionality of the blue AccessIBM button ==&lt;br /&gt;
&lt;br /&gt;
Somebody figured out [http://sharadware.com/2005/07/11/suse-linux-winxp-access-ibm-on-the-thinkpad-t43/|how to keep the AccessIBM functionality] when installing Linux, quite easy fix. How come nobody thought about it before? :)&lt;br /&gt;
(link got from [[Installing_Ubuntu_5.04_on_a_ThinkPad_T43_%281875%29 here]])&lt;br /&gt;
&lt;br /&gt;
--[[User:Micampe|Micampe]] 17:39, 9 Dec 2005 (CET)&lt;br /&gt;
&lt;br /&gt;
The relevant part of that page:&lt;br /&gt;
&lt;br /&gt;
''Set the IBM Predesktop Area (in the BIOS) to â€œSecureâ€. Boot using the SUSE DVD. Shrink the Windows partition as required. Follow the instructions and go through the regular installation process. Create a primary partition for /boot (the other stuff can go into the extended partitions) and when the time comes to install GRUB (you do prefer GRUB to LILO, donâ€™t you?), make sure you install it into the boot sector of the boot partition. Set this partition as active. Leave the MBR alone.''&lt;br /&gt;
&lt;br /&gt;
That's the first thing I tried on my T43. Didn't work: setting the active partition to /boot had no effect, it was still booting the first (Windows) partition. So I had to install Grub into MBR, thereby killing R&amp;amp;R. Anyway, there's another solution in the article page (didn't try it since I saw it only after purging my R&amp;amp;R partition).&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
--[[User:Thinker|Thinker]] 19:18, 9 Dec 2005 (CET)&lt;br /&gt;
&lt;br /&gt;
== Parsing the HPA information (BEER/DOS) ==&lt;br /&gt;
&lt;br /&gt;
I too have been writing a program to parse the BEER and DOS info. Sample output:&lt;br /&gt;
:{{cmdresult| beer.signature: 0xBEEF}}&lt;br /&gt;
:{{cmdresult| beer.size: 128}}&lt;br /&gt;
:{{cmdresult| beer.flags: 41}}&lt;br /&gt;
:{{cmdresult|    Read Only:}}&lt;br /&gt;
:{{cmdresult|    Generated Record:}}&lt;br /&gt;
:{{cmdresult|    Use Reserved Area Boot Code Address: yes}}&lt;br /&gt;
:{{cmdresult|    Configuration Time Stamp is valid:}}&lt;br /&gt;
:{{cmdresult|    Device Supports LBA:                 yes}}&lt;br /&gt;
:{{cmdresult|    Directory of Services is Present}}&lt;br /&gt;
:{{cmdresult|    Formatted Geometry Valid}}&lt;br /&gt;
:{{cmdresult|    Reported Geometry Valid              yes}}&lt;br /&gt;
:{{cmdresult| beer.reported_cylinders: 16383}}&lt;br /&gt;
:{{cmdresult| beer.reported_heads: 16}}&lt;br /&gt;
:{{cmdresult| beer.reported_sectors: 63}}&lt;br /&gt;
:{{cmdresult| beer.reported_bytes_sector: 512}}&lt;br /&gt;
:{{cmdresult| beer.reported_sectors_device: 117210240}}&lt;br /&gt;
:{{cmdresult| beer.formatted_cylinders: 16383}}&lt;br /&gt;
:{{cmdresult| beer.formatted_heads: 16}}&lt;br /&gt;
:{{cmdresult| beer.formatted_sectors: 63}}&lt;br /&gt;
:{{cmdresult| beer.formatted_bytes_sector: 512}}&lt;br /&gt;
:{{cmdresult| beer.formatted_sectors_device: 117210240}}&lt;br /&gt;
:{{cmdresult| year: 2004}}&lt;br /&gt;
:{{cmdresult| day: 313}}&lt;br /&gt;
:{{cmdresult| beer.timestamp: 1426063684}}&lt;br /&gt;
:{{cmdresult| beer.device_index: 0x80}}&lt;br /&gt;
:{{cmdresult| beer.hpa_start: 110194034}}&lt;br /&gt;
:{{cmdresult| beer.boot_code_address: 117002545}}&lt;br /&gt;
:{{cmdresult| beer.num_entries: 8}}&lt;br /&gt;
:{{cmdresult| beer.dir_length: 64}}&lt;br /&gt;
:{{cmdresult| beer.revision: 0}}&lt;br /&gt;
:{{cmdresult| dev_name: HTS726060M9AT00}}&lt;br /&gt;
:{{cmdresult| beer.checksum: -26982}}&lt;br /&gt;
:{{cmdresult| dos[0].flags: 3}}&lt;br /&gt;
:{{cmdresult|    Service area is available as B:}}&lt;br /&gt;
:{{cmdresult|    Diagnostic Service:}}&lt;br /&gt;
:{{cmdresult|    Service Area is Read Only:}}&lt;br /&gt;
:{{cmdresult|    This Boot:}}&lt;br /&gt;
:{{cmdresult|    Empty Service Area:}}&lt;br /&gt;
:{{cmdresult|    Hidden Service Area:                 yes}}&lt;br /&gt;
:{{cmdresult|    Service Area is bootable as A:       yes}}&lt;br /&gt;
:{{cmdresult| dos[0].service_area_start: 117005431}}&lt;br /&gt;
:{{cmdresult| dos[0].service_area_size: 204800}}&lt;br /&gt;
:{{cmdresult| dos[0].load_sectors: 1}}&lt;br /&gt;
:{{cmdresult| dos[0].load_address: 0x7:C000}}&lt;br /&gt;
:{{cmdresult| dos[0].service_area_id: 0}}&lt;br /&gt;
:{{cmdresult| dos[0] id_str: FirstWare Reserved Area}}&lt;br /&gt;
:{{cmdresult| dos[0].checksum: -22271}}&lt;br /&gt;
:{{cmdresult| [...]}}&lt;br /&gt;
&lt;br /&gt;
Very rough code. Send me an e-mail (at the address found at my user page) if you want a (GPL'd) copy, but only if you're willing to test and improve the code.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 01:15, 24 January 2006 (CET)&lt;br /&gt;
&lt;br /&gt;
== SET MAX Security Extensions ==&lt;br /&gt;
&lt;br /&gt;
I've hacked Andries Brouwer's setmax tool (see: Google) to support the SET MAX security extensions (SET MAX SET PASSWORD, SET MAX LOCK, SET MAX UNLOCK, SET MAX FREEZE). Very rough code once again. Mail me if you're willing to brick your HDD.&lt;br /&gt;
&lt;br /&gt;
A few random observations:&lt;br /&gt;
&lt;br /&gt;
- secure mode: the Phoenix BIOS probably sets a SET MAX password in the HDD, does a non-volatile SET MAX and LOCKs (or FREEZEs) the HDD.&lt;br /&gt;
&lt;br /&gt;
- normal mode: the Phoenix BIOS might set a SET MAX password in the HDD, does a (volatile?) SET MAX but does not LOCK the HDD. The HDD will accept another SET MAX, a new SET MAX SET PASSWORD, etc.&lt;br /&gt;
&lt;br /&gt;
- normal mode: Linux 2.6.x disables the HPA in normal mode (by doing a volatile SET MAX to maximum native address). After a suspend the HDD reenables the HPA (by returning to the latest non-volatile value of SET MAX). It thus treats the suspend cycle as a power cycle (it also discards a SET MAX password, unlocks or unfreezes the HPA etc). I'm not sure whether that is a correct implementation of the ATA spec. (The HDD doesn't do this in secure mode. I would like to know how the Phoenix BIOS and/or Hitachi HDD people have managed this.) &lt;br /&gt;
&lt;br /&gt;
This can lead to some problems if a partition ends within the limits of the HPA (which is then actually (partly) overwritten by that partition). Maybe the best solution would be to have the kernel do a non-volatile SET MAX to the native maximum address. Then a resume from suspend will in effect not reenable the HPA.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 01:40, 20 February 2006 (CET)&lt;br /&gt;
&lt;br /&gt;
== hpafs ==&lt;br /&gt;
&lt;br /&gt;
I've written a (read only) FUSE for the hpa: hpafs. Alpha quality at best. Mail me if you'd like to test it, hack on it. Now about 1100 LOC. The binary is a mere 33 KB (this is with debugging symbols). Rather i386 centric. &lt;br /&gt;
&lt;br /&gt;
hpafs will only work if the Predesktop Area is disabled (but that is more or less obvious). It basically turns each PSA into a file:&lt;br /&gt;
&lt;br /&gt;
{{cmdresult|$ sudo hpafs /dev/hda /mnt/hpa -o allow_other&amp;lt;br/&amp;gt;&lt;br /&gt;
$ ll /mnt/hpa/&amp;lt;br/&amp;gt;&lt;br /&gt;
total 0&amp;lt;br/&amp;gt;&lt;br /&gt;
-r--r--r--  1 root root    2097152 Jan  1  1970 BIOSWORKAREA&amp;lt;br/&amp;gt;&lt;br /&gt;
-r--r--r--  1 root root    7710720 Jan  1  1970 Create Diagnostic Diskettes&amp;lt;br/&amp;gt;&lt;br /&gt;
-r--r--r--  1 root root  104857600 Jan  1  1970 FirstWare Reserved Area&amp;lt;br/&amp;gt;&lt;br /&gt;
-r--r--r--  1 root root     7710720 Jan  1  1970 Rec Boot&amp;lt;br/&amp;gt;&lt;br /&gt;
-r--r--r--  1 root root 3459252224 Jan  1  1970 Rec Data&amp;lt;br/&amp;gt;&lt;br /&gt;
-r--r--r--  1 root root    1476096 Jan  1  1970 Restore from backup&amp;lt;br/&amp;gt;&lt;br /&gt;
-r--r--r--  1 root root    7710720 Jan  1  1970 Run Diagnostics&amp;lt;br/&amp;gt;&lt;br /&gt;
-r--r--r--  1 root root    1477632 Jan  1  1970 SIGHT}}&lt;br /&gt;
&lt;br /&gt;
This FUSE file can easily be copied with basic GNU tools (cat, dd, etc). Even more fun is to loop mount such a FUSE file (if the corresponding PSA is a bootable image). Then the PSA is a (read only) part of your mounted filesystems. So now you do not need to use dd on /dev/hda to copy the Predesktop Area: you can just mount it!&lt;br /&gt;
&lt;br /&gt;
{{cmdresult|$ sudo mount -o loop,ro,users  /mnt/hpa/Rec\ Data /mnt/tmp&amp;lt;br/&amp;gt;&lt;br /&gt;
$ ll /mnt/tmp/&amp;lt;br/&amp;gt;&lt;br /&gt;
total 1454&amp;lt;br/&amp;gt;&lt;br /&gt;
-rwxr-xr-x  1 root root      64 Sep 27  2002 bootcat.bin&amp;lt;br/&amp;gt;&lt;br /&gt;
-rwxr-xr-x  1 root root 1474560 Oct  3  2002 bootimg.bin&amp;lt;br/&amp;gt;&lt;br /&gt;
drwxr-xr-x  2 root root    2048 Mar 13  2004 country&amp;lt;br/&amp;gt;&lt;br /&gt;
drwxr-xr-x  2 root root    2048 Mar 13  2004 ibmwork&amp;lt;br/&amp;gt;&lt;br /&gt;
drwxr-xr-x  3 root root    8192 Mar 13  2004 recovery&amp;lt;br/&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
To be continued ...&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 00:56, 2 March 2006 (CET)&lt;/div&gt;</summary>
		<author><name>Pebolle</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Talk:Hidden_Protected_Area&amp;diff=27478</id>
		<title>Talk:Hidden Protected Area</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Talk:Hidden_Protected_Area&amp;diff=27478"/>
		<updated>2007-01-04T00:08:17Z</updated>

		<summary type="html">&lt;p&gt;Pebolle: Re: 5 Accessing the HPA from Linux: was that really an HPA?&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There is conflicting information on this page.  In the introductory paragraph it says &amp;quot;The HPA was introduced with the R/T/X 40 series of ThinkPads.&amp;quot;  But on the bottom the X3x models are also linked as having this technology.  What is right? --[[User:Rolf|Rolf]] 12:30, 19 October 2006 (CEST)&lt;br /&gt;
&lt;br /&gt;
Also I know an R50e machine, that has Rescue and Recovery on a Compaq Diagnostics partition. So it shouldn't be listed either on the bottom of the page. I'm just not too sure, if I understand those technologies correctly, so I hesitate to remove it.&lt;br /&gt;
&lt;br /&gt;
==Re: 5 Accessing the HPA from Linux==&lt;br /&gt;
I've checked the fwdir code (http://colimit.googlepages.com/fwdir.zip). This code works on a Hidden Partition (is that the same as a R and R or yet another Predesktop variant?). This code can not work with real HPAs.&lt;br /&gt;
&lt;br /&gt;
I suggest we remove this section in an week or so (or move it to the discussion section) unless further info regarding those Hidden Partition is provided.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 01:08, 4 January 2007 (CET)&lt;/div&gt;</summary>
		<author><name>Pebolle</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Hidden_Protected_Area&amp;diff=27477</id>
		<title>Hidden Protected Area</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Hidden_Protected_Area&amp;diff=27477"/>
		<updated>2007-01-03T23:50:31Z</updated>

		<summary type="html">&lt;p&gt;Pebolle: updated t13 link (twice)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=&amp;quot;100%&amp;quot;&lt;br /&gt;
|style=&amp;quot;vertical-align:top;padding-right:20px;width:10px;white-space:nowrap;&amp;quot; | __TOC__&lt;br /&gt;
|style=&amp;quot;vertical-align:top&amp;quot; |&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin: 0; margin-right:10px; border: 1px solid #dfdfdf; padding: 0em 1em 1em 1em; background-color:#F8F8FF; align:right;&amp;quot;&amp;gt;&lt;br /&gt;
=== The Hidden Protected Area ===&lt;br /&gt;
The Hidden Protected Area (also known as the Host Protected Area) is a special area (usually a few gigabytes in size) located at the end of a hard disk. It is preinstalled on the harddisks of some ThinkPads. It is normally hidden to the software running on your ThinkPad. It includes all the software and data needed to recover the preloaded state of the ThinkPad. The HPA also includes some diagnostic tools and a (MS Windows only) backup tool.&lt;br /&gt;
&lt;br /&gt;
The HPA was introduced with the R/T/X 40 series of ThinkPads. It is refered to as the Predesktop Area in the BIOS Setup Utility. Recent ThinkPads can have a (hidden) partition that is also called [[Predesktop Area|Predesktop Area]] in the BIOS Setup Utility. That (hidden) partition is not an HPA. More information can be found in [[Rescue and Recovery | Rescue and Recovery]],&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|style=&amp;quot;vertical-align:top;padding-right:10px;width:10px;white-space:nowrap;&amp;quot; | [[Image:hpa.jpg|IBM PreDesktop Area]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==General information about the HPA==&lt;br /&gt;
As opposed to [[Rescue and Recovery|Recovery Partitions]], Protected Service Areas (PSAs) such as the HPA are (let's say) images of partitions written to the end of a harddisk. They are only accessible through their BEER. The general idea is that, under control of the BIOS, the PSAs are totally hidden from all ordinary software, including malware (viruses, trojans, spyware). They are only accessible when permitted by the BIOS, and even then only through special HPA-aware tools. Under GNU/Linux they are only accessible with low level tools like dd.&lt;br /&gt;
&lt;br /&gt;
The HPA is based on [http://www.phoenix.com/en/Products/Trusted+Applications/Phoenix+FirstWare/default.htm Phoenix FirstWare]. FirstWare is (in short) an implementation of two technologies: BEER and PARTIES. (Yes, those names are correct!) BEER (Boot Engineering Extension Record) and PARTIES (Protected Area Run Time Interface Extension Services) are described in [http://t13.org/Documents/UploadedDocuments/project/d1367r3-PARTIES.pdf this T13 working draft]. There is a more general introduction to PARTIES on the [http://www-1.ibm.com/support/docview.wss?rs=0&amp;amp;uid=psg1MIGR-51248&amp;amp;loc=en_US IBM site]. FirstWare depends on certain [http://en.wikipedia.org/wiki/Advanced_Technology_Attachment#ATA_standards_versions.2C_transfer_rates.2C_and_features ATA-5] commands, so it won't work with lower ATA level (earlier) drives or even with all ATA-5 drives. Unfortunately, there is no public HPA compatibility tester or list of compatible drives.&lt;br /&gt;
&lt;br /&gt;
Basically, what's going on is that the Phoenix BIOS commands the drive to hide the last few gigabytes of the hard disk (the HPA). The to non-HPA aware software, the drive appears to have a smaller size. Note that this is just a setting in the BIOS and can be disabled. The HPA can be accessed by pressing {{ibmkey|Access IBM|#495988}} or {{key|Enter}} at boot time. The BIOS will then parse the BEER (128 bytes, situated in the last sector of 512 bytes of the harddisk) and the &amp;quot;Directory of Services&amp;quot; (consisting of directory entries of 64 bytes each, starting in the last sector and spilling over into the previous sectors) to see what part of the HPA should be launched. In (most?) ThinkPads the BEER tells the BIOS to launch the Access IBM Predesktop Area. The system will then actually be booting into a (minimal) DOS environment which is able to launch a graphical shell (called Phoenix FirstSight). IBM has simply rebranded this graphical shell to the Access IBM Predesktop Area. From this graphical shell one can launch several tools (BIOS Setup Utility, diagnostic tools, recovery tools).&lt;br /&gt;
&lt;br /&gt;
==Three BIOS options==&lt;br /&gt;
The BIOS has three settings for the &amp;quot;IBM Predesktop Area&amp;quot; (in the Security category):&lt;br /&gt;
*Secure: No user or SW-initiated changes; Contents hidden from OS&lt;br /&gt;
*Normal: Change allowed; Contents hidden from OS&lt;br /&gt;
*Disabled: Not Usable; Visible and Reclaimable&lt;br /&gt;
&lt;br /&gt;
Normal is the default setting. One can boot into the Predesktop Area when either Secure or Normal is set. When Disabled is set the Predesktop Area will not boot. According to the [http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-46023 Predesktop Area white paper] the HPA is both &amp;quot;locked&amp;quot;{{footnote|1}} and &amp;quot;hidden&amp;quot; when Secure is set and only &amp;quot;hidden&amp;quot; when normal is set. In practice the result seems to be that the HPA is totally unavailable to the Linux kernel (and therefore all applications) when Secure is set. (The HPA should be unavailable in &amp;quot;Secure mode&amp;quot; for all operating systems, MS Windows included.) One would expect the HPA to be only accessable to HPA aware tools when Normal is set. However, recent kernels disable the HPA by default when Normal is set. Note that [http://marc.theaimsgroup.com/?l=linux-ide&amp;amp;w=2&amp;amp;r=1&amp;amp;s=Host+protected+area&amp;amp;q=b recent threads on linux-ide] suggest that the ThinkPad will reenable the HPA on resume and thus causing (possibly serious) conflicts with the GNU/Linux system (that assumes the HPA is still available).&lt;br /&gt;
&lt;br /&gt;
With Disabled you should be able to safely reclaim the area used by the HPA (to GNU/Linux it basically is unallocated space on the harddisk).&lt;br /&gt;
&lt;br /&gt;
==Details of the HPA==&lt;br /&gt;
Fabrice Bellet describes a [http://bellet.info/laptop/t40.html#the_predesktop_area technique he used] to explore the HPA of his ThinkPad T40, using GNU/Linux tools. This technique is only for the more curious or more careless people. It uses &amp;quot;dd&amp;quot; to copy the sectors on the harddisk containing the HPA from &amp;quot;/dev/hda&amp;quot; to a new file: when using &amp;quot;dd&amp;quot; on &amp;quot;/dev/hda&amp;quot; you are only one small typo away from an unrecoverable disaster!&lt;br /&gt;
&lt;br /&gt;
Here follows a more detailed description of the HPA on a ThinkPad T41 (60 GB harddisk) to contrast his findings.&lt;br /&gt;
&lt;br /&gt;
On this ThinkPad T41 the HPA is 3,4 GB in size. It contains 8 consecutive PSAs (Protected Service Areas). Six of those start with an x86 boot sector.&lt;br /&gt;
&lt;br /&gt;
* The first PSA is 3,2 GB in size. The OEM-ID of the boot sector is: &amp;quot;IBM  7.1&amp;quot;. It seems to hold a copy of the preloaded OS and everything needed to generate a bootable DVD-ROM for it, even an El Torito boot image and a boot catalog: see [[Backing up the preloaded OS]].&lt;br /&gt;
&lt;br /&gt;
* The second PSA is exactly 2 MB in size. According to its entry in the Directory of Service it's the &amp;quot;BIOSWORKAREA&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
* The third PSA is only 7,4 MB in size. The OEM-ID of the boot sector is: &amp;quot;MSWIN4.1&amp;quot;. It seems to be an image of a 1,44 MB bootable floppy disk (with MS DOS) and a directory containig 6 MB of FirstWare tools. It will be launched by the &amp;quot;Recover to factory contents&amp;quot; tool of the Predesktop Area. Those &amp;quot;factory contents&amp;quot; should be the data on the first PSA.&lt;br /&gt;
&lt;br /&gt;
* The fourth PSA is only 1,4 MB in size. The OEM-ID of the boot sector is: &amp;quot;IBM  7.1&amp;quot;. It too seems to be an image of a (sort of) 1,44 MB bootable floppy disk. It will be launched by the &amp;quot;Restore your backups&amp;quot; tool of the Predesktop Area.&lt;br /&gt;
&lt;br /&gt;
* The fifth PSA is again 7,4 MB in size. The OEM-ID of the boot sector is: &amp;quot;IBM  7.0&amp;quot;. It will be launched by the &amp;quot;Run diagnostics&amp;quot; tool of the Predesktop Area.&lt;br /&gt;
&lt;br /&gt;
* The sixth PSA is also 7,4 MB in size and the OEM-ID of the boot sector also is: &amp;quot;IBM  7.0&amp;quot;. It will be launched by the &amp;quot;Create diagnostic disks&amp;quot; tool of the Predesktop Area. It contains a copy of a (sort of) bootable 1,44 MB floppy disk, some tools and compressed copies of the diagnostic disks.&lt;br /&gt;
&lt;br /&gt;
* The seventh PSA is only 1,4 MB in size. The OEM-ID of the boot sector is &amp;quot;PHOENIX&amp;quot;. It seems to be a copy of a (sort of) 1.44 MB bootable floppy disk too and only contains a (minimal) DOS and the FirstSight application. Basically, this is the Access IBM Predesktop Area.&lt;br /&gt;
&lt;br /&gt;
* The eigth PSA is 101 MB in size. It doesn't have a boot sector. It contains the FirstWare Reserved Area. That probably is some sort of swap space for the FirstWare system.&lt;br /&gt;
&lt;br /&gt;
==Accessing the HPA from Linux==&lt;br /&gt;
While Fabrice Bellet's method, described in the previous section, works in many cases, it has some serious flaws. The most important one -- is that each PSA has to be formated (i.e. has to posses a filesystem), and the size this filesystem has to be equal to the size of the PSA. If the HPA has some sort of a swap partition, or the filesystem size is a few megabytes less than the PSA's size, then we will not be able to find any following PSA(s).&lt;br /&gt;
&lt;br /&gt;
A more systematic approach would be just to use the BEER record to find the exact LBA addresses of all PSA(s). The idea is to use the [http://www.t13.org/project/d1367r3-PARTIES.pdf T13 working draft] of the BEER specs. There is some serious discussion on this matter going on in [[Talk:Predesktop_Area|Talk:Predesktop_Area]], but so far they didn't release any code to the public. As an interim solution, we can use a free open-source [http://colimit.googlepages.com clone of the Phoenix utility fwdir]. If we first disable the &amp;quot;IBM Predesktop Area&amp;quot; in BIOS (which, essentially, sends appropriate SETMAX command to the harddrive), then the whole harddrive will be accessible from the userspace. Now, if we run fwdir, a typical output of this utility would look like&lt;br /&gt;
&amp;lt;div&amp;gt;&lt;br /&gt;
 #   ID  Name                           1st Sector Sectors Sec Icon Flag&lt;br /&gt;
&lt;br /&gt;
 0 0000h FirstWare Reserved Area         234231736  204800   0  00h  03h&lt;br /&gt;
 1 0001h CONSOLE                         234170510   61226   0  FCh  01h&lt;br /&gt;
 2 0140h Recover Pro                     234088523   81987   0  00h  01h&lt;br /&gt;
 3 0104h Factory Restore                 234085638    2885   0  03h  03h&lt;br /&gt;
 4 0120h RADA Data                       234020102   65536   0  00h  02h&lt;br /&gt;
 5 0108h Factory Data                    230026502 3993600   0  00h  02h&lt;br /&gt;
 6 0141h Recover Pro Records             229616902  409600   0  00h  02h&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
Once we know all the LBA addresses of the first sectors of all PSA(s) and their sizes, we can extract any particular PSA. E.g. the &amp;quot;Factory Data&amp;quot; PSA in this example can be extracted with&lt;br /&gt;
&amp;lt;div&amp;gt;&lt;br /&gt;
 dd if=/dev/hda of=/tmp/FacDat.img skip=230026502 count=3993600&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
But if we are only interested in the contents of this PSA partition, there is no need to extract it to a file and later mount it through a loop-device. It can be done right away with&lt;br /&gt;
&amp;lt;div&amp;gt;&lt;br /&gt;
 mount /dev/hda /mnt/fwdata -t vfat -o ro,offset=`expr 512 &amp;quot;*&amp;quot; 230026502`&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
Of course, there is no way to know in advance which particular filesystem each PSA has (if any). This still has to be found by trial and error (because &amp;quot;mount -t auto&amp;quot; does not always work). In the above example, the &amp;quot;CONSOLE&amp;quot; PSA is formated in ext2.&lt;br /&gt;
&lt;br /&gt;
==How to reclaim the HPA==&lt;br /&gt;
After disabling the &amp;quot;IBM Predesktop Area&amp;quot; (with the BIOS option &amp;quot;Disabled&amp;quot;, see above) it's possible to reclaim the area used by the HPA. Then one can include that area in a partition with standard tools (i.e. fdisk, mkfs) as it will be treated just as regular free space of the hard disk.&lt;br /&gt;
&lt;br /&gt;
==Alternative uses?==&lt;br /&gt;
It might be possible to use the FirstWare tools included in the HPA to make the HPA more useful for GNU/Linux purposes. For instance, the copy of the preloaded OS could be replaced with an emergency backup of your GNU/Linux distribution. Maybe the Predesktop area could be even used to boot into a GNU/Linux rescue system. Whether the Phoenix proprietary tools really allow alternative uses and whether those tools do not make it too hard to accomplish those cannot yet be said. It seems realistic to assume that the benefits of those alternative uses aren't worth the effort to accomplish them. Still, it might be fun (altough possibly hazardous to your system) to try ...&lt;br /&gt;
&lt;br /&gt;
==Problems caused by the HPA==&lt;br /&gt;
As of Linux 2.6.18, having a HPA may cause errors when resuming the laptop from suspend-to-RAM or suspend-to-disk.  See the section called &amp;quot;SectorIdNotFound disk errors when laptop is resumed&amp;quot; in [[Problems with ACPI suspend-to-ram | ACPI suspend problems]].&lt;br /&gt;
&lt;br /&gt;
==External Sources==&lt;br /&gt;
*[http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-46023 Predesktop Area white paper]&lt;br /&gt;
*[http://www-3.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-46025 Predesktop Aministrator Utility (DOS)]&lt;br /&gt;
*[http://webstore.ansi.org/ansidocstore/product.asp?sku=ANSI+INCITS+346-2001 Protected Area Run Time Interface Extension Services (PARTIES) ANSI INCITS 346-2001 ($30)]&lt;br /&gt;
*[http://t13.org/Documents/UploadedDocuments/project/d1367r3-PARTIES.pdf The latest free draft of ANSI INCITS 346-2001 (BEER specs)]&lt;br /&gt;
*[http://www.phoenix.com/NR/rdonlyres/7465D3CF-B0E3-4F64-9122-47D9C83028D0/0/cme_firstware_wp.pdf Phoenix FirstWare White Paper]&lt;br /&gt;
*[http://www.win.tue.nl/~aeb/linux/Large-Disk-11.html Section 11 of the Large Disk HOWTO (Clipped disks)]&lt;br /&gt;
&lt;br /&gt;
==Models featuring this Technology==&lt;br /&gt;
*ThinkPad {{R40}}, {{R40e}}, {{R50}}, {{R50e}}, {{R50p}}, {{R51}}, {{R52}}&lt;br /&gt;
*ThinkPad {{T40}}, {{T40p}}, {{T41}}, {{T41p}}, {{T42}}, {{T42p}}, {{T43}}, {{T43p}}&lt;br /&gt;
*ThinkPad {{X31}}, {{X32}}, {{X40}}, {{X41}}, {{X41T}}&lt;br /&gt;
*ThinkPad {{Z61m}}&lt;br /&gt;
&lt;br /&gt;
{{footnotes|&lt;br /&gt;
# Presumably by having the BIOS use the SET MAX security extension. The BIOS seems to set a password for the HPA at boot (using the SETMAX-SET PASSWORD command) and after that use that password to issue a SETMAX-LOCK command. Since the password is unknown (and most likely changes at every Secure boot) the HPA is inaccessable to all programs running on the ThinkPad.&amp;lt;BR&amp;gt;&amp;lt;BR&amp;gt;Something similar would be possible running in Normal mode. Then a program could issue the SETMAX-SET PASSWORD command. At the moment there's no program running under GNU/Linux capable of doing that. Of course this is possibly less secure: it's (theoretically) possible that other (rogue) programs get hold of that password.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Glossary]]&lt;/div&gt;</summary>
		<author><name>Pebolle</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Hidden_Protected_Area&amp;diff=27476</id>
		<title>Hidden Protected Area</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Hidden_Protected_Area&amp;diff=27476"/>
		<updated>2007-01-03T23:44:53Z</updated>

		<summary type="html">&lt;p&gt;Pebolle: Using Predesktop Area here is rather confusing&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=&amp;quot;100%&amp;quot;&lt;br /&gt;
|style=&amp;quot;vertical-align:top;padding-right:20px;width:10px;white-space:nowrap;&amp;quot; | __TOC__&lt;br /&gt;
|style=&amp;quot;vertical-align:top&amp;quot; |&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin: 0; margin-right:10px; border: 1px solid #dfdfdf; padding: 0em 1em 1em 1em; background-color:#F8F8FF; align:right;&amp;quot;&amp;gt;&lt;br /&gt;
=== The Hidden Protected Area ===&lt;br /&gt;
The Hidden Protected Area (also known as the Host Protected Area) is a special area (usually a few gigabytes in size) located at the end of a hard disk. It is preinstalled on the harddisks of some ThinkPads. It is normally hidden to the software running on your ThinkPad. It includes all the software and data needed to recover the preloaded state of the ThinkPad. The HPA also includes some diagnostic tools and a (MS Windows only) backup tool.&lt;br /&gt;
&lt;br /&gt;
The HPA was introduced with the R/T/X 40 series of ThinkPads. It is refered to as the Predesktop Area in the BIOS Setup Utility. Recent ThinkPads can have a (hidden) partition that is also called [[Predesktop Area|Predesktop Area]] in the BIOS Setup Utility. That (hidden) partition is not an HPA. More information can be found in [[Rescue and Recovery | Rescue and Recovery]],&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|style=&amp;quot;vertical-align:top;padding-right:10px;width:10px;white-space:nowrap;&amp;quot; | [[Image:hpa.jpg|IBM PreDesktop Area]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==General information about the HPA==&lt;br /&gt;
As opposed to [[Rescue and Recovery|Recovery Partitions]], Protected Service Areas (PSAs) such as the HPA are (let's say) images of partitions written to the end of a harddisk. They are only accessible through their BEER. The general idea is that, under control of the BIOS, the PSAs are totally hidden from all ordinary software, including malware (viruses, trojans, spyware). They are only accessible when permitted by the BIOS, and even then only through special HPA-aware tools. Under GNU/Linux they are only accessible with low level tools like dd.&lt;br /&gt;
&lt;br /&gt;
The HPA is based on [http://www.phoenix.com/en/Products/Trusted+Applications/Phoenix+FirstWare/default.htm Phoenix FirstWare]. FirstWare is (in short) an implementation of two technologies: BEER and PARTIES. (Yes, those names are correct!) BEER (Boot Engineering Extension Record) and PARTIES (Protected Area Run Time Interface Extension Services) are described in [http://www.t13.org/project/d1367r3-PARTIES.pdf this T13 working draft]. There is a more general introduction to PARTIES on the [http://www-1.ibm.com/support/docview.wss?rs=0&amp;amp;uid=psg1MIGR-51248&amp;amp;loc=en_US IBM site]. FirstWare depends on certain [http://en.wikipedia.org/wiki/Advanced_Technology_Attachment#ATA_standards_versions.2C_transfer_rates.2C_and_features ATA-5] commands, so it won't work with lower ATA level (earlier) drives or even with all ATA-5 drives. Unfortunately, there is no public HPA compatibility tester or list of compatible drives.&lt;br /&gt;
&lt;br /&gt;
Basically, what's going on is that the Phoenix BIOS commands the drive to hide the last few gigabytes of the hard disk (the HPA). The to non-HPA aware software, the drive appears to have a smaller size. Note that this is just a setting in the BIOS and can be disabled. The HPA can be accessed by pressing {{ibmkey|Access IBM|#495988}} or {{key|Enter}} at boot time. The BIOS will then parse the BEER (128 bytes, situated in the last sector of 512 bytes of the harddisk) and the &amp;quot;Directory of Services&amp;quot; (consisting of directory entries of 64 bytes each, starting in the last sector and spilling over into the previous sectors) to see what part of the HPA should be launched. In (most?) ThinkPads the BEER tells the BIOS to launch the Access IBM Predesktop Area. The system will then actually be booting into a (minimal) DOS environment which is able to launch a graphical shell (called Phoenix FirstSight). IBM has simply rebranded this graphical shell to the Access IBM Predesktop Area. From this graphical shell one can launch several tools (BIOS Setup Utility, diagnostic tools, recovery tools).&lt;br /&gt;
&lt;br /&gt;
==Three BIOS options==&lt;br /&gt;
The BIOS has three settings for the &amp;quot;IBM Predesktop Area&amp;quot; (in the Security category):&lt;br /&gt;
*Secure: No user or SW-initiated changes; Contents hidden from OS&lt;br /&gt;
*Normal: Change allowed; Contents hidden from OS&lt;br /&gt;
*Disabled: Not Usable; Visible and Reclaimable&lt;br /&gt;
&lt;br /&gt;
Normal is the default setting. One can boot into the Predesktop Area when either Secure or Normal is set. When Disabled is set the Predesktop Area will not boot. According to the [http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-46023 Predesktop Area white paper] the HPA is both &amp;quot;locked&amp;quot;{{footnote|1}} and &amp;quot;hidden&amp;quot; when Secure is set and only &amp;quot;hidden&amp;quot; when normal is set. In practice the result seems to be that the HPA is totally unavailable to the Linux kernel (and therefore all applications) when Secure is set. (The HPA should be unavailable in &amp;quot;Secure mode&amp;quot; for all operating systems, MS Windows included.) One would expect the HPA to be only accessable to HPA aware tools when Normal is set. However, recent kernels disable the HPA by default when Normal is set. Note that [http://marc.theaimsgroup.com/?l=linux-ide&amp;amp;w=2&amp;amp;r=1&amp;amp;s=Host+protected+area&amp;amp;q=b recent threads on linux-ide] suggest that the ThinkPad will reenable the HPA on resume and thus causing (possibly serious) conflicts with the GNU/Linux system (that assumes the HPA is still available).&lt;br /&gt;
&lt;br /&gt;
With Disabled you should be able to safely reclaim the area used by the HPA (to GNU/Linux it basically is unallocated space on the harddisk).&lt;br /&gt;
&lt;br /&gt;
==Details of the HPA==&lt;br /&gt;
Fabrice Bellet describes a [http://bellet.info/laptop/t40.html#the_predesktop_area technique he used] to explore the HPA of his ThinkPad T40, using GNU/Linux tools. This technique is only for the more curious or more careless people. It uses &amp;quot;dd&amp;quot; to copy the sectors on the harddisk containing the HPA from &amp;quot;/dev/hda&amp;quot; to a new file: when using &amp;quot;dd&amp;quot; on &amp;quot;/dev/hda&amp;quot; you are only one small typo away from an unrecoverable disaster!&lt;br /&gt;
&lt;br /&gt;
Here follows a more detailed description of the HPA on a ThinkPad T41 (60 GB harddisk) to contrast his findings.&lt;br /&gt;
&lt;br /&gt;
On this ThinkPad T41 the HPA is 3,4 GB in size. It contains 8 consecutive PSAs (Protected Service Areas). Six of those start with an x86 boot sector.&lt;br /&gt;
&lt;br /&gt;
* The first PSA is 3,2 GB in size. The OEM-ID of the boot sector is: &amp;quot;IBM  7.1&amp;quot;. It seems to hold a copy of the preloaded OS and everything needed to generate a bootable DVD-ROM for it, even an El Torito boot image and a boot catalog: see [[Backing up the preloaded OS]].&lt;br /&gt;
&lt;br /&gt;
* The second PSA is exactly 2 MB in size. According to its entry in the Directory of Service it's the &amp;quot;BIOSWORKAREA&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
* The third PSA is only 7,4 MB in size. The OEM-ID of the boot sector is: &amp;quot;MSWIN4.1&amp;quot;. It seems to be an image of a 1,44 MB bootable floppy disk (with MS DOS) and a directory containig 6 MB of FirstWare tools. It will be launched by the &amp;quot;Recover to factory contents&amp;quot; tool of the Predesktop Area. Those &amp;quot;factory contents&amp;quot; should be the data on the first PSA.&lt;br /&gt;
&lt;br /&gt;
* The fourth PSA is only 1,4 MB in size. The OEM-ID of the boot sector is: &amp;quot;IBM  7.1&amp;quot;. It too seems to be an image of a (sort of) 1,44 MB bootable floppy disk. It will be launched by the &amp;quot;Restore your backups&amp;quot; tool of the Predesktop Area.&lt;br /&gt;
&lt;br /&gt;
* The fifth PSA is again 7,4 MB in size. The OEM-ID of the boot sector is: &amp;quot;IBM  7.0&amp;quot;. It will be launched by the &amp;quot;Run diagnostics&amp;quot; tool of the Predesktop Area.&lt;br /&gt;
&lt;br /&gt;
* The sixth PSA is also 7,4 MB in size and the OEM-ID of the boot sector also is: &amp;quot;IBM  7.0&amp;quot;. It will be launched by the &amp;quot;Create diagnostic disks&amp;quot; tool of the Predesktop Area. It contains a copy of a (sort of) bootable 1,44 MB floppy disk, some tools and compressed copies of the diagnostic disks.&lt;br /&gt;
&lt;br /&gt;
* The seventh PSA is only 1,4 MB in size. The OEM-ID of the boot sector is &amp;quot;PHOENIX&amp;quot;. It seems to be a copy of a (sort of) 1.44 MB bootable floppy disk too and only contains a (minimal) DOS and the FirstSight application. Basically, this is the Access IBM Predesktop Area.&lt;br /&gt;
&lt;br /&gt;
* The eigth PSA is 101 MB in size. It doesn't have a boot sector. It contains the FirstWare Reserved Area. That probably is some sort of swap space for the FirstWare system.&lt;br /&gt;
&lt;br /&gt;
==Accessing the HPA from Linux==&lt;br /&gt;
While Fabrice Bellet's method, described in the previous section, works in many cases, it has some serious flaws. The most important one -- is that each PSA has to be formated (i.e. has to posses a filesystem), and the size this filesystem has to be equal to the size of the PSA. If the HPA has some sort of a swap partition, or the filesystem size is a few megabytes less than the PSA's size, then we will not be able to find any following PSA(s).&lt;br /&gt;
&lt;br /&gt;
A more systematic approach would be just to use the BEER record to find the exact LBA addresses of all PSA(s). The idea is to use the [http://www.t13.org/project/d1367r3-PARTIES.pdf T13 working draft] of the BEER specs. There is some serious discussion on this matter going on in [[Talk:Predesktop_Area|Talk:Predesktop_Area]], but so far they didn't release any code to the public. As an interim solution, we can use a free open-source [http://colimit.googlepages.com clone of the Phoenix utility fwdir]. If we first disable the &amp;quot;IBM Predesktop Area&amp;quot; in BIOS (which, essentially, sends appropriate SETMAX command to the harddrive), then the whole harddrive will be accessible from the userspace. Now, if we run fwdir, a typical output of this utility would look like&lt;br /&gt;
&amp;lt;div&amp;gt;&lt;br /&gt;
 #   ID  Name                           1st Sector Sectors Sec Icon Flag&lt;br /&gt;
&lt;br /&gt;
 0 0000h FirstWare Reserved Area         234231736  204800   0  00h  03h&lt;br /&gt;
 1 0001h CONSOLE                         234170510   61226   0  FCh  01h&lt;br /&gt;
 2 0140h Recover Pro                     234088523   81987   0  00h  01h&lt;br /&gt;
 3 0104h Factory Restore                 234085638    2885   0  03h  03h&lt;br /&gt;
 4 0120h RADA Data                       234020102   65536   0  00h  02h&lt;br /&gt;
 5 0108h Factory Data                    230026502 3993600   0  00h  02h&lt;br /&gt;
 6 0141h Recover Pro Records             229616902  409600   0  00h  02h&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
Once we know all the LBA addresses of the first sectors of all PSA(s) and their sizes, we can extract any particular PSA. E.g. the &amp;quot;Factory Data&amp;quot; PSA in this example can be extracted with&lt;br /&gt;
&amp;lt;div&amp;gt;&lt;br /&gt;
 dd if=/dev/hda of=/tmp/FacDat.img skip=230026502 count=3993600&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
But if we are only interested in the contents of this PSA partition, there is no need to extract it to a file and later mount it through a loop-device. It can be done right away with&lt;br /&gt;
&amp;lt;div&amp;gt;&lt;br /&gt;
 mount /dev/hda /mnt/fwdata -t vfat -o ro,offset=`expr 512 &amp;quot;*&amp;quot; 230026502`&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
Of course, there is no way to know in advance which particular filesystem each PSA has (if any). This still has to be found by trial and error (because &amp;quot;mount -t auto&amp;quot; does not always work). In the above example, the &amp;quot;CONSOLE&amp;quot; PSA is formated in ext2.&lt;br /&gt;
&lt;br /&gt;
==How to reclaim the HPA==&lt;br /&gt;
After disabling the &amp;quot;IBM Predesktop Area&amp;quot; (with the BIOS option &amp;quot;Disabled&amp;quot;, see above) it's possible to reclaim the area used by the HPA. Then one can include that area in a partition with standard tools (i.e. fdisk, mkfs) as it will be treated just as regular free space of the hard disk.&lt;br /&gt;
&lt;br /&gt;
==Alternative uses?==&lt;br /&gt;
It might be possible to use the FirstWare tools included in the HPA to make the HPA more useful for GNU/Linux purposes. For instance, the copy of the preloaded OS could be replaced with an emergency backup of your GNU/Linux distribution. Maybe the Predesktop area could be even used to boot into a GNU/Linux rescue system. Whether the Phoenix proprietary tools really allow alternative uses and whether those tools do not make it too hard to accomplish those cannot yet be said. It seems realistic to assume that the benefits of those alternative uses aren't worth the effort to accomplish them. Still, it might be fun (altough possibly hazardous to your system) to try ...&lt;br /&gt;
&lt;br /&gt;
==Problems caused by the HPA==&lt;br /&gt;
As of Linux 2.6.18, having a HPA may cause errors when resuming the laptop from suspend-to-RAM or suspend-to-disk.  See the section called &amp;quot;SectorIdNotFound disk errors when laptop is resumed&amp;quot; in [[Problems with ACPI suspend-to-ram | ACPI suspend problems]].&lt;br /&gt;
&lt;br /&gt;
==External Sources==&lt;br /&gt;
*[http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-46023 Predesktop Area white paper]&lt;br /&gt;
*[http://www-3.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-46025 Predesktop Aministrator Utility (DOS)]&lt;br /&gt;
*[http://webstore.ansi.org/ansidocstore/product.asp?sku=ANSI+INCITS+346-2001 Protected Area Run Time Interface Extension Services (PARTIES) ANSI INCITS 346-2001 ($30)]&lt;br /&gt;
*[http://www.t13.org/project/d1367r3-PARTIES.pdf The latest free draft of ANSI INCITS 346-2001 (BEER specs)]&lt;br /&gt;
*[http://www.phoenix.com/NR/rdonlyres/7465D3CF-B0E3-4F64-9122-47D9C83028D0/0/cme_firstware_wp.pdf Phoenix FirstWare White Paper]&lt;br /&gt;
*[http://www.win.tue.nl/~aeb/linux/Large-Disk-11.html Section 11 of the Large Disk HOWTO (Clipped disks)]&lt;br /&gt;
&lt;br /&gt;
==Models featuring this Technology==&lt;br /&gt;
*ThinkPad {{R40}}, {{R40e}}, {{R50}}, {{R50e}}, {{R50p}}, {{R51}}, {{R52}}&lt;br /&gt;
*ThinkPad {{T40}}, {{T40p}}, {{T41}}, {{T41p}}, {{T42}}, {{T42p}}, {{T43}}, {{T43p}}&lt;br /&gt;
*ThinkPad {{X31}}, {{X32}}, {{X40}}, {{X41}}, {{X41T}}&lt;br /&gt;
*ThinkPad {{Z61m}}&lt;br /&gt;
&lt;br /&gt;
{{footnotes|&lt;br /&gt;
# Presumably by having the BIOS use the SET MAX security extension. The BIOS seems to set a password for the HPA at boot (using the SETMAX-SET PASSWORD command) and after that use that password to issue a SETMAX-LOCK command. Since the password is unknown (and most likely changes at every Secure boot) the HPA is inaccessable to all programs running on the ThinkPad.&amp;lt;BR&amp;gt;&amp;lt;BR&amp;gt;Something similar would be possible running in Normal mode. Then a program could issue the SETMAX-SET PASSWORD command. At the moment there's no program running under GNU/Linux capable of doing that. Of course this is possibly less secure: it's (theoretically) possible that other (rogue) programs get hold of that password.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Glossary]]&lt;/div&gt;</summary>
		<author><name>Pebolle</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Rescue_and_Recovery&amp;diff=23000</id>
		<title>Rescue and Recovery</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Rescue_and_Recovery&amp;diff=23000"/>
		<updated>2006-06-28T21:21:35Z</updated>

		<summary type="html">&lt;p&gt;Pebolle: third try&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=&amp;quot;100%&amp;quot;&lt;br /&gt;
|style=&amp;quot;vertical-align:top;padding-right:20px;width:10px;&amp;quot; | __NOTOC__&lt;br /&gt;
|style=&amp;quot;vertical-align:top&amp;quot; |&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin: 0; margin-right:10px; border: 1px solid #dfdfdf; padding: 0em 1em 1em 1em; background-color:#F8F8FF; align:right;&amp;quot;&amp;gt;&lt;br /&gt;
===Rescue and Recovery===&lt;br /&gt;
Rescue and Recovery version 3.0 consists of a bootable partition containing various system recovery tools, including full recovery of the preinstalled Windows XP partition. It can be activated by pressing the {{ibmkey|ThinkPad|#494949}}, {{ibmkey|Access IBM|#495988}} or {{ibmkey|ThinkVantage|#495988}} [[ThinkPad Button|Button]] during system boot. It contains a FAT filesystem (labeled &amp;quot;IBM_SERVICE&amp;quot;), and has partition type 0x12 (&amp;quot;Compaq diagnostics&amp;quot; in &amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
As opposed to a [[Hidden Protected Area|Hidden Protected Area]] Recovery partitions are ordinary partitions, accessible through the partition table. As they are ordinary partitions they are accessible by ordinary partitioning tools. They should be dealt carefully with.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
==Proper MBR==&lt;br /&gt;
{{WARN|Only tinker with the MBR and the Rescue and Recovery partition if you know what you're doing. Mistakes can leave the system unbootable and can make it very difficult to retrieve the data on the harddisk.}}&lt;br /&gt;
&lt;br /&gt;
Consideration 6 of the Readme states:&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&amp;quot;The Master Boot Record (MBR) must be configured properly for the Rescue and Recovery application to function properly.  When possible, the Rescue and Recovery application attempts to ensure the proper configuration of the MBR.  This can only occur if the Rescue and Recovery application is installed after other applications that requires the MBR.&amp;quot;&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Apparently, the MBR is not &amp;quot;configured properly&amp;quot; if LILO or GRUB have written it. The following is the case:&lt;br /&gt;
*the default bootloader seems to ignore the active bit and always boots the first partition instead&lt;br /&gt;
*the default bootloader contains code to catch a press of the appropriate button during bootup and launch the Rescue and Recovery application in that case&lt;br /&gt;
*before launching the Rescue and Recovery application at system boot, the default bootloader changes the partition type of the Rescue and Recovery partiton to 0x0b, otherwise it changes it to 0x12 (to hide it from Windows)&lt;br /&gt;
*the Rescue and Recovery application assumes that the first partition contains Windows&lt;br /&gt;
*the Rescue and Recovery partition needs to be of type 0x0b (FAT32) otherwise the default bootloader will not launch the Rescue and Recovery application&lt;br /&gt;
&lt;br /&gt;
Since neither LILO nor GRUB catch the press of the button (an undocumented mechanism anyway) it is not possible to launch the Rescue and Recovery application by pressing the appropriate button during system boot, once LILO or GRUB have altered the MBR for their boot procedure.&lt;br /&gt;
&lt;br /&gt;
IBM provides a program to manage the Rescue and Recovery bootloader. It is located in {{path|C:\Program Files\IBM ThinkVantage\Common\BMGR}}. It can select the partition to boot, and also allows for rewriting the MBR if it was written by another bootloader.&lt;br /&gt;
&lt;br /&gt;
===MBR written by GRUB===&lt;br /&gt;
If the MBR was written by GRUB you can still use GRUB to launch the Rescue and Recovery application. However if you leave the type of the Rescue and Recovery partition to 0x12 (Compaq diagnostics), this will result in an error message &amp;quot;c000021a, Fatal System Error&amp;quot; if you try to launch it. To avoid that and to make sure the recovery partition always is of the right type, add a line to change the partition type to 0x0b to the Rescue and Recovery partition's entry in your {{path|/boot/grub/menu.lst}}. Assuming your Rescue and Recovery partition is the second partition, it could look like this:&lt;br /&gt;
  title           IBM Rescue and Recovery&lt;br /&gt;
  root            (hd0,1)&lt;br /&gt;
  '''parttype        (hd0,1) 0x0b'''&lt;br /&gt;
  '''unhide          (hd0,1)'''&lt;br /&gt;
  chainloader     +1&lt;br /&gt;
&lt;br /&gt;
Also add an &amp;lt;tt&amp;gt;unhide&amp;lt;/tt&amp;gt; line here because we are going to hide the Rescue and Recovery partition on every boot of Windows, so we need to unhide it, when the recovery partition is booted. This is because if we don't hide the partition when booting Windows, it would be visible and accessable there and that's not what we want. So, assuming that Windows is on the first partition, the Windows entry could now look like this:&lt;br /&gt;
  title           Windows&lt;br /&gt;
  root            (hd0,0)&lt;br /&gt;
  '''hide            (hd0,1)'''&lt;br /&gt;
  chainloader     +1&lt;br /&gt;
&lt;br /&gt;
===GRUB in a partitions boot sector===&lt;br /&gt;
A way to have your Access IBM button still functional on bootup, is to create a separate {{path|/boot}} partition, install GRUB to that partition and make it active. This will leave the MBR untouched.&lt;br /&gt;
{{NOTE|If the above finding is true that the MBR ignores the active bit, that partition has to be the first one. In most recent Linux distributions it is not easy to create /boot as first partition and shrink the Windows partition. In that case the Windows bootloader can be used to boot Windows and Linux, also preserving the Rescue and Recovery functionality. See below.}}&lt;br /&gt;
*In the BIOS, set the IBM Predesktop Area to 'Secure'.&lt;br /&gt;
*Boot your Linux distribution's installation CD.&lt;br /&gt;
*Follow the instructions and go through the regular installation process.&lt;br /&gt;
*Create a primary partition for /boot (the other stuff can go into the extended partitions) and when the time comes to install GRUB, make sure you install it into the boot sector of the boot partition.&lt;br /&gt;
*Set this boot partition as active.&lt;br /&gt;
&lt;br /&gt;
===Using NTLDR to boot Linux===&lt;br /&gt;
It is possible to configure the Windows bootloader to also boot Linux (installed on separate partition). This allows to preserve the Rescue and Recovery functionality at system boot (as MBR is not modified), Windows XP (booted via its native bootloader) and Linux (booted from its own partition by Windows XP bootloader). A quick and dirty howto, regarding applying this procedure to Ubuntu Dapper Drake installation can be found [http://http://gawrysiak.org/corvus/?p=4 here].&lt;br /&gt;
&lt;br /&gt;
==Older versions of Rescue and Recovery==&lt;br /&gt;
Some Thinkpads (e.g., T23 and T30) do not come with a Recovery CD, but also do not support the [[Hidden Protected Area]].  These ThinkPads have an older version of Rescue and Recovery preloaded on the hard disk to implement the factory recovery function.  Most of the comments above also apply to the older versions, with the following differences:&lt;br /&gt;
*The recovery partition type is 0x1c, hidden FAT32, LBA-mapped (or 0xc when unhidden).&lt;br /&gt;
*The boot manager program is in {{path|C:\IBMTOOLS\RECOVERY}} and only runs in a 16-bit DOS environment&lt;br /&gt;
{{Fixme|name of this boot manager needed}}&lt;br /&gt;
*The IBM Predesktop area runs atop of Windows 98 (command-line) instead of WinPE&lt;br /&gt;
&lt;br /&gt;
==External Sources==&lt;br /&gt;
* IBM page on [http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-4Q2QAK ThinkVantage Rescue and Recovery].&lt;br /&gt;
* [ftp://ftp.software.ibm.com/pc/pccbbs/thinkvantage_en/tvtrnr3_1027en.txt Rescue and Recovery Readme]&lt;br /&gt;
* [http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-46088 IBM page about accessing the Recovery Partition if Linux has been installed and the F11 button no longer works]&lt;br /&gt;
* [http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-54483 IBM Rescue and Recovery repair diskette]&lt;br /&gt;
&lt;br /&gt;
==Models featuring this technology==&lt;br /&gt;
* ThinkPad {{T23}}, {{T30}} (R&amp;amp;R 2.0)&lt;br /&gt;
* ThinkPad {{T42}}&lt;br /&gt;
* ThinkPad {{T43}}, {{T43p}}&lt;br /&gt;
* ThinkPad {{R52}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Glossary]]&lt;/div&gt;</summary>
		<author><name>Pebolle</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Rescue_and_Recovery&amp;diff=22999</id>
		<title>Rescue and Recovery</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Rescue_and_Recovery&amp;diff=22999"/>
		<updated>2006-06-28T21:15:38Z</updated>

		<summary type="html">&lt;p&gt;Pebolle: oops&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=&amp;quot;100%&amp;quot;&lt;br /&gt;
|style=&amp;quot;vertical-align:top;padding-right:20px;width:10px;&amp;quot; | __NOTOC__&lt;br /&gt;
|style=&amp;quot;vertical-align:top&amp;quot; |&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin: 0; margin-right:10px; border: 1px solid #dfdfdf; padding: 0em 1em 1em 1em; background-color:#F8F8FF; align:right;&amp;quot;&amp;gt;&lt;br /&gt;
===Rescue and Recovery===&lt;br /&gt;
Rescue and Recovery version 3.0 consists of a bootable partition containing various system recovery tools, including full recovery of the preinstalled Windows XP partition. It can be activated by pressing the {{ibmkey|ThinkPad|#494949}}, {{ibmkey|Access IBM|#495988}} or {{ibmkey|ThinkVantage|#495988}} [[ThinkPad Button|Button]] during system boot. It contains a FAT filesystem (labeled &amp;quot;IBM_SERVICE&amp;quot;), and has partition type 0x12 (&amp;quot;Compaq diagnostics&amp;quot; in &amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
As opposed to a [[Hidden Protected Area|Hidden Protected Area]] Recovery partitions are ordinary partitions, accessible through the partition table. As they are ordinary partitions they are accessible by ordinary partitioning tools. They should be dealt carefully with.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
==Proper MBR==&lt;br /&gt;
{{WARN|Only tinker with the MBR and the Rescue and Recovery partition if you know what you're doing. Mistakes can leave the system unbootable and can make it very difficult to retrieve the data on the harddisk.}}&lt;br /&gt;
&lt;br /&gt;
Consideration 6 of the Readme states:&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&amp;quot;The Master Boot Record (MBR) must be configured properly for the Rescue and Recovery application to function properly.  When possible, the Rescue and Recovery application attempts to ensure the proper configuration of the MBR.  This can only occur if the Rescue and Recovery application is installed after other applications that requires the MBR.&amp;quot;&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Apparently, the MBR is not &amp;quot;configured properly&amp;quot; if LILO or GRUB have written it. The following is the case:&lt;br /&gt;
*the default bootloader seems to ignore the active bit and always boots the first partition instead&lt;br /&gt;
*the default bootloader contains code to catch a press of the appropriate button during bootup and launch the Rescue and Recovery application in that case&lt;br /&gt;
*before launching the Rescue and Recovery application at system boot, the default bootloader changes the partition type of the Rescue and Recovery partiton to 0x0b, otherwise it changes it to 0x12 (to hide it from Windows)&lt;br /&gt;
*the Rescue and Recovery application assumes that the first partition contains Windows&lt;br /&gt;
*the Rescue and Recovery partition needs to be of type 0x0b (FAT32) otherwise the default bootloader will not launch the Rescue and Recovery application&lt;br /&gt;
&lt;br /&gt;
Since neither LILO nor GRUB catch the press of the button (an undocumented mechanism anyway) it is not possible to launch the Rescue and Recovery application by pressing the appropriate button during system boot, once LILO or GRUB have altered the MBR for their boot procedure.&lt;br /&gt;
&lt;br /&gt;
IBM provides a program to manage the Rescue and Recovery bootloader. It is located in {{path|C:\Program Files\IBM ThinkVantage\Common\BMGR}}. It can select the partition to boot, and also allows for rewriting the MBR if it was written by another bootloader.&lt;br /&gt;
&lt;br /&gt;
===MBR written by GRUB===&lt;br /&gt;
If the MBR was written by GRUB you can still use GRUB to launch the Rescue and Recovery application. However if you leave the type of the Rescue and Recovery partition to 0x12 (Compaq diagnostics), this will result in an error message &amp;quot;c000021a, Fatal System Error&amp;quot; if you try to launch it. To avoid that and to make sure the recovery partition always is of the right type, add a line to change the partition type to 0x0b to the Rescue and Recovery partition's entry in your {{path|/boot/grub/menu.lst}}. Assuming your Rescue and Recovery partition is the second partition, it could look like this:&lt;br /&gt;
  title           IBM Rescue and Recovery&lt;br /&gt;
  root            (hd0,1)&lt;br /&gt;
  '''parttype        (hd0,1) 0x0b'''&lt;br /&gt;
  '''unhide          (hd0,1)'''&lt;br /&gt;
  chainloader     +1&lt;br /&gt;
&lt;br /&gt;
Also add an &amp;lt;tt&amp;gt;unhide&amp;lt;/tt&amp;gt; line here because we are going to hide the Rescue and Recovery partition on every boot of Windows, so we need to unhide it, when the recovery partition is booted. This is because if we don't hide the partition when booting Windows, it would be visible and accessable there and that's not what we want. So, assuming that Windows is on the first partition, the Windows entry could now look like this:&lt;br /&gt;
  title           Windows&lt;br /&gt;
  root            (hd0,0)&lt;br /&gt;
  '''hide            (hd0,1)'''&lt;br /&gt;
  chainloader     +1&lt;br /&gt;
&lt;br /&gt;
===GRUB in a partitions boot sector===&lt;br /&gt;
A way to have your Access IBM button still functional on bootup, is to create a separate {{path|/boot}} partition, install GRUB to that partition and make it active. This will leave the MBR untouched.&lt;br /&gt;
{{NOTE|If the above finding is true that the MBR ignores the active bit, that partition has to be the first one. In most recent Linux distributions it is not easy to create /boot as first partition and shrink the Windows partition. In that case the Windows bootloader can be used to boot Windows and Linux, also preserving the Rescue and Recovery functionality. See below.}}&lt;br /&gt;
*In the BIOS, set the IBM Predesktop Area to 'Secure'.&lt;br /&gt;
*Boot your Linux distribution's installation CD.&lt;br /&gt;
*Follow the instructions and go through the regular installation process.&lt;br /&gt;
*Create a primary partition for /boot (the other stuff can go into the extended partitions) and when the time comes to install GRUB, make sure you install it into the boot sector of the boot partition.&lt;br /&gt;
*Set this boot partition as active.&lt;br /&gt;
&lt;br /&gt;
===Using NTLDR to boot Linux===&lt;br /&gt;
It is possible to configure the Windows bootloader to also boot Linux (installed on separate partition). This allows to preserve the Rescue and Recovery functionality at system boot (as MBR is not modified), Windows XP (booted via its native bootloader) and Linux (booted from its own partition by Windows XP bootloader). A quick and dirty howto, regarding applying this procedure to Ubuntu Dapper Drake installation can be found [http://http://gawrysiak.org/corvus/?p=4 here].&lt;br /&gt;
&lt;br /&gt;
==Older versions of Rescue and Recovery==&lt;br /&gt;
Some Thinkpads (e.g., T23 and T30) do not come with a Recovery CD, but also do not support the [[Hidden Protected Area]].  These ThinkPads have an older version of Rescue and Recovery preloaded on the hard disk to implement the factory recovery function.  Most of the comments above also apply to the older versions, with the following differences:&lt;br /&gt;
*The recovery partition type is 0x1c, hidden FAT32, LBA-mapped (or 0xc when unhidden).&lt;br /&gt;
*The boot manager program is in {{path|C:\IBMTOOLS\RECOVERY}} and only runs in a 16-bit DOS environment&lt;br /&gt;
{{FIXME|name of this boot manager needed}}&lt;br /&gt;
*The IBM Predesktop area runs atop of Windows 98 (command-line) instead of WinPE&lt;br /&gt;
&lt;br /&gt;
==External Sources==&lt;br /&gt;
* IBM page on [http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-4Q2QAK ThinkVantage Rescue and Recovery].&lt;br /&gt;
* [ftp://ftp.software.ibm.com/pc/pccbbs/thinkvantage_en/tvtrnr3_1027en.txt Rescue and Recovery Readme]&lt;br /&gt;
* [http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-46088 IBM page about accessing the Recovery Partition if Linux has been installed and the F11 button no longer works]&lt;br /&gt;
* [http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-54483 IBM Rescue and Recovery repair diskette]&lt;br /&gt;
&lt;br /&gt;
==Models featuring this technology==&lt;br /&gt;
* ThinkPad {{T23}}, {{T30}} (R&amp;amp;R 2.0)&lt;br /&gt;
* ThinkPad {{T42}}&lt;br /&gt;
* ThinkPad {{T43}}, {{T43p}}&lt;br /&gt;
* ThinkPad {{R52}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Glossary]]&lt;/div&gt;</summary>
		<author><name>Pebolle</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Rescue_and_Recovery&amp;diff=22998</id>
		<title>Rescue and Recovery</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Rescue_and_Recovery&amp;diff=22998"/>
		<updated>2006-06-28T21:13:16Z</updated>

		<summary type="html">&lt;p&gt;Pebolle: Name of the old boot manager?&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=&amp;quot;100%&amp;quot;&lt;br /&gt;
|style=&amp;quot;vertical-align:top;padding-right:20px;width:10px;&amp;quot; | __NOTOC__&lt;br /&gt;
|style=&amp;quot;vertical-align:top&amp;quot; |&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin: 0; margin-right:10px; border: 1px solid #dfdfdf; padding: 0em 1em 1em 1em; background-color:#F8F8FF; align:right;&amp;quot;&amp;gt;&lt;br /&gt;
===Rescue and Recovery===&lt;br /&gt;
Rescue and Recovery version 3.0 consists of a bootable partition containing various system recovery tools, including full recovery of the preinstalled Windows XP partition. It can be activated by pressing the {{ibmkey|ThinkPad|#494949}}, {{ibmkey|Access IBM|#495988}} or {{ibmkey|ThinkVantage|#495988}} [[ThinkPad Button|Button]] during system boot. It contains a FAT filesystem (labeled &amp;quot;IBM_SERVICE&amp;quot;), and has partition type 0x12 (&amp;quot;Compaq diagnostics&amp;quot; in &amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
As opposed to a [[Hidden Protected Area|Hidden Protected Area]] Recovery partitions are ordinary partitions, accessible through the partition table. As they are ordinary partitions they are accessible by ordinary partitioning tools. They should be dealt carefully with.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
==Proper MBR==&lt;br /&gt;
{{WARN|Only tinker with the MBR and the Rescue and Recovery partition if you know what you're doing. Mistakes can leave the system unbootable and can make it very difficult to retrieve the data on the harddisk.}}&lt;br /&gt;
&lt;br /&gt;
Consideration 6 of the Readme states:&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&amp;quot;The Master Boot Record (MBR) must be configured properly for the Rescue and Recovery application to function properly.  When possible, the Rescue and Recovery application attempts to ensure the proper configuration of the MBR.  This can only occur if the Rescue and Recovery application is installed after other applications that requires the MBR.&amp;quot;&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Apparently, the MBR is not &amp;quot;configured properly&amp;quot; if LILO or GRUB have written it. The following is the case:&lt;br /&gt;
*the default bootloader seems to ignore the active bit and always boots the first partition instead&lt;br /&gt;
*the default bootloader contains code to catch a press of the appropriate button during bootup and launch the Rescue and Recovery application in that case&lt;br /&gt;
*before launching the Rescue and Recovery application at system boot, the default bootloader changes the partition type of the Rescue and Recovery partiton to 0x0b, otherwise it changes it to 0x12 (to hide it from Windows)&lt;br /&gt;
*the Rescue and Recovery application assumes that the first partition contains Windows&lt;br /&gt;
*the Rescue and Recovery partition needs to be of type 0x0b (FAT32) otherwise the default bootloader will not launch the Rescue and Recovery application&lt;br /&gt;
&lt;br /&gt;
Since neither LILO nor GRUB catch the press of the button (an undocumented mechanism anyway) it is not possible to launch the Rescue and Recovery application by pressing the appropriate button during system boot, once LILO or GRUB have altered the MBR for their boot procedure.&lt;br /&gt;
&lt;br /&gt;
IBM provides a program to manage the Rescue and Recovery bootloader. It is located in {{path|C:\Program Files\IBM ThinkVantage\Common\BMGR}}. It can select the partition to boot, and also allows for rewriting the MBR if it was written by another bootloader.&lt;br /&gt;
&lt;br /&gt;
===MBR written by GRUB===&lt;br /&gt;
If the MBR was written by GRUB you can still use GRUB to launch the Rescue and Recovery application. However if you leave the type of the Rescue and Recovery partition to 0x12 (Compaq diagnostics), this will result in an error message &amp;quot;c000021a, Fatal System Error&amp;quot; if you try to launch it. To avoid that and to make sure the recovery partition always is of the right type, add a line to change the partition type to 0x0b to the Rescue and Recovery partition's entry in your {{path|/boot/grub/menu.lst}}. Assuming your Rescue and Recovery partition is the second partition, it could look like this:&lt;br /&gt;
  title           IBM Rescue and Recovery&lt;br /&gt;
  root            (hd0,1)&lt;br /&gt;
  '''parttype        (hd0,1) 0x0b'''&lt;br /&gt;
  '''unhide          (hd0,1)'''&lt;br /&gt;
  chainloader     +1&lt;br /&gt;
&lt;br /&gt;
Also add an &amp;lt;tt&amp;gt;unhide&amp;lt;/tt&amp;gt; line here because we are going to hide the Rescue and Recovery partition on every boot of Windows, so we need to unhide it, when the recovery partition is booted. This is because if we don't hide the partition when booting Windows, it would be visible and accessable there and that's not what we want. So, assuming that Windows is on the first partition, the Windows entry could now look like this:&lt;br /&gt;
  title           Windows&lt;br /&gt;
  root            (hd0,0)&lt;br /&gt;
  '''hide            (hd0,1)'''&lt;br /&gt;
  chainloader     +1&lt;br /&gt;
&lt;br /&gt;
===GRUB in a partitions boot sector===&lt;br /&gt;
A way to have your Access IBM button still functional on bootup, is to create a separate {{path|/boot}} partition, install GRUB to that partition and make it active. This will leave the MBR untouched.&lt;br /&gt;
{{NOTE|If the above finding is true that the MBR ignores the active bit, that partition has to be the first one. In most recent Linux distributions it is not easy to create /boot as first partition and shrink the Windows partition. In that case the Windows bootloader can be used to boot Windows and Linux, also preserving the Rescue and Recovery functionality. See below.}}&lt;br /&gt;
*In the BIOS, set the IBM Predesktop Area to 'Secure'.&lt;br /&gt;
*Boot your Linux distribution's installation CD.&lt;br /&gt;
*Follow the instructions and go through the regular installation process.&lt;br /&gt;
*Create a primary partition for /boot (the other stuff can go into the extended partitions) and when the time comes to install GRUB, make sure you install it into the boot sector of the boot partition.&lt;br /&gt;
*Set this boot partition as active.&lt;br /&gt;
&lt;br /&gt;
===Using NTLDR to boot Linux===&lt;br /&gt;
It is possible to configure the Windows bootloader to also boot Linux (installed on separate partition). This allows to preserve the Rescue and Recovery functionality at system boot (as MBR is not modified), Windows XP (booted via its native bootloader) and Linux (booted from its own partition by Windows XP bootloader). A quick and dirty howto, regarding applying this procedure to Ubuntu Dapper Drake installation can be found [http://http://gawrysiak.org/corvus/?p=4 here].&lt;br /&gt;
&lt;br /&gt;
==Older versions of Rescue and Recovery==&lt;br /&gt;
Some Thinkpads (e.g., T23 and T30) do not come with a Recovery CD, but also do not support the [[Hidden Protected Area]].  These ThinkPads have an older version of Rescue and Recovery preloaded on the hard disk to implement the factory recovery function.  Most of the comments above also apply to the older versions, with the following differences:&lt;br /&gt;
*The recovery partition type is 0x1c, hidden FAT32, LBA-mapped (or 0xc when unhidden).&lt;br /&gt;
*The boot manager program is in {{path|C:\IBMTOOLS\RECOVERY}} and only runs in a 16-bit DOS environment&lt;br /&gt;
{{Fixme:name of this boot manager needed}}&lt;br /&gt;
*The IBM Predesktop area runs atop of Windows 98 (command-line) instead of WinPE&lt;br /&gt;
&lt;br /&gt;
==External Sources==&lt;br /&gt;
* IBM page on [http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-4Q2QAK ThinkVantage Rescue and Recovery].&lt;br /&gt;
* [ftp://ftp.software.ibm.com/pc/pccbbs/thinkvantage_en/tvtrnr3_1027en.txt Rescue and Recovery Readme]&lt;br /&gt;
* [http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-46088 IBM page about accessing the Recovery Partition if Linux has been installed and the F11 button no longer works]&lt;br /&gt;
* [http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-54483 IBM Rescue and Recovery repair diskette]&lt;br /&gt;
&lt;br /&gt;
==Models featuring this technology==&lt;br /&gt;
* ThinkPad {{T23}}, {{T30}} (R&amp;amp;R 2.0)&lt;br /&gt;
* ThinkPad {{T42}}&lt;br /&gt;
* ThinkPad {{T43}}, {{T43p}}&lt;br /&gt;
* ThinkPad {{R52}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Glossary]]&lt;/div&gt;</summary>
		<author><name>Pebolle</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Rescue_and_Recovery&amp;diff=22997</id>
		<title>Rescue and Recovery</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Rescue_and_Recovery&amp;diff=22997"/>
		<updated>2006-06-28T21:10:53Z</updated>

		<summary type="html">&lt;p&gt;Pebolle: s/&amp;amp;/and/&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=&amp;quot;100%&amp;quot;&lt;br /&gt;
|style=&amp;quot;vertical-align:top;padding-right:20px;width:10px;&amp;quot; | __NOTOC__&lt;br /&gt;
|style=&amp;quot;vertical-align:top&amp;quot; |&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin: 0; margin-right:10px; border: 1px solid #dfdfdf; padding: 0em 1em 1em 1em; background-color:#F8F8FF; align:right;&amp;quot;&amp;gt;&lt;br /&gt;
===Rescue and Recovery===&lt;br /&gt;
Rescue and Recovery version 3.0 consists of a bootable partition containing various system recovery tools, including full recovery of the preinstalled Windows XP partition. It can be activated by pressing the {{ibmkey|ThinkPad|#494949}}, {{ibmkey|Access IBM|#495988}} or {{ibmkey|ThinkVantage|#495988}} [[ThinkPad Button|Button]] during system boot. It contains a FAT filesystem (labeled &amp;quot;IBM_SERVICE&amp;quot;), and has partition type 0x12 (&amp;quot;Compaq diagnostics&amp;quot; in &amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
As opposed to a [[Hidden Protected Area|Hidden Protected Area]] Recovery partitions are ordinary partitions, accessible through the partition table. As they are ordinary partitions they are accessible by ordinary partitioning tools. They should be dealt carefully with.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
==Proper MBR==&lt;br /&gt;
{{WARN|Only tinker with the MBR and the Rescue and Recovery partition if you know what you're doing. Mistakes can leave the system unbootable and can make it very difficult to retrieve the data on the harddisk.}}&lt;br /&gt;
&lt;br /&gt;
Consideration 6 of the Readme states:&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&amp;quot;The Master Boot Record (MBR) must be configured properly for the Rescue and Recovery application to function properly.  When possible, the Rescue and Recovery application attempts to ensure the proper configuration of the MBR.  This can only occur if the Rescue and Recovery application is installed after other applications that requires the MBR.&amp;quot;&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Apparently, the MBR is not &amp;quot;configured properly&amp;quot; if LILO or GRUB have written it. The following is the case:&lt;br /&gt;
*the default bootloader seems to ignore the active bit and always boots the first partition instead&lt;br /&gt;
*the default bootloader contains code to catch a press of the appropriate button during bootup and launch the Rescue and Recovery application in that case&lt;br /&gt;
*before launching the Rescue and Recovery application at system boot, the default bootloader changes the partition type of the Rescue and Recovery partiton to 0x0b, otherwise it changes it to 0x12 (to hide it from Windows)&lt;br /&gt;
*the Rescue and Recovery application assumes that the first partition contains Windows&lt;br /&gt;
*the Rescue and Recovery partition needs to be of type 0x0b (FAT32) otherwise the default bootloader will not launch the Rescue and Recovery application&lt;br /&gt;
&lt;br /&gt;
Since neither LILO nor GRUB catch the press of the button (an undocumented mechanism anyway) it is not possible to launch the Rescue and Recovery application by pressing the appropriate button during system boot, once LILO or GRUB have altered the MBR for their boot procedure.&lt;br /&gt;
&lt;br /&gt;
IBM provides a program to manage the Rescue and Recovery bootloader. It is located in {{path|C:\Program Files\IBM ThinkVantage\Common\BMGR}}. It can select the partition to boot, and also allows for rewriting the MBR if it was written by another bootloader.&lt;br /&gt;
&lt;br /&gt;
===MBR written by GRUB===&lt;br /&gt;
If the MBR was written by GRUB you can still use GRUB to launch the Rescue and Recovery application. However if you leave the type of the Rescue and Recovery partition to 0x12 (Compaq diagnostics), this will result in an error message &amp;quot;c000021a, Fatal System Error&amp;quot; if you try to launch it. To avoid that and to make sure the recovery partition always is of the right type, add a line to change the partition type to 0x0b to the Rescue and Recovery partition's entry in your {{path|/boot/grub/menu.lst}}. Assuming your Rescue and Recovery partition is the second partition, it could look like this:&lt;br /&gt;
  title           IBM Rescue and Recovery&lt;br /&gt;
  root            (hd0,1)&lt;br /&gt;
  '''parttype        (hd0,1) 0x0b'''&lt;br /&gt;
  '''unhide          (hd0,1)'''&lt;br /&gt;
  chainloader     +1&lt;br /&gt;
&lt;br /&gt;
Also add an &amp;lt;tt&amp;gt;unhide&amp;lt;/tt&amp;gt; line here because we are going to hide the Rescue and Recovery partition on every boot of Windows, so we need to unhide it, when the recovery partition is booted. This is because if we don't hide the partition when booting Windows, it would be visible and accessable there and that's not what we want. So, assuming that Windows is on the first partition, the Windows entry could now look like this:&lt;br /&gt;
  title           Windows&lt;br /&gt;
  root            (hd0,0)&lt;br /&gt;
  '''hide            (hd0,1)'''&lt;br /&gt;
  chainloader     +1&lt;br /&gt;
&lt;br /&gt;
===GRUB in a partitions boot sector===&lt;br /&gt;
A way to have your Access IBM button still functional on bootup, is to create a separate {{path|/boot}} partition, install GRUB to that partition and make it active. This will leave the MBR untouched.&lt;br /&gt;
{{NOTE|If the above finding is true that the MBR ignores the active bit, that partition has to be the first one. In most recent Linux distributions it is not easy to create /boot as first partition and shrink the Windows partition. In that case the Windows bootloader can be used to boot Windows and Linux, also preserving the Rescue and Recovery functionality. See below.}}&lt;br /&gt;
*In the BIOS, set the IBM Predesktop Area to 'Secure'.&lt;br /&gt;
*Boot your Linux distribution's installation CD.&lt;br /&gt;
*Follow the instructions and go through the regular installation process.&lt;br /&gt;
*Create a primary partition for /boot (the other stuff can go into the extended partitions) and when the time comes to install GRUB, make sure you install it into the boot sector of the boot partition.&lt;br /&gt;
*Set this boot partition as active.&lt;br /&gt;
&lt;br /&gt;
===Using NTLDR to boot Linux===&lt;br /&gt;
It is possible to configure the Windows bootloader to also boot Linux (installed on separate partition). This allows to preserve the Rescue and Recovery functionality at system boot (as MBR is not modified), Windows XP (booted via its native bootloader) and Linux (booted from its own partition by Windows XP bootloader). A quick and dirty howto, regarding applying this procedure to Ubuntu Dapper Drake installation can be found [http://http://gawrysiak.org/corvus/?p=4 here].&lt;br /&gt;
&lt;br /&gt;
==Older versions of Rescue and Recovery==&lt;br /&gt;
Some Thinkpads (e.g., T23 and T30) do not come with a Recovery CD, but also do not support the [[Hidden Protected Area]].  These ThinkPads have an older version of Rescue and Recovery preloaded on the hard disk to implement the factory recovery function.  Most of the comments above also apply to the older versions, with the following differences:&lt;br /&gt;
*The recovery partition type is 0x1c, hidden FAT32, LBA-mapped (or 0xc when unhidden).&lt;br /&gt;
*The boot manager program is in {{path|C:\IBMTOOLS\RECOVERY}} and only runs in a 16-bit DOS environment&lt;br /&gt;
*The IBM Predesktop area runs atop of Windows 98 (command-line) instead of WinPE&lt;br /&gt;
&lt;br /&gt;
==External Sources==&lt;br /&gt;
* IBM page on [http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-4Q2QAK ThinkVantage Rescue and Recovery].&lt;br /&gt;
* [ftp://ftp.software.ibm.com/pc/pccbbs/thinkvantage_en/tvtrnr3_1027en.txt Rescue and Recovery Readme]&lt;br /&gt;
* [http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-46088 IBM page about accessing the Recovery Partition if Linux has been installed and the F11 button no longer works]&lt;br /&gt;
* [http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-54483 IBM Rescue and Recovery repair diskette]&lt;br /&gt;
&lt;br /&gt;
==Models featuring this technology==&lt;br /&gt;
* ThinkPad {{T23}}, {{T30}} (R&amp;amp;R 2.0)&lt;br /&gt;
* ThinkPad {{T42}}&lt;br /&gt;
* ThinkPad {{T43}}, {{T43p}}&lt;br /&gt;
* ThinkPad {{R52}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Glossary]]&lt;/div&gt;</summary>
		<author><name>Pebolle</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Rescue_and_Recovery&amp;diff=22996</id>
		<title>Rescue and Recovery</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Rescue_and_Recovery&amp;diff=22996"/>
		<updated>2006-06-28T21:08:51Z</updated>

		<summary type="html">&lt;p&gt;Pebolle: typo; clarifications&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=&amp;quot;100%&amp;quot;&lt;br /&gt;
|style=&amp;quot;vertical-align:top;padding-right:20px;width:10px;&amp;quot; | __NOTOC__&lt;br /&gt;
|style=&amp;quot;vertical-align:top&amp;quot; |&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin: 0; margin-right:10px; border: 1px solid #dfdfdf; padding: 0em 1em 1em 1em; background-color:#F8F8FF; align:right;&amp;quot;&amp;gt;&lt;br /&gt;
===Rescue and Recovery===&lt;br /&gt;
Rescue and Recovery version 3.0 consists of a bootable partition containing various system recovery tools, including full recovery of the preinstalled Windows XP partition. It can be activated by pressing the {{ibmkey|ThinkPad|#494949}}, {{ibmkey|Access IBM|#495988}} or {{ibmkey|ThinkVantage|#495988}} [[ThinkPad Button|Button]] during system boot. It contains a FAT filesystem (labeled &amp;quot;IBM_SERVICE&amp;quot;), and has partition type 0x12 (&amp;quot;Compaq diagnostics&amp;quot; in &amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
As opposed to a [[Hidden Protected Area|Hidden Protected Area]] Recovery partitions are ordinary partitions, accessible through the partition table. As they are ordinary partitions they are accessible by ordinary partitioning tools. They should be dealt carefully with.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
==Proper MBR==&lt;br /&gt;
{{WARN|Only tinker with the MBR and the Rescue and Recovery partition if you know what you're doing. Mistakes can leave the system unbootable and can make it very difficult to retrieve the data on the harddisk.}}&lt;br /&gt;
&lt;br /&gt;
Consideration 6 of the Readme states:&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&amp;quot;The Master Boot Record (MBR) must be configured properly for the Rescue and Recovery application to function properly.  When possible, the Rescue and Recovery application attempts to ensure the proper configuration of the MBR.  This can only occur if the Rescue and Recovery application is installed after other applications that requires the MBR.&amp;quot;&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Apparently, the MBR is not &amp;quot;configured properly&amp;quot; if LILO or GRUB have written it. The following is the case:&lt;br /&gt;
*the default bootloader seems to ignore the active bit and always boots the first partition instead&lt;br /&gt;
*the default bootloader contains code to catch a press of the appropriate button during bootup and launch the Rescue and Recovery application in that case&lt;br /&gt;
*before launching the Rescue and Recovery application at system boot, the default bootloader changes the partition type of the Rescue and Recovery partiton to 0x0b, otherwise it changes it to 0x12 (to hide it from Windows)&lt;br /&gt;
*the Rescue and Recovery application assumes that the first partition contains Windows&lt;br /&gt;
*the Rescue and Recovery partition needs to be of type 0x0b (FAT32) otherwise the default bootloader will not launch the Rescue and Recovery application&lt;br /&gt;
&lt;br /&gt;
Since neither LILO nor GRUB catch the press of the button (an undocumented mechanism anyway) it is not possible to launch the Rescue and Recovery application by pressing the appropriate button during system boot, once LILO or GRUB have altered the MBR for their boot procedure.&lt;br /&gt;
&lt;br /&gt;
IBM provides a program to manage the Rescue and Recovery bootloader. It is located in {{path|C:\Program Files\IBM ThinkVantage\Common\BMGR}}. It can select the partition to boot, and also allows for rewriting the MBR if it was written by another bootloader.&lt;br /&gt;
&lt;br /&gt;
===MBR written by GRUB===&lt;br /&gt;
If the MBR was written by GRUB you can still use GRUB to launch the Rescue and Recovery application. However if you leave the type of the Rescue and Recovery partition to 0x12 (Compaq diagnostics), this will result in an error message &amp;quot;c000021a, Fatal System Error&amp;quot; if you try to launch it. To avoid that and to make sure the recovery partition always is of the right type, add a line to change the partition type to 0x0b to the Rescue and Recovery partition's entry in your {{path|/boot/grub/menu.lst}}. Assuming your Rescue and Recovery partition is the second partition, it could look like this:&lt;br /&gt;
  title           IBM Rescue and Recovery&lt;br /&gt;
  root            (hd0,1)&lt;br /&gt;
  '''parttype        (hd0,1) 0x0b'''&lt;br /&gt;
  '''unhide          (hd0,1)'''&lt;br /&gt;
  chainloader     +1&lt;br /&gt;
&lt;br /&gt;
Also add an &amp;lt;tt&amp;gt;unhide&amp;lt;/tt&amp;gt; line here because we are going to hide the Rescue and Recovery partition on every boot of Windows, so we need to unhide it, when the recovery partition is booted. This is because if we don't hide the partition when booting Windows, it would be visible and accessable there and that's not what we want. So, assuming that Windows is on the first partition, the Windows entry could now look like this:&lt;br /&gt;
  title           Windows&lt;br /&gt;
  root            (hd0,0)&lt;br /&gt;
  '''hide            (hd0,1)'''&lt;br /&gt;
  chainloader     +1&lt;br /&gt;
&lt;br /&gt;
===GRUB in a partitions boot sector===&lt;br /&gt;
A way to have your Access IBM button still functional on bootup, is to create a separate {{path|/boot}} partition, install GRUB to that partition and make it active. This will leave the MBR untouched.&lt;br /&gt;
{{NOTE|If the above finding is true that the MBR ignores the active bit, that partition has to be the first one. In most recent Linux distributions it is not easy to create /boot as first partition and shrink the Windows partition. In that case the Windows bootloader can be used to boot Windows and Linux, also preserving the Rescue and Recovery functionality. See below.}}&lt;br /&gt;
*In the BIOS, set the IBM Predesktop Area to 'Secure'.&lt;br /&gt;
*Boot your Linux distribution's installation CD.&lt;br /&gt;
*Follow the instructions and go through the regular installation process.&lt;br /&gt;
*Create a primary partition for /boot (the other stuff can go into the extended partitions) and when the time comes to install GRUB, make sure you install it into the boot sector of the boot partition.&lt;br /&gt;
*Set this boot partition as active.&lt;br /&gt;
&lt;br /&gt;
===Using NTLDR to boot Linux===&lt;br /&gt;
It is possible to configure the Windows bootloader to also boot Linux (installed on separate partition). This allows to preserve the Rescue and Recovery functionality at system boot (as MBR is not modified), Windows XP (booted via its native bootloader) and Linux (booted from its own partition by Windows XP bootloader). A quick and dirty howto, regarding applying this procedure to Ubuntu Dapper Drake installation can be found [http://http://gawrysiak.org/corvus/?p=4 here].&lt;br /&gt;
&lt;br /&gt;
==Older versions of Rescue and Recovery==&lt;br /&gt;
Some Thinkpads (e.g., T23 and T30) do not come with a Recovery CD, but also do not support the [[Hidden Protected Area]].  These ThinkPads have an older version of Rescue and Recovery preloaded on the hard disk to implement the factory recovery function.  Most of the comments above also apply to the older versions, with the following differences:&lt;br /&gt;
*The recovery partition type is 0x1c, hidden FAT32, LBA-mapped (or 0xc when unhidden).&lt;br /&gt;
*The boot manager program is in {{path|C:\IBMTOOLS\RECOVERY}} and only runs in a 16-bit DOS environment&lt;br /&gt;
*The IBM Predesktop area runs atop of Windows 98 (command-line) instead of WinPE&lt;br /&gt;
&lt;br /&gt;
==External Sources==&lt;br /&gt;
* IBM page on [http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-4Q2QAK ThinkVantage Rescue and Recovery].&lt;br /&gt;
* [ftp://ftp.software.ibm.com/pc/pccbbs/thinkvantage_en/tvtrnr3_1027en.txt Rescue and Recovery Readme]&lt;br /&gt;
* [http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-46088 IBM page about accessing the Recovery Partition if Linux has been installed and the F11 button no longer works]&lt;br /&gt;
* [http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-54483 IBM Rescue &amp;amp; Recovery repair diskette]&lt;br /&gt;
&lt;br /&gt;
==Models featuring this technology==&lt;br /&gt;
* ThinkPad {{T23}}, {{T30}} (R&amp;amp;R 2.0)&lt;br /&gt;
* ThinkPad {{T42}}&lt;br /&gt;
* ThinkPad {{T43}}, {{T43p}}&lt;br /&gt;
* ThinkPad {{R52}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Glossary]]&lt;/div&gt;</summary>
		<author><name>Pebolle</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Rescue_and_Recovery&amp;diff=22995</id>
		<title>Rescue and Recovery</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Rescue_and_Recovery&amp;diff=22995"/>
		<updated>2006-06-28T21:05:42Z</updated>

		<summary type="html">&lt;p&gt;Pebolle: stylistic&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=&amp;quot;100%&amp;quot;&lt;br /&gt;
|style=&amp;quot;vertical-align:top;padding-right:20px;width:10px;&amp;quot; | __NOTOC__&lt;br /&gt;
|style=&amp;quot;vertical-align:top&amp;quot; |&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin: 0; margin-right:10px; border: 1px solid #dfdfdf; padding: 0em 1em 1em 1em; background-color:#F8F8FF; align:right;&amp;quot;&amp;gt;&lt;br /&gt;
===Rescue and Recovery===&lt;br /&gt;
Rescue and Recovery version 3.0 consists of a bootable partition containing various system recovery tools, including full recovery of the preinstalled Windows XP partition. It can be activated by pressing the {{ibmkey|ThinkPad|#494949}}, {{ibmkey|Access IBM|#495988}} or {{ibmkey|ThinkVantage|#495988}} [[ThinkPad Button|Button]] during system boot. It contains a FAT filesystem (labeled &amp;quot;IBM_SERVICE&amp;quot;), and has partition type 0x12 (&amp;quot;Compaq diagnostics&amp;quot; in &amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
As opposed to a [[Hidden Protected Area|Hidden Protected Area]] Recovery partitions are ordinary partitions, accessible through the partition table. As they are ordinary partitions they are accessible by ordinary partitioning tools. They should be dealt carefully with.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
==Proper MBR==&lt;br /&gt;
{{WARN|Only tinker with the MBR and the Rescue and Recovery partition if you know what you're doing. Mistakes can leave the system unbootable and can make it very difficult to retrieve the data on the harddisk.}}&lt;br /&gt;
&lt;br /&gt;
Consideration 6 of the Readme states:&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&amp;quot;The Master Boot Record (MBR) must be configured properly for the Rescue and Recovery application to function properly.  When possible, the Rescue and Recovery application attempts to ensure the proper configuration of the MBR.  This can only occur if the Rescue and Recovery application is installed after other applications that requires the MBR.&amp;quot;&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Apparently, the MBR is not &amp;quot;configured properly&amp;quot; if LILO or GRUB have written it. The following is the case:&lt;br /&gt;
*the default bootloader seems to ignore the active bit and always boots the first partition instead&lt;br /&gt;
*the default bootloader contains code to catch a press of the appropriate button during bootup and launch the Rescue and Recovery application in that case&lt;br /&gt;
*before launching the Rescue and Recovery application at system boot, the default bootloader changes the partition type of the Rescue and Recovery partiton to 0x0b, otherwise it changes it to 0x12 (to hide it from Windows)&lt;br /&gt;
*the Rescue and Recovery application assumes that the first partition contains Windows&lt;br /&gt;
*the Rescue and Recovery partition needs to be of type 0x0b (FAT32) otherwise the default bootloader will not launch the Rescue and Recovery application&lt;br /&gt;
&lt;br /&gt;
Since neither LILO nor GRUB catch the press of the button (an undocumented mechanism anyway) it is not possible to launch the Rescue and Recovery application by pressing the appropriate button during system boot, once LILO or GRUB have altered the MBR for their boot procedure.&lt;br /&gt;
&lt;br /&gt;
IBM provides a program to manage the Rescue and Recovery bootloader. It is located in {{path|C:\Program Files\IBM ThinkVantage\Common\BMGR}}. It can select the partition to boot, and also allows for rewriting the MBR if it was written by another bootloader.&lt;br /&gt;
&lt;br /&gt;
===MBR written by GRUB===&lt;br /&gt;
If the MBR was written by GRUB you can still use GRUB to launch the Rescue and Recovery application. However if you leave the type of the Rescue and Recovery partition to 0x12 (Compaq diagnostics), this will result in an error message &amp;quot;c000021a, Fatal System Error&amp;quot; if you try to launch it. To avoid that and to make sure the recovery partition always is of the right type, add a line to change the partition type to 0x0b to the Rescue and Recovery partition's entry in your {{path|/boot/grub/menu.lst}}. Assuming your Rescue and Recovery partition is the second partition, it could look like this:&lt;br /&gt;
  title           IBM Rescue and Recovery&lt;br /&gt;
  root            (hd0,1)&lt;br /&gt;
  '''parttype        (hd0,1) 0x0b'''&lt;br /&gt;
  '''unhide          (hd0,1)'''&lt;br /&gt;
  chainloader     +1&lt;br /&gt;
&lt;br /&gt;
Also add an &amp;lt;tt&amp;gt;unhide&amp;lt;/tt&amp;gt; line here because we are going to hide the Rescue and Recovery partition on every boot of Windows, so we need to unhide it, when the recovery partition is booted. This is because if we don't hide the partition when booting Windows, it would be visible and accessable there and that's not what we want. So, assuming that Windows is on the first partition, the Windows entry could now look like this:&lt;br /&gt;
  title           Windows&lt;br /&gt;
  root            (hd0,0)&lt;br /&gt;
  '''hide            (hd0,1)'''&lt;br /&gt;
  chainloader     +1&lt;br /&gt;
&lt;br /&gt;
===GRUB in a partitions boot sector===&lt;br /&gt;
A way to have your Access IBM button still functional on bootup, is to create a separate {{path|/boot}} partition, install GRUB to that partition and make it active. This will leave the MBR untouched.&lt;br /&gt;
{{NOTE|If the above finding is true that the MBR ignores the active bit, that partition has to be the first one. In most recent Linux distributions - for example Ubuntu - it is not easy to create /boot as first partition and shrink the Windows partition. In that case the Windows bootloader can be used to boot Windows and Linux, preserving teh Rescue and Recovery functionality. See below.}}&lt;br /&gt;
*In the BIOS, set the IBM Predesktop Area to 'Secure'.&lt;br /&gt;
*Boot your Linux distribution's installation CD.&lt;br /&gt;
*Follow the instructions and go through the regular installation process.&lt;br /&gt;
*Create a primary partition for /boot (the other stuff can go into the extended partitions) and when the time comes to install GRUB, make sure you install it into the boot sector of the boot partition.&lt;br /&gt;
*Set this boot partition as active.&lt;br /&gt;
&lt;br /&gt;
===Using NTLDR to boot Linux===&lt;br /&gt;
It is possible to configure the Windows bootloader to also boot Linux (installed on separate partition). This allows to preserve the Rescue and Recovery functionality at system boot (as MBR is not modified), Windows XP (booted via its native bootloader) and Linux (booted from its own partition by Windows XP bootloader). A quick and dirty howto, regarding applying this procedure to Ubuntu Dapper Drake installation can be found [http://http://gawrysiak.org/corvus/?p=4 here].&lt;br /&gt;
&lt;br /&gt;
==Older versions of Rescue and Recovery==&lt;br /&gt;
Some Thinkpads (e.g., T23 and T30) do not come with a Recovery CD, but also do not support the [[Hidden Protected Area]].  These ThinkPads have an older version of Rescue and Recovery preloaded on the hard disk to implement the factory recovery function.  Most of the comments above also apply to the older versions, with the following differences:&lt;br /&gt;
*The recovery partition type is 0x1c, hidden FAT32, LBA-mapped (or 0xc when unhidden).&lt;br /&gt;
*The boot manager program is in {{path|C:\IBMTOOLS\RECOVERY}} and only runs in a 16-bit DOS environment&lt;br /&gt;
*The IBM Predesktop area runs atop of Windows 98 (command-line) instead of WinPE&lt;br /&gt;
&lt;br /&gt;
==External Sources==&lt;br /&gt;
* IBM page on [http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-4Q2QAK ThinkVantage Rescue and Recovery].&lt;br /&gt;
* [ftp://ftp.software.ibm.com/pc/pccbbs/thinkvantage_en/tvtrnr3_1027en.txt Rescue and Recovery Readme]&lt;br /&gt;
* [http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-46088 IBM page about accessing the Recovery Partition if Linux has been installed and the F11 button no longer works]&lt;br /&gt;
* [http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-54483 IBM Rescue &amp;amp; Recovery repair diskette]&lt;br /&gt;
&lt;br /&gt;
==Models featuring this technology==&lt;br /&gt;
* ThinkPad {{T23}}, {{T30}} (R&amp;amp;R 2.0)&lt;br /&gt;
* ThinkPad {{T42}}&lt;br /&gt;
* ThinkPad {{T43}}, {{T43p}}&lt;br /&gt;
* ThinkPad {{R52}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Glossary]]&lt;/div&gt;</summary>
		<author><name>Pebolle</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Rescue_and_Recovery&amp;diff=22994</id>
		<title>Rescue and Recovery</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Rescue_and_Recovery&amp;diff=22994"/>
		<updated>2006-06-28T21:04:09Z</updated>

		<summary type="html">&lt;p&gt;Pebolle: Tone down the warning&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=&amp;quot;100%&amp;quot;&lt;br /&gt;
|style=&amp;quot;vertical-align:top;padding-right:20px;width:10px;&amp;quot; | __NOTOC__&lt;br /&gt;
|style=&amp;quot;vertical-align:top&amp;quot; |&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin: 0; margin-right:10px; border: 1px solid #dfdfdf; padding: 0em 1em 1em 1em; background-color:#F8F8FF; align:right;&amp;quot;&amp;gt;&lt;br /&gt;
===Rescue and Recovery===&lt;br /&gt;
Rescue and Recovery version 3.0 consists of a bootable partition containing various system recovery tools, including full recovery of the preinstalled Windows XP partition. It can be activated by pressing the {{ibmkey|ThinkPad|#494949}}, {{ibmkey|Access IBM|#495988}} or {{ibmkey|ThinkVantage|#495988}} [[ThinkPad Button|Button]] during system boot. It contains a FAT filesystem (labeled &amp;quot;IBM_SERVICE&amp;quot;), and has partition type 0x12 (&amp;quot;Compaq diagnostics&amp;quot; in &amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
As opposed to a [[Hidden Protected Area|Hidden Protected Area]] Recovery partitions are ordinary partitions, accessible through the partition table. As they are ordinary partitions they are accessible by ordinary partitioning tools. They should be dealt carefully with.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
==Proper MBR==&lt;br /&gt;
{{WARN|Only tinker with the MBR and the Rescue and Recovery partition if you know what you're doing. Mistakes can leave the system unbootable and can make it very difficult to retrieve the data on the harddisk.}}&lt;br /&gt;
&lt;br /&gt;
Consideration 6 of the Readme states:&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&amp;quot;The Master Boot Record (MBR) must be configured properly for the Rescue and Recovery application to function properly.  When possible, the Rescue and Recovery application attempts to ensure the proper configuration of the MBR.  This can only occur if the Rescue and Recovery application is installed after other applications that requires the MBR.&amp;quot;&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Apparently, the MBR is not &amp;quot;configured properly&amp;quot; if LILO or GRUB have written it. The following is the case:&lt;br /&gt;
*the default bootloader seems to ignore the active bit and always boots the first partition instead&lt;br /&gt;
*the default bootloader contains code to catch a press of the appropriate button during bootup and launch the Rescue and Recovery application in that case&lt;br /&gt;
*before launching the Rescue and Recovery application at system boot, the default bootloader changes the partition type of the Rescue and Recovery partiton to 0x0b, otherwise it changes it to 0x12 (to hide it from Windows)&lt;br /&gt;
*the Rescue and Recovery application assumes that the first partition contains Windows&lt;br /&gt;
*the Rescue and Recovery partition needs to be of type 0x0b (FAT32) otherwise the default bootloader will not launch the Rescue and Recovery application&lt;br /&gt;
&lt;br /&gt;
Since neither LILO nor GRUB catch the press of the button (an undocumented mechanism anyway) it is not possible to invoke Rescue and Recovery by pressing the appropriate button during system boot, once LILO or GRUB have altered the MBR for their boot procedure.&lt;br /&gt;
&lt;br /&gt;
IBM provides a program to manage the Rescue and Recovery bootloader. It is located in {{path|C:\Program Files\IBM ThinkVantage\Common\BMGR}}. It can select the partition to boot, and also allows for rewriting the MBR if it was written by another bootloader.&lt;br /&gt;
&lt;br /&gt;
===MBR written by GRUB===&lt;br /&gt;
If the MBR was written by GRUB you can still use GRUB to launch the Rescue and Recovery application. However if you leave the type of the Rescue and Recovery partition to 0x12 (Compaq diagnostics), this will result in an error message &amp;quot;c000021a, Fatal System Error&amp;quot; if you try to launch it. To avoid that and to make sure the recovery partition always is of the right type, add a line to change the partition type to 0x0b to the Rescue and Recovery partition's entry in your {{path|/boot/grub/menu.lst}}. Assuming your Rescue and Recovery partition is the second partition, it could look like this:&lt;br /&gt;
  title           IBM Rescue and Recovery&lt;br /&gt;
  root            (hd0,1)&lt;br /&gt;
  '''parttype        (hd0,1) 0x0b'''&lt;br /&gt;
  '''unhide          (hd0,1)'''&lt;br /&gt;
  chainloader     +1&lt;br /&gt;
&lt;br /&gt;
Also add an &amp;lt;tt&amp;gt;unhide&amp;lt;/tt&amp;gt; line here because we are going to hide the Rescue and Recovery partition on every boot of Windows, so we need to unhide it, when the recovery partition is booted. This is because if we don't hide the partition when booting Windows, it would be visible and accessable there and that's not what we want. So, assuming that Windows is on the first partition, the Windows entry could now look like this:&lt;br /&gt;
  title           Windows&lt;br /&gt;
  root            (hd0,0)&lt;br /&gt;
  '''hide            (hd0,1)'''&lt;br /&gt;
  chainloader     +1&lt;br /&gt;
&lt;br /&gt;
===GRUB in a partitions boot sector===&lt;br /&gt;
A way to have your Access IBM button still functional on bootup, is to create a separate {{path|/boot}} partition, install GRUB to that partition and make it active. This will leave the MBR untouched.&lt;br /&gt;
{{NOTE|If the above finding is true that the MBR ignores the active bit, that partition has to be the first one. In most recent Linux distributions - for example Ubuntu - it is not easy to create /boot as first partition and shrink the Windows partition. In that case the Windows bootloader can be used to boot Windows and Linux, preserving teh Rescue and Recovery functionality. See below.}}&lt;br /&gt;
*In the BIOS, set the IBM Predesktop Area to 'Secure'.&lt;br /&gt;
*Boot your Linux distribution's installation CD.&lt;br /&gt;
*Follow the instructions and go through the regular installation process.&lt;br /&gt;
*Create a primary partition for /boot (the other stuff can go into the extended partitions) and when the time comes to install GRUB, make sure you install it into the boot sector of the boot partition.&lt;br /&gt;
*Set this boot partition as active.&lt;br /&gt;
&lt;br /&gt;
===Using NTLDR to boot Linux===&lt;br /&gt;
It is possible to configure the Windows bootloader to also boot Linux (installed on separate partition). This allows to preserve the Rescue and Recovery functionality at system boot (as MBR is not modified), Windows XP (booted via its native bootloader) and Linux (booted from its own partition by Windows XP bootloader). A quick and dirty howto, regarding applying this procedure to Ubuntu Dapper Drake installation can be found [http://http://gawrysiak.org/corvus/?p=4 here].&lt;br /&gt;
&lt;br /&gt;
==Older versions of Rescue and Recovery==&lt;br /&gt;
Some Thinkpads (e.g., T23 and T30) do not come with a Recovery CD, but also do not support the [[Hidden Protected Area]].  These ThinkPads have an older version of Rescue and Recovery preloaded on the hard disk to implement the factory recovery function.  Most of the comments above also apply to the older versions, with the following differences:&lt;br /&gt;
*The recovery partition type is 0x1c, hidden FAT32, LBA-mapped (or 0xc when unhidden).&lt;br /&gt;
*The boot manager program is in {{path|C:\IBMTOOLS\RECOVERY}} and only runs in a 16-bit DOS environment&lt;br /&gt;
*The IBM Predesktop area runs atop of Windows 98 (command-line) instead of WinPE&lt;br /&gt;
&lt;br /&gt;
==External Sources==&lt;br /&gt;
* IBM page on [http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-4Q2QAK ThinkVantage Rescue and Recovery].&lt;br /&gt;
* [ftp://ftp.software.ibm.com/pc/pccbbs/thinkvantage_en/tvtrnr3_1027en.txt Rescue and Recovery Readme]&lt;br /&gt;
* [http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-46088 IBM page about accessing the Recovery Partition if Linux has been installed and the F11 button no longer works]&lt;br /&gt;
* [http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-54483 IBM Rescue &amp;amp; Recovery repair diskette]&lt;br /&gt;
&lt;br /&gt;
==Models featuring this technology==&lt;br /&gt;
* ThinkPad {{T23}}, {{T30}} (R&amp;amp;R 2.0)&lt;br /&gt;
* ThinkPad {{T42}}&lt;br /&gt;
* ThinkPad {{T43}}, {{T43p}}&lt;br /&gt;
* ThinkPad {{R52}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Glossary]]&lt;/div&gt;</summary>
		<author><name>Pebolle</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Rescue_and_Recovery&amp;diff=22993</id>
		<title>Rescue and Recovery</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Rescue_and_Recovery&amp;diff=22993"/>
		<updated>2006-06-28T20:58:41Z</updated>

		<summary type="html">&lt;p&gt;Pebolle: oops; previoes edit was minor too&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=&amp;quot;100%&amp;quot;&lt;br /&gt;
|style=&amp;quot;vertical-align:top;padding-right:20px;width:10px;&amp;quot; | __NOTOC__&lt;br /&gt;
|style=&amp;quot;vertical-align:top&amp;quot; |&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin: 0; margin-right:10px; border: 1px solid #dfdfdf; padding: 0em 1em 1em 1em; background-color:#F8F8FF; align:right;&amp;quot;&amp;gt;&lt;br /&gt;
===Rescue and Recovery===&lt;br /&gt;
Rescue and Recovery version 3.0 consists of a bootable partition containing various system recovery tools, including full recovery of the preinstalled Windows XP partition. It can be activated by pressing the {{ibmkey|ThinkPad|#494949}}, {{ibmkey|Access IBM|#495988}} or {{ibmkey|ThinkVantage|#495988}} [[ThinkPad Button|Button]] during system boot. It contains a FAT filesystem (labeled &amp;quot;IBM_SERVICE&amp;quot;), and has partition type 0x12 (&amp;quot;Compaq diagnostics&amp;quot; in &amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
As opposed to a [[Hidden Protected Area|Hidden Protected Area]] Recovery partitions are ordinary partitions, accessible through the partition table. As they are ordinary partitions they are accessible by ordinary partitioning tools. They should be dealt carefully with.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
==Proper MBR==&lt;br /&gt;
{{WARN|Tinkering with the default MBR and the Rescue &amp;amp; Recovery partition puts risk to your system. It can result in rendering the system completely unusable and severe data loss. You follow any instructions described here on your own risk.}}&lt;br /&gt;
&lt;br /&gt;
Consideration 6 of the Readme states:&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&amp;quot;The Master Boot Record (MBR) must be configured properly for the Rescue and Recovery application to function properly.  When possible, the Rescue and Recovery application attempts to ensure the proper configuration of the MBR.  This can only occur if the Rescue and Recovery application is installed after other applications that requires the MBR.&amp;quot;&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Apparently, the MBR is not &amp;quot;configured properly&amp;quot; if LILO or GRUB have written it. The following is the case:&lt;br /&gt;
*the default bootloader seems to ignore the active bit and always boots the first partition instead&lt;br /&gt;
*the default bootloader contains code to catch a press of the appropriate button during bootup and launch the Rescue and Recovery application in that case&lt;br /&gt;
*before launching the Rescue and Recovery application at system boot, the default bootloader changes the partition type of the Rescue and Recovery partiton to 0x0b, otherwise it changes it to 0x12 (to hide it from Windows)&lt;br /&gt;
*the Rescue and Recovery application assumes that the first partition contains Windows&lt;br /&gt;
*the Rescue and Recovery partition needs to be of type 0x0b (FAT32) otherwise the default bootloader will not launch the Rescue and Recovery application&lt;br /&gt;
&lt;br /&gt;
Since neither LILO nor GRUB catch the press of the button (an undocumented mechanism anyway) it is not possible to invoke Rescue and Recovery by pressing the appropriate button during system boot, once LILO or GRUB have altered the MBR for their boot procedure.&lt;br /&gt;
&lt;br /&gt;
IBM provides a program to manage the Rescue and Recovery bootloader. It is located in {{path|C:\Program Files\IBM ThinkVantage\Common\BMGR}}. It can select the partition to boot, and also allows for rewriting the MBR if it was written by another bootloader.&lt;br /&gt;
&lt;br /&gt;
===MBR written by GRUB===&lt;br /&gt;
If the MBR was written by GRUB you can still use GRUB to launch the Rescue and Recovery application. However if you leave the type of the Rescue and Recovery partition to 0x12 (Compaq diagnostics), this will result in an error message &amp;quot;c000021a, Fatal System Error&amp;quot; if you try to launch it. To avoid that and to make sure the recovery partition always is of the right type, add a line to change the partition type to 0x0b to the Rescue and Recovery partition's entry in your {{path|/boot/grub/menu.lst}}. Assuming your Rescue and Recovery partition is the second partition, it could look like this:&lt;br /&gt;
  title           IBM Rescue and Recovery&lt;br /&gt;
  root            (hd0,1)&lt;br /&gt;
  '''parttype        (hd0,1) 0x0b'''&lt;br /&gt;
  '''unhide          (hd0,1)'''&lt;br /&gt;
  chainloader     +1&lt;br /&gt;
&lt;br /&gt;
Also add an &amp;lt;tt&amp;gt;unhide&amp;lt;/tt&amp;gt; line here because we are going to hide the Rescue and Recovery partition on every boot of Windows, so we need to unhide it, when the recovery partition is booted. This is because if we don't hide the partition when booting Windows, it would be visible and accessable there and that's not what we want. So, assuming that Windows is on the first partition, the Windows entry could now look like this:&lt;br /&gt;
  title           Windows&lt;br /&gt;
  root            (hd0,0)&lt;br /&gt;
  '''hide            (hd0,1)'''&lt;br /&gt;
  chainloader     +1&lt;br /&gt;
&lt;br /&gt;
===GRUB in a partitions boot sector===&lt;br /&gt;
A way to have your Access IBM button still functional on bootup, is to create a separate {{path|/boot}} partition, install GRUB to that partition and make it active. This will leave the MBR untouched.&lt;br /&gt;
{{NOTE|If the above finding is true that the MBR ignores the active bit, that partition has to be the first one. In most recent Linux distributions - for example Ubuntu - it is not easy to create /boot as first partition and shrink the Windows partition. In that case the Windows bootloader can be used to boot Windows and Linux, preserving teh Rescue and Recovery functionality. See below.}}&lt;br /&gt;
*In the BIOS, set the IBM Predesktop Area to 'Secure'.&lt;br /&gt;
*Boot your Linux distribution's installation CD.&lt;br /&gt;
*Follow the instructions and go through the regular installation process.&lt;br /&gt;
*Create a primary partition for /boot (the other stuff can go into the extended partitions) and when the time comes to install GRUB, make sure you install it into the boot sector of the boot partition.&lt;br /&gt;
*Set this boot partition as active.&lt;br /&gt;
&lt;br /&gt;
===Using NTLDR to boot Linux===&lt;br /&gt;
It is possible to configure the Windows bootloader to also boot Linux (installed on separate partition). This allows to preserve the Rescue and Recovery functionality at system boot (as MBR is not modified), Windows XP (booted via its native bootloader) and Linux (booted from its own partition by Windows XP bootloader). A quick and dirty howto, regarding applying this procedure to Ubuntu Dapper Drake installation can be found [http://http://gawrysiak.org/corvus/?p=4 here].&lt;br /&gt;
&lt;br /&gt;
==Older versions of Rescue and Recovery==&lt;br /&gt;
Some Thinkpads (e.g., T23 and T30) do not come with a Recovery CD, but also do not support the [[Hidden Protected Area]].  These ThinkPads have an older version of Rescue and Recovery preloaded on the hard disk to implement the factory recovery function.  Most of the comments above also apply to the older versions, with the following differences:&lt;br /&gt;
*The recovery partition type is 0x1c, hidden FAT32, LBA-mapped (or 0xc when unhidden).&lt;br /&gt;
*The boot manager program is in {{path|C:\IBMTOOLS\RECOVERY}} and only runs in a 16-bit DOS environment&lt;br /&gt;
*The IBM Predesktop area runs atop of Windows 98 (command-line) instead of WinPE&lt;br /&gt;
&lt;br /&gt;
==External Sources==&lt;br /&gt;
* IBM page on [http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-4Q2QAK ThinkVantage Rescue and Recovery].&lt;br /&gt;
* [ftp://ftp.software.ibm.com/pc/pccbbs/thinkvantage_en/tvtrnr3_1027en.txt Rescue and Recovery Readme]&lt;br /&gt;
* [http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-46088 IBM page about accessing the Recovery Partition if Linux has been installed and the F11 button no longer works]&lt;br /&gt;
* [http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-54483 IBM Rescue &amp;amp; Recovery repair diskette]&lt;br /&gt;
&lt;br /&gt;
==Models featuring this technology==&lt;br /&gt;
* ThinkPad {{T23}}, {{T30}} (R&amp;amp;R 2.0)&lt;br /&gt;
* ThinkPad {{T42}}&lt;br /&gt;
* ThinkPad {{T43}}, {{T43p}}&lt;br /&gt;
* ThinkPad {{R52}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Glossary]]&lt;/div&gt;</summary>
		<author><name>Pebolle</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Rescue_and_Recovery&amp;diff=22992</id>
		<title>Rescue and Recovery</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Rescue_and_Recovery&amp;diff=22992"/>
		<updated>2006-06-28T20:57:48Z</updated>

		<summary type="html">&lt;p&gt;Pebolle: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=&amp;quot;100%&amp;quot;&lt;br /&gt;
|style=&amp;quot;vertical-align:top;padding-right:20px;width:10px;&amp;quot; | __NOTOC__&lt;br /&gt;
|style=&amp;quot;vertical-align:top&amp;quot; |&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin: 0; margin-right:10px; border: 1px solid #dfdfdf; padding: 0em 1em 1em 1em; background-color:#F8F8FF; align:right;&amp;quot;&amp;gt;&lt;br /&gt;
===Rescue and Recovery===&lt;br /&gt;
Rescue and Recovery version 3.0 consists of a bootable partition containing various system recovery tools, including full recovery of the preinstalled Windows XP partition. It can be activated by pressing the {{ibmkey|ThinkPad|#494949}}, {{ibmkey|Access IBM|#495988}} or {{ibmkey|ThinkVantage|#495988}} [[ThinkPad Button|Button]] during system boot. It contains a FAT filesystem (labeled &amp;quot;IBM_SERVICE&amp;quot;), and has partition type 0x12 (&amp;quot;Compaq diagnostics&amp;quot; in &amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
As opposed to a [[Hidden Protected Area|Hidden Protected Area]] Recovery partitions are ordinary partitions, accessible through the partition table. As they are ordinary partitions they are accessible by ordinary partitioning tools. They should be dealt carefully with.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
==Proper MBR==&lt;br /&gt;
{{WARN|Tinkering with the default MBR and the Rescue &amp;amp; Recovery partition puts risk to your system. It can result in rendering the system completely unusable and severe data loss. You follow any instructions described here on your own risk.}}&lt;br /&gt;
&lt;br /&gt;
Consideration 6 of the Readme states:&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&amp;quot;The Master Boot Record (MBR) must be configured properly for the Rescue and Recovery application to function properly.  When possible, the Rescue and Recovery application attempts to ensure the proper configuration of the MBR.  This can only occur if the Rescue and Recovery application is installed after other applications that requires the MBR.&amp;quot;&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Apparently, the MBR is not &amp;quot;configured properly&amp;quot; if LILO or GRUB have written it. The following is the case:&lt;br /&gt;
*the default bootloader seems to ignore the active bit and always boots the first partition instead&lt;br /&gt;
*the default bootloader contains code to catch a press of the appropriate button during bootup and launch the Rescue and Recovery application in that case&lt;br /&gt;
*before launching the Rescue and Recovery application at system boot, the default bootloader changes the partition type of the Rescue and Recovery partiton to 0x0b, otherwise it changes it to 0x12 (to hide it from Windows)&lt;br /&gt;
*the Rescue and Recovery application assumes that the first partition contains Windows&lt;br /&gt;
*the Rescue and Recovery partition needs to be of type 0x0b (FAT32) otherwise the default bootloader will not launch the Rescue and Recovery application&lt;br /&gt;
&lt;br /&gt;
Since neither LILO nor GRUB catch the press of the button (an undocumented mechanism anyway) it is not possible to invoke Rescue and Recovery by pressing the appropriate button during system boot, once LILO or GRUB have altered the MBR for their boot procedure.&lt;br /&gt;
&lt;br /&gt;
IBM provides a program to manage the Rescue and Recovery bootloader. It is located in {{path|C:\Program Files\IBM ThinkVantage\Common\BMGR}}. It can select the partition to boot, and also allows for rewriting the MBR if it was written by another bootloader.&lt;br /&gt;
&lt;br /&gt;
===MBR written by GRUB===&lt;br /&gt;
If the MBR was written by GRUB you can still use GRUB to launch the Rescue and Recovery application. However if you leave the type of the Rescue and Recovery partition to 0x12 (Compaq diagnostics), this will result in an error message &amp;quot;c000021a, Fatal System Error&amp;quot; if you try to launch it. To avoid that and to make sure the recovery partition always is of the right type, add a line to change the partition type to 0x0b to the Rescue and Recovery partition's entry in your {{path|/boot/grub/menu.lst}}. Assuming your Rescue and Recovery partition is the second partition, it could look like this:&lt;br /&gt;
  title           IBM Rescue and Recovery&lt;br /&gt;
  root            (hd0,1)&lt;br /&gt;
  '''parttype        (hd0,1) 0x0b'''&lt;br /&gt;
  '''unhide          (hd0,1)'''&lt;br /&gt;
  chainloader     +1&lt;br /&gt;
&lt;br /&gt;
Also add an &amp;lt;tt&amp;gt;unhide&amp;lt;/tt&amp;gt; line here because we are going to hide the Rescue and Recovery partition on every boot of Windows, so we need to unhide it, when the recovery partition is booted. This is because if we don't hide the partition when booting Windows, it would be visible and accessable there and that's not what we want. So, assuming that Windows is on the first partition, the Windows entry could now look like this:&lt;br /&gt;
  title           Windows&lt;br /&gt;
  root            (hd0,0)h&lt;br /&gt;
  '''hide            (hd0,1)'''&lt;br /&gt;
  chainloader     +1&lt;br /&gt;
&lt;br /&gt;
===GRUB in a partitions boot sector===&lt;br /&gt;
A way to have your Access IBM button still functional on bootup, is to create a separate {{path|/boot}} partition, install GRUB to that partition and make it active. This will leave the MBR untouched.&lt;br /&gt;
{{NOTE|If the above finding is true that the MBR ignores the active bit, that partition has to be the first one. In most recent Linux distributions - for example Ubuntu - it is not easy to create /boot as first partition and shrink the Windows partition. In that case the Windows bootloader can be used to boot Windows and Linux, preserving teh Rescue and Recovery functionality. See below.}}&lt;br /&gt;
*In the BIOS, set the IBM Predesktop Area to 'Secure'.&lt;br /&gt;
*Boot your Linux distribution's installation CD.&lt;br /&gt;
*Follow the instructions and go through the regular installation process.&lt;br /&gt;
*Create a primary partition for /boot (the other stuff can go into the extended partitions) and when the time comes to install GRUB, make sure you install it into the boot sector of the boot partition.&lt;br /&gt;
*Set this boot partition as active.&lt;br /&gt;
&lt;br /&gt;
===Using NTLDR to boot Linux===&lt;br /&gt;
It is possible to configure the Windows bootloader to also boot Linux (installed on separate partition). This allows to preserve the Rescue and Recovery functionality at system boot (as MBR is not modified), Windows XP (booted via its native bootloader) and Linux (booted from its own partition by Windows XP bootloader). A quick and dirty howto, regarding applying this procedure to Ubuntu Dapper Drake installation can be found [http://http://gawrysiak.org/corvus/?p=4 here].&lt;br /&gt;
&lt;br /&gt;
==Older versions of Rescue and Recovery==&lt;br /&gt;
Some Thinkpads (e.g., T23 and T30) do not come with a Recovery CD, but also do not support the [[Hidden Protected Area]].  These ThinkPads have an older version of Rescue and Recovery preloaded on the hard disk to implement the factory recovery function.  Most of the comments above also apply to the older versions, with the following differences:&lt;br /&gt;
*The recovery partition type is 0x1c, hidden FAT32, LBA-mapped (or 0xc when unhidden).&lt;br /&gt;
*The boot manager program is in {{path|C:\IBMTOOLS\RECOVERY}} and only runs in a 16-bit DOS environment&lt;br /&gt;
*The IBM Predesktop area runs atop of Windows 98 (command-line) instead of WinPE&lt;br /&gt;
&lt;br /&gt;
==External Sources==&lt;br /&gt;
* IBM page on [http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-4Q2QAK ThinkVantage Rescue and Recovery].&lt;br /&gt;
* [ftp://ftp.software.ibm.com/pc/pccbbs/thinkvantage_en/tvtrnr3_1027en.txt Rescue and Recovery Readme]&lt;br /&gt;
* [http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-46088 IBM page about accessing the Recovery Partition if Linux has been installed and the F11 button no longer works]&lt;br /&gt;
* [http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-54483 IBM Rescue &amp;amp; Recovery repair diskette]&lt;br /&gt;
&lt;br /&gt;
==Models featuring this technology==&lt;br /&gt;
* ThinkPad {{T23}}, {{T30}} (R&amp;amp;R 2.0)&lt;br /&gt;
* ThinkPad {{T42}}&lt;br /&gt;
* ThinkPad {{T43}}, {{T43p}}&lt;br /&gt;
* ThinkPad {{R52}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Glossary]]&lt;/div&gt;</summary>
		<author><name>Pebolle</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Rescue_and_Recovery&amp;diff=22991</id>
		<title>Rescue and Recovery</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Rescue_and_Recovery&amp;diff=22991"/>
		<updated>2006-06-28T20:53:53Z</updated>

		<summary type="html">&lt;p&gt;Pebolle: Further clarifications and stylistic issues&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=&amp;quot;100%&amp;quot;&lt;br /&gt;
|style=&amp;quot;vertical-align:top;padding-right:20px;width:10px;&amp;quot; | __NOTOC__&lt;br /&gt;
|style=&amp;quot;vertical-align:top&amp;quot; |&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin: 0; margin-right:10px; border: 1px solid #dfdfdf; padding: 0em 1em 1em 1em; background-color:#F8F8FF; align:right;&amp;quot;&amp;gt;&lt;br /&gt;
===Rescue and Recovery===&lt;br /&gt;
Rescue and Recovery version 3.0 consists of a bootable partition containing various system recovery tools, including full recovery of the preinstalled Windows XP partition. It can be activated by pressing the {{ibmkey|ThinkPad|#494949}}, {{ibmkey|Access IBM|#495988}} or {{ibmkey|ThinkVantage|#495988}} [[ThinkPad Button|Button]] during system boot. It contains a FAT filesystem (labeled &amp;quot;IBM_SERVICE&amp;quot;), and has partition type 0x12 (&amp;quot;Compaq diagnostics&amp;quot; in &amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
As opposed to a [[Hidden Protected Area|Hidden Protected Area]] Recovery partitions are ordinary partitions, accessible through the partition table. As they are ordinary partitions they are accessible by ordinary partitioning tools. They should be dealt carefully with.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
==Proper MBR==&lt;br /&gt;
{{WARN|Tinkering with the default MBR and the Rescue &amp;amp; Recovery partition puts risk to your system. It can result in rendering the system completely unusable and severe data loss. You follow any instructions described here on your own risk.}}&lt;br /&gt;
&lt;br /&gt;
Consideration 6 of the Readme states:&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&amp;quot;The Master Boot Record (MBR) must be configured properly for the Rescue and Recovery application to function properly.  When possible, the Rescue and Recovery application attempts to ensure the proper configuration of the MBR.  This can only occur if the Rescue and Recovery application is installed after other applications that requires the MBR.&amp;quot;&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Apparently, the MBR is not &amp;quot;configured properly&amp;quot; if LILO or GRUB have written it. The following is the case:&lt;br /&gt;
*the default bootloader seems to ignore the active bit and always boots the first partition instead&lt;br /&gt;
*the default bootloader contains code to catch a press of the appropriate button during bootup and launch the Rescue and Recovery application in that case&lt;br /&gt;
*before launching the Rescue and Recovery application at system boot, the default bootloader changes the partition type of the Rescue and Recovery partiton to 0x0b, otherwise it changes it to 0x12 (to hide it from Windows)&lt;br /&gt;
*the Rescue and Recovery application assumes that the first partition contains Windows&lt;br /&gt;
*the Rescue and Recovery partition needs to be of type 0x0b (FAT32) otherwise the default bootloader will not launch the Rescue and Recovery application&lt;br /&gt;
&lt;br /&gt;
Since neither LILO nor GRUB catch the press of the button (an undocumented mechanism anyway) it is not possible to invoke Rescue and Recovery by pressing the appropriate button during system boot, once LILO or GRUB have altered the MBR for their boot procedure.&lt;br /&gt;
&lt;br /&gt;
IBM provides a program to manage the Rescue and Recovery bootloader. It is located in {{path|C:\Program Files\IBM ThinkVantage\Common\BMGR}}. It can select the partition to boot, and also allows for rewriting the MBR if it was written by another bootloader.&lt;br /&gt;
&lt;br /&gt;
===MBR written by GRUB===&lt;br /&gt;
If the MBR was written by GRUB you can still use GRUB to launch the Rescue and Recovery application. However if you leave the type of the Rescue and Recovery partition to 0x12 (Compaq diagnostics), this will result in an error message &amp;quot;c000021a, Fatal System Error&amp;quot; if you try to launch it. To avoid that and to make sure the recovery partition always is of the right type, add a line to change the partition type to 0x0b to the Rescue and Recovery partition's entry in your {{path|/boot/grub/menu.lst}}. Assuming your Rescue and Recovery partition is the second partition,  it should look like this:&lt;br /&gt;
  title           IBM Rescue and Recovery&lt;br /&gt;
  root            (hd0,1)&lt;br /&gt;
  '''parttype        (hd0,1) 0x0b'''&lt;br /&gt;
  '''unhide          (hd0,1)'''&lt;br /&gt;
  chainloader     +1&lt;br /&gt;
&lt;br /&gt;
Also add an &amp;lt;tt&amp;gt;unhide&amp;lt;/tt&amp;gt; line here because we are going to hide the Rescue and Recovery partition on every boot of Windows, so we need to unhide it, when the recovery partition is booted. This is because if we don't hide the partition when booting Windows, it would be visible and accessable there and that's not what we want. So, assuming that Windows is on the first partition, the Windows entry should now look like this:&lt;br /&gt;
  title           Windows&lt;br /&gt;
  root            (hd0,0)&lt;br /&gt;
  '''hide            (hd0,1)'''&lt;br /&gt;
  chainloader     +1&lt;br /&gt;
&lt;br /&gt;
===GRUB in a partitions boot sector===&lt;br /&gt;
A way to have your Access IBM button still functional on bootup, is to create a separate {{path|/boot}} partition, install GRUB to that partition and make it active. This will leave the MBR untouched.&lt;br /&gt;
{{NOTE|If the above finding is true that the MBR ignores the active bit, that partition has to be the first one. In most recent Linux distributions - for example Ubuntu - it is not easy to create /boot as first partition and shrink the Windows partition. In that case the Windows bootloader can be used to boot Windows and Linux, preserving teh Rescue and Recovery functionality. See below.}}&lt;br /&gt;
*In the BIOS, set the IBM Predesktop Area to 'Secure'.&lt;br /&gt;
*Boot your Linux distribution's installation CD.&lt;br /&gt;
*Follow the instructions and go through the regular installation process.&lt;br /&gt;
*Create a primary partition for /boot (the other stuff can go into the extended partitions) and when the time comes to install GRUB, make sure you install it into the boot sector of the boot partition.&lt;br /&gt;
*Set this boot partition as active.&lt;br /&gt;
&lt;br /&gt;
===Using NTLDR to boot Linux===&lt;br /&gt;
It is possible to configure the Windows bootloader to also boot Linux (installed on separate partition). This allows to preserve the Rescue and Recovery functionality at system boot (as MBR is not modified), Windows XP (booted via its native bootloader) and Linux (booted from its own partition by Windows XP bootloader). A quick and dirty howto, regarding applying this procedure to Ubuntu Dapper Drake installation can be found [http://http://gawrysiak.org/corvus/?p=4 here].&lt;br /&gt;
&lt;br /&gt;
==Older versions of Rescue and Recovery==&lt;br /&gt;
Some Thinkpads (e.g., T23 and T30) do not come with a Recovery CD, but also do not support the [[Hidden Protected Area]].  These ThinkPads have an older version of Rescue and Recovery preloaded on the hard disk to implement the factory recovery function.  Most of the comments above also apply to the older versions, with the following differences:&lt;br /&gt;
*The recovery partition type is 0x1c, hidden FAT32, LBA-mapped (or 0xc when unhidden).&lt;br /&gt;
*The boot manager program is in {{path|C:\IBMTOOLS\RECOVERY}} and only runs in a 16-bit DOS environment&lt;br /&gt;
*The IBM Predesktop area runs atop of Windows 98 (command-line) instead of WinPE&lt;br /&gt;
&lt;br /&gt;
==External Sources==&lt;br /&gt;
* IBM page on [http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-4Q2QAK ThinkVantage Rescue and Recovery].&lt;br /&gt;
* [ftp://ftp.software.ibm.com/pc/pccbbs/thinkvantage_en/tvtrnr3_1027en.txt Rescue and Recovery Readme]&lt;br /&gt;
* [http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-46088 IBM page about accessing the Recovery Partition if Linux has been installed and the F11 button no longer works]&lt;br /&gt;
* [http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-54483 IBM Rescue &amp;amp; Recovery repair diskette]&lt;br /&gt;
&lt;br /&gt;
==Models featuring this technology==&lt;br /&gt;
* ThinkPad {{T23}}, {{T30}} (R&amp;amp;R 2.0)&lt;br /&gt;
* ThinkPad {{T42}}&lt;br /&gt;
* ThinkPad {{T43}}, {{T43p}}&lt;br /&gt;
* ThinkPad {{R52}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Glossary]]&lt;/div&gt;</summary>
		<author><name>Pebolle</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Rescue_and_Recovery&amp;diff=22990</id>
		<title>Rescue and Recovery</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Rescue_and_Recovery&amp;diff=22990"/>
		<updated>2006-06-28T20:40:59Z</updated>

		<summary type="html">&lt;p&gt;Pebolle: As far as I know &amp;quot;sharadware&amp;quot; is not reallu authorative&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=&amp;quot;100%&amp;quot;&lt;br /&gt;
|style=&amp;quot;vertical-align:top;padding-right:20px;width:10px;&amp;quot; | __NOTOC__&lt;br /&gt;
|style=&amp;quot;vertical-align:top&amp;quot; |&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin: 0; margin-right:10px; border: 1px solid #dfdfdf; padding: 0em 1em 1em 1em; background-color:#F8F8FF; align:right;&amp;quot;&amp;gt;&lt;br /&gt;
===Rescue and Recovery===&lt;br /&gt;
Rescue and Recovery version 3.0 consists of a bootable partition containing various system recovery tools, including full recovery of the preinstalled Windows XP partition. It can be activated by pressing the {{ibmkey|ThinkPad|#494949}}, {{ibmkey|Access IBM|#495988}} or {{ibmkey|ThinkVantage|#495988}} [[ThinkPad Button|Button]] during system boot. It contains a FAT filesystem (labeled &amp;quot;IBM_SERVICE&amp;quot;), and has partition type 0x12 (&amp;quot;Compaq diagnostics&amp;quot; in &amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
As opposed to a [[Hidden Protected Area|Hidden Protected Area]] Recovery partitions are ordinary partitions, accessible through the partition table. As they are ordinary partitions they are accessible by ordinary partitioning tools. They should be dealt carefully with.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
==Proper MBR==&lt;br /&gt;
{{WARN|Tinkering with the default MBR and the Rescue &amp;amp; Recovery partition puts risk to your system. It can result in rendering the system completely unusable and severe data loss. You follow any instructions described here on your own risk.}}&lt;br /&gt;
&lt;br /&gt;
Consideration 6 of the Readme states:&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&amp;quot;The Master Boot Record (MBR) must be configured properly for the Rescue and Recovery application to function properly.  When possible, the Rescue and Recovery application attempts to ensure the proper configuration of the MBR.  This can only occur if the Rescue and Recovery application is installed after other applications that requires the MBR.&amp;quot;&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Apparently, the MBR is not &amp;quot;configured properly&amp;quot; if LILO or GRUB have written it. The following is the case:&lt;br /&gt;
*the default bootloader seems to ignore the active bit and always boots the first partition instead&lt;br /&gt;
*the default bootloader contains code to catch a press of the appropriate button during bootup and boot the R&amp;amp;R partition in that case&lt;br /&gt;
*before booting the R&amp;amp;R, the default bootloader changes its partition type to 0x0b, otherwise it changes it to 0x12 (to hide it from Windows)&lt;br /&gt;
*the R&amp;amp;R software assumes that the first partition contains Windows&lt;br /&gt;
*the R&amp;amp;R partition needs to be of type 0x0b (FAT32) for the R&amp;amp;R software to work&lt;br /&gt;
&lt;br /&gt;
Since neither LILO nor GRUB catch the press of the button (an undocumented mechanism anyway) it is not possible to invoke Rescue and Recovery by pressing the appropriate button during system boot, once LILO or GRUB have altered the MBR for their boot procedure.&lt;br /&gt;
&lt;br /&gt;
The IBM provides a program to manage the R&amp;amp;R bootloader. It is located in {{path|C:\Program Files\IBM ThinkVantage\Common\BMGR}}. It can select the partition to boot, and also allows for rewriting the R&amp;amp;R MBR if it was overwritten.&lt;br /&gt;
&lt;br /&gt;
===MBR written by GRUB===&lt;br /&gt;
If the MBR was written by GRUB you can still use GRUB to boot the Rescue and Recovery partition. However if you leave its partition's type to 0x12 (Compaq diagnostics), this will result in an error message &amp;quot;c000021a, Fatal System Error&amp;quot; if you try to boot it. To avoid that and to make sure the recovery partition always is of the right type, add a line to change the partition type to 0x0b to the recovery partition's entry in your {{path|/boot/grub/menu.lst}}. Assuming your recovery partition is the second partition,  it should look like this:&lt;br /&gt;
  title           IBM Rescue and Recovery&lt;br /&gt;
  root            (hd0,1)&lt;br /&gt;
  '''parttype        (hd0,1) 0x0b'''&lt;br /&gt;
  '''unhide          (hd0,1)'''&lt;br /&gt;
  chainloader     +1&lt;br /&gt;
&lt;br /&gt;
Also add an &amp;lt;tt&amp;gt;unhide&amp;lt;/tt&amp;gt; line here because we are going to hide the recovery partition on every boot of Windows, so we need to unhide it, when the recovery partition is booted. This is because if we don't hide the partition when booting Windows, it would be visible and accessable there and that's not what we want. So, assuming that Windows is on the first partition, the Windows entry should now look like this:&lt;br /&gt;
  title           Windows&lt;br /&gt;
  root            (hd0,0)&lt;br /&gt;
  '''hide            (hd0,1)'''&lt;br /&gt;
  chainloader     +1&lt;br /&gt;
&lt;br /&gt;
===GRUB in a partitions boot sector===&lt;br /&gt;
A way to have your Access IBM button still functional on bootup, is to create a separate {{path|/boot}} partition, install GRUB to that partition and make it active. This will leave the MBR untouched.&lt;br /&gt;
{{NOTE|If the above finding is true that the MBR ignores the active bit, that partition has to be the first one. In most recent Linux distributions - for example Ubuntu - it is not easy to create /boot as first partition and shrink the Windows partition. In that case the Windows bootloader can be used to boot Windows and Linux, preserving teh Rescue and Recovery functionality. See below.}}&lt;br /&gt;
*In the BIOS, set the IBM Predesktop Area to 'Secure'.&lt;br /&gt;
*Boot your Linux distribution's installation CD.&lt;br /&gt;
*Follow the instructions and go through the regular installation process.&lt;br /&gt;
*Create a primary partition for /boot (the other stuff can go into the extended partitions) and when the time comes to install GRUB, make sure you install it into the boot sector of the boot partition.&lt;br /&gt;
*Set this boot partition as active.&lt;br /&gt;
&lt;br /&gt;
===Using NTLDR to boot Linux===&lt;br /&gt;
It is possible to configure the Windows bootloader to also boot Linux (installed on separate partition). This allows to preserve the Rescue and Recovery functionality at system boot (as MBR is not modified), Windows XP (booted via its native bootloader) and Linux (booted from its own partition by Windows XP bootloader). A quick and dirty howto, regarding applying this procedure to Ubuntu Dapper Drake installation can be found [http://http://gawrysiak.org/corvus/?p=4 here].&lt;br /&gt;
&lt;br /&gt;
==Older versions of Rescue and Recovery==&lt;br /&gt;
Some Thinkpads (e.g., T23 and T30) do not come with a Recovery CD, but also do not support the [[Hidden Protected Area]].  These ThinkPads have an older version of Rescue and Recovery preloaded on the hard disk to implement the factory recovery function.  Most of the comments above also apply to the older versions, with the following differences:&lt;br /&gt;
*The recovery partition type is 0x1c, hidden FAT32, LBA-mapped (or 0xc when unhidden).&lt;br /&gt;
*The boot manager program is in {{path|C:\IBMTOOLS\RECOVERY}} and only runs in a 16-bit DOS environment&lt;br /&gt;
*The IBM Predesktop area runs atop of Windows 98 (command-line) instead of WinPE&lt;br /&gt;
&lt;br /&gt;
==External Sources==&lt;br /&gt;
* IBM page on [http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-4Q2QAK ThinkVantage Rescue and Recovery].&lt;br /&gt;
* [ftp://ftp.software.ibm.com/pc/pccbbs/thinkvantage_en/tvtrnr3_1027en.txt Rescue and Recovery Readme]&lt;br /&gt;
* [http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-46088 IBM page about accessing the Recovery Partition if Linux has been installed and the F11 button no longer works]&lt;br /&gt;
* [http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-54483 IBM Rescue &amp;amp; Recovery repair diskette]&lt;br /&gt;
&lt;br /&gt;
==Models featuring this technology==&lt;br /&gt;
* ThinkPad {{T23}}, {{T30}} (R&amp;amp;R 2.0)&lt;br /&gt;
* ThinkPad {{T42}}&lt;br /&gt;
* ThinkPad {{T43}}, {{T43p}}&lt;br /&gt;
* ThinkPad {{R52}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Glossary]]&lt;/div&gt;</summary>
		<author><name>Pebolle</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Rescue_and_Recovery&amp;diff=22989</id>
		<title>Rescue and Recovery</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Rescue_and_Recovery&amp;diff=22989"/>
		<updated>2006-06-28T20:39:40Z</updated>

		<summary type="html">&lt;p&gt;Pebolle: 0x1c is &amp;quot;hidden FAT32, LBA-mapped&amp;quot; according to Andries Brouwer (google for it)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=&amp;quot;100%&amp;quot;&lt;br /&gt;
|style=&amp;quot;vertical-align:top;padding-right:20px;width:10px;&amp;quot; | __NOTOC__&lt;br /&gt;
|style=&amp;quot;vertical-align:top&amp;quot; |&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin: 0; margin-right:10px; border: 1px solid #dfdfdf; padding: 0em 1em 1em 1em; background-color:#F8F8FF; align:right;&amp;quot;&amp;gt;&lt;br /&gt;
===Rescue and Recovery===&lt;br /&gt;
Rescue and Recovery version 3.0 consists of a bootable partition containing various system recovery tools, including full recovery of the preinstalled Windows XP partition. It can be activated by pressing the {{ibmkey|ThinkPad|#494949}}, {{ibmkey|Access IBM|#495988}} or {{ibmkey|ThinkVantage|#495988}} [[ThinkPad Button|Button]] during system boot. It contains a FAT filesystem (labeled &amp;quot;IBM_SERVICE&amp;quot;), and has partition type 0x12 (&amp;quot;Compaq diagnostics&amp;quot; in &amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
As opposed to a [[Hidden Protected Area|Hidden Protected Area]] Recovery partitions are ordinary partitions, accessible through the partition table. As they are ordinary partitions they are accessible by ordinary partitioning tools. They should be dealt carefully with.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
==Proper MBR==&lt;br /&gt;
{{WARN|Tinkering with the default MBR and the Rescue &amp;amp; Recovery partition puts risk to your system. It can result in rendering the system completely unusable and severe data loss. You follow any instructions described here on your own risk.}}&lt;br /&gt;
&lt;br /&gt;
Consideration 6 of the Readme states:&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&amp;quot;The Master Boot Record (MBR) must be configured properly for the Rescue and Recovery application to function properly.  When possible, the Rescue and Recovery application attempts to ensure the proper configuration of the MBR.  This can only occur if the Rescue and Recovery application is installed after other applications that requires the MBR.&amp;quot;&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Apparently, the MBR is not &amp;quot;configured properly&amp;quot; if LILO or GRUB have written it. The following is the case:&lt;br /&gt;
*the default bootloader seems to ignore the active bit and always boots the first partition instead&lt;br /&gt;
*the default bootloader contains code to catch a press of the appropriate button during bootup and boot the R&amp;amp;R partition in that case&lt;br /&gt;
*before booting the R&amp;amp;R, the default bootloader changes its partition type to 0x0b, otherwise it changes it to 0x12 (to hide it from Windows)&lt;br /&gt;
*the R&amp;amp;R software assumes that the first partition contains Windows&lt;br /&gt;
*the R&amp;amp;R partition needs to be of type 0x0b (FAT32) for the R&amp;amp;R software to work&lt;br /&gt;
&lt;br /&gt;
Since neither LILO nor GRUB catch the press of the button (an undocumented mechanism anyway) it is not possible to invoke Rescue and Recovery by pressing the appropriate button during system boot, once LILO or GRUB have altered the MBR for their boot procedure.&lt;br /&gt;
&lt;br /&gt;
The IBM provides a program to manage the R&amp;amp;R bootloader. It is located in {{path|C:\Program Files\IBM ThinkVantage\Common\BMGR}}. It can select the partition to boot, and also allows for rewriting the R&amp;amp;R MBR if it was overwritten.&lt;br /&gt;
&lt;br /&gt;
===MBR written by GRUB===&lt;br /&gt;
If the MBR was written by GRUB you can still use GRUB to boot the Rescue and Recovery partition. However if you leave its partition's type to 0x12 (Compaq diagnostics), this will result in an error message &amp;quot;c000021a, Fatal System Error&amp;quot; if you try to boot it. To avoid that and to make sure the recovery partition always is of the right type, add a line to change the partition type to 0x0b to the recovery partition's entry in your {{path|/boot/grub/menu.lst}}. Assuming your recovery partition is the second partition,  it should look like this:&lt;br /&gt;
  title           IBM Rescue and Recovery&lt;br /&gt;
  root            (hd0,1)&lt;br /&gt;
  '''parttype        (hd0,1) 0x0b'''&lt;br /&gt;
  '''unhide          (hd0,1)'''&lt;br /&gt;
  chainloader     +1&lt;br /&gt;
&lt;br /&gt;
Also add an &amp;lt;tt&amp;gt;unhide&amp;lt;/tt&amp;gt; line here because we are going to hide the recovery partition on every boot of Windows, so we need to unhide it, when the recovery partition is booted. This is because if we don't hide the partition when booting Windows, it would be visible and accessable there and that's not what we want. So, assuming that Windows is on the first partition, the Windows entry should now look like this:&lt;br /&gt;
  title           Windows&lt;br /&gt;
  root            (hd0,0)&lt;br /&gt;
  '''hide            (hd0,1)'''&lt;br /&gt;
  chainloader     +1&lt;br /&gt;
&lt;br /&gt;
===GRUB in a partitions boot sector===&lt;br /&gt;
A way to have your Access IBM button still functional on bootup, is to create a separate {{path|/boot}} partition, install GRUB to that partition and make it active. This will leave the MBR untouched.&lt;br /&gt;
{{NOTE|If the above finding is true that the MBR ignores the active bit, that partition has to be the first one. In most recent Linux distributions - for example Ubuntu - it is not easy to create /boot as first partition and shrink the Windows partition. In that case the Windows bootloader can be used to boot Windows and Linux, preserving teh Rescue and Recovery functionality. See below.}}&lt;br /&gt;
*In the BIOS, set the IBM Predesktop Area to 'Secure'.&lt;br /&gt;
*Boot your Linux distribution's installation CD.&lt;br /&gt;
*Follow the instructions and go through the regular installation process.&lt;br /&gt;
*Create a primary partition for /boot (the other stuff can go into the extended partitions) and when the time comes to install GRUB, make sure you install it into the boot sector of the boot partition.&lt;br /&gt;
*Set this boot partition as active.&lt;br /&gt;
&lt;br /&gt;
===Using NTLDR to boot Linux===&lt;br /&gt;
It is possible to configure the Windows bootloader to also boot Linux (installed on separate partition). This allows to preserve the Rescue and Recovery functionality at system boot (as MBR is not modified), Windows XP (booted via its native bootloader) and Linux (booted from its own partition by Windows XP bootloader). A quick and dirty howto, regarding applying this procedure to Ubuntu Dapper Drake installation can be found [http://http://gawrysiak.org/corvus/?p=4 here].&lt;br /&gt;
&lt;br /&gt;
==Older versions of Rescue and Recovery==&lt;br /&gt;
Some Thinkpads (e.g., T23 and T30) do not come with a Recovery CD, but also do not support the [[Hidden Protected Area]].  These ThinkPads have an older version of Rescue and Recovery preloaded on the hard disk to implement the factory recovery function.  Most of the comments above also apply to the older versions, with the following differences:&lt;br /&gt;
*The recovery partition type is 0x1c, hidden FAT32, LBA-mapped (or 0xc when unhidden).&lt;br /&gt;
*The boot manager program is in {{path|C:\IBMTOOLS\RECOVERY}} and only runs in a 16-bit DOS environment&lt;br /&gt;
*The IBM Predesktop area runs atop of Windows 98 (command-line) instead of WinPE&lt;br /&gt;
&lt;br /&gt;
==External Sources==&lt;br /&gt;
* IBM page on [http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-4Q2QAK ThinkVantage Rescue and Recovery].&lt;br /&gt;
* [ftp://ftp.software.ibm.com/pc/pccbbs/thinkvantage_en/tvtrnr3_1027en.txt Rescue and Recovery Readme]&lt;br /&gt;
* [http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-46088 IBM page about accessing the Recovery Partition if Linux has been installed and the F11 button no longer works]&lt;br /&gt;
* [http://sharadware.com/2005/07/11/suse-linux-winxp-access-ibm-on-the-thinkpad-t43/#comment-165 original GRUB R&amp;amp;R boot success report on SharedWare]&lt;br /&gt;
* [http://sharadware.com/2005/07/11/suse-linux-winxp-access-ibm-on-the-thinkpad-t43/ how to keep the AccessIBM functionality]&lt;br /&gt;
* [http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-54483 IBM Rescue &amp;amp; Recovery repair diskette]&lt;br /&gt;
&lt;br /&gt;
==Models featuring this technology==&lt;br /&gt;
* ThinkPad {{T23}}, {{T30}} (R&amp;amp;R 2.0)&lt;br /&gt;
* ThinkPad {{T42}}&lt;br /&gt;
* ThinkPad {{T43}}, {{T43p}}&lt;br /&gt;
* ThinkPad {{R52}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Glossary]]&lt;/div&gt;</summary>
		<author><name>Pebolle</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Rescue_and_Recovery&amp;diff=22988</id>
		<title>Rescue and Recovery</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Rescue_and_Recovery&amp;diff=22988"/>
		<updated>2006-06-28T20:35:01Z</updated>

		<summary type="html">&lt;p&gt;Pebolle: various clarfications etc.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=&amp;quot;100%&amp;quot;&lt;br /&gt;
|style=&amp;quot;vertical-align:top;padding-right:20px;width:10px;&amp;quot; | __NOTOC__&lt;br /&gt;
|style=&amp;quot;vertical-align:top&amp;quot; |&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin: 0; margin-right:10px; border: 1px solid #dfdfdf; padding: 0em 1em 1em 1em; background-color:#F8F8FF; align:right;&amp;quot;&amp;gt;&lt;br /&gt;
===Rescue and Recovery===&lt;br /&gt;
Rescue and Recovery version 3.0 consists of a bootable partition containing various system recovery tools, including full recovery of the preinstalled Windows XP partition. It can be activated by pressing the {{ibmkey|ThinkPad|#494949}}, {{ibmkey|Access IBM|#495988}} or {{ibmkey|ThinkVantage|#495988}} [[ThinkPad Button|Button]] during system boot. It contains a FAT filesystem (labeled &amp;quot;IBM_SERVICE&amp;quot;), and has partition type 0x12 (&amp;quot;Compaq diagnostics&amp;quot; in &amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
As opposed to a [[Hidden Protected Area|Hidden Protected Area]] Recovery partitions are ordinary partitions, accessible through the partition table. As they are ordinary partitions they are accessible by ordinary partitioning tools. They should be dealt carefully with.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
==Proper MBR==&lt;br /&gt;
{{WARN|Tinkering with the default MBR and the Rescue &amp;amp; Recovery partition puts risk to your system. It can result in rendering the system completely unusable and severe data loss. You follow any instructions described here on your own risk.}}&lt;br /&gt;
&lt;br /&gt;
Consideration 6 of the Readme states:&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&amp;quot;The Master Boot Record (MBR) must be configured properly for the Rescue and Recovery application to function properly.  When possible, the Rescue and Recovery application attempts to ensure the proper configuration of the MBR.  This can only occur if the Rescue and Recovery application is installed after other applications that requires the MBR.&amp;quot;&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Apparently, the MBR is not &amp;quot;configured properly&amp;quot; if LILO or GRUB have written it. The following is the case:&lt;br /&gt;
*the default bootloader seems to ignore the active bit and always boots the first partition instead&lt;br /&gt;
*the default bootloader contains code to catch a press of the appropriate button during bootup and boot the R&amp;amp;R partition in that case&lt;br /&gt;
*before booting the R&amp;amp;R, the default bootloader changes its partition type to 0x0b, otherwise it changes it to 0x12 (to hide it from Windows)&lt;br /&gt;
*the R&amp;amp;R software assumes that the first partition contains Windows&lt;br /&gt;
*the R&amp;amp;R partition needs to be of type 0x0b (FAT32) for the R&amp;amp;R software to work&lt;br /&gt;
&lt;br /&gt;
Since neither LILO nor GRUB catch the press of the button (an undocumented mechanism anyway) it is not possible to invoke Rescue and Recovery by pressing the appropriate button during system boot, once LILO or GRUB have altered the MBR for their boot procedure.&lt;br /&gt;
&lt;br /&gt;
The IBM provides a program to manage the R&amp;amp;R bootloader. It is located in {{path|C:\Program Files\IBM ThinkVantage\Common\BMGR}}. It can select the partition to boot, and also allows for rewriting the R&amp;amp;R MBR if it was overwritten.&lt;br /&gt;
&lt;br /&gt;
===MBR written by GRUB===&lt;br /&gt;
If the MBR was written by GRUB you can still use GRUB to boot the Rescue and Recovery partition. However if you leave its partition's type to 0x12 (Compaq diagnostics), this will result in an error message &amp;quot;c000021a, Fatal System Error&amp;quot; if you try to boot it. To avoid that and to make sure the recovery partition always is of the right type, add a line to change the partition type to 0x0b to the recovery partition's entry in your {{path|/boot/grub/menu.lst}}. Assuming your recovery partition is the second partition,  it should look like this:&lt;br /&gt;
  title           IBM Rescue and Recovery&lt;br /&gt;
  root            (hd0,1)&lt;br /&gt;
  '''parttype        (hd0,1) 0x0b'''&lt;br /&gt;
  '''unhide          (hd0,1)'''&lt;br /&gt;
  chainloader     +1&lt;br /&gt;
&lt;br /&gt;
Also add an &amp;lt;tt&amp;gt;unhide&amp;lt;/tt&amp;gt; line here because we are going to hide the recovery partition on every boot of Windows, so we need to unhide it, when the recovery partition is booted. This is because if we don't hide the partition when booting Windows, it would be visible and accessable there and that's not what we want. So, assuming that Windows is on the first partition, the Windows entry should now look like this:&lt;br /&gt;
  title           Windows&lt;br /&gt;
  root            (hd0,0)&lt;br /&gt;
  '''hide            (hd0,1)'''&lt;br /&gt;
  chainloader     +1&lt;br /&gt;
&lt;br /&gt;
===GRUB in a partitions boot sector===&lt;br /&gt;
A way to have your Access IBM button still functional on bootup, is to create a separate {{path|/boot}} partition, install GRUB to that partition and make it active. This will leave the MBR untouched.&lt;br /&gt;
{{NOTE|If the above finding is true that the MBR ignores the active bit, that partition has to be the first one. In most recent Linux distributions - for example Ubuntu - it is not easy to create /boot as first partition and shrink the Windows partition. In that case the Windows bootloader can be used to boot Windows and Linux, preserving teh Rescue and Recovery functionality. See below.}}&lt;br /&gt;
*In the BIOS, set the IBM Predesktop Area to 'Secure'.&lt;br /&gt;
*Boot your Linux distribution's installation CD.&lt;br /&gt;
*Follow the instructions and go through the regular installation process.&lt;br /&gt;
*Create a primary partition for /boot (the other stuff can go into the extended partitions) and when the time comes to install GRUB, make sure you install it into the boot sector of the boot partition.&lt;br /&gt;
*Set this boot partition as active.&lt;br /&gt;
&lt;br /&gt;
===Using NTLDR to boot Linux===&lt;br /&gt;
It is possible to configure the Windows bootloader to also boot Linux (installed on separate partition). This allows to preserve the Rescue and Recovery functionality at system boot (as MBR is not modified), Windows XP (booted via its native bootloader) and Linux (booted from its own partition by Windows XP bootloader). A quick and dirty howto, regarding applying this procedure to Ubuntu Dapper Drake installation can be found [http://http://gawrysiak.org/corvus/?p=4 here].&lt;br /&gt;
&lt;br /&gt;
==Older versions of Rescue and Recovery==&lt;br /&gt;
Some Thinkpads (e.g., T23 and T30) do not come with a Recovery CD, but also do not support the [[Hidden Protected Area]].  These ThinkPads have an older version of Rescue and Recovery preloaded on the hard disk to implement the factory recovery function.  Most of the comments above also apply to the older versions, with the following differences:&lt;br /&gt;
*The recovery partition type is 0x1c, hidden FAT32, (or 0xc when unhidden).&lt;br /&gt;
*The boot manager program is in {{path|C:\IBMTOOLS\RECOVERY}} and only runs in a 16-bit DOS environment&lt;br /&gt;
*The IBM Predesktop area runs atop of Windows 98 (command-line) instead of WinPE&lt;br /&gt;
&lt;br /&gt;
==External Sources==&lt;br /&gt;
* IBM page on [http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-4Q2QAK ThinkVantage Rescue and Recovery].&lt;br /&gt;
* [ftp://ftp.software.ibm.com/pc/pccbbs/thinkvantage_en/tvtrnr3_1027en.txt Rescue and Recovery Readme]&lt;br /&gt;
* [http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-46088 IBM page about accessing the Recovery Partition if Linux has been installed and the F11 button no longer works]&lt;br /&gt;
* [http://sharadware.com/2005/07/11/suse-linux-winxp-access-ibm-on-the-thinkpad-t43/#comment-165 original GRUB R&amp;amp;R boot success report on SharedWare]&lt;br /&gt;
* [http://sharadware.com/2005/07/11/suse-linux-winxp-access-ibm-on-the-thinkpad-t43/ how to keep the AccessIBM functionality]&lt;br /&gt;
* [http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-54483 IBM Rescue &amp;amp; Recovery repair diskette]&lt;br /&gt;
&lt;br /&gt;
==Models featuring this technology==&lt;br /&gt;
* ThinkPad {{T23}}, {{T30}} (R&amp;amp;R 2.0)&lt;br /&gt;
* ThinkPad {{T42}}&lt;br /&gt;
* ThinkPad {{T43}}, {{T43p}}&lt;br /&gt;
* ThinkPad {{R52}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Glossary]]&lt;/div&gt;</summary>
		<author><name>Pebolle</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Rescue_and_Recovery&amp;diff=22987</id>
		<title>Rescue and Recovery</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Rescue_and_Recovery&amp;diff=22987"/>
		<updated>2006-06-28T20:17:14Z</updated>

		<summary type="html">&lt;p&gt;Pebolle: Revert last edit for various reasons. Maybe this can be resubmit as &amp;quot;Talk&amp;quot; for this page.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=&amp;quot;100%&amp;quot;&lt;br /&gt;
|style=&amp;quot;vertical-align:top;padding-right:20px;width:10px;&amp;quot; | __NOTOC__&lt;br /&gt;
|style=&amp;quot;vertical-align:top&amp;quot; |&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin: 0; margin-right:10px; border: 1px solid #dfdfdf; padding: 0em 1em 1em 1em; background-color:#F8F8FF; align:right;&amp;quot;&amp;gt;&lt;br /&gt;
===Rescue and Recovery===&lt;br /&gt;
Rescue and Recovery version 3.0 consists of a bootable partition containing various system recovery tools, including full recovery of the preinstalled Windows XP partition. It can be activated by pressing the {{ibmkey|ThinkPad|#494949}}, {{ibmkey|Access IBM|#495988}} or {{ibmkey|ThinkVantage|#495988}} [[ThinkPad Button|Button]] during system boot. It contains a FAT filesystem (labeled &amp;quot;IBM_SERVICE&amp;quot;), and has partition type 0x12 (&amp;quot;Compaq diagnostics&amp;quot; in &amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
As opposed to a [[Hidden Protected Area|Hidden Protected Area]] Recovery partitions are ordinary partitions, accessible through the partition table. As they are ordinary partitions they are accessible by ordinary partitioning tools. They should be dealt carefully with.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
==Proper MBR==&lt;br /&gt;
{{WARN|Tinkering with the default MBR and the Rescue &amp;amp; Recovery partition puts risk to your system. It can result in rendering the system completely unusable and severe data loss. You follow any instructions described here on your own risk.}}&lt;br /&gt;
&lt;br /&gt;
Consideration 6 of the Readme states:&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&amp;quot;The Master Boot Record (MBR) must be configured properly for the Rescue and Recovery application to function properly.  When possible, the Rescue and Recovery application attempts to ensure the proper configuration of the MBR.  This can only occur if the Rescue and Recovery application is installed after other applications that requires the MBR.&amp;quot;&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Apparently, the MBR is not &amp;quot;configured properly&amp;quot; if LILO or GRUB has been installed in it as the following is the case:&lt;br /&gt;
*the default MBR seems to ignore the active bit and always boots the first partition instead&lt;br /&gt;
*the default MBR contains code to catch a press of the appropriate button during bootup and boot the R&amp;amp;R partition in that case&lt;br /&gt;
*before booting the R&amp;amp;R, the default MBR changes its partition type to 0x0b, otherwise it changes it to 0x12 (to hide it from Windows)&lt;br /&gt;
*the R&amp;amp;R software assumes that the first partition contains Windows&lt;br /&gt;
*the R&amp;amp;R partition needs to be of type 0x0b (FAT32) for the R&amp;amp;R software to work&lt;br /&gt;
&lt;br /&gt;
Since neither LILO nor GRUB can catch the press of the button (an undocumented mechanism anyway) it is not possible to invoke Rescue and Recovery by pressing the appropriate button during system boot, once LILO or GRUB have altered the MBR for their boot procedure.&lt;br /&gt;
&lt;br /&gt;
The IBM provides a program to manage the R&amp;amp;R MBR.  It is located in {{path|C:\Program Files\IBM ThinkVantage\Common\BMGR}}.  It can select the partition to boot, and also allows for rewriting the R&amp;amp;R MBR if it was overwritten.&lt;br /&gt;
&lt;br /&gt;
===GRUB in the MBR===&lt;br /&gt;
You can, however, boot the Rescue and Recovery partition from within a GRUB residing in your MBR. However if you leave its partition's type to 0x12 (Compaq diagnostics), this will result in an error message &amp;quot;c000021a, Fatal System Error&amp;quot; if you try to boot it. To avoid that and to make sure the recovery partition always is of the right type, add a line to change the partition type to 0x0b to the recovery partition's entry in your {{path|/boot/grub/menu.lst}}. Assuming your recovery partition is the second partition,  it should look like this:&lt;br /&gt;
  title           IBM Rescue and Recovery&lt;br /&gt;
  root            (hd0,1)&lt;br /&gt;
  '''parttype        (hd0,1) 0x0b'''&lt;br /&gt;
  '''unhide          (hd0,1)'''&lt;br /&gt;
  chainloader     +1&lt;br /&gt;
&lt;br /&gt;
We also add an &amp;lt;tt&amp;gt;unhide&amp;lt;/tt&amp;gt; line here because we are going to hide the recovery partition on every boot of Windows, so we need to unhide it, when the recovery partition is booted. This is because if we don't hide the partition when booting Windows, it would be visible and accessable there and that's not what we want. So, assuming that Windows is on the first partition, the Windows entry should now look like this:&lt;br /&gt;
  title           Windows&lt;br /&gt;
  root            (hd0,0)&lt;br /&gt;
  '''hide            (hd0,1)'''&lt;br /&gt;
  chainloader     +1&lt;br /&gt;
&lt;br /&gt;
Now you should be able to boot the R&amp;amp;R partition from within GRUB, residing in your MBR.&lt;br /&gt;
&lt;br /&gt;
===GRUB in a partitions boot sector===&lt;br /&gt;
A way to have your Access IBM button still functional on bootup, is to create a separate {{path|/boot}} partition, install GRUB to that partition and make it active.&lt;br /&gt;
{{NOTE|If the above finding is true that the MBR ignores the active bit, that partition has to be the first one. In most recent Linux distributions - for example Ubuntu - it is not easy to create /boot as first partition and shrink Windows partition. In such case Windows XP bootloader can be used to boot Windows and Linux, preserving Access IBM functionality. See below.}}&lt;br /&gt;
*In the BIOS, set the IBM Predesktop Area to 'Secure'.&lt;br /&gt;
*Boot your Linux distribution's installation CD.&lt;br /&gt;
*Follow the instructions and go through the regular installation process.&lt;br /&gt;
*Create a primary partition for /boot (the other stuff can go into the extended partitions) and when the time comes to install GRUB, make sure you install it into the boot sector of the boot partition.&lt;br /&gt;
*Set this partition as active. Leave the MBR alone.&lt;br /&gt;
&lt;br /&gt;
===Using NTLDR to boot Linux===&lt;br /&gt;
It is possible to use Windows XP bootloader to boot also Linux installed on separate partition. This allows to preserve Access IBM functionality (as MBR is not modified), Windows XP (booted via its native bootloader) and Linux (booted from its own partition by Windows XP bootloader). A quick &amp;amp; dirty howto, regarding applying this procedure to Ubuntu Dapper Drake installation can be found [http://http://gawrysiak.org/corvus/?p=4 here].&lt;br /&gt;
&lt;br /&gt;
==Older versions of Rescue and Recovery==&lt;br /&gt;
Some Thinkpads (e.g., T23 and T30) do not come with a Recovery CD, but also do not support the [[Hidden Protected Area]].  These ThinkPads have an older version of Rescue and Recovery preloaded on the hard disk to implement the factory recovery function.  Most of the comments above also apply to the older versions, with the following differences:&lt;br /&gt;
*The recovery partition type is 0x1c, hidden FAT32, (or 0xc when unhidden).&lt;br /&gt;
*The boot manager program is in {{path|C:\IBMTOOLS\RECOVERY}} and only runs in a 16-bit DOS environment&lt;br /&gt;
*The IBM Predesktop area runs atop of Windows 98 (command-line) instead of WinPE&lt;br /&gt;
&lt;br /&gt;
==External Sources==&lt;br /&gt;
* IBM page on [http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-4Q2QAK ThinkVantage Rescue and Recovery].&lt;br /&gt;
* [ftp://ftp.software.ibm.com/pc/pccbbs/thinkvantage_en/tvtrnr3_1027en.txt Rescue and Recovery Readme]&lt;br /&gt;
* [http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-46088 IBM page about accessing the Recovery Partition if Linux has been installed and the F11 button no longer works]&lt;br /&gt;
* [http://sharadware.com/2005/07/11/suse-linux-winxp-access-ibm-on-the-thinkpad-t43/#comment-165 original GRUB R&amp;amp;R boot success report on SharedWare]&lt;br /&gt;
* [http://sharadware.com/2005/07/11/suse-linux-winxp-access-ibm-on-the-thinkpad-t43/ how to keep the AccessIBM functionality]&lt;br /&gt;
* [http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-54483 IBM Rescue &amp;amp; Recovery repair diskette]&lt;br /&gt;
&lt;br /&gt;
==Models featuring this technology==&lt;br /&gt;
* ThinkPad {{T23}}, {{T30}} (R&amp;amp;R 2.0)&lt;br /&gt;
* ThinkPad {{T42}}&lt;br /&gt;
* ThinkPad {{T43}}, {{T43p}}&lt;br /&gt;
* ThinkPad {{R52}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Glossary]]&lt;/div&gt;</summary>
		<author><name>Pebolle</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Talk:Predesktop_Area&amp;diff=22706</id>
		<title>Talk:Predesktop Area</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Talk:Predesktop_Area&amp;diff=22706"/>
		<updated>2006-06-11T17:01:58Z</updated>

		<summary type="html">&lt;p&gt;Pebolle: GRUB won't work ..&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Use the HPA for GNU/Linux?==&lt;br /&gt;
More interesting than removing the HPA (which includes a.o. Acces IBM Predesktop Area, some other tools and a backup of the pre-installed OS) would be to use this area for GNU/Linux too. At least, removing the HPA only saves 3,5 GB on my 60 GB hard disk. It would be worth a try to see whether the backup of the pre-installed OS on the largest PSA could be replaced by a backup of your favourite GNU/Linux distribution.&lt;br /&gt;
&lt;br /&gt;
Elaborating on my ideas a few days later, I'd guess the following could be tried:&lt;br /&gt;
* see whether GRUB can be made to boot the Access IBM Predekstop Area (I guess by &amp;quot;chainloading&amp;quot; the bootsector of its PSA). Right now GRUB refuses to load sectors outside the partioned area. I've got absolutely no idea if it's possible to write a hack to overcome that restriction. Need to contact the GRUB people about that ...&lt;br /&gt;
* write some userspace tools for the HPA/the SPAs (things like: dumpbeer, printDoS).&lt;br /&gt;
&lt;br /&gt;
It should be clear these are basically random ideas. Still feedback would be appreciated ...&lt;br /&gt;
----&lt;br /&gt;
Hei,&lt;br /&gt;
&lt;br /&gt;
interesting ideas, but i'd only see a point in it if one could keep Win and Linux rescue stuff in the HPA. That means it would need to be expandable or fit the stuff for both systems.&lt;br /&gt;
[[User:Wyrfel|Wyrfel]] 20:03, 15 Mar 2005 (CET)&lt;br /&gt;
---- &lt;br /&gt;
Thanks.&lt;br /&gt;
&lt;br /&gt;
Short answer: that should be possible.&lt;br /&gt;
&lt;br /&gt;
Long answer: I see little in the specs (as I understand them now) to stop one from adding (say) an extra 3 GB GNU/Linux-rescue PSA or something like that. We might try to do that first by changing the BEER and DoS manually. (Not sure whether Phoenix added some proprietary stuff to keep you from booting it. The PSA should always be accesable with the proper BIOS setting.) It might be mandatory to put it on a FAT filesystem. The hard part probably is to have it show up in the Access IBM Predesktop Area. (My guess is you need to regenerate the FirstSight &amp;quot;graphical shell&amp;quot;. If that's correct we probably only can use the FirstWare tools &amp;quot;hidden&amp;quot; on their little PSA. That's no fun. Well it might a little fun if we try FreeDOS). &lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle (not logged in)]]&lt;br /&gt;
----&lt;br /&gt;
Update: a trivial patch to grub allows it to also work outside the partioned area:&lt;br /&gt;
&lt;br /&gt;
 --- /var/tmp/rpm/BUILD/grub-0.95/stage2/disk_io.c.oud   2004-05-23 18:35:24.000000000 +0200&lt;br /&gt;
 +++ /var/tmp/rpm/BUILD/grub-0.95/stage2/disk_io.c       2005-03-18 22:38:30.050907408 +0100&lt;br /&gt;
 @@ -297,8 +297,8 @@&lt;br /&gt;
     *  Check partition boundaries&lt;br /&gt;
     */&lt;br /&gt;
    if (sector &amp;lt; 0&lt;br /&gt;
 -      || ((sector + ((byte_offset + byte_len - 1) &amp;gt;&amp;gt; SECTOR_BITS))&lt;br /&gt;
 -         &amp;gt;= part_length))&lt;br /&gt;
 +      /*|| ((sector + ((byte_offset + byte_len - 1) &amp;gt;&amp;gt; SECTOR_BITS))&lt;br /&gt;
 +         &amp;gt;= part_length)*/)&lt;br /&gt;
      {&lt;br /&gt;
        errnum = ERR_OUTSIDE_PART;&lt;br /&gt;
        return 0;&lt;br /&gt;
&lt;br /&gt;
I made a grub CD with a grub patched with the above. Now I can &amp;quot;cat&amp;quot; the bootsector of the Predesktop Area from the grub shell (when booting of that grub CD). But I haven't yet managed to boot the Predesktop Area (dangerous stuff!) To be continued ...&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] Fri Mar 18 22:42:43 CET 2005&lt;br /&gt;
----&lt;br /&gt;
Update: a quick test with the current development version of grub2 (grub-1.93) showed that grub2 can chainload a block outside the partitioned area &lt;br /&gt;
&amp;quot;out of the box&amp;quot;. That's nice. I still haven't been able to get passed the error messages generated by the boot sectors of the bootable PSAs. My guess is the BIOS provides those boot sectors with some (special) settings that grub doesn't use ...&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 00:40, 5 April 2006 (CEST)&lt;br /&gt;
----&lt;br /&gt;
GRUB cannot be expected to (chain)load the Predesktop Area. When showing the Predesktop Area the BIOS runs in a special mode (more specifically: using some very specific interrupts, behaving differently under normal circumstances). So this seems to be not something to merit further investigation.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 19:01, 11 June 2006 (CEST)&lt;br /&gt;
----&lt;br /&gt;
Hey there - I hope to be welcome here to since I've no ThinkPad but an Samsung X20 notebook. This notebook uses also the HPA for some kind of a predesktop area - a linux&lt;br /&gt;
based multimedia system called &amp;quot;AVStation Now&amp;quot; which is hidden there. I used dd to dump the hpa and read the BEER table to find out what is hidden inside.&lt;br /&gt;
&lt;br /&gt;
What I found out:&lt;br /&gt;
&lt;br /&gt;
*the first partition (ext3) contains the rootfilesystem (funny, cause they use libdvdcss for dvd playback)&lt;br /&gt;
&lt;br /&gt;
*the second partition (ext3) contained a /boot partition with a special kernel with the possibility to mount this partition (seems they use a special liloversion for booting)&lt;br /&gt;
&lt;br /&gt;
*the third partition (fat?) - some html files - the firstware menu&lt;br /&gt;
&lt;br /&gt;
*and at last a fourth partition i was unable to mount&lt;br /&gt;
&lt;br /&gt;
[http://www.christophmueller.org/stuff/beerdump.html A dump of my BEER ;-)]&lt;br /&gt;
&lt;br /&gt;
Does someone know weather it would be possible mounting souch an hpapartition without using dd - maybe kernelsupport for the BEER? - since im nither a C nor a kernelhacker im unable to continue, but there must be some kind of support cause this multimediasystem knows howto handle it.&lt;br /&gt;
&lt;br /&gt;
If you need some more information you could send me an email to christoph_at_christophmueller.org&lt;br /&gt;
&lt;br /&gt;
[[User:Christophmueller.org|Christoph MÃ¼ller]]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
I've been playing around with the predesktop area tonight.  I was simply trying to just leave the diagnostics stuff and remove the windows part.  I wrote some programs to read/write the BEER data and stuff, but I wasn't able to get the system to boot it, it kept erroring &amp;quot;Authentication of System Services failed&amp;quot; (or something along those lines).  I will play around with this some more later&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[User:Invisi|Tim Nordell]]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A quick look with a hexeditor gave me two instances of &amp;quot;Application authentication has failed!&amp;quot; in the FirstSight application. Does that sound familair? &lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] Fri Apr 1 19:35:30 CEST 2005&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Actually it wasn't that.  I did a search of that too, the message itself was not in the predesktop area at all.  What also is interesting is the fw*.exe utilities for manipulating the predesktop area, contains the string &amp;quot;MD5&amp;quot; which makes me wonder if there is an md5 hash of each &amp;quot;predesktop&amp;quot; partition.  I know on the IBM whitepaper it states there being a signature so that non-signed applications can not be run.  Could a simple &amp;quot;md5&amp;quot; be the signature?&lt;br /&gt;
&lt;br /&gt;
[[User:Invisi|Tim Nordell]] 12:01, 3 Apr 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*What is it that you were trying to do (what did trigger the error you saw)?&lt;br /&gt;
&lt;br /&gt;
*About ten of the fw*.exe utilities contain the phrase &amp;quot;MD5 Checksums do not match&amp;quot;. So they could very well be using MD5 sums for some sort of validation. But they could use the MD5 sums in a lot of ways actually, so I won't yet speculate ...&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] Sun Apr  3 15:11:10 CEST 2005&lt;br /&gt;
&lt;br /&gt;
== Predesktop Area ==&lt;br /&gt;
&lt;br /&gt;
I made a program that takes the BEER record at the end, parses it out to a &amp;quot;.cfg&amp;quot; file, lets you modify it, recalibrate the start spots for the records, and write it out to disk again.  It doesn't directly access hda, 'cept for reading the original beer record.  It makes a script file to go with the files you have, to read in the HPA data, and to write it out again with the new record.&lt;br /&gt;
&lt;br /&gt;
Anyways, I tried simply removing the last record from the BEER, which is the windows recovery partition.  It didn't like that.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Did you update the two's complement checksum at the end of the BEER?&lt;br /&gt;
&lt;br /&gt;
[[user:Pebolle|Paul Bolle]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Yep, I updated that.  If I don't update that, it doesn't even say that failed message.  I also made a seperate program to update the checksum so you can also modify the beer record by hand with a hex editor and have valid checksums.&lt;br /&gt;
&lt;br /&gt;
== Linux kernel support ==&lt;br /&gt;
{{Todo|research and add to article}}&lt;br /&gt;
* Add a section on dmesg and hdparm -I output:&lt;br /&gt;
 (...)&lt;br /&gt;
 Commands/features:&lt;br /&gt;
        Enabled Supported:&lt;br /&gt;
 (...)&lt;br /&gt;
           *    Host Protected Area feature set&lt;br /&gt;
 (...)&lt;br /&gt;
                SET MAX security extension&lt;br /&gt;
                Address Offset Reserved Area Boot&lt;br /&gt;
 (...)&lt;br /&gt;
&lt;br /&gt;
* Recent (2.6.10 and up?) kernels disable HPAs automatically (in drivers/ide/ide-disk.c). Dmesg example:&lt;br /&gt;
&lt;br /&gt;
 hda: Host Protected Area detected.&lt;br /&gt;
        current capacity is 110194034 sectors (56419 MB)&lt;br /&gt;
         native  capacity is 117210240 sectors (60011 MB)&lt;br /&gt;
 hda: Host Protected Area disabled.&lt;br /&gt;
&lt;br /&gt;
This should be (further researched and) added to this section (maybe with some pointers to the unexpected consequences of this new approach ...)&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 22:06, 6 Sep 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
In 2.6.11, I was able to re-enable HPA by commenting out the section in drivers/ide/ide-disk.c under the comment &amp;quot;Some maxtor support LBA48 but not accept LBA48 set max...&amp;quot;.  I suppose that wouldn't be a good idea with a Maxtor drive but it worked fine for my R50.&lt;br /&gt;
&lt;br /&gt;
--[[User:Rkilian|Robert Kilian]] 21:13, 22 March 2006 (CET)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* SRCMOS24.EXE&lt;br /&gt;
&lt;br /&gt;
In the PSA used by the Predesktop Area I found a &amp;quot;hidden&amp;quot; executable: SRCMOS24.EXE (it is not mentioned in the FAT). This executable can capture and update CMOS data. It might only be used by the FirstSight program to display (part of) the BIOS info. It might be nice to see what it can do and if similar things are possible under GNU/Linux.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 22:01, 7 Sep 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
== Newer thinkpads don't use Phoenix Firstware? ==&lt;br /&gt;
&lt;br /&gt;
On my T42 that arrived yesterday, the predesktop area looks a lot like MS Windows. The widget set, the fonts, even the boot sequence looks exactly like Windows 2000. Debian-installer indentified it as &amp;quot;Microsoft Windows NT/2000/XP&amp;quot;, while it identified my XP partition as &amp;quot;Microsoft Windows XP Professional&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Has Lenovo/IBM changed their system, or is this Phoenix stuff really just Windows?&lt;br /&gt;
&lt;br /&gt;
-- [[Evan.Heidtmann]]&lt;br /&gt;
&lt;br /&gt;
Evan,&lt;br /&gt;
&lt;br /&gt;
Could it be that you're talking about the preinstalled version of Windows here? As far as I know (using information to be found on the internet, not personal research) the preinstalled OS will reformat its partition from FAT32 to NTFS at first boot. That could explain the difference in the identification by the Debian installer (which I never really used).&lt;br /&gt;
&lt;br /&gt;
Moreover the Predesktop Area is part of the HPA and the HPA is not an partition. It seems unlikely that the Debain installer notices the HPA. As far as I know there are at present no GNU/Linux tools with a (useful) support of HPAs.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 15:43, 4 Aug 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
My T42P (model 2373HSG) is using a cut-down version of Windows XP as the pre-desktop area.  I'm not sure whether it's a special IBM thing or just a [http://www.microsoft.com/licensing/programs/sa/benefits/winpe.mspx Windows PE] (preinstallation environment) setup.  It includes Java and Python, which are used by some of the IBM tools, and the Opera web browser.&lt;br /&gt;
&lt;br /&gt;
It's no longer an HPA but a 487MB hidden FAT32 called IBM_SERVICE located at the end of the disk.&lt;br /&gt;
&lt;br /&gt;
--[[User:Korourke|Korourke]]&lt;br /&gt;
&lt;br /&gt;
== Rescue and Recovery via grub? ==&lt;br /&gt;
&lt;br /&gt;
Did anyone get the Rescue and Recovery partition to boot via grub on recent models? On a T43 with&lt;br /&gt;
 rootnoverify (hd0,1)&lt;br /&gt;
 chainloader +1&lt;br /&gt;
the Rescue and Recovery partition starts booting nicely and then, a few seconds in the R&amp;amp;R loading sequence, chokes with a &lt;br /&gt;
 STOP: c000021a {Fatal System Error}&lt;br /&gt;
 The Session Manager Initialization system process terminated unexpectedly with a status of 0xc000003a (0x00000000 0x00000000).&lt;br /&gt;
 The system has been shut down. &lt;br /&gt;
The problem started right after installing grub into the MBR (I couldn't get the preinstalled MBR to boot grub from an active primary partition). It seems oblivious to the Predesktop BIOS setting.&lt;br /&gt;
&lt;br /&gt;
The same problem has been reported by others with other models (for example [http://forums.fedoraforum.org/archive/index.php/t-19433.html here] for a T42).&lt;br /&gt;
&lt;br /&gt;
[[User:Thinker|Thinker]] 11:35, 30 Sep 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
Your &amp;quot;Rescue and Recovery partition&amp;quot; seems not to be a HPA (which isn't a partition). Maybe we should open a new page for that system.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 21:54, 30 Sep 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
It may very well not be an HPA , but the BIOS stil calls it a &amp;quot;Predesktop Area&amp;quot;. Anyway, the partition is actually a VFAT partition (even though it has type 0x12, &amp;quot;Compaq Diagnostics&amp;quot;). It seems to boot into PC-DOS (using {{path|NTDETECT.EXE}} so it looks like Windows startup) and then its {{path|AUTOEXEC.BAT}} runs a fancy GUI.&lt;br /&gt;
--[[User:Thinker|Thinker]] 23:31, 30 Sep 2005 (CEST)&lt;br /&gt;
----&lt;br /&gt;
Right, there has been a lot of confusion about this, we should have a separate page. Introduced an edit link (called Rescue and Recovery) on the [[ThinkPad Technologies]] page for that purpose.&lt;br /&gt;
&lt;br /&gt;
== Suggestions for projects ==&lt;br /&gt;
&lt;br /&gt;
I'd guess it would be rather nice to have GNU/Linux tools (like sfdisk and parted) HPA aware. The most urgent change would be to have those programs at least recognize and respect a HPA (e.g.: do not write in or otherwise use the HPA area; unless the user gives a --force option or something similar).&lt;br /&gt;
&lt;br /&gt;
As for now, I realize I caused this error: ENOPATCH.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 22:56, 5 Nov 2005 (CET)&lt;br /&gt;
&lt;br /&gt;
== Keeping functionality of the blue AccessIBM button ==&lt;br /&gt;
&lt;br /&gt;
Somebody figured out [http://sharadware.com/2005/07/11/suse-linux-winxp-access-ibm-on-the-thinkpad-t43/|how to keep the AccessIBM functionality] when installing Linux, quite easy fix. How come nobody thought about it before? :)&lt;br /&gt;
(link got from [[Installing_Ubuntu_5.04_on_a_ThinkPad_T43_%281875%29 here]])&lt;br /&gt;
&lt;br /&gt;
--[[User:Micampe|Micampe]] 17:39, 9 Dec 2005 (CET)&lt;br /&gt;
&lt;br /&gt;
The relevant part of that page:&lt;br /&gt;
&lt;br /&gt;
''Set the IBM Predesktop Area (in the BIOS) to â€œSecureâ€. Boot using the SUSE DVD. Shrink the Windows partition as required. Follow the instructions and go through the regular installation process. Create a primary partition for /boot (the other stuff can go into the extended partitions) and when the time comes to install GRUB (you do prefer GRUB to LILO, donâ€™t you?), make sure you install it into the boot sector of the boot partition. Set this partition as active. Leave the MBR alone.''&lt;br /&gt;
&lt;br /&gt;
That's the first thing I tried on my T43. Didn't work: setting the active partition to /boot had no effect, it was still booting the first (Windows) partition. So I had to install Grub into MBR, thereby killing R&amp;amp;R. Anyway, there's another solution in the article page (didn't try it since I saw it only after purging my R&amp;amp;R partition).&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
--[[User:Thinker|Thinker]] 19:18, 9 Dec 2005 (CET)&lt;br /&gt;
&lt;br /&gt;
== Parsing the HPA information (BEER/DOS) ==&lt;br /&gt;
&lt;br /&gt;
I too have been writing a program to parse the BEER and DOS info. Sample output:&lt;br /&gt;
:{{cmdresult| beer.signature: 0xBEEF}}&lt;br /&gt;
:{{cmdresult| beer.size: 128}}&lt;br /&gt;
:{{cmdresult| beer.flags: 41}}&lt;br /&gt;
:{{cmdresult|    Read Only:}}&lt;br /&gt;
:{{cmdresult|    Generated Record:}}&lt;br /&gt;
:{{cmdresult|    Use Reserved Area Boot Code Address: yes}}&lt;br /&gt;
:{{cmdresult|    Configuration Time Stamp is valid:}}&lt;br /&gt;
:{{cmdresult|    Device Supports LBA:                 yes}}&lt;br /&gt;
:{{cmdresult|    Directory of Services is Present}}&lt;br /&gt;
:{{cmdresult|    Formatted Geometry Valid}}&lt;br /&gt;
:{{cmdresult|    Reported Geometry Valid              yes}}&lt;br /&gt;
:{{cmdresult| beer.reported_cylinders: 16383}}&lt;br /&gt;
:{{cmdresult| beer.reported_heads: 16}}&lt;br /&gt;
:{{cmdresult| beer.reported_sectors: 63}}&lt;br /&gt;
:{{cmdresult| beer.reported_bytes_sector: 512}}&lt;br /&gt;
:{{cmdresult| beer.reported_sectors_device: 117210240}}&lt;br /&gt;
:{{cmdresult| beer.formatted_cylinders: 16383}}&lt;br /&gt;
:{{cmdresult| beer.formatted_heads: 16}}&lt;br /&gt;
:{{cmdresult| beer.formatted_sectors: 63}}&lt;br /&gt;
:{{cmdresult| beer.formatted_bytes_sector: 512}}&lt;br /&gt;
:{{cmdresult| beer.formatted_sectors_device: 117210240}}&lt;br /&gt;
:{{cmdresult| year: 2004}}&lt;br /&gt;
:{{cmdresult| day: 313}}&lt;br /&gt;
:{{cmdresult| beer.timestamp: 1426063684}}&lt;br /&gt;
:{{cmdresult| beer.device_index: 0x80}}&lt;br /&gt;
:{{cmdresult| beer.hpa_start: 110194034}}&lt;br /&gt;
:{{cmdresult| beer.boot_code_address: 117002545}}&lt;br /&gt;
:{{cmdresult| beer.num_entries: 8}}&lt;br /&gt;
:{{cmdresult| beer.dir_length: 64}}&lt;br /&gt;
:{{cmdresult| beer.revision: 0}}&lt;br /&gt;
:{{cmdresult| dev_name: HTS726060M9AT00}}&lt;br /&gt;
:{{cmdresult| beer.checksum: -26982}}&lt;br /&gt;
:{{cmdresult| dos[0].flags: 3}}&lt;br /&gt;
:{{cmdresult|    Service area is available as B:}}&lt;br /&gt;
:{{cmdresult|    Diagnostic Service:}}&lt;br /&gt;
:{{cmdresult|    Service Area is Read Only:}}&lt;br /&gt;
:{{cmdresult|    This Boot:}}&lt;br /&gt;
:{{cmdresult|    Empty Service Area:}}&lt;br /&gt;
:{{cmdresult|    Hidden Service Area:                 yes}}&lt;br /&gt;
:{{cmdresult|    Service Area is bootable as A:       yes}}&lt;br /&gt;
:{{cmdresult| dos[0].service_area_start: 117005431}}&lt;br /&gt;
:{{cmdresult| dos[0].service_area_size: 204800}}&lt;br /&gt;
:{{cmdresult| dos[0].load_sectors: 1}}&lt;br /&gt;
:{{cmdresult| dos[0].load_address: 0x7:C000}}&lt;br /&gt;
:{{cmdresult| dos[0].service_area_id: 0}}&lt;br /&gt;
:{{cmdresult| dos[0] id_str: FirstWare Reserved Area}}&lt;br /&gt;
:{{cmdresult| dos[0].checksum: -22271}}&lt;br /&gt;
:{{cmdresult| [...]}}&lt;br /&gt;
&lt;br /&gt;
Very rough code. Send me an e-mail (at the address found at my user page) if you want a (GPL'd) copy, but only if you're willing to test and improve the code.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 01:15, 24 January 2006 (CET)&lt;br /&gt;
&lt;br /&gt;
== SET MAX Security Extensions ==&lt;br /&gt;
&lt;br /&gt;
I've hacked Andries Brouwer's setmax tool (see: Google) to support the SET MAX security extensions (SET MAX SET PASSWORD, SET MAX LOCK, SET MAX UNLOCK, SET MAX FREEZE). Very rough code once again. Mail me if you're willing to brick your HDD.&lt;br /&gt;
&lt;br /&gt;
A few random observations:&lt;br /&gt;
&lt;br /&gt;
- secure mode: the Phoenix BIOS probably sets a SET MAX password in the HDD, does a non-volatile SET MAX and LOCKs (or FREEZEs) the HDD.&lt;br /&gt;
&lt;br /&gt;
- normal mode: the Phoenix BIOS might set a SET MAX password in the HDD, does a (volatile?) SET MAX but does not LOCK the HDD. The HDD will accept another SET MAX, a new SET MAX SET PASSWORD, etc.&lt;br /&gt;
&lt;br /&gt;
- normal mode: Linux 2.6.x disables the HPA in normal mode (by doing a volatile SET MAX to maximum native address). After a suspend the HDD reenables the HPA (by returning to the latest non-volatile value of SET MAX). It thus treats the suspend cycle as a power cycle (it also discards a SET MAX password, unlocks or unfreezes the HPA etc). I'm not sure whether that is a correct implementation of the ATA spec. (The HDD doesn't do this in secure mode. I would like to know how the Phoenix BIOS and/or Hitachi HDD people have managed this.) &lt;br /&gt;
&lt;br /&gt;
This can lead to some problems if a partition ends within the limits of the HPA (which is then actually (partly) overwritten by that partition). Maybe the best solution would be to have the kernel do a non-volatile SET MAX to the native maximum address. Then a resume from suspend will in effect not reenable the HPA.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 01:40, 20 February 2006 (CET)&lt;br /&gt;
&lt;br /&gt;
== hpafs ==&lt;br /&gt;
&lt;br /&gt;
I've written a (read only) FUSE for the hpa: hpafs. Alpha quality at best. Mail me if you'd like to test it, hack on it. Now about 1100 LOC. The binary is a mere 33 KB (this is with debugging symbols). Rather i386 centric. &lt;br /&gt;
&lt;br /&gt;
hpafs will only work if the Predesktop Area is disabled (but that is more or less obvious). It basically turns each PSA into a file:&lt;br /&gt;
&lt;br /&gt;
{{cmdresult|$ sudo hpafs /dev/hda /mnt/hpa -o allow_other&amp;lt;br/&amp;gt;&lt;br /&gt;
$ ll /mnt/hpa/&amp;lt;br/&amp;gt;&lt;br /&gt;
total 0&amp;lt;br/&amp;gt;&lt;br /&gt;
-r--r--r--  1 root root    2097152 Jan  1  1970 BIOSWORKAREA&amp;lt;br/&amp;gt;&lt;br /&gt;
-r--r--r--  1 root root    7710720 Jan  1  1970 Create Diagnostic Diskettes&amp;lt;br/&amp;gt;&lt;br /&gt;
-r--r--r--  1 root root  104857600 Jan  1  1970 FirstWare Reserved Area&amp;lt;br/&amp;gt;&lt;br /&gt;
-r--r--r--  1 root root     7710720 Jan  1  1970 Rec Boot&amp;lt;br/&amp;gt;&lt;br /&gt;
-r--r--r--  1 root root 3459252224 Jan  1  1970 Rec Data&amp;lt;br/&amp;gt;&lt;br /&gt;
-r--r--r--  1 root root    1476096 Jan  1  1970 Restore from backup&amp;lt;br/&amp;gt;&lt;br /&gt;
-r--r--r--  1 root root    7710720 Jan  1  1970 Run Diagnostics&amp;lt;br/&amp;gt;&lt;br /&gt;
-r--r--r--  1 root root    1477632 Jan  1  1970 SIGHT}}&lt;br /&gt;
&lt;br /&gt;
This FUSE file can easily be copied with basic GNU tools (cat, dd, etc). Even more fun is to loop mount such a FUSE file (if the corresponding PSA is a bootable image). Then the PSA is a (read only) part of your mounted filesystems. So now you do not need to use dd on /dev/hda to copy the Predesktop Area: you can just mount it!&lt;br /&gt;
&lt;br /&gt;
{{cmdresult|$ sudo mount -o loop,ro,users  /mnt/hpa/Rec\ Data /mnt/tmp&amp;lt;br/&amp;gt;&lt;br /&gt;
$ ll /mnt/tmp/&amp;lt;br/&amp;gt;&lt;br /&gt;
total 1454&amp;lt;br/&amp;gt;&lt;br /&gt;
-rwxr-xr-x  1 root root      64 Sep 27  2002 bootcat.bin&amp;lt;br/&amp;gt;&lt;br /&gt;
-rwxr-xr-x  1 root root 1474560 Oct  3  2002 bootimg.bin&amp;lt;br/&amp;gt;&lt;br /&gt;
drwxr-xr-x  2 root root    2048 Mar 13  2004 country&amp;lt;br/&amp;gt;&lt;br /&gt;
drwxr-xr-x  2 root root    2048 Mar 13  2004 ibmwork&amp;lt;br/&amp;gt;&lt;br /&gt;
drwxr-xr-x  3 root root    8192 Mar 13  2004 recovery&amp;lt;br/&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
To be continued ...&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 00:56, 2 March 2006 (CET)&lt;/div&gt;</summary>
		<author><name>Pebolle</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Talk:Predesktop_Area&amp;diff=22705</id>
		<title>Talk:Predesktop Area</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Talk:Predesktop_Area&amp;diff=22705"/>
		<updated>2006-06-11T16:48:44Z</updated>

		<summary type="html">&lt;p&gt;Pebolle: minor reorganization of comments&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Use the HPA for GNU/Linux?==&lt;br /&gt;
More interesting than removing the HPA (which includes a.o. Acces IBM Predesktop Area, some other tools and a backup of the pre-installed OS) would be to use this area for GNU/Linux too. At least, removing the HPA only saves 3,5 GB on my 60 GB hard disk. It would be worth a try to see whether the backup of the pre-installed OS on the largest PSA could be replaced by a backup of your favourite GNU/Linux distribution.&lt;br /&gt;
&lt;br /&gt;
Elaborating on my ideas a few days later, I'd guess the following could be tried:&lt;br /&gt;
* see whether GRUB can be made to boot the Access IBM Predekstop Area (I guess by &amp;quot;chainloading&amp;quot; the bootsector of its PSA). Right now GRUB refuses to load sectors outside the partioned area. I've got absolutely no idea if it's possible to write a hack to overcome that restriction. Need to contact the GRUB people about that ...&lt;br /&gt;
* write some userspace tools for the HPA/the SPAs (things like: dumpbeer, printDoS).&lt;br /&gt;
&lt;br /&gt;
It should be clear these are basically random ideas. Still feedback would be appreciated ...&lt;br /&gt;
----&lt;br /&gt;
Hei,&lt;br /&gt;
&lt;br /&gt;
interesting ideas, but i'd only see a point in it if one could keep Win and Linux rescue stuff in the HPA. That means it would need to be expandable or fit the stuff for both systems.&lt;br /&gt;
[[User:Wyrfel|Wyrfel]] 20:03, 15 Mar 2005 (CET)&lt;br /&gt;
----&lt;br /&gt;
Thanks.&lt;br /&gt;
&lt;br /&gt;
Short answer: that should be possible.&lt;br /&gt;
&lt;br /&gt;
Long answer: I see little in the specs (as I understand them now) to stop one from adding (say) an extra 3 GB GNU/Linux-rescue PSA or something like that. We might try to do that first by changing the BEER and DoS manually. (Not sure whether Phoenix added some proprietary stuff to keep you from booting it. The PSA should always be accesable with the proper BIOS setting.) It might be mandatory to put it on a FAT filesystem. The hard part probably is to have it show up in the Access IBM Predesktop Area. (My guess is you need to regenerate the FirstSight &amp;quot;graphical shell&amp;quot;. If that's correct we probably only can use the FirstWare tools &amp;quot;hidden&amp;quot; on their little PSA. That's no fun. Well it might a little fun if we try FreeDOS). &lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle (not logged in)]]&lt;br /&gt;
----&lt;br /&gt;
Update: a trivial patch to grub allows it to also work outside the partioned area:&lt;br /&gt;
&lt;br /&gt;
 --- /var/tmp/rpm/BUILD/grub-0.95/stage2/disk_io.c.oud   2004-05-23 18:35:24.000000000 +0200&lt;br /&gt;
 +++ /var/tmp/rpm/BUILD/grub-0.95/stage2/disk_io.c       2005-03-18 22:38:30.050907408 +0100&lt;br /&gt;
 @@ -297,8 +297,8 @@&lt;br /&gt;
     *  Check partition boundaries&lt;br /&gt;
     */&lt;br /&gt;
    if (sector &amp;lt; 0&lt;br /&gt;
 -      || ((sector + ((byte_offset + byte_len - 1) &amp;gt;&amp;gt; SECTOR_BITS))&lt;br /&gt;
 -         &amp;gt;= part_length))&lt;br /&gt;
 +      /*|| ((sector + ((byte_offset + byte_len - 1) &amp;gt;&amp;gt; SECTOR_BITS))&lt;br /&gt;
 +         &amp;gt;= part_length)*/)&lt;br /&gt;
      {&lt;br /&gt;
        errnum = ERR_OUTSIDE_PART;&lt;br /&gt;
        return 0;&lt;br /&gt;
&lt;br /&gt;
I made a grub CD with a grub patched with the above. Now I can &amp;quot;cat&amp;quot; the bootsector of the Predesktop Area from the grub shell (when booting of that grub CD). But I haven't yet managed to boot the Predesktop Area (dangerous stuff!) To be continued ...&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] Fri Mar 18 22:42:43 CET 2005&lt;br /&gt;
----&lt;br /&gt;
Update: a quick test with the current development version of grub2 (grub-1.93) showed that grub2 can chainload a block outside the partitioned area &lt;br /&gt;
&amp;quot;out of the box&amp;quot;. That's nice. I still haven't been able to get passed the error messages generated by the boot sectors of the bootable PSAs. My guess is the BIOS provides those boot sectors with some (special) settings that grub doesn't use ...&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 00:40, 5 April 2006 (CEST)&lt;br /&gt;
----&lt;br /&gt;
Hey there - I hope to be welcome here to since I've no ThinkPad but an Samsung X20 notebook. This notebook uses also the HPA for some kind of a predesktop area - a linux&lt;br /&gt;
based multimedia system called &amp;quot;AVStation Now&amp;quot; which is hidden there. I used dd to dump the hpa and read the BEER table to find out what is hidden inside.&lt;br /&gt;
&lt;br /&gt;
What I found out:&lt;br /&gt;
&lt;br /&gt;
*the first partition (ext3) contains the rootfilesystem (funny, cause they use libdvdcss for dvd playback)&lt;br /&gt;
&lt;br /&gt;
*the second partition (ext3) contained a /boot partition with a special kernel with the possibility to mount this partition (seems they use a special liloversion for booting)&lt;br /&gt;
&lt;br /&gt;
*the third partition (fat?) - some html files - the firstware menu&lt;br /&gt;
&lt;br /&gt;
*and at last a fourth partition i was unable to mount&lt;br /&gt;
&lt;br /&gt;
[http://www.christophmueller.org/stuff/beerdump.html A dump of my BEER ;-)]&lt;br /&gt;
&lt;br /&gt;
Does someone know weather it would be possible mounting souch an hpapartition without using dd - maybe kernelsupport for the BEER? - since im nither a C nor a kernelhacker im unable to continue, but there must be some kind of support cause this multimediasystem knows howto handle it.&lt;br /&gt;
&lt;br /&gt;
If you need some more information you could send me an email to christoph_at_christophmueller.org&lt;br /&gt;
&lt;br /&gt;
[[User:Christophmueller.org|Christoph MÃ¼ller]]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
I've been playing around with the predesktop area tonight.  I was simply trying to just leave the diagnostics stuff and remove the windows part.  I wrote some programs to read/write the BEER data and stuff, but I wasn't able to get the system to boot it, it kept erroring &amp;quot;Authentication of System Services failed&amp;quot; (or something along those lines).  I will play around with this some more later&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[User:Invisi|Tim Nordell]]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A quick look with a hexeditor gave me two instances of &amp;quot;Application authentication has failed!&amp;quot; in the FirstSight application. Does that sound familair? &lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] Fri Apr 1 19:35:30 CEST 2005&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Actually it wasn't that.  I did a search of that too, the message itself was not in the predesktop area at all.  What also is interesting is the fw*.exe utilities for manipulating the predesktop area, contains the string &amp;quot;MD5&amp;quot; which makes me wonder if there is an md5 hash of each &amp;quot;predesktop&amp;quot; partition.  I know on the IBM whitepaper it states there being a signature so that non-signed applications can not be run.  Could a simple &amp;quot;md5&amp;quot; be the signature?&lt;br /&gt;
&lt;br /&gt;
[[User:Invisi|Tim Nordell]] 12:01, 3 Apr 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*What is it that you were trying to do (what did trigger the error you saw)?&lt;br /&gt;
&lt;br /&gt;
*About ten of the fw*.exe utilities contain the phrase &amp;quot;MD5 Checksums do not match&amp;quot;. So they could very well be using MD5 sums for some sort of validation. But they could use the MD5 sums in a lot of ways actually, so I won't yet speculate ...&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] Sun Apr  3 15:11:10 CEST 2005&lt;br /&gt;
&lt;br /&gt;
== Predesktop Area ==&lt;br /&gt;
&lt;br /&gt;
I made a program that takes the BEER record at the end, parses it out to a &amp;quot;.cfg&amp;quot; file, lets you modify it, recalibrate the start spots for the records, and write it out to disk again.  It doesn't directly access hda, 'cept for reading the original beer record.  It makes a script file to go with the files you have, to read in the HPA data, and to write it out again with the new record.&lt;br /&gt;
&lt;br /&gt;
Anyways, I tried simply removing the last record from the BEER, which is the windows recovery partition.  It didn't like that.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Did you update the two's complement checksum at the end of the BEER?&lt;br /&gt;
&lt;br /&gt;
[[user:Pebolle|Paul Bolle]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Yep, I updated that.  If I don't update that, it doesn't even say that failed message.  I also made a seperate program to update the checksum so you can also modify the beer record by hand with a hex editor and have valid checksums.&lt;br /&gt;
&lt;br /&gt;
== Linux kernel support ==&lt;br /&gt;
{{Todo|research and add to article}}&lt;br /&gt;
* Add a section on dmesg and hdparm -I output:&lt;br /&gt;
 (...)&lt;br /&gt;
 Commands/features:&lt;br /&gt;
        Enabled Supported:&lt;br /&gt;
 (...)&lt;br /&gt;
           *    Host Protected Area feature set&lt;br /&gt;
 (...)&lt;br /&gt;
                SET MAX security extension&lt;br /&gt;
                Address Offset Reserved Area Boot&lt;br /&gt;
 (...)&lt;br /&gt;
&lt;br /&gt;
* Recent (2.6.10 and up?) kernels disable HPAs automatically (in drivers/ide/ide-disk.c). Dmesg example:&lt;br /&gt;
&lt;br /&gt;
 hda: Host Protected Area detected.&lt;br /&gt;
        current capacity is 110194034 sectors (56419 MB)&lt;br /&gt;
         native  capacity is 117210240 sectors (60011 MB)&lt;br /&gt;
 hda: Host Protected Area disabled.&lt;br /&gt;
&lt;br /&gt;
This should be (further researched and) added to this section (maybe with some pointers to the unexpected consequences of this new approach ...)&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 22:06, 6 Sep 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
In 2.6.11, I was able to re-enable HPA by commenting out the section in drivers/ide/ide-disk.c under the comment &amp;quot;Some maxtor support LBA48 but not accept LBA48 set max...&amp;quot;.  I suppose that wouldn't be a good idea with a Maxtor drive but it worked fine for my R50.&lt;br /&gt;
&lt;br /&gt;
--[[User:Rkilian|Robert Kilian]] 21:13, 22 March 2006 (CET)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* SRCMOS24.EXE&lt;br /&gt;
&lt;br /&gt;
In the PSA used by the Predesktop Area I found a &amp;quot;hidden&amp;quot; executable: SRCMOS24.EXE (it is not mentioned in the FAT). This executable can capture and update CMOS data. It might only be used by the FirstSight program to display (part of) the BIOS info. It might be nice to see what it can do and if similar things are possible under GNU/Linux.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 22:01, 7 Sep 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
== Newer thinkpads don't use Phoenix Firstware? ==&lt;br /&gt;
&lt;br /&gt;
On my T42 that arrived yesterday, the predesktop area looks a lot like MS Windows. The widget set, the fonts, even the boot sequence looks exactly like Windows 2000. Debian-installer indentified it as &amp;quot;Microsoft Windows NT/2000/XP&amp;quot;, while it identified my XP partition as &amp;quot;Microsoft Windows XP Professional&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Has Lenovo/IBM changed their system, or is this Phoenix stuff really just Windows?&lt;br /&gt;
&lt;br /&gt;
-- [[Evan.Heidtmann]]&lt;br /&gt;
&lt;br /&gt;
Evan,&lt;br /&gt;
&lt;br /&gt;
Could it be that you're talking about the preinstalled version of Windows here? As far as I know (using information to be found on the internet, not personal research) the preinstalled OS will reformat its partition from FAT32 to NTFS at first boot. That could explain the difference in the identification by the Debian installer (which I never really used).&lt;br /&gt;
&lt;br /&gt;
Moreover the Predesktop Area is part of the HPA and the HPA is not an partition. It seems unlikely that the Debain installer notices the HPA. As far as I know there are at present no GNU/Linux tools with a (useful) support of HPAs.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 15:43, 4 Aug 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
My T42P (model 2373HSG) is using a cut-down version of Windows XP as the pre-desktop area.  I'm not sure whether it's a special IBM thing or just a [http://www.microsoft.com/licensing/programs/sa/benefits/winpe.mspx Windows PE] (preinstallation environment) setup.  It includes Java and Python, which are used by some of the IBM tools, and the Opera web browser.&lt;br /&gt;
&lt;br /&gt;
It's no longer an HPA but a 487MB hidden FAT32 called IBM_SERVICE located at the end of the disk.&lt;br /&gt;
&lt;br /&gt;
--[[User:Korourke|Korourke]]&lt;br /&gt;
&lt;br /&gt;
== Rescue and Recovery via grub? ==&lt;br /&gt;
&lt;br /&gt;
Did anyone get the Rescue and Recovery partition to boot via grub on recent models? On a T43 with&lt;br /&gt;
 rootnoverify (hd0,1)&lt;br /&gt;
 chainloader +1&lt;br /&gt;
the Rescue and Recovery partition starts booting nicely and then, a few seconds in the R&amp;amp;R loading sequence, chokes with a &lt;br /&gt;
 STOP: c000021a {Fatal System Error}&lt;br /&gt;
 The Session Manager Initialization system process terminated unexpectedly with a status of 0xc000003a (0x00000000 0x00000000).&lt;br /&gt;
 The system has been shut down. &lt;br /&gt;
The problem started right after installing grub into the MBR (I couldn't get the preinstalled MBR to boot grub from an active primary partition). It seems oblivious to the Predesktop BIOS setting.&lt;br /&gt;
&lt;br /&gt;
The same problem has been reported by others with other models (for example [http://forums.fedoraforum.org/archive/index.php/t-19433.html here] for a T42).&lt;br /&gt;
&lt;br /&gt;
[[User:Thinker|Thinker]] 11:35, 30 Sep 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
Your &amp;quot;Rescue and Recovery partition&amp;quot; seems not to be a HPA (which isn't a partition). Maybe we should open a new page for that system.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 21:54, 30 Sep 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
It may very well not be an HPA , but the BIOS stil calls it a &amp;quot;Predesktop Area&amp;quot;. Anyway, the partition is actually a VFAT partition (even though it has type 0x12, &amp;quot;Compaq Diagnostics&amp;quot;). It seems to boot into PC-DOS (using {{path|NTDETECT.EXE}} so it looks like Windows startup) and then its {{path|AUTOEXEC.BAT}} runs a fancy GUI.&lt;br /&gt;
--[[User:Thinker|Thinker]] 23:31, 30 Sep 2005 (CEST)&lt;br /&gt;
----&lt;br /&gt;
Right, there has been a lot of confusion about this, we should have a separate page. Introduced an edit link (called Rescue and Recovery) on the [[ThinkPad Technologies]] page for that purpose.&lt;br /&gt;
&lt;br /&gt;
== Suggestions for projects ==&lt;br /&gt;
&lt;br /&gt;
I'd guess it would be rather nice to have GNU/Linux tools (like sfdisk and parted) HPA aware. The most urgent change would be to have those programs at least recognize and respect a HPA (e.g.: do not write in or otherwise use the HPA area; unless the user gives a --force option or something similar).&lt;br /&gt;
&lt;br /&gt;
As for now, I realize I caused this error: ENOPATCH.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 22:56, 5 Nov 2005 (CET)&lt;br /&gt;
&lt;br /&gt;
== Keeping functionality of the blue AccessIBM button ==&lt;br /&gt;
&lt;br /&gt;
Somebody figured out [http://sharadware.com/2005/07/11/suse-linux-winxp-access-ibm-on-the-thinkpad-t43/|how to keep the AccessIBM functionality] when installing Linux, quite easy fix. How come nobody thought about it before? :)&lt;br /&gt;
(link got from [[Installing_Ubuntu_5.04_on_a_ThinkPad_T43_%281875%29 here]])&lt;br /&gt;
&lt;br /&gt;
--[[User:Micampe|Micampe]] 17:39, 9 Dec 2005 (CET)&lt;br /&gt;
&lt;br /&gt;
The relevant part of that page:&lt;br /&gt;
&lt;br /&gt;
''Set the IBM Predesktop Area (in the BIOS) to â€œSecureâ€. Boot using the SUSE DVD. Shrink the Windows partition as required. Follow the instructions and go through the regular installation process. Create a primary partition for /boot (the other stuff can go into the extended partitions) and when the time comes to install GRUB (you do prefer GRUB to LILO, donâ€™t you?), make sure you install it into the boot sector of the boot partition. Set this partition as active. Leave the MBR alone.''&lt;br /&gt;
&lt;br /&gt;
That's the first thing I tried on my T43. Didn't work: setting the active partition to /boot had no effect, it was still booting the first (Windows) partition. So I had to install Grub into MBR, thereby killing R&amp;amp;R. Anyway, there's another solution in the article page (didn't try it since I saw it only after purging my R&amp;amp;R partition).&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
--[[User:Thinker|Thinker]] 19:18, 9 Dec 2005 (CET)&lt;br /&gt;
&lt;br /&gt;
== Parsing the HPA information (BEER/DOS) ==&lt;br /&gt;
&lt;br /&gt;
I too have been writing a program to parse the BEER and DOS info. Sample output:&lt;br /&gt;
:{{cmdresult| beer.signature: 0xBEEF}}&lt;br /&gt;
:{{cmdresult| beer.size: 128}}&lt;br /&gt;
:{{cmdresult| beer.flags: 41}}&lt;br /&gt;
:{{cmdresult|    Read Only:}}&lt;br /&gt;
:{{cmdresult|    Generated Record:}}&lt;br /&gt;
:{{cmdresult|    Use Reserved Area Boot Code Address: yes}}&lt;br /&gt;
:{{cmdresult|    Configuration Time Stamp is valid:}}&lt;br /&gt;
:{{cmdresult|    Device Supports LBA:                 yes}}&lt;br /&gt;
:{{cmdresult|    Directory of Services is Present}}&lt;br /&gt;
:{{cmdresult|    Formatted Geometry Valid}}&lt;br /&gt;
:{{cmdresult|    Reported Geometry Valid              yes}}&lt;br /&gt;
:{{cmdresult| beer.reported_cylinders: 16383}}&lt;br /&gt;
:{{cmdresult| beer.reported_heads: 16}}&lt;br /&gt;
:{{cmdresult| beer.reported_sectors: 63}}&lt;br /&gt;
:{{cmdresult| beer.reported_bytes_sector: 512}}&lt;br /&gt;
:{{cmdresult| beer.reported_sectors_device: 117210240}}&lt;br /&gt;
:{{cmdresult| beer.formatted_cylinders: 16383}}&lt;br /&gt;
:{{cmdresult| beer.formatted_heads: 16}}&lt;br /&gt;
:{{cmdresult| beer.formatted_sectors: 63}}&lt;br /&gt;
:{{cmdresult| beer.formatted_bytes_sector: 512}}&lt;br /&gt;
:{{cmdresult| beer.formatted_sectors_device: 117210240}}&lt;br /&gt;
:{{cmdresult| year: 2004}}&lt;br /&gt;
:{{cmdresult| day: 313}}&lt;br /&gt;
:{{cmdresult| beer.timestamp: 1426063684}}&lt;br /&gt;
:{{cmdresult| beer.device_index: 0x80}}&lt;br /&gt;
:{{cmdresult| beer.hpa_start: 110194034}}&lt;br /&gt;
:{{cmdresult| beer.boot_code_address: 117002545}}&lt;br /&gt;
:{{cmdresult| beer.num_entries: 8}}&lt;br /&gt;
:{{cmdresult| beer.dir_length: 64}}&lt;br /&gt;
:{{cmdresult| beer.revision: 0}}&lt;br /&gt;
:{{cmdresult| dev_name: HTS726060M9AT00}}&lt;br /&gt;
:{{cmdresult| beer.checksum: -26982}}&lt;br /&gt;
:{{cmdresult| dos[0].flags: 3}}&lt;br /&gt;
:{{cmdresult|    Service area is available as B:}}&lt;br /&gt;
:{{cmdresult|    Diagnostic Service:}}&lt;br /&gt;
:{{cmdresult|    Service Area is Read Only:}}&lt;br /&gt;
:{{cmdresult|    This Boot:}}&lt;br /&gt;
:{{cmdresult|    Empty Service Area:}}&lt;br /&gt;
:{{cmdresult|    Hidden Service Area:                 yes}}&lt;br /&gt;
:{{cmdresult|    Service Area is bootable as A:       yes}}&lt;br /&gt;
:{{cmdresult| dos[0].service_area_start: 117005431}}&lt;br /&gt;
:{{cmdresult| dos[0].service_area_size: 204800}}&lt;br /&gt;
:{{cmdresult| dos[0].load_sectors: 1}}&lt;br /&gt;
:{{cmdresult| dos[0].load_address: 0x7:C000}}&lt;br /&gt;
:{{cmdresult| dos[0].service_area_id: 0}}&lt;br /&gt;
:{{cmdresult| dos[0] id_str: FirstWare Reserved Area}}&lt;br /&gt;
:{{cmdresult| dos[0].checksum: -22271}}&lt;br /&gt;
:{{cmdresult| [...]}}&lt;br /&gt;
&lt;br /&gt;
Very rough code. Send me an e-mail (at the address found at my user page) if you want a (GPL'd) copy, but only if you're willing to test and improve the code.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 01:15, 24 January 2006 (CET)&lt;br /&gt;
&lt;br /&gt;
== SET MAX Security Extensions ==&lt;br /&gt;
&lt;br /&gt;
I've hacked Andries Brouwer's setmax tool (see: Google) to support the SET MAX security extensions (SET MAX SET PASSWORD, SET MAX LOCK, SET MAX UNLOCK, SET MAX FREEZE). Very rough code once again. Mail me if you're willing to brick your HDD.&lt;br /&gt;
&lt;br /&gt;
A few random observations:&lt;br /&gt;
&lt;br /&gt;
- secure mode: the Phoenix BIOS probably sets a SET MAX password in the HDD, does a non-volatile SET MAX and LOCKs (or FREEZEs) the HDD.&lt;br /&gt;
&lt;br /&gt;
- normal mode: the Phoenix BIOS might set a SET MAX password in the HDD, does a (volatile?) SET MAX but does not LOCK the HDD. The HDD will accept another SET MAX, a new SET MAX SET PASSWORD, etc.&lt;br /&gt;
&lt;br /&gt;
- normal mode: Linux 2.6.x disables the HPA in normal mode (by doing a volatile SET MAX to maximum native address). After a suspend the HDD reenables the HPA (by returning to the latest non-volatile value of SET MAX). It thus treats the suspend cycle as a power cycle (it also discards a SET MAX password, unlocks or unfreezes the HPA etc). I'm not sure whether that is a correct implementation of the ATA spec. (The HDD doesn't do this in secure mode. I would like to know how the Phoenix BIOS and/or Hitachi HDD people have managed this.) &lt;br /&gt;
&lt;br /&gt;
This can lead to some problems if a partition ends within the limits of the HPA (which is then actually (partly) overwritten by that partition). Maybe the best solution would be to have the kernel do a non-volatile SET MAX to the native maximum address. Then a resume from suspend will in effect not reenable the HPA.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 01:40, 20 February 2006 (CET)&lt;br /&gt;
&lt;br /&gt;
== hpafs ==&lt;br /&gt;
&lt;br /&gt;
I've written a (read only) FUSE for the hpa: hpafs. Alpha quality at best. Mail me if you'd like to test it, hack on it. Now about 1100 LOC. The binary is a mere 33 KB (this is with debugging symbols). Rather i386 centric. &lt;br /&gt;
&lt;br /&gt;
hpafs will only work if the Predesktop Area is disabled (but that is more or less obvious). It basically turns each PSA into a file:&lt;br /&gt;
&lt;br /&gt;
{{cmdresult|$ sudo hpafs /dev/hda /mnt/hpa -o allow_other&amp;lt;br/&amp;gt;&lt;br /&gt;
$ ll /mnt/hpa/&amp;lt;br/&amp;gt;&lt;br /&gt;
total 0&amp;lt;br/&amp;gt;&lt;br /&gt;
-r--r--r--  1 root root    2097152 Jan  1  1970 BIOSWORKAREA&amp;lt;br/&amp;gt;&lt;br /&gt;
-r--r--r--  1 root root    7710720 Jan  1  1970 Create Diagnostic Diskettes&amp;lt;br/&amp;gt;&lt;br /&gt;
-r--r--r--  1 root root  104857600 Jan  1  1970 FirstWare Reserved Area&amp;lt;br/&amp;gt;&lt;br /&gt;
-r--r--r--  1 root root     7710720 Jan  1  1970 Rec Boot&amp;lt;br/&amp;gt;&lt;br /&gt;
-r--r--r--  1 root root 3459252224 Jan  1  1970 Rec Data&amp;lt;br/&amp;gt;&lt;br /&gt;
-r--r--r--  1 root root    1476096 Jan  1  1970 Restore from backup&amp;lt;br/&amp;gt;&lt;br /&gt;
-r--r--r--  1 root root    7710720 Jan  1  1970 Run Diagnostics&amp;lt;br/&amp;gt;&lt;br /&gt;
-r--r--r--  1 root root    1477632 Jan  1  1970 SIGHT}}&lt;br /&gt;
&lt;br /&gt;
This FUSE file can easily be copied with basic GNU tools (cat, dd, etc). Even more fun is to loop mount such a FUSE file (if the corresponding PSA is a bootable image). Then the PSA is a (read only) part of your mounted filesystems. So now you do not need to use dd on /dev/hda to copy the Predesktop Area: you can just mount it!&lt;br /&gt;
&lt;br /&gt;
{{cmdresult|$ sudo mount -o loop,ro,users  /mnt/hpa/Rec\ Data /mnt/tmp&amp;lt;br/&amp;gt;&lt;br /&gt;
$ ll /mnt/tmp/&amp;lt;br/&amp;gt;&lt;br /&gt;
total 1454&amp;lt;br/&amp;gt;&lt;br /&gt;
-rwxr-xr-x  1 root root      64 Sep 27  2002 bootcat.bin&amp;lt;br/&amp;gt;&lt;br /&gt;
-rwxr-xr-x  1 root root 1474560 Oct  3  2002 bootimg.bin&amp;lt;br/&amp;gt;&lt;br /&gt;
drwxr-xr-x  2 root root    2048 Mar 13  2004 country&amp;lt;br/&amp;gt;&lt;br /&gt;
drwxr-xr-x  2 root root    2048 Mar 13  2004 ibmwork&amp;lt;br/&amp;gt;&lt;br /&gt;
drwxr-xr-x  3 root root    8192 Mar 13  2004 recovery&amp;lt;br/&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
To be continued ...&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 00:56, 2 March 2006 (CET)&lt;/div&gt;</summary>
		<author><name>Pebolle</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Talk:How_to_get_special_keys_to_work&amp;diff=21387</id>
		<title>Talk:How to get special keys to work</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Talk:How_to_get_special_keys_to_work&amp;diff=21387"/>
		<updated>2006-04-05T20:46:45Z</updated>

		<summary type="html">&lt;p&gt;Pebolle: DIY Firefox 1.5 xpi&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
The xmodmap step doesn't seem to work when using the &amp;quot;kdb&amp;quot; driver of xorg. Here are the changes I needed to make to my setup to get the &amp;quot;back&amp;quot; and &amp;quot;forward&amp;quot; keys to work (in diff -u format);&lt;br /&gt;
&lt;br /&gt;
 --- xkb/symbols/inet.oud        2004-12-01 08:36:04.000000000 +0100&lt;br /&gt;
 +++ xkb/symbols/inet    2005-03-08 19:59:32.587636120 +0100&lt;br /&gt;
 @@ -1875,6 +1875,16 @@&lt;br /&gt;
      key &amp;lt;I76&amp;gt;  {       [ XF86AudioLowerVolume  ]       };&lt;br /&gt;
  };&lt;br /&gt;
  &lt;br /&gt;
 +// IBM ThinkPad 41 Internet Keys&lt;br /&gt;
 +&lt;br /&gt;
 +partial alphanumeric_keys&lt;br /&gt;
 +xkb_symbols &amp;quot;tp41&amp;quot; {&lt;br /&gt;
 +    name[Group1]= &amp;quot;IBM ThinkPad 41 Internet Keys&amp;quot;;&lt;br /&gt;
 +&lt;br /&gt;
 +    key &amp;lt;I69&amp;gt;  {       [ F22           ]       };&lt;br /&gt;
 +    key &amp;lt;I6A&amp;gt;  {       [ F21           ]       };&lt;br /&gt;
 +};&lt;br /&gt;
 +&lt;br /&gt;
  // Trust&lt;br /&gt;
  &lt;br /&gt;
  partial alphanumeric_keys&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 --- xkb/rules/xorg.lst.oud      2004-12-01 08:36:05.000000000 +0100&lt;br /&gt;
 +++ xkb/rules/xorg.lst  2005-03-07 20:55:21.000000000 +0100&lt;br /&gt;
 @@ -97,6 +97,7 @@&lt;br /&gt;
    sven         SVEN Ergonomic 2500&lt;br /&gt;
    symplon      Symplon PaceBook (tablet PC)&lt;br /&gt;
    toshiba_s3000        Toshiba Satellite S3000&lt;br /&gt;
 +  tp41         IBM ThinkPad 41 Internet Keys&lt;br /&gt;
    trust                Trust Wireless Keyboard Classic&lt;br /&gt;
    trustda      Trust Direct Access Keyboard&lt;br /&gt;
    yahoo                Yahoo! Internet Keyboard&lt;br /&gt;
&lt;br /&gt;
 --- xkb/rules/xorg.oud  2004-12-01 08:36:05.000000000 +0100&lt;br /&gt;
 +++ xkb/rules/xorg      2005-03-07 20:45:59.000000000 +0100&lt;br /&gt;
 @@ -120,7 +120,7 @@&lt;br /&gt;
                qtronix \&lt;br /&gt;
                samsung4500 samsung4510 \&lt;br /&gt;
                sk1300 sk2500 sk6200 sk7100 \&lt;br /&gt;
 -              sven symplon toshiba_s3000 trust trustda yahoo&lt;br /&gt;
 +              sven symplon toshiba_s3000 tp41 trust trustda yahoo&lt;br /&gt;
 &lt;br /&gt;
  ! model         =       symbols&lt;br /&gt;
    $inetkbds     =       +inet(%m)&lt;br /&gt;
&lt;br /&gt;
 --- xkb/rules/xorg.xml.oud      2004-12-01 08:36:05.000000000 +0100&lt;br /&gt;
 +++ xkb/rules/xorg.xml  2005-03-07 20:52:35.000000000 +0100&lt;br /&gt;
 @@ -975,6 +975,13 @@&lt;br /&gt;
      &amp;lt;/model&amp;gt;&lt;br /&gt;
      &amp;lt;model&amp;gt;&lt;br /&gt;
        &amp;lt;configItem&amp;gt;&lt;br /&gt;
 +        &amp;lt;name&amp;gt;tp41&amp;lt;/name&amp;gt;&lt;br /&gt;
 +        &amp;lt;description&amp;gt;IBM Thinkpad 41 Internet Keys&amp;lt;/description&amp;gt;&lt;br /&gt;
 +        &amp;lt;description xml:lang=&amp;quot;nl&amp;quot;&amp;gt;IBM ThinkPad 41 internet toetsen&amp;lt;/description&amp;gt;&lt;br /&gt;
 +      &amp;lt;/configItem&amp;gt;&lt;br /&gt;
 +    &amp;lt;/model&amp;gt;&lt;br /&gt;
 +    &amp;lt;model&amp;gt;&lt;br /&gt;
 +      &amp;lt;configItem&amp;gt;&lt;br /&gt;
          &amp;lt;name&amp;gt;trust&amp;lt;/name&amp;gt;&lt;br /&gt;
          &amp;lt;description&amp;gt;Trust Wireless Keyboard Classic&amp;lt;/description&amp;gt;&lt;br /&gt;
          &amp;lt;description xml:lang=&amp;quot;fr&amp;quot;&amp;gt;clavier classique Trust Wireless&amp;lt;/description&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Do not forget to add something like &amp;quot;+inet(tp41)&amp;quot; to /etc/X11/xorg.conf:&lt;br /&gt;
        (...)&lt;br /&gt;
        Option      &amp;quot;XkbLayout&amp;quot; &amp;quot;us_intl+inet(tp41)&amp;quot;&lt;br /&gt;
        (...)&lt;br /&gt;
&lt;br /&gt;
== Not T41 specific ==&lt;br /&gt;
&lt;br /&gt;
These keys are hardly T41 specific, they can also be found on the T30, T40, T42 and I'm sure several other ThinkPads in the X, R and G lineup.&lt;br /&gt;
&lt;br /&gt;
Actually, the above patches could be completed with the information of the other special keys found on some Thinkpads (which is listed in [[How_to_get_special_keys_to_work#xmodmap_configuration]]) and submitted as a request for enhancement with [http://bugs.freedesktop.org xorg's bugzilla]. However, firefox doesn't yet recognize keysyms like XF86Back, XF86Forward, so then firefox still needs to be patched manually (unless an enhancement is requested for firefox too).&lt;br /&gt;
&lt;br /&gt;
== Fake ACPI events? ==&lt;br /&gt;
&lt;br /&gt;
Not all keys generate ACPI events. Maybe it is feasible to have the ibm-acpi module check the CMOS (instead of having tpb checking /dev/nvram) and generate fake ACPI events for those keys. Even if it is feasible, that is probably way to hacky for a kernel module ... Still, it would be nice to only have to use scripts triggered by ACPI events and not both scripts for ACPI events and scripts for tpb.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
I think something like this is possible with ibm-acpi 0.10 already. It provides a proc file from which you can derive a table of CMOS states. You'd only have to figure the who is who of CMOS bits and write a daemon (or daemon like shell script) checking them regularly. This should be about what you suggest since tpb does the same thing with the bios ram. Of course generating ACPI events can not be done like that (or can it?), but you could trigger the ACPI action scripts directly then.&lt;br /&gt;
&lt;br /&gt;
[[User:Wyrfel|Wyrfel]] 01:02, 14 Mar 2005 (CET)&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
It may be possible (I have a 770x, so don't have the special keys) to add the keys as real ACPI events, by altering the DSDT.  I've done this to enable ACPI events for Fn-(every labelled F key),Home,End,PgUp,PgDn on mine, and they aren't labelled with anything physically (no thinklight and physical brightness control).  The Embedded Controller  reports all events, including keys, by calling one of the _Qxx functions (you'll find a whole pile in the sourcecode for the DSDT).  If you then insert a fucntion in the same scope as the others like:-&lt;br /&gt;
 Method (_Q12, 0, NotSerialized) { \_SB.HKEY.MHKQ (0x1003) } //Fn-F3&lt;br /&gt;
when executed, ibm-acpi will then report an acpi event numbered 0x0001003.  You should find some functions, e.g. _Q1B For Fn-F12 identical to this.&lt;br /&gt;
&lt;br /&gt;
I found some IBM DSDT's had functions that made MKHQ calls for EC functions _Q63, _Q64, _Q4E, _Q4F, but did nothing on mine---maybe these are a good starting point.  Add a whole pile, and see if you get lucky! (At your own risk, of course... :/  But it should be pretty safe).&lt;br /&gt;
&lt;br /&gt;
Yes, the above sounds pretty identical to tpb, except with /proc/ibm/ecdump instead of /dev/nvram.  The above works very nicely, however there's luck involved in finding the right number, even if it exists!&lt;br /&gt;
&lt;br /&gt;
[[User:lentinj|lentinj]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Fn+F6 does not seem to generate an event on t41p even if the mask is set to 0xffff and experimental=1 is passed to ibm_acpi&lt;br /&gt;
[[User:tf|tf]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==Bind Fn to super or hyper ==&lt;br /&gt;
&lt;br /&gt;
Hello &lt;br /&gt;
&lt;br /&gt;
Is it possible to bind Fn via Xmodmap to a key modifier such as hyper or super? Thanks&lt;br /&gt;
[[User:Oub|Oub]] 13:14, 6 February 2006 (CET): &lt;br /&gt;
----&lt;br /&gt;
I doubt it. The event for the {{key|Fn}} key is generated at release (as opposed to holding it where it serves it's usual special function). Hence you can't use it as a modifier. [[User:Wyrfel|Wyrfel]] 22:52, 6 February 2006 (CET)&lt;br /&gt;
----&lt;br /&gt;
==Bind Fn 12 say to F34 ==&lt;br /&gt;
Thanks Wyrfel for your reply, in order to display my question better, I use a new header: can I bind all the Fn Fx to hay F34 and the like?&lt;br /&gt;
[[User:Oub|Oub]] 21:33, 10 February 2006 (CET):&lt;br /&gt;
----&lt;br /&gt;
You can do this with all key '''combinations''' that support xmodmap (see the table). That means you can't do it with {{key|Fn}}}{{key|F12}}, because that combination doesn't generate a key event at all (it only generates an APM/ACPI event. Hence there is nothing vor xmodmap to remap.&lt;br /&gt;
&lt;br /&gt;
But what is your wider focus goal? I'm sure that what you want to do can be realized, anyway: You can write an ACPI script and event file for {{key|Fn}}{{key|F12}} and have the script start some tool that sends a F34 key to the X server. I'm sure this is possible.&lt;br /&gt;
&lt;br /&gt;
[[User:Wyrfel|Wyrfel]] 00:03, 11 February 2006 (CET)&lt;br /&gt;
----&lt;br /&gt;
==Can't bind Fn 12 ==&lt;br /&gt;
&lt;br /&gt;
Hello &lt;br /&gt;
&lt;br /&gt;
I  am using a R51 and I have compiled ibm-acpi monolithic in the kernel (not as module, maybe this is a mistake?). Anyway, I am using &lt;br /&gt;
suspend2, which I compiled in the kernel as well. Now I have bound &lt;br /&gt;
''to hibernate '' first to Fn 4, with the following script&lt;br /&gt;
 event=button[ /]sleep  &lt;br /&gt;
 action=/usr/local/sbin/mihibernate &lt;br /&gt;
&lt;br /&gt;
This works fine. Now I want to do the same for Fn12, so following the key table I did:  &lt;br /&gt;
&lt;br /&gt;
 event=button[/] ibm/hotkey HKEY 00000080 0000100c  &lt;br /&gt;
 action=/usr/local/sbin/mihibernate &lt;br /&gt;
&lt;br /&gt;
But that does not work. What is the problem? I tried even   &lt;br /&gt;
 echo enable,0xffff &amp;gt;/proc/acpi/ibm/hotkey &lt;br /&gt;
without success. Can anybody help me? &lt;br /&gt;
[[User:Oub|Oub]] 16:27, 4 March 2006 (CET):&lt;br /&gt;
----&lt;br /&gt;
The proper event line is&lt;br /&gt;
 event=ibm/hotkey HKEY 00000080 0000100c&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
Also, make sure that you are not using [thinkpad-acpi]. If &amp;lt;tt&amp;gt;event=button[ /]sleep&amp;lt;/tt&amp;gt; works for {{key|Fn}}{{key|F4}}, that indicates that you do. It might block the ibm-acpi driver. Check your kernel config and disable any thinkpad acpi driver except ibm-acpi.&lt;br /&gt;
&lt;br /&gt;
[[User:Wyrfel|Wyrfel]] 21:58, 4 March 2006 (CET)&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
:Hello&lt;br /&gt;
:&lt;br /&gt;
:It is odd, I am pretty sure, that I do not use [thinkpad-acpi], but [ibm-acpi], although event=button[ /]sleep works for FnF4, in any case I found out that &lt;br /&gt;
:&lt;br /&gt;
: event=(button/power|ibm/hotkey HKEY 00000080 0000100c)&lt;br /&gt;
:&lt;br /&gt;
:Works! What do you think of adding a subsection to the [[How to get special keys to work]] page, with some examples, like the following:&lt;br /&gt;
:&lt;br /&gt;
:from ''/etc/acpi/events/battery'':&lt;br /&gt;
 event=(button/power|ibm/hotkey HKEY 00000080 0000100c)  &lt;br /&gt;
 action=/usr/local/sbin/hibernate&lt;br /&gt;
:from ''/etc/acpi/events/lid''&lt;br /&gt;
 event=button/lid&lt;br /&gt;
 action=/usr/local/bin/mysleepram&lt;br /&gt;
:from ''/etc/acpi/events/sleepbtn''&lt;br /&gt;
 event=(button/sleep|ibm/hotkey HKEY 00000080 00001004)&lt;br /&gt;
 action=/usr/local/bin/mysleepram&lt;br /&gt;
:&lt;br /&gt;
:(Also ''event=button/sleep '' works for me)&lt;br /&gt;
:and then restart acpi:&lt;br /&gt;
:&lt;br /&gt;
 /etc/init.d/acpid restart&lt;br /&gt;
:&lt;br /&gt;
:[[User:Oub|Oub]] 13:22, 5 March 2006 (CET):&lt;br /&gt;
----&lt;br /&gt;
What you do with&lt;br /&gt;
 event=(button/power|ibm/hotkey HKEY 00000080 0000100c)  &lt;br /&gt;
is to make a logical nonexclusive OR between&lt;br /&gt;
 event=button/power&lt;br /&gt;
and&lt;br /&gt;
 event=ibm/hotkey HKEY 00000080 0000100c&lt;br /&gt;
. If the first works, the whole thing works. So that's pretty logical.&lt;br /&gt;
&lt;br /&gt;
Please, do a {{cmdroot|dmesg &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; grep thinkpad-acpi}} and do a {{cmdroot|dmesg &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; ibm-acpi}}. What is the output in either case?&lt;br /&gt;
&lt;br /&gt;
I see no sense in putting examples to the page that only confuse people because they are not correct. ibm-acpi generates the events listed in the table and nothing else. If you get something like &amp;lt;tt&amp;gt;button/sleep&amp;lt;/tt&amp;gt; it's not ibm-acpi generating it. You are running Debian, right? Let's hope they didn't patch the driver to generate different events.&lt;br /&gt;
&lt;br /&gt;
Also, you can always do {{cmdroot|tail -f /var/log/acpid}} to have a life view of the generated events.&lt;br /&gt;
&lt;br /&gt;
I am pretty sure that you are using thinkpad-acpi or - if not so - that something else must interfere.&lt;br /&gt;
&lt;br /&gt;
[[User:Wyrfel|Wyrfel]] 04:49, 6 March 2006 (CET)&lt;br /&gt;
&lt;br /&gt;
---- &lt;br /&gt;
&lt;br /&gt;
:Hi &lt;br /&gt;
:&lt;br /&gt;
:Ok I admit everything is very odd. For the start, I seem to use &lt;br /&gt;
:ibm-acpi. As I said I am Debian,  but I compiled my own kernel :(2.6.10)(but not as a module, maybe this was a bad idee??)  and I used :the ibm-acpi driver which comes shipped with that kernel. I did not :download the driver from the official http://ibm-acpi.sourceforge.net/ :site. Here is the output of &lt;br /&gt;
:&lt;br /&gt;
:dmesg | grep acpi&lt;br /&gt;
 Kernel command line: ro  root=/dev/hda6 acpi_sleep=s3_bios&lt;br /&gt;
 tbxface-0118 [02] acpi_load_tables      : ACPI Tables successfully acquired&lt;br /&gt;
 evxfevnt-0094 [03] acpi_enable           : Transition to ACPI mode successful&lt;br /&gt;
 acpi_bus-0081 [06] acpi_bus_get_device   : Error getting context for object [df6ddaa8]&lt;br /&gt;
 acpi_bus-0081 [06] acpi_bus_get_device   : Error getting context for object [c1464768]&lt;br /&gt;
 acpi_bus-0081 [06] acpi_bus_get_device   : Error getting context for object [c1467328]&lt;br /&gt;
 acpi_bus-0081 [06] acpi_bus_get_device   : Error getting context for object [c146bba8]&lt;br /&gt;
 acpi_bus-0081 [06] acpi_bus_get_device   : Error getting context for object [c146b628]&lt;br /&gt;
 acpi_bus-0081 [06] acpi_bus_get_device   : Error getting context for object [c146b3e8]&lt;br /&gt;
 acpi_bus-0081 [06] acpi_bus_get_device   : Error getting context for object [c146b268]&lt;br /&gt;
 acpi_bus-0081 [06] acpi_bus_get_device   : Error getting context for object [c146dde8]&lt;br /&gt;
 acpi_bus-0081 [06] acpi_bus_get_device   : Error getting context for object [c1470d68]&lt;br /&gt;
 acpi_bus-0081 [06] acpi_bus_get_device   : Error getting context for object [c1470568]&lt;br /&gt;
 acpi_bus-0081 [06] acpi_bus_get_device   : Error getting context for object [c14719a8]&lt;br /&gt;
 ibm_acpi: IBM ThinkPad ACPI Extras v0.8&lt;br /&gt;
 ibm_acpi: http://ibm-acpi.sf.net/&lt;br /&gt;
 acpi_bus-0081 [08] acpi_bus_get_device   : Error getting context for object [c1467328]&lt;br /&gt;
 ibm_acpi: dock device not present&lt;br /&gt;
&lt;br /&gt;
:I don't understand the errors but anyway. Now the odd thing is that indeed the following works&lt;br /&gt;
:&lt;br /&gt;
 event=button[ /]sleep&lt;br /&gt;
 action=/usr/local/sbin/hibernate &lt;br /&gt;
:but   &lt;br /&gt;
 event=button[/]sleep  &lt;br /&gt;
 action=/usr/local/sbin/hibernate &lt;br /&gt;
&lt;br /&gt;
:Does not work. But from what you said, using the ibm_acpi neither of '''these strings ''' should  work? So I don't understand what is going on. [[User:Oub|Oub]] 20:28, 6 March 2006 (CET): &lt;br /&gt;
&lt;br /&gt;
==Turn on/off Wifi on Fn5 ==&lt;br /&gt;
Hi&lt;br /&gt;
&lt;br /&gt;
I hope this is the last question. I use a crude way to activate and deactivate my wificard: I remove and insert the relevant modules, with 2 simple scripts. Now the question is how can I bind Fn5 so, that it turns on and off the wificard? With my approach I need to fire up two scripts, and that I cannot bind to one button. Thanks &lt;br /&gt;
[[User:Oub|Oub]] 17:57, 5 March 2006 (CET):&lt;br /&gt;
&lt;br /&gt;
Try a {{cmdroot|cat /proc/acpi/ibm/bluetooth}}. Maybe it returns the state. If not, the other way would be to check if the USB bluetooth controller device is listed in {{path|/proc/bus/usb}} somewhere. It shouldn't be there if bluetooth is switched off and should be there if it is on.&lt;br /&gt;
&lt;br /&gt;
[[User:Wyrfel|Wyrfel]] 04:49, 6 March 2006 (CET)&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Split page?==&lt;br /&gt;
This page is getting too long. Maybe we should split it. I'd suggest moving the &amp;quot;Example applications&amp;quot; to a seperate page. &lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 22:46, 3 April 2006 (CEST)&lt;br /&gt;
&lt;br /&gt;
==DIY Firefox 1.5 xpi==&lt;br /&gt;
Here's how I maneged a Firefox 1.5 compatible plugin (source: google). Note that the wiki eats some of the xml tags (so look at the source too)&lt;br /&gt;
&lt;br /&gt;
 $ ls -1R tp41.xpi&lt;br /&gt;
 tp41.xpi/:&lt;br /&gt;
 chrome&lt;br /&gt;
 chrome.manifest&lt;br /&gt;
 install.rdf&lt;br /&gt;
 &lt;br /&gt;
 tp41.xpi/chrome:&lt;br /&gt;
 content&lt;br /&gt;
 &lt;br /&gt;
 tp41.xpi/chrome/content:&lt;br /&gt;
 tp41keysOverlay.xul&lt;br /&gt;
&lt;br /&gt;
 $ cat tp41.xpi/chrome.manifest&lt;br /&gt;
 content     tp41keys    chrome/content/&lt;br /&gt;
 overlay chrome://browser/content/browser.xul chrome://tp41keys/content/tp41keysOverlay.xul&lt;br /&gt;
&lt;br /&gt;
 $ cat tp41.xpi/install.rdf&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;RDF xmlns=&amp;quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&amp;quot;&lt;br /&gt;
      xmlns:em=&amp;quot;http://www.mozilla.org/2004/em-rdf#&amp;quot;&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
   &amp;lt;Description about=&amp;quot;urn:mozilla:install-manifest&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;em:id&amp;gt;tp41keys@tp41keys.org&amp;lt;/em:id&amp;gt;&lt;br /&gt;
     &amp;lt;em:version&amp;gt;1.0&amp;lt;/em:version&amp;gt;&lt;br /&gt;
     &amp;lt;em:type&amp;gt;2&amp;lt;/em:type&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
     &amp;lt;!-- Target Application this extension can install into,&lt;br /&gt;
          with minimum and maximum supported versions. --&amp;gt;&lt;br /&gt;
     &amp;lt;em:targetApplication&amp;gt;&lt;br /&gt;
       &amp;lt;Description&amp;gt;&lt;br /&gt;
         &amp;lt;em:id&amp;gt;{ec8030f7-c20a-464f-9b0e-13a3a9e97384}&amp;lt;/em:id&amp;gt;&lt;br /&gt;
         &amp;lt;em:minVersion&amp;gt;1.0+&amp;lt;/em:minVersion&amp;gt;&lt;br /&gt;
         &amp;lt;em:maxVersion&amp;gt;1.5.0.*&amp;lt;/em:maxVersion&amp;gt;&lt;br /&gt;
       &amp;lt;/Description&amp;gt;&lt;br /&gt;
     &amp;lt;/em:targetApplication&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
     &amp;lt;!-- Front End MetaData --&amp;gt;&lt;br /&gt;
     &amp;lt;em:name&amp;gt;IBM ThinkPad 41 Keys&amp;lt;/em:name&amp;gt;&lt;br /&gt;
     &amp;lt;em:description&amp;gt;Two Browser Navigation Keys&amp;lt;/em:description&amp;gt;&lt;br /&gt;
     &amp;lt;em:creator&amp;gt;Paul Bolle&amp;lt;/em:creator&amp;gt;&lt;br /&gt;
     &amp;lt;em:homepageURL&amp;gt;http://www.example.com/tp41keys.xpi&amp;lt;/em:homepageURL&amp;gt;&lt;br /&gt;
   &amp;lt;/Description&amp;gt;&lt;br /&gt;
 &amp;lt;/RDF&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 $ cat tp41.xpi/chrome/content/tp41keysOverlay.xul&lt;br /&gt;
 &amp;lt;?xml version='1.0'?&amp;gt;&lt;br /&gt;
 &amp;lt;!DOCTYPE overlay&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;overlay id='tp41keysOverlay'&lt;br /&gt;
     xmlns='http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul'&amp;gt;&lt;br /&gt;
 &amp;lt;!-- For Firefox --&amp;gt;&lt;br /&gt;
     &amp;lt;keyset id='mainKeyset'&amp;gt;&lt;br /&gt;
         &amp;lt;key id='tp41BackKey' keycode='VK_F21' command='Browser:Back' /&amp;gt;&lt;br /&gt;
         &amp;lt;key id='tp41ForwardKey' keycode='VK_F22' command='Browser:Forward' /&amp;gt;&lt;br /&gt;
     &amp;lt;/keyset&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;/overlay&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 $ cat .mozilla/firefox/*.default/extensions/tp41keys\@tp41keys.org &lt;br /&gt;
 ~/tp41.xpi&lt;/div&gt;</summary>
		<author><name>Pebolle</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Talk:Predesktop_Area&amp;diff=21364</id>
		<title>Talk:Predesktop Area</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Talk:Predesktop_Area&amp;diff=21364"/>
		<updated>2006-04-04T22:40:25Z</updated>

		<summary type="html">&lt;p&gt;Pebolle: grub2&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Use the HPA for GNU/Linux?==&lt;br /&gt;
More interesting than removing the HPA (which includes a.o. Acces IBM Predesktop Area, some other tools and a backup of the pre-installed OS) would be to use this area for GNU/Linux too. At least, removing the HPA only saves 3,5 GB on my 60 GB hard disk. It would be worth a try to see whether the backup of the pre-installed OS on the largest PSA could be replaced by a backup of your favourite GNU/Linux distribution.&lt;br /&gt;
&lt;br /&gt;
Elaborating on my ideas a few days later, I'd guess the following could be tried:&lt;br /&gt;
* see whether GRUB can be made to boot the Access IBM Predekstop Area (I guess by &amp;quot;chainloading&amp;quot; the bootsector of its PSA). Right now GRUB refuses to load sectors outside the partioned area. I've got absolutely no idea if it's possible to write a hack to overcome that restriction. Need to contact the GRUB people about that ...&lt;br /&gt;
* write some userspace tools for the HPA/the SPAs (things like: dumpbeer, printDoS).&lt;br /&gt;
&lt;br /&gt;
It should be clear these are basically random ideas. Still feedback would be appreciated ...&lt;br /&gt;
----&lt;br /&gt;
Hei,&lt;br /&gt;
&lt;br /&gt;
interesting ideas, but i'd only see a point in it if one could keep Win and Linux rescue stuff in the HPA. That means it would need to be expandable or fit the stuff for both systems.&lt;br /&gt;
[[User:Wyrfel|Wyrfel]] 20:03, 15 Mar 2005 (CET)&lt;br /&gt;
----&lt;br /&gt;
Thanks.&lt;br /&gt;
&lt;br /&gt;
Short answer: that should be possible.&lt;br /&gt;
&lt;br /&gt;
Long answer: I see little in the specs (as I understand them now) to stop one from adding (say) an extra 3 GB GNU/Linux-rescue PSA or something like that. We might try to do that first by changing the BEER and DoS manually. (Not sure whether Phoenix added some proprietary stuff to keep you from booting it. The PSA should always be accesable with the proper BIOS setting.) It might be mandatory to put it on a FAT filesystem. The hard part probably is to have it show up in the Access IBM Predesktop Area. (My guess is you need to regenerate the FirstSight &amp;quot;graphical shell&amp;quot;. If that's correct we probably only can use the FirstWare tools &amp;quot;hidden&amp;quot; on their little PSA. That's no fun. Well it might a little fun if we try FreeDOS). &lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle (not logged in)]]&lt;br /&gt;
----&lt;br /&gt;
Update: a trivial patch to grub allows it to also work outside the partioned area:&lt;br /&gt;
&lt;br /&gt;
 --- /var/tmp/rpm/BUILD/grub-0.95/stage2/disk_io.c.oud   2004-05-23 18:35:24.000000000 +0200&lt;br /&gt;
 +++ /var/tmp/rpm/BUILD/grub-0.95/stage2/disk_io.c       2005-03-18 22:38:30.050907408 +0100&lt;br /&gt;
 @@ -297,8 +297,8 @@&lt;br /&gt;
     *  Check partition boundaries&lt;br /&gt;
     */&lt;br /&gt;
    if (sector &amp;lt; 0&lt;br /&gt;
 -      || ((sector + ((byte_offset + byte_len - 1) &amp;gt;&amp;gt; SECTOR_BITS))&lt;br /&gt;
 -         &amp;gt;= part_length))&lt;br /&gt;
 +      /*|| ((sector + ((byte_offset + byte_len - 1) &amp;gt;&amp;gt; SECTOR_BITS))&lt;br /&gt;
 +         &amp;gt;= part_length)*/)&lt;br /&gt;
      {&lt;br /&gt;
        errnum = ERR_OUTSIDE_PART;&lt;br /&gt;
        return 0;&lt;br /&gt;
&lt;br /&gt;
I made a grub CD with a grub patched with the above. Now I can &amp;quot;cat&amp;quot; the bootsector of the Predesktop Area from the grub shell (when booting of that grub CD). But I haven't yet managed to boot the Predesktop Area (dangerous stuff!) To be continued ...&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] Fri Mar 18 22:42:43 CET 2005&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Update: a quick test with the current development version of grub2 (grub-1.93) showed that grub2 can chainload a block outside the partitioned area &lt;br /&gt;
&amp;quot;out of the box&amp;quot;. That's nice. I still haven't been able to get passed the error messages generated by the boot sectors of the bootable PSAs. My guess is the BIOS provides those boot sectors with some (special) settings that grub doesn't use ...&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 00:40, 5 April 2006 (CEST)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
I've been playing around with the predesktop area tonight.  I was simply trying to just leave the diagnostics stuff and remove the windows part.  I wrote some programs to read/write the BEER data and stuff, but I wasn't able to get the system to boot it, it kept erroring &amp;quot;Authentication of System Services failed&amp;quot; (or something along those lines).  I will play around with this some more later&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[User:Invisi|Tim Nordell]]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A quick look with a hexeditor gave me two instances of &amp;quot;Application authentication has failed!&amp;quot; in the FirstSight application. Does that sound familair? &lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] Fri Apr 1 19:35:30 CEST 2005&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Actually it wasn't that.  I did a search of that too, the message itself was not in the predesktop area at all.  What also is interesting is the fw*.exe utilities for manipulating the predesktop area, contains the string &amp;quot;MD5&amp;quot; which makes me wonder if there is an md5 hash of each &amp;quot;predesktop&amp;quot; partition.  I know on the IBM whitepaper it states there being a signature so that non-signed applications can not be run.  Could a simple &amp;quot;md5&amp;quot; be the signature?&lt;br /&gt;
&lt;br /&gt;
[[User:Invisi|Tim Nordell]] 12:01, 3 Apr 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*What is it that you were trying to do (what did trigger the error you saw)?&lt;br /&gt;
&lt;br /&gt;
*About ten of the fw*.exe utilities contain the phrase &amp;quot;MD5 Checksums do not match&amp;quot;. So they could very well be using MD5 sums for some sort of validation. But they could use the MD5 sums in a lot of ways actually, so I won't yet speculate ...&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] Sun Apr  3 15:11:10 CEST 2005&lt;br /&gt;
&lt;br /&gt;
== Predesktop Area ==&lt;br /&gt;
&lt;br /&gt;
I made a program that takes the BEER record at the end, parses it out to a &amp;quot;.cfg&amp;quot; file, lets you modify it, recalibrate the start spots for the records, and write it out to disk again.  It doesn't directly access hda, 'cept for reading the original beer record.  It makes a script file to go with the files you have, to read in the HPA data, and to write it out again with the new record.&lt;br /&gt;
&lt;br /&gt;
Anyways, I tried simply removing the last record from the BEER, which is the windows recovery partition.  It didn't like that.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Did you update the two's complement checksum at the end of the BEER?&lt;br /&gt;
&lt;br /&gt;
[[user:Pebolle|Paul Bolle]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Yep, I updated that.  If I don't update that, it doesn't even say that failed message.  I also made a seperate program to update the checksum so you can also modify the beer record by hand with a hex editor and have valid checksums.&lt;br /&gt;
&lt;br /&gt;
== Linux kernel support ==&lt;br /&gt;
{{Todo|research and add to article}}&lt;br /&gt;
* Add a section on dmesg and hdparm -I output:&lt;br /&gt;
 (...)&lt;br /&gt;
 Commands/features:&lt;br /&gt;
        Enabled Supported:&lt;br /&gt;
 (...)&lt;br /&gt;
           *    Host Protected Area feature set&lt;br /&gt;
 (...)&lt;br /&gt;
                SET MAX security extension&lt;br /&gt;
                Address Offset Reserved Area Boot&lt;br /&gt;
 (...)&lt;br /&gt;
&lt;br /&gt;
* Recent (2.6.10 and up?) kernels disable HPAs automatically (in drivers/ide/ide-disk.c). Dmesg example:&lt;br /&gt;
&lt;br /&gt;
 hda: Host Protected Area detected.&lt;br /&gt;
        current capacity is 110194034 sectors (56419 MB)&lt;br /&gt;
         native  capacity is 117210240 sectors (60011 MB)&lt;br /&gt;
 hda: Host Protected Area disabled.&lt;br /&gt;
&lt;br /&gt;
This should be (further researched and) added to this section (maybe with some pointers to the unexpected consequences of this new approach ...)&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 22:06, 6 Sep 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
In 2.6.11, I was able to re-enable HPA by commenting out the section in drivers/ide/ide-disk.c under the comment &amp;quot;Some maxtor support LBA48 but not accept LBA48 set max...&amp;quot;.  I suppose that wouldn't be a good idea with a Maxtor drive but it worked fine for my R50.&lt;br /&gt;
&lt;br /&gt;
--[[User:Rkilian|Robert Kilian]] 21:13, 22 March 2006 (CET)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* SRCMOS24.EXE&lt;br /&gt;
&lt;br /&gt;
In the PSA used by the Predesktop Area I found a &amp;quot;hidden&amp;quot; executable: SRCMOS24.EXE (it is not mentioned in the FAT). This executable can capture and update CMOS data. It might only be used by the FirstSight program to display (part of) the BIOS info. It might be nice to see what it can do and if similar things are possible under GNU/Linux.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 22:01, 7 Sep 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
== Newer thinkpads don't use Phoenix Firstware? ==&lt;br /&gt;
&lt;br /&gt;
On my T42 that arrived yesterday, the predesktop area looks a lot like MS Windows. The widget set, the fonts, even the boot sequence looks exactly like Windows 2000. Debian-installer indentified it as &amp;quot;Microsoft Windows NT/2000/XP&amp;quot;, while it identified my XP partition as &amp;quot;Microsoft Windows XP Professional&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Has Lenovo/IBM changed their system, or is this Phoenix stuff really just Windows?&lt;br /&gt;
&lt;br /&gt;
-- [[Evan.Heidtmann]]&lt;br /&gt;
&lt;br /&gt;
Evan,&lt;br /&gt;
&lt;br /&gt;
Could it be that you're talking about the preinstalled version of Windows here? As far as I know (using information to be found on the internet, not personal research) the preinstalled OS will reformat its partition from FAT32 to NTFS at first boot. That could explain the difference in the identification by the Debian installer (which I never really used).&lt;br /&gt;
&lt;br /&gt;
Moreover the Predesktop Area is part of the HPA and the HPA is not an partition. It seems unlikely that the Debain installer notices the HPA. As far as I know there are at present no GNU/Linux tools with a (useful) support of HPAs.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 15:43, 4 Aug 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
My T42P (model 2373HSG) is using a cut-down version of Windows XP as the pre-desktop area.  I'm not sure whether it's a special IBM thing or just a [http://www.microsoft.com/licensing/programs/sa/benefits/winpe.mspx Windows PE] (preinstallation environment) setup.  It includes Java and Python, which are used by some of the IBM tools, and the Opera web browser.&lt;br /&gt;
&lt;br /&gt;
It's no longer an HPA but a 487MB hidden FAT32 called IBM_SERVICE located at the end of the disk.&lt;br /&gt;
&lt;br /&gt;
--[[User:Korourke|Korourke]]&lt;br /&gt;
&lt;br /&gt;
== Rescue and Recovery via grub? ==&lt;br /&gt;
&lt;br /&gt;
Did anyone get the Rescue and Recovery partition to boot via grub on recent models? On a T43 with&lt;br /&gt;
 rootnoverify (hd0,1)&lt;br /&gt;
 chainloader +1&lt;br /&gt;
the Rescue and Recovery partition starts booting nicely and then, a few seconds in the R&amp;amp;R loading sequence, chokes with a &lt;br /&gt;
 STOP: c000021a {Fatal System Error}&lt;br /&gt;
 The Session Manager Initialization system process terminated unexpectedly with a status of 0xc000003a (0x00000000 0x00000000).&lt;br /&gt;
 The system has been shut down. &lt;br /&gt;
The problem started right after installing grub into the MBR (I couldn't get the preinstalled MBR to boot grub from an active primary partition). It seems oblivious to the Predesktop BIOS setting.&lt;br /&gt;
&lt;br /&gt;
The same problem has been reported by others with other models (for example [http://forums.fedoraforum.org/archive/index.php/t-19433.html here] for a T42).&lt;br /&gt;
&lt;br /&gt;
[[User:Thinker|Thinker]] 11:35, 30 Sep 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
Your &amp;quot;Rescue and Recovery partition&amp;quot; seems not to be a HPA (which isn't a partition). Maybe we should open a new page for that system.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 21:54, 30 Sep 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
It may very well not be an HPA , but the BIOS stil calls it a &amp;quot;Predesktop Area&amp;quot;. Anyway, the partition is actually a VFAT partition (even though it has type 0x12, &amp;quot;Compaq Diagnostics&amp;quot;). It seems to boot into PC-DOS (using {{path|NTDETECT.EXE}} so it looks like Windows startup) and then its {{path|AUTOEXEC.BAT}} runs a fancy GUI.&lt;br /&gt;
--[[User:Thinker|Thinker]] 23:31, 30 Sep 2005 (CEST)&lt;br /&gt;
----&lt;br /&gt;
Right, there has been a lot of confusion about this, we should have a separate page. Introduced an edit link (called Rescue and Recovery) on the [[ThinkPad Technologies]] page for that purpose.&lt;br /&gt;
&lt;br /&gt;
== Suggestions for projects ==&lt;br /&gt;
&lt;br /&gt;
I'd guess it would be rather nice to have GNU/Linux tools (like sfdisk and parted) HPA aware. The most urgent change would be to have those programs at least recognize and respect a HPA (e.g.: do not write in or otherwise use the HPA area; unless the user gives a --force option or something similar).&lt;br /&gt;
&lt;br /&gt;
As for now, I realize I caused this error: ENOPATCH.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 22:56, 5 Nov 2005 (CET)&lt;br /&gt;
&lt;br /&gt;
== Keeping functionality of the blue AccessIBM button ==&lt;br /&gt;
&lt;br /&gt;
Somebody figured out [http://sharadware.com/2005/07/11/suse-linux-winxp-access-ibm-on-the-thinkpad-t43/|how to keep the AccessIBM functionality] when installing Linux, quite easy fix. How come nobody thought about it before? :)&lt;br /&gt;
(link got from [[Installing_Ubuntu_5.04_on_a_ThinkPad_T43_%281875%29 here]])&lt;br /&gt;
&lt;br /&gt;
--[[User:Micampe|Micampe]] 17:39, 9 Dec 2005 (CET)&lt;br /&gt;
&lt;br /&gt;
The relevant part of that page:&lt;br /&gt;
&lt;br /&gt;
''Set the IBM Predesktop Area (in the BIOS) to â€œSecureâ€. Boot using the SUSE DVD. Shrink the Windows partition as required. Follow the instructions and go through the regular installation process. Create a primary partition for /boot (the other stuff can go into the extended partitions) and when the time comes to install GRUB (you do prefer GRUB to LILO, donâ€™t you?), make sure you install it into the boot sector of the boot partition. Set this partition as active. Leave the MBR alone.''&lt;br /&gt;
&lt;br /&gt;
That's the first thing I tried on my T43. Didn't work: setting the active partition to /boot had no effect, it was still booting the first (Windows) partition. So I had to install Grub into MBR, thereby killing R&amp;amp;R. Anyway, there's another solution in the article page (didn't try it since I saw it only after purging my R&amp;amp;R partition).&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
--[[User:Thinker|Thinker]] 19:18, 9 Dec 2005 (CET)&lt;br /&gt;
&lt;br /&gt;
== Parsing the HPA information (BEER/DOS) ==&lt;br /&gt;
&lt;br /&gt;
I too have been writing a program to parse the BEER and DOS info. Sample output:&lt;br /&gt;
:{{cmdresult| beer.signature: 0xBEEF}}&lt;br /&gt;
:{{cmdresult| beer.size: 128}}&lt;br /&gt;
:{{cmdresult| beer.flags: 41}}&lt;br /&gt;
:{{cmdresult|    Read Only:}}&lt;br /&gt;
:{{cmdresult|    Generated Record:}}&lt;br /&gt;
:{{cmdresult|    Use Reserved Area Boot Code Address: yes}}&lt;br /&gt;
:{{cmdresult|    Configuration Time Stamp is valid:}}&lt;br /&gt;
:{{cmdresult|    Device Supports LBA:                 yes}}&lt;br /&gt;
:{{cmdresult|    Directory of Services is Present}}&lt;br /&gt;
:{{cmdresult|    Formatted Geometry Valid}}&lt;br /&gt;
:{{cmdresult|    Reported Geometry Valid              yes}}&lt;br /&gt;
:{{cmdresult| beer.reported_cylinders: 16383}}&lt;br /&gt;
:{{cmdresult| beer.reported_heads: 16}}&lt;br /&gt;
:{{cmdresult| beer.reported_sectors: 63}}&lt;br /&gt;
:{{cmdresult| beer.reported_bytes_sector: 512}}&lt;br /&gt;
:{{cmdresult| beer.reported_sectors_device: 117210240}}&lt;br /&gt;
:{{cmdresult| beer.formatted_cylinders: 16383}}&lt;br /&gt;
:{{cmdresult| beer.formatted_heads: 16}}&lt;br /&gt;
:{{cmdresult| beer.formatted_sectors: 63}}&lt;br /&gt;
:{{cmdresult| beer.formatted_bytes_sector: 512}}&lt;br /&gt;
:{{cmdresult| beer.formatted_sectors_device: 117210240}}&lt;br /&gt;
:{{cmdresult| year: 2004}}&lt;br /&gt;
:{{cmdresult| day: 313}}&lt;br /&gt;
:{{cmdresult| beer.timestamp: 1426063684}}&lt;br /&gt;
:{{cmdresult| beer.device_index: 0x80}}&lt;br /&gt;
:{{cmdresult| beer.hpa_start: 110194034}}&lt;br /&gt;
:{{cmdresult| beer.boot_code_address: 117002545}}&lt;br /&gt;
:{{cmdresult| beer.num_entries: 8}}&lt;br /&gt;
:{{cmdresult| beer.dir_length: 64}}&lt;br /&gt;
:{{cmdresult| beer.revision: 0}}&lt;br /&gt;
:{{cmdresult| dev_name: HTS726060M9AT00}}&lt;br /&gt;
:{{cmdresult| beer.checksum: -26982}}&lt;br /&gt;
:{{cmdresult| dos[0].flags: 3}}&lt;br /&gt;
:{{cmdresult|    Service area is available as B:}}&lt;br /&gt;
:{{cmdresult|    Diagnostic Service:}}&lt;br /&gt;
:{{cmdresult|    Service Area is Read Only:}}&lt;br /&gt;
:{{cmdresult|    This Boot:}}&lt;br /&gt;
:{{cmdresult|    Empty Service Area:}}&lt;br /&gt;
:{{cmdresult|    Hidden Service Area:                 yes}}&lt;br /&gt;
:{{cmdresult|    Service Area is bootable as A:       yes}}&lt;br /&gt;
:{{cmdresult| dos[0].service_area_start: 117005431}}&lt;br /&gt;
:{{cmdresult| dos[0].service_area_size: 204800}}&lt;br /&gt;
:{{cmdresult| dos[0].load_sectors: 1}}&lt;br /&gt;
:{{cmdresult| dos[0].load_address: 0x7:C000}}&lt;br /&gt;
:{{cmdresult| dos[0].service_area_id: 0}}&lt;br /&gt;
:{{cmdresult| dos[0] id_str: FirstWare Reserved Area}}&lt;br /&gt;
:{{cmdresult| dos[0].checksum: -22271}}&lt;br /&gt;
:{{cmdresult| [...]}}&lt;br /&gt;
&lt;br /&gt;
Very rough code. Send me an e-mail (at the address found at my user page) if you want a (GPL'd) copy, but only if you're willing to test and improve the code.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 01:15, 24 January 2006 (CET)&lt;br /&gt;
&lt;br /&gt;
== SET MAX Security Extensions ==&lt;br /&gt;
&lt;br /&gt;
I've hacked Andries Brouwer's setmax tool (see: Google) to support the SET MAX security extensions (SET MAX SET PASSWORD, SET MAX LOCK, SET MAX UNLOCK, SET MAX FREEZE). Very rough code once again. Mail me if you're willing to brick your HDD.&lt;br /&gt;
&lt;br /&gt;
A few random observations:&lt;br /&gt;
&lt;br /&gt;
- secure mode: the Phoenix BIOS probably sets a SET MAX password in the HDD, does a non-volatile SET MAX and LOCKs (or FREEZEs) the HDD.&lt;br /&gt;
&lt;br /&gt;
- normal mode: the Phoenix BIOS might set a SET MAX password in the HDD, does a (volatile?) SET MAX but does not LOCK the HDD. The HDD will accept another SET MAX, a new SET MAX SET PASSWORD, etc.&lt;br /&gt;
&lt;br /&gt;
- normal mode: Linux 2.6.x disables the HPA in normal mode (by doing a volatile SET MAX to maximum native address). After a suspend the HDD reenables the HPA (by returning to the latest non-volatile value of SET MAX). It thus treats the suspend cycle as a power cycle (it also discards a SET MAX password, unlocks or unfreezes the HPA etc). I'm not sure whether that is a correct implementation of the ATA spec. (The HDD doesn't do this in secure mode. I would like to know how the Phoenix BIOS and/or Hitachi HDD people have managed this.) &lt;br /&gt;
&lt;br /&gt;
This can lead to some problems if a partition ends within the limits of the HPA (which is then actually (partly) overwritten by that partition). Maybe the best solution would be to have the kernel do a non-volatile SET MAX to the native maximum address. Then a resume from suspend will in effect not reenable the HPA.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 01:40, 20 February 2006 (CET)&lt;br /&gt;
&lt;br /&gt;
== hpafs ==&lt;br /&gt;
&lt;br /&gt;
I've written a (read only) FUSE for the hpa: hpafs. Alpha quality at best. Mail me if you'd like to test it, hack on it. Now about 1100 LOC. The binary is a mere 33 KB (this is with debugging symbols). Rather i386 centric. &lt;br /&gt;
&lt;br /&gt;
hpafs will only work if the Predesktop Area is disabled (but that is more or less obvious). It basically turns each PSA into a file:&lt;br /&gt;
&lt;br /&gt;
{{cmdresult|$ sudo hpafs /dev/hda /mnt/hpa -o allow_other&amp;lt;br/&amp;gt;&lt;br /&gt;
$ ll /mnt/hpa/&amp;lt;br/&amp;gt;&lt;br /&gt;
total 0&amp;lt;br/&amp;gt;&lt;br /&gt;
-r--r--r--  1 root root    2097152 Jan  1  1970 BIOSWORKAREA&amp;lt;br/&amp;gt;&lt;br /&gt;
-r--r--r--  1 root root    7710720 Jan  1  1970 Create Diagnostic Diskettes&amp;lt;br/&amp;gt;&lt;br /&gt;
-r--r--r--  1 root root  104857600 Jan  1  1970 FirstWare Reserved Area&amp;lt;br/&amp;gt;&lt;br /&gt;
-r--r--r--  1 root root     7710720 Jan  1  1970 Rec Boot&amp;lt;br/&amp;gt;&lt;br /&gt;
-r--r--r--  1 root root 3459252224 Jan  1  1970 Rec Data&amp;lt;br/&amp;gt;&lt;br /&gt;
-r--r--r--  1 root root    1476096 Jan  1  1970 Restore from backup&amp;lt;br/&amp;gt;&lt;br /&gt;
-r--r--r--  1 root root    7710720 Jan  1  1970 Run Diagnostics&amp;lt;br/&amp;gt;&lt;br /&gt;
-r--r--r--  1 root root    1477632 Jan  1  1970 SIGHT}}&lt;br /&gt;
&lt;br /&gt;
This FUSE file can easily be copied with basic GNU tools (cat, dd, etc). Even more fun is to loop mount such a FUSE file (if the corresponding PSA is a bootable image). Then the PSA is a (read only) part of your mounted filesystems. So now you do not need to use dd on /dev/hda to copy the Predesktop Area: you can just mount it!&lt;br /&gt;
&lt;br /&gt;
{{cmdresult|$ sudo mount -o loop,ro,users  /mnt/hpa/Rec\ Data /mnt/tmp&amp;lt;br/&amp;gt;&lt;br /&gt;
$ ll /mnt/tmp/&amp;lt;br/&amp;gt;&lt;br /&gt;
total 1454&amp;lt;br/&amp;gt;&lt;br /&gt;
-rwxr-xr-x  1 root root      64 Sep 27  2002 bootcat.bin&amp;lt;br/&amp;gt;&lt;br /&gt;
-rwxr-xr-x  1 root root 1474560 Oct  3  2002 bootimg.bin&amp;lt;br/&amp;gt;&lt;br /&gt;
drwxr-xr-x  2 root root    2048 Mar 13  2004 country&amp;lt;br/&amp;gt;&lt;br /&gt;
drwxr-xr-x  2 root root    2048 Mar 13  2004 ibmwork&amp;lt;br/&amp;gt;&lt;br /&gt;
drwxr-xr-x  3 root root    8192 Mar 13  2004 recovery&amp;lt;br/&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
To be continued ...&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 00:56, 2 March 2006 (CET)&lt;/div&gt;</summary>
		<author><name>Pebolle</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Rescue_and_Recovery&amp;diff=21310</id>
		<title>Rescue and Recovery</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Rescue_and_Recovery&amp;diff=21310"/>
		<updated>2006-04-03T20:53:20Z</updated>

		<summary type="html">&lt;p&gt;Pebolle: grub4dos entry still unfixed. I'm removing it now.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=&amp;quot;100%&amp;quot;&lt;br /&gt;
|style=&amp;quot;vertical-align:top;padding-right:20px;width:10px;&amp;quot; | __NOTOC__&lt;br /&gt;
|style=&amp;quot;vertical-align:top&amp;quot; |&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin: 0; margin-right:10px; border: 1px solid #dfdfdf; padding: 0em 1em 1em 1em; background-color:#F8F8FF; align:right;&amp;quot;&amp;gt;&lt;br /&gt;
===Rescue and Recovery===&lt;br /&gt;
Rescue and Recovery version 3.0 consists of a bootable partition containing various system recovery tools, including full recovery of the preinstalled Windows XP partition. It can be activated by pressing the {{ibmkey|ThinkPad|#494949}}, {{ibmkey|Access IBM|#495988}} or {{ibmkey|ThinkVantage|#495988}} [[ThinkPad Button|Button]] during system boot. It contains a FAT filesystem (labeled &amp;quot;IBM_SERVICE&amp;quot;), and has partition type 0x12 (&amp;quot;Compaq diagnostics&amp;quot; in &amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
As opposed to a [[Hidden Protected Area|Hidden Protected Area]] Recovery partitions are ordinary partitions, accessible through the partition table. As they are ordinary partitions they are accessible by ordinary partitioning tools. They should be dealt carefully with.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
==Proper MBR==&lt;br /&gt;
{{WARN|Tinkering with the default MBR and the Rescue &amp;amp; Recovery partition puts risk to your system. It can result in rendering the system completely unusable and severe data loss. You follow any instructions described here on your own risk.}}&lt;br /&gt;
&lt;br /&gt;
Consideration 6 of the Readme states:&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&amp;quot;The Master Boot Record (MBR) must be configured properly for the Rescue and Recovery application to function properly.  When possible, the Rescue and Recovery application attempts to ensure the proper configuration of the MBR.  This can only occur if the Rescue and Recovery application is installed after other applications that requires the MBR.&amp;quot;&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Apparently, the MBR is not &amp;quot;configured properly&amp;quot; if LILO or GRUB has been installed in it as the following is the case:&lt;br /&gt;
*the default MBR seems to ignore the active bit and always boots the first partition instead&lt;br /&gt;
*the default MBR contains code to catch a press of the appropriate button during bootup and boot the R&amp;amp;R partition in that case&lt;br /&gt;
*before booting the R&amp;amp;R, the default MBR changes it's partition type to 0x0b, otherwise it changes it to 0x12 (to hide it from Windows)&lt;br /&gt;
*the R&amp;amp;R software assumes that the first partition contains Windows&lt;br /&gt;
*the R&amp;amp;R partition needs to be of type 0x0b (FAT32) for the R&amp;amp;R software to work&lt;br /&gt;
&lt;br /&gt;
Since neither LILO nor GRUB can catch the press of the button (an undocumented mechanism anyway) it is not possible to invoke Rescue and Recovery by pressing the appropriate button during system boot, once LILO or GRUB have altered the MBR for their boot procedure.&lt;br /&gt;
&lt;br /&gt;
===GRUB in the MBR===&lt;br /&gt;
You can, however, boot the Rescue and Recovery partition from within a GRUB residing in your MBR. However if you leave its partitions type to 0x12 (Compaq disgnostics) this will result in an error message &amp;quot;c000021a, Fatal System Error&amp;quot; if you try to boot it. To avoid that and to make sure the recovery partition always is of the right type, add a line to change the partition type to 0x0b to the recovery partitions entry in your {{path|/boot/grub/menu.lst}}. Assuming your recovery partition is the second partition,  it should look like this:&lt;br /&gt;
  title           IBM Rescue and Recovery&lt;br /&gt;
  root            (hd0,1)&lt;br /&gt;
  '''parttype        (hd0,1) 0x0b'''&lt;br /&gt;
  '''unhide          (hd0,1)'''&lt;br /&gt;
  chainloader     +1&lt;br /&gt;
&lt;br /&gt;
We also add an &amp;lt;tt&amp;gt;unhide&amp;lt;/tt&amp;gt; line here because we are going to hide the recovery partition on every boot of Windows, so we need to unhide it, when the recovery partition is booted. This is because if we wouldn't hide the partition when booting Windows, it would be visible and accessable there and that's not what we want. So, assuming that Windows is on the first partition, the Windows entry should now look like this:&lt;br /&gt;
  title           Windows&lt;br /&gt;
  root            (hd0,0)&lt;br /&gt;
  '''hide            (hd0,1)'''&lt;br /&gt;
  chainloader     +1&lt;br /&gt;
&lt;br /&gt;
Now you should be able to boot the R&amp;amp;R partition from withing GRUB, residing in your MBR.&lt;br /&gt;
&lt;br /&gt;
===GRUB in a partitions boot sector===&lt;br /&gt;
A way to have your Access IBM button still functional on bootup, is to create a separate {{path|/boot}} partition, install GRUB to that partition and make it active.&lt;br /&gt;
{{NOTE|If the above finding is true that the MBR ignores the active bit, that partition has to be the first one.}}&lt;br /&gt;
*In the BIOS, set the IBM Predesktop Area to 'Secure'.&lt;br /&gt;
*Boot your Linux distributions installation CD.&lt;br /&gt;
*Follow the instructions and go through the regular installation process.&lt;br /&gt;
*Create a primary partition for /boot (the other stuff can go into the extended partitions) and when the time comes to install GRUB, make sure you install it into the boot sector of the boot partition.&lt;br /&gt;
*Set this partition as active. Leave the MBR alone.&lt;br /&gt;
&lt;br /&gt;
==External Sources==&lt;br /&gt;
* IBM page on [http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-4Q2QAK ThinkVantage Rescue and Recovery].&lt;br /&gt;
* [ftp://ftp.software.ibm.com/pc/pccbbs/thinkvantage_en/tvtrnr3_1027en.txt Rescue and Recovery Readme]&lt;br /&gt;
* [http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-46088 IBMs page about accessing the Recovery Partition if Linux has been installed and the F11 button no longer works]&lt;br /&gt;
* [http://sharadware.com/2005/07/11/suse-linux-winxp-access-ibm-on-the-thinkpad-t43/#comment-165 original GRUB R&amp;amp;R boot success report on SharedWare]&lt;br /&gt;
* [http://sharadware.com/2005/07/11/suse-linux-winxp-access-ibm-on-the-thinkpad-t43/ how to keep the AccessIBM functionality]&lt;br /&gt;
* [http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-54483 IBM Rescue &amp;amp; Recovery repair diskette]&lt;br /&gt;
&lt;br /&gt;
==Models featuring this technology==&lt;br /&gt;
* ThinkPad {{T42}}&lt;br /&gt;
* ThinkPad {{T43}}, {{T43p}}&lt;br /&gt;
* ThinkPad {{R52}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Glossary]]&lt;/div&gt;</summary>
		<author><name>Pebolle</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Talk:How_to_get_special_keys_to_work&amp;diff=21309</id>
		<title>Talk:How to get special keys to work</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Talk:How_to_get_special_keys_to_work&amp;diff=21309"/>
		<updated>2006-04-03T20:46:23Z</updated>

		<summary type="html">&lt;p&gt;Pebolle: Split page?&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
The xmodmap step doesn't seem to work when using the &amp;quot;kdb&amp;quot; driver of xorg. Here are the changes I needed to make to my setup to get the &amp;quot;back&amp;quot; and &amp;quot;forward&amp;quot; keys to work (in diff -u format);&lt;br /&gt;
&lt;br /&gt;
 --- xkb/symbols/inet.oud        2004-12-01 08:36:04.000000000 +0100&lt;br /&gt;
 +++ xkb/symbols/inet    2005-03-08 19:59:32.587636120 +0100&lt;br /&gt;
 @@ -1875,6 +1875,16 @@&lt;br /&gt;
      key &amp;lt;I76&amp;gt;  {       [ XF86AudioLowerVolume  ]       };&lt;br /&gt;
  };&lt;br /&gt;
  &lt;br /&gt;
 +// IBM ThinkPad 41 Internet Keys&lt;br /&gt;
 +&lt;br /&gt;
 +partial alphanumeric_keys&lt;br /&gt;
 +xkb_symbols &amp;quot;tp41&amp;quot; {&lt;br /&gt;
 +    name[Group1]= &amp;quot;IBM ThinkPad 41 Internet Keys&amp;quot;;&lt;br /&gt;
 +&lt;br /&gt;
 +    key &amp;lt;I69&amp;gt;  {       [ F22           ]       };&lt;br /&gt;
 +    key &amp;lt;I6A&amp;gt;  {       [ F21           ]       };&lt;br /&gt;
 +};&lt;br /&gt;
 +&lt;br /&gt;
  // Trust&lt;br /&gt;
  &lt;br /&gt;
  partial alphanumeric_keys&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 --- xkb/rules/xorg.lst.oud      2004-12-01 08:36:05.000000000 +0100&lt;br /&gt;
 +++ xkb/rules/xorg.lst  2005-03-07 20:55:21.000000000 +0100&lt;br /&gt;
 @@ -97,6 +97,7 @@&lt;br /&gt;
    sven         SVEN Ergonomic 2500&lt;br /&gt;
    symplon      Symplon PaceBook (tablet PC)&lt;br /&gt;
    toshiba_s3000        Toshiba Satellite S3000&lt;br /&gt;
 +  tp41         IBM ThinkPad 41 Internet Keys&lt;br /&gt;
    trust                Trust Wireless Keyboard Classic&lt;br /&gt;
    trustda      Trust Direct Access Keyboard&lt;br /&gt;
    yahoo                Yahoo! Internet Keyboard&lt;br /&gt;
&lt;br /&gt;
 --- xkb/rules/xorg.oud  2004-12-01 08:36:05.000000000 +0100&lt;br /&gt;
 +++ xkb/rules/xorg      2005-03-07 20:45:59.000000000 +0100&lt;br /&gt;
 @@ -120,7 +120,7 @@&lt;br /&gt;
                qtronix \&lt;br /&gt;
                samsung4500 samsung4510 \&lt;br /&gt;
                sk1300 sk2500 sk6200 sk7100 \&lt;br /&gt;
 -              sven symplon toshiba_s3000 trust trustda yahoo&lt;br /&gt;
 +              sven symplon toshiba_s3000 tp41 trust trustda yahoo&lt;br /&gt;
 &lt;br /&gt;
  ! model         =       symbols&lt;br /&gt;
    $inetkbds     =       +inet(%m)&lt;br /&gt;
&lt;br /&gt;
 --- xkb/rules/xorg.xml.oud      2004-12-01 08:36:05.000000000 +0100&lt;br /&gt;
 +++ xkb/rules/xorg.xml  2005-03-07 20:52:35.000000000 +0100&lt;br /&gt;
 @@ -975,6 +975,13 @@&lt;br /&gt;
      &amp;lt;/model&amp;gt;&lt;br /&gt;
      &amp;lt;model&amp;gt;&lt;br /&gt;
        &amp;lt;configItem&amp;gt;&lt;br /&gt;
 +        &amp;lt;name&amp;gt;tp41&amp;lt;/name&amp;gt;&lt;br /&gt;
 +        &amp;lt;description&amp;gt;IBM Thinkpad 41 Internet Keys&amp;lt;/description&amp;gt;&lt;br /&gt;
 +        &amp;lt;description xml:lang=&amp;quot;nl&amp;quot;&amp;gt;IBM ThinkPad 41 internet toetsen&amp;lt;/description&amp;gt;&lt;br /&gt;
 +      &amp;lt;/configItem&amp;gt;&lt;br /&gt;
 +    &amp;lt;/model&amp;gt;&lt;br /&gt;
 +    &amp;lt;model&amp;gt;&lt;br /&gt;
 +      &amp;lt;configItem&amp;gt;&lt;br /&gt;
          &amp;lt;name&amp;gt;trust&amp;lt;/name&amp;gt;&lt;br /&gt;
          &amp;lt;description&amp;gt;Trust Wireless Keyboard Classic&amp;lt;/description&amp;gt;&lt;br /&gt;
          &amp;lt;description xml:lang=&amp;quot;fr&amp;quot;&amp;gt;clavier classique Trust Wireless&amp;lt;/description&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Do not forget to add something like &amp;quot;+inet(tp41)&amp;quot; to /etc/X11/xorg.conf:&lt;br /&gt;
        (...)&lt;br /&gt;
        Option      &amp;quot;XkbLayout&amp;quot; &amp;quot;us_intl+inet(tp41)&amp;quot;&lt;br /&gt;
        (...)&lt;br /&gt;
&lt;br /&gt;
== Not T41 specific ==&lt;br /&gt;
&lt;br /&gt;
These keys are hardly T41 specific, they can also be found on the T30, T40, T42 and I'm sure several other ThinkPads in the X, R and G lineup.&lt;br /&gt;
&lt;br /&gt;
Actually, the above patches could be completed with the information of the other special keys found on some Thinkpads (which is listed in [[How_to_get_special_keys_to_work#xmodmap_configuration]]) and submitted as a request for enhancement with [http://bugs.freedesktop.org xorg's bugzilla]. However, firefox doesn't yet recognize keysyms like XF86Back, XF86Forward, so then firefox still needs to be patched manually (unless an enhancement is requested for firefox too).&lt;br /&gt;
&lt;br /&gt;
== Fake ACPI events? ==&lt;br /&gt;
&lt;br /&gt;
Not all keys generate ACPI events. Maybe it is feasible to have the ibm-acpi module check the CMOS (instead of having tpb checking /dev/nvram) and generate fake ACPI events for those keys. Even if it is feasible, that is probably way to hacky for a kernel module ... Still, it would be nice to only have to use scripts triggered by ACPI events and not both scripts for ACPI events and scripts for tpb.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
I think something like this is possible with ibm-acpi 0.10 already. It provides a proc file from which you can derive a table of CMOS states. You'd only have to figure the who is who of CMOS bits and write a daemon (or daemon like shell script) checking them regularly. This should be about what you suggest since tpb does the same thing with the bios ram. Of course generating ACPI events can not be done like that (or can it?), but you could trigger the ACPI action scripts directly then.&lt;br /&gt;
&lt;br /&gt;
[[User:Wyrfel|Wyrfel]] 01:02, 14 Mar 2005 (CET)&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
It may be possible (I have a 770x, so don't have the special keys) to add the keys as real ACPI events, by altering the DSDT.  I've done this to enable ACPI events for Fn-(every labelled F key),Home,End,PgUp,PgDn on mine, and they aren't labelled with anything physically (no thinklight and physical brightness control).  The Embedded Controller  reports all events, including keys, by calling one of the _Qxx functions (you'll find a whole pile in the sourcecode for the DSDT).  If you then insert a fucntion in the same scope as the others like:-&lt;br /&gt;
 Method (_Q12, 0, NotSerialized) { \_SB.HKEY.MHKQ (0x1003) } //Fn-F3&lt;br /&gt;
when executed, ibm-acpi will then report an acpi event numbered 0x0001003.  You should find some functions, e.g. _Q1B For Fn-F12 identical to this.&lt;br /&gt;
&lt;br /&gt;
I found some IBM DSDT's had functions that made MKHQ calls for EC functions _Q63, _Q64, _Q4E, _Q4F, but did nothing on mine---maybe these are a good starting point.  Add a whole pile, and see if you get lucky! (At your own risk, of course... :/  But it should be pretty safe).&lt;br /&gt;
&lt;br /&gt;
Yes, the above sounds pretty identical to tpb, except with /proc/ibm/ecdump instead of /dev/nvram.  The above works very nicely, however there's luck involved in finding the right number, even if it exists!&lt;br /&gt;
&lt;br /&gt;
[[User:lentinj|lentinj]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Fn+F6 does not seem to generate an event on t41p even if the mask is set to 0xffff and experimental=1 is passed to ibm_acpi&lt;br /&gt;
[[User:tf|tf]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==Bind Fn to super or hyper ==&lt;br /&gt;
&lt;br /&gt;
Hello &lt;br /&gt;
&lt;br /&gt;
Is it possible to bind Fn via Xmodmap to a key modifier such as hyper or super? Thanks&lt;br /&gt;
[[User:Oub|Oub]] 13:14, 6 February 2006 (CET): &lt;br /&gt;
----&lt;br /&gt;
I doubt it. The event for the {{key|Fn}} key is generated at release (as opposed to holding it where it serves it's usual special function). Hence you can't use it as a modifier. [[User:Wyrfel|Wyrfel]] 22:52, 6 February 2006 (CET)&lt;br /&gt;
----&lt;br /&gt;
==Bind Fn 12 say to F34 ==&lt;br /&gt;
Thanks Wyrfel for your reply, in order to display my question better, I use a new header: can I bind all the Fn Fx to hay F34 and the like?&lt;br /&gt;
[[User:Oub|Oub]] 21:33, 10 February 2006 (CET):&lt;br /&gt;
----&lt;br /&gt;
You can do this with all key '''combinations''' that support xmodmap (see the table). That means you can't do it with {{key|Fn}}}{{key|F12}}, because that combination doesn't generate a key event at all (it only generates an APM/ACPI event. Hence there is nothing vor xmodmap to remap.&lt;br /&gt;
&lt;br /&gt;
But what is your wider focus goal? I'm sure that what you want to do can be realized, anyway: You can write an ACPI script and event file for {{key|Fn}}{{key|F12}} and have the script start some tool that sends a F34 key to the X server. I'm sure this is possible.&lt;br /&gt;
&lt;br /&gt;
[[User:Wyrfel|Wyrfel]] 00:03, 11 February 2006 (CET)&lt;br /&gt;
----&lt;br /&gt;
==Can't bind Fn 12 ==&lt;br /&gt;
&lt;br /&gt;
Hello &lt;br /&gt;
&lt;br /&gt;
I  am using a R51 and I have compiled ibm-acpi monolithic in the kernel (not as module, maybe this is a mistake?). Anyway, I am using &lt;br /&gt;
suspend2, which I compiled in the kernel as well. Now I have bound &lt;br /&gt;
''to hibernate '' first to Fn 4, with the following script&lt;br /&gt;
 event=button[ /]sleep  &lt;br /&gt;
 action=/usr/local/sbin/mihibernate &lt;br /&gt;
&lt;br /&gt;
This works fine. Now I want to do the same for Fn12, so following the key table I did:  &lt;br /&gt;
&lt;br /&gt;
 event=button[/] ibm/hotkey HKEY 00000080 0000100c  &lt;br /&gt;
 action=/usr/local/sbin/mihibernate &lt;br /&gt;
&lt;br /&gt;
But that does not work. What is the problem? I tried even   &lt;br /&gt;
 echo enable,0xffff &amp;gt;/proc/acpi/ibm/hotkey &lt;br /&gt;
without success. Can anybody help me? &lt;br /&gt;
[[User:Oub|Oub]] 16:27, 4 March 2006 (CET):&lt;br /&gt;
----&lt;br /&gt;
The proper event line is&lt;br /&gt;
 event=ibm/hotkey HKEY 00000080 0000100c&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
Also, make sure that you are not using [thinkpad-acpi]. If &amp;lt;tt&amp;gt;event=button[ /]sleep&amp;lt;/tt&amp;gt; works for {{key|Fn}}{{key|F4}}, that indicates that you do. It might block the ibm-acpi driver. Check your kernel config and disable any thinkpad acpi driver except ibm-acpi.&lt;br /&gt;
&lt;br /&gt;
[[User:Wyrfel|Wyrfel]] 21:58, 4 March 2006 (CET)&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
:Hello&lt;br /&gt;
:&lt;br /&gt;
:It is odd, I am pretty sure, that I do not use [thinkpad-acpi], but [ibm-acpi], although event=button[ /]sleep works for FnF4, in any case I found out that &lt;br /&gt;
:&lt;br /&gt;
: event=(button/power|ibm/hotkey HKEY 00000080 0000100c)&lt;br /&gt;
:&lt;br /&gt;
:Works! What do you think of adding a subsection to the [[How to get special keys to work]] page, with some examples, like the following:&lt;br /&gt;
:&lt;br /&gt;
:from ''/etc/acpi/events/battery'':&lt;br /&gt;
 event=(button/power|ibm/hotkey HKEY 00000080 0000100c)  &lt;br /&gt;
 action=/usr/local/sbin/hibernate&lt;br /&gt;
:from ''/etc/acpi/events/lid''&lt;br /&gt;
 event=button/lid&lt;br /&gt;
 action=/usr/local/bin/mysleepram&lt;br /&gt;
:from ''/etc/acpi/events/sleepbtn''&lt;br /&gt;
 event=(button/sleep|ibm/hotkey HKEY 00000080 00001004)&lt;br /&gt;
 action=/usr/local/bin/mysleepram&lt;br /&gt;
:&lt;br /&gt;
:(Also ''event=button/sleep '' works for me)&lt;br /&gt;
:and then restart acpi:&lt;br /&gt;
:&lt;br /&gt;
 /etc/init.d/acpid restart&lt;br /&gt;
:&lt;br /&gt;
:[[User:Oub|Oub]] 13:22, 5 March 2006 (CET):&lt;br /&gt;
----&lt;br /&gt;
What you do with&lt;br /&gt;
 event=(button/power|ibm/hotkey HKEY 00000080 0000100c)  &lt;br /&gt;
is to make a logical nonexclusive OR between&lt;br /&gt;
 event=button/power&lt;br /&gt;
and&lt;br /&gt;
 event=ibm/hotkey HKEY 00000080 0000100c&lt;br /&gt;
. If the first works, the whole thing works. So that's pretty logical.&lt;br /&gt;
&lt;br /&gt;
Please, do a {{cmdroot|dmesg &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; grep thinkpad-acpi}} and do a {{cmdroot|dmesg &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; ibm-acpi}}. What is the output in either case?&lt;br /&gt;
&lt;br /&gt;
I see no sense in putting examples to the page that only confuse people because they are not correct. ibm-acpi generates the events listed in the table and nothing else. If you get something like &amp;lt;tt&amp;gt;button/sleep&amp;lt;/tt&amp;gt; it's not ibm-acpi generating it. You are running Debian, right? Let's hope they didn't patch the driver to generate different events.&lt;br /&gt;
&lt;br /&gt;
Also, you can always do {{cmdroot|tail -f /var/log/acpid}} to have a life view of the generated events.&lt;br /&gt;
&lt;br /&gt;
I am pretty sure that you are using thinkpad-acpi or - if not so - that something else must interfere.&lt;br /&gt;
&lt;br /&gt;
[[User:Wyrfel|Wyrfel]] 04:49, 6 March 2006 (CET)&lt;br /&gt;
&lt;br /&gt;
---- &lt;br /&gt;
&lt;br /&gt;
:Hi &lt;br /&gt;
:&lt;br /&gt;
:Ok I admit everything is very odd. For the start, I seem to use &lt;br /&gt;
:ibm-acpi. As I said I am Debian,  but I compiled my own kernel :(2.6.10)(but not as a module, maybe this was a bad idee??)  and I used :the ibm-acpi driver which comes shipped with that kernel. I did not :download the driver from the official http://ibm-acpi.sourceforge.net/ :site. Here is the output of &lt;br /&gt;
:&lt;br /&gt;
:dmesg | grep acpi&lt;br /&gt;
 Kernel command line: ro  root=/dev/hda6 acpi_sleep=s3_bios&lt;br /&gt;
 tbxface-0118 [02] acpi_load_tables      : ACPI Tables successfully acquired&lt;br /&gt;
 evxfevnt-0094 [03] acpi_enable           : Transition to ACPI mode successful&lt;br /&gt;
 acpi_bus-0081 [06] acpi_bus_get_device   : Error getting context for object [df6ddaa8]&lt;br /&gt;
 acpi_bus-0081 [06] acpi_bus_get_device   : Error getting context for object [c1464768]&lt;br /&gt;
 acpi_bus-0081 [06] acpi_bus_get_device   : Error getting context for object [c1467328]&lt;br /&gt;
 acpi_bus-0081 [06] acpi_bus_get_device   : Error getting context for object [c146bba8]&lt;br /&gt;
 acpi_bus-0081 [06] acpi_bus_get_device   : Error getting context for object [c146b628]&lt;br /&gt;
 acpi_bus-0081 [06] acpi_bus_get_device   : Error getting context for object [c146b3e8]&lt;br /&gt;
 acpi_bus-0081 [06] acpi_bus_get_device   : Error getting context for object [c146b268]&lt;br /&gt;
 acpi_bus-0081 [06] acpi_bus_get_device   : Error getting context for object [c146dde8]&lt;br /&gt;
 acpi_bus-0081 [06] acpi_bus_get_device   : Error getting context for object [c1470d68]&lt;br /&gt;
 acpi_bus-0081 [06] acpi_bus_get_device   : Error getting context for object [c1470568]&lt;br /&gt;
 acpi_bus-0081 [06] acpi_bus_get_device   : Error getting context for object [c14719a8]&lt;br /&gt;
 ibm_acpi: IBM ThinkPad ACPI Extras v0.8&lt;br /&gt;
 ibm_acpi: http://ibm-acpi.sf.net/&lt;br /&gt;
 acpi_bus-0081 [08] acpi_bus_get_device   : Error getting context for object [c1467328]&lt;br /&gt;
 ibm_acpi: dock device not present&lt;br /&gt;
&lt;br /&gt;
:I don't understand the errors but anyway. Now the odd thing is that indeed the following works&lt;br /&gt;
:&lt;br /&gt;
 event=button[ /]sleep&lt;br /&gt;
 action=/usr/local/sbin/hibernate &lt;br /&gt;
:but   &lt;br /&gt;
 event=button[/]sleep  &lt;br /&gt;
 action=/usr/local/sbin/hibernate &lt;br /&gt;
&lt;br /&gt;
:Does not work. But from what you said, using the ibm_acpi neither of '''these strings ''' should  work? So I don't understand what is going on. [[User:Oub|Oub]] 20:28, 6 March 2006 (CET): &lt;br /&gt;
&lt;br /&gt;
==Turn on/off Wifi on Fn5 ==&lt;br /&gt;
Hi&lt;br /&gt;
&lt;br /&gt;
I hope this is the last question. I use a crude way to activate and deactivate my wificard: I remove and insert the relevant modules, with 2 simple scripts. Now the question is how can I bind Fn5 so, that it turns on and off the wificard? With my approach I need to fire up two scripts, and that I cannot bind to one button. Thanks &lt;br /&gt;
[[User:Oub|Oub]] 17:57, 5 March 2006 (CET):&lt;br /&gt;
&lt;br /&gt;
Try a {{cmdroot|cat /proc/acpi/ibm/bluetooth}}. Maybe it returns the state. If not, the other way would be to check if the USB bluetooth controller device is listed in {{path|/proc/bus/usb}} somewhere. It shouldn't be there if bluetooth is switched off and should be there if it is on.&lt;br /&gt;
&lt;br /&gt;
[[User:Wyrfel|Wyrfel]] 04:49, 6 March 2006 (CET)&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Split page?==&lt;br /&gt;
This page is getting too long. Maybe we should split it. I'd suggest moving the &amp;quot;Example applications&amp;quot; to a seperate page. &lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 22:46, 3 April 2006 (CEST)&lt;/div&gt;</summary>
		<author><name>Pebolle</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=How_to_enable_integrated_fingerprint_reader_with_BioAPI&amp;diff=21308</id>
		<title>How to enable integrated fingerprint reader with BioAPI</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=How_to_enable_integrated_fingerprint_reader_with_BioAPI&amp;diff=21308"/>
		<updated>2006-04-03T20:37:02Z</updated>

		<summary type="html">&lt;p&gt;Pebolle: The history page can show messages like that (use &amp;quot;Summary&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=&amp;quot;100%&amp;quot;&lt;br /&gt;
|style=&amp;quot;vertical-align:top;padding-right:20px;width:10px;white-space:nowrap;&amp;quot; | __TOC__&lt;br /&gt;
|style=&amp;quot;vertical-align:top&amp;quot; |&lt;br /&gt;
This page describes the process of getting the [[Integrated Fingerprint Reader|integrated fingerprint reader]] to work under Linux. It is based on experiences in {{Ubuntu}} on a T43. The same works on {{Fedora}} 4, SuSE 9.3, SuSE 10, and {{Gentoo}}.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Basic installation==&lt;br /&gt;
===Installing the bioapi framework===&lt;br /&gt;
====Automated installation script====&lt;br /&gt;
The [[Script for enabling the fingerprint reader]] automates the installation of most components (bioapi framework, driver, pam_bioapi, pam setup, device permissions, pamtester and enrolling), for some Linux distributions.&lt;br /&gt;
&lt;br /&gt;
====Binary packages====&lt;br /&gt;
=====Debian=====&lt;br /&gt;
*If you're using {{Debian}} Sid (the unstable branch) you can try the packages from Michael R. Crusoe's site, either [http://www.qrivy.net/~michael/temp/ version 1.2.3] (recommended) or [http://www.qrivy.net/~michael/debs/unstable/ older versions] which might not work with the steps in this howto.&lt;br /&gt;
*This seems to work for {{Ubuntu}} Breezy/Dapper too, so save yourself some trouble and grab it.&lt;br /&gt;
=====Gentoo=====&lt;br /&gt;
You can either grab the [http://www.qrivy.net/~michael/blua/bioapi/bioapi-1.2.2.ebuild.tar.bz2 ebuild], or use the source-install procedure below.&lt;br /&gt;
&lt;br /&gt;
Also see [http://toe.ch/~tsa/ibm-fingerprint/ http://toe.ch/~tsa/ibm-fingerprint/] for alternative documentation on installing on Gentoo including ebuilds for all the packages used.&lt;br /&gt;
&lt;br /&gt;
====Installing from source====&lt;br /&gt;
*Get the bioapi source:&lt;br /&gt;
:{{cmduser|wget http://www.qrivy.net/~michael/blua/bioapi/bioapi-latest.tar.bz2}}&lt;br /&gt;
*I could not compile bioapi with the graphical Qt tools. To do it manually, do the following:&lt;br /&gt;
:{{cmduser|tar xjf bioapi-latest.tar.bz2}}&lt;br /&gt;
:{{cmduser|cd bioapi-1.2.2}}&lt;br /&gt;
:{{cmduser|1=./configure --with-Qt-dir=no}}&lt;br /&gt;
:{{cmduser|make}}&lt;br /&gt;
:and then as root&lt;br /&gt;
:{{cmdroot|make install}}&lt;br /&gt;
:If make install fails, be sure you're root and then:&lt;br /&gt;
:{{cmdroot|1=export LD_LIBRARY_PATH=/usr/local/lib}}&lt;br /&gt;
:{{cmdroot|make install}}&lt;br /&gt;
:and if you want to compile pam_bioapi for auth later&lt;br /&gt;
:{{cmdroot|cp include/bioapi_util.h include/installdefs.h imports/cdsa/v2_0/inc/cssmtype.h /usr/include}}&lt;br /&gt;
:Be aware that checkinstall will not work!&lt;br /&gt;
:(I got through configure with Qt, but got a cryptic build error.  It all worked fine with Qt disabled as above)&lt;br /&gt;
:buzz: This is due to a wrong qt include path, set it manually in configure and everything should work.&lt;br /&gt;
*Bioapi (at least version 1.2.2) doesn't compile with GCC4. You need to patch it:&lt;br /&gt;
:{{cmduser|wget http://upir.cz/linux/patches/bioapi-1.2.2-gcc4.patch}}&lt;br /&gt;
:{{cmduser|patch -p1 &amp;lt; bioapi-1.2.2-gcc4.patch}}&lt;br /&gt;
* By default, bioapi will install numerous files in {{path|/usr/local/&amp;lt;nowiki&amp;gt;{&amp;lt;/nowiki&amp;gt;bin,lib,include&amp;lt;nowiki&amp;gt;}&amp;lt;/nowiki&amp;gt;}}, including files with &amp;quot;self-explanatory&amp;quot; names such as {{path|/usr/local/bin/Sample}}. To prevent this pollution:&lt;br /&gt;
:Create a dedicated directory, for example {{path|/opt/bioapi}} .&lt;br /&gt;
:Append &amp;lt;tt&amp;gt;--prefix=/opt/bioapi&amp;lt;/tt&amp;gt; to the above &amp;lt;tt&amp;gt;./configure&amp;lt;/tt&amp;gt; command.&lt;br /&gt;
:Append {{path|/opt/bioapi/bin}} to &amp;lt;tt&amp;gt;$PATH&amp;lt;/tt&amp;gt; and {{path|/opt/bioapi/lib}} to &amp;lt;tt&amp;gt;$LD_LIBRARY_PATH&amp;lt;/tt&amp;gt;.&lt;br /&gt;
:When installing the driver (below), tell it the new install path: {{cmdroot|sh install.sh /opt/bioapi/lib}}&lt;br /&gt;
&lt;br /&gt;
====Adjusting ldconfigs library search path====&lt;br /&gt;
At least on {{Fedora}} or {{Aurox}} 11, you may need to add {{path|/usr/local/lib}} to the library path so that the libraries referenced from &amp;lt;tt&amp;gt;pam_bioapi.so&amp;lt;/tt&amp;gt; get picked up properly. The usual way to do this is adding it to the ldconfig configuration:&lt;br /&gt;
:{{cmdroot|echo '/usr/local/lib' &amp;gt; /etc/ld.so.conf.d/bioapi.conf}}&lt;br /&gt;
:{{cmdroot|ldconfig}}&lt;br /&gt;
Alternatively you can add it to the LD_LIBRARY variable.&lt;br /&gt;
&lt;br /&gt;
If you see bioapi libs in the output of &lt;br /&gt;
:{{cmdroot|ldconfig -p | grep bioapi}}&lt;br /&gt;
then it should work.&lt;br /&gt;
&lt;br /&gt;
===Installing and configuring the driver===&lt;br /&gt;
====Installing the driver====&lt;br /&gt;
*Download {{path|TFMESS_BSP_LIN_1.0.zip}} from the [http://www.upek.com/support/dl_linux_bsp.asp UPEK support site] and unzip it into a seperate folder, as it will not create one.&lt;br /&gt;
*Change to that folder and do as root:&lt;br /&gt;
:{{cmdroot|sh install.sh}}&lt;br /&gt;
:If you're running Gentoo, use&lt;br /&gt;
:{{cmdroot|sh install.sh /usr/lib}}&lt;br /&gt;
:If that fails, it may be that make install failed up above -- try setting LD_LIBRARY_PATH, do the make install again, and come back here and try this again.  You also need {{cmd|mod_install|}} from bioapi in your PATH.&lt;br /&gt;
====Configuring permissions for non-root use====&lt;br /&gt;
If you want to use PAM-aware applications like xscreensaver that are NOT running with root permissions (as opposed to login, gdm or other authentication mechanisms), you may need to do all or at least some of the things in this section.  More details on what is necessary on which distributions would be greately appreciated.&lt;br /&gt;
*Create two groups, one for access to BioAPI files and the other for access to the usb files.  (This is done for full generality; i.e., you may have other USB devices which you want accessable to other users, without exposing your BioAPI configuration to them).  Add your normal user (the one you wish to use PAM-aware applications with) to both of these groups.&lt;br /&gt;
On {{Debian}} this is done with&lt;br /&gt;
:{{cmdroot|addgroup --system bioapi}}&lt;br /&gt;
:{{cmdroot|addgroup --system usbfs}}&lt;br /&gt;
:{{cmdroot|adduser yournormaluser bioapi}}&lt;br /&gt;
:{{cmdroot|adduser yournormaluser usbfs}}&lt;br /&gt;
On {{SUSE}} this is done with&lt;br /&gt;
:{{cmdroot|groupadd --system bioapi}}&lt;br /&gt;
:{{cmdroot|groupadd --system usbfs}}&lt;br /&gt;
:{{cmdroot|groupmod -A yournormaluser bioapi}}&lt;br /&gt;
:{{cmdroot|groupmod -A yournormaluser usbfs}}&lt;br /&gt;
On {{Mandriva}} this is done with&lt;br /&gt;
:{{cmdroot|groupadd -r bioapi}}&lt;br /&gt;
:{{cmdroot|groupadd -r usbfs}}&lt;br /&gt;
:{{cmdroot|usermod -G bioapi,usbfs yournormaluser}}&lt;br /&gt;
&lt;br /&gt;
:(where {{cmd|yournormaluser|}} is your normal user name).  You will need to log out and log back in for this to take effect.&lt;br /&gt;
*Set permissions on the BioAPI config/registry directory:&lt;br /&gt;
:{{cmdroot|chown -R root:bioapi /usr/local/var/bioapi/}}&lt;br /&gt;
:{{cmdroot|chmod -R 770 /usr/local/var/bioapi/}}&lt;br /&gt;
:(change this path if you used an alternate BioAPI install directory above)&lt;br /&gt;
*Set permissions on the files in {{path|/proc/bus/usb}}:&lt;br /&gt;
:{{cmdroot|chown -R root:usbfs /proc/bus/usb}}&lt;br /&gt;
:{{cmdroot|chmod -R g+X /proc/bus/usb}}&lt;br /&gt;
:{{cmdroot|chown root:usbfs /proc/bus/usb/`lsusb &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; sed -ne &amp;quot;/0483:2016/s/Bus\ \(.*\)\ Device\ \(.*\):\ .*/\1\/\2/p&amp;quot;`}}&lt;br /&gt;
:{{cmdroot|chmod 660 /proc/bus/usb/`lsusb &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; sed -ne &amp;quot;/0483:2016/s/Bus\ \(.*\)\ Device\ \(.*\):\ .*/\1\/\2/p&amp;quot;`}}&lt;br /&gt;
:You may need to replace {{cmd|lsusb|}} with its full path, which is something like {{cmd|/sbin/lsusb|}} or {{cmd|/usr/bin/lsusb|}} depending on your distro.  It might be necessary to put these lines into a script which is run at startup and resume from suspend/hibernate.&lt;br /&gt;
*As an alternative to the {{cmd|chown|}}/{{cmd|chmod|}} commands above, you can set mount options for usbfs with a line in {{path|/etc/fstab|}}; an example would be&lt;br /&gt;
 none /proc/bus/usb usbfs defaults,devgid=108,devmode=0660,busgid=108,busmode=0770,listgid=108,listmode=0660 0 0&lt;br /&gt;
:where 108 is replaced with the numerical group ID of the usbfs group (you can determine this with something like {{cmd|cat /etc/group &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; grep usbfs &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; cut -d':' -f 3|}}).  Make sure you only have one {{path|/proc/bus/usb}} entry in {{path|/etc/fstab}}.  See the {{cmd|mount(8)|}} manpage for more information on these options.  This is &amp;quot;cleaner&amp;quot; but seems to have a few weird issues -- see the talk page for details.&lt;br /&gt;
*You may also have files in {{path|/dev/bus/usb}}, which the driver will try before {{path|/proc/bus/usb}}.  If this is another usbfs mount point ({{cmd|mount|}} shows a line containing {{cmdresult|/dev/bus/usb type usbfs}}), then simply follow the above instructions with {{path|/dev/bus/usb}} rather than {{path|/proc/bus/usb}}.  Otherwise, you may be running a new kernel (i.e. 2.6.15) that makes usbfs-like files available through {{path|/dev/bus/usb}}.  On systems running udev these files are dynamically created; you can configure their permissions by editing a udev config file.  On Debian this is done by changing the &amp;lt;tt&amp;gt;usb_device&amp;lt;/tt&amp;gt; line of {{path|/etc/udev/permissions.rules}} to read&lt;br /&gt;
 SUBSYSTEM==&amp;quot;usb_device&amp;quot;, MODE=&amp;quot;0660&amp;quot;, GROUP=&amp;quot;usbfs&amp;quot;&lt;br /&gt;
*For the beta versions only, there is a logfile, which needs to exist with the proper permissions:&lt;br /&gt;
:{{cmdroot|touch /var/log/BSP.log &amp;amp;&amp;amp; chown root:bioapi /var/log/BSP.log &amp;amp;&amp;amp; chmod 660 /var/log/BSP.log}}&lt;br /&gt;
&lt;br /&gt;
====Miscellaneous configuration====&lt;br /&gt;
* To increase the security level (minimize false accept rate), set this in {{path|/etc/tfmessbsp.cfg}}:&lt;br /&gt;
 security-level=&amp;quot;5&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Testing the driver and enrolling a fingerprint===&lt;br /&gt;
To test the driver and generate the file containing your fingerprint information, you need a sample program included with the driver.  The compilation steps below were discovered by trial and error; if they don't work for you, try the binary {{cmd|Sample|}} utility that came with the beta versions of the driver (i.e., {{path|TFMESS_BSP_LIN_1.0beta2.zip}} as mentioned above).&lt;br /&gt;
Go to the folder where you extracted {{path|TFMESS_BSP_LIN_1.0.zip}} and do:&lt;br /&gt;
:{{cmdroot|cd NonGUI_Sample}}&lt;br /&gt;
:Edit {{path|main.c|}} and remove (or comment out) the line&lt;br /&gt;
 #include &amp;quot;port/bioapi_port.h&amp;quot;&lt;br /&gt;
:{{cmdroot|gcc -o Sample main.c -L/usr/local/lib -lbioapi100 -DUNIX -DLITTLE_ENDIAN}}&lt;br /&gt;
:{{cmdroot|./Sample}}&lt;br /&gt;
:Note that Sample may only run as root, unless you've already configured the usbfs file permissions.&lt;br /&gt;
:You can try to &amp;quot;e&amp;quot;nroll (to record a fingerprint for an account) and then &amp;quot;v&amp;quot;erify (to test a fingerprint against the one it expects for an account).&lt;br /&gt;
:You'll save a step later if you use your own login username as the username to enroll here.&lt;br /&gt;
&lt;br /&gt;
==Login via pam_bioapi==&lt;br /&gt;
&lt;br /&gt;
The following explains how to add fingerprint authentiation to programs that use the PAM (Pluggable Authentication Modules) framework, such as  Gnome's GDM and KDE's KDM and screensaver.&lt;br /&gt;
&lt;br /&gt;
===Getting required libs &amp;amp; tools===&lt;br /&gt;
====Installing pam_bioapi====&lt;br /&gt;
*Prerequisites&lt;br /&gt;
:On SuSE 10, I needed to install the pam-devel RPM&lt;br /&gt;
:In general, you will need pam itself (standard for most distros) as well as the pam development files (probably an optional package for your distro).&lt;br /&gt;
*Get and compile the pam_bioapi module.&lt;br /&gt;
:{{cmduser|wget http://www.qrivy.net/~michael/blua/pam_bioapi/pam_bioapi-latest.tar.bz2}}&lt;br /&gt;
:{{cmduser|tar xjf pam_bioapi-latest.tar.bz2}}&lt;br /&gt;
:{{cmduser|cd pam_bioapi-0.2.1}}&lt;br /&gt;
:{{cmduser|wget http://badcode.de/downloads/fingerprint.patch}}&lt;br /&gt;
:{{cmduser|patch -p0 &amp;lt; fingerprint.patch}}&lt;br /&gt;
:If you want to, review the patch. In general you should review all code you download and compile, if possible. The patch comes from [http://linuxbiometrics.com/modules/newbb/viewtopic.php?viewmode=flat&amp;amp;topic_id=80&amp;amp;forum=1 this thread].&lt;br /&gt;
:{{cmduser|./configure &amp;amp;&amp;amp; make}}&lt;br /&gt;
:and as root&lt;br /&gt;
:{{cmdroot| make install}}&lt;br /&gt;
:{{cmdroot| cp /usr/local/lib/security/* /lib/security/}}&lt;br /&gt;
{{NOTE|If you get a 'rpl_malloc' error in /var/log/auth.log when trying to use the fingerprint reader, redo these steps and remove the related term from Makefile after running ./configure. (FC3, Debian etch)}}&lt;br /&gt;
*If you get 'PAM [dlerror: /lib/security/pam_bioapi.so: undefined symbol: BioAPIMemoryFuncs]' error in your syslog, replace 'LIBS = ' line in {{path|libpam_bioapi/makefile}} with the following (of course, replace {{path|/opt/bioapi/}} with the path where you installed bioapi):&lt;br /&gt;
 LIBS = -L/opt/bioapi/lib -lbioapi100 -lbioapi_mds300 -lmds_util&lt;br /&gt;
*Use the sample tool from the fingerprint reader to create {{path|&amp;lt;username&amp;gt;.bir}} (&amp;lt;tt&amp;gt;&amp;lt;username&amp;gt;&amp;lt;/tt&amp;gt; '''must''' be the username you want to login with. gdm will probably break for any login name that has no .bir file).&lt;br /&gt;
*As root do:&lt;br /&gt;
:{{cmdroot|SERIAL&amp;lt;nowiki&amp;gt;=`BioAPITest | sed -ne &amp;quot;/Fingerprint/{n;n;s/^.*: \(.\{9\}\)\(.\{4\}\)\(.\{4\}\)\(.\{4\}\)\(.*\)/\1-\2-\3-\4-\5/gp}&amp;quot;` &amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
:{{cmdroot|echo $SERIAL}} should print something like {{cmdresult|&amp;lt;nowiki&amp;gt;{5550454b-2054-464d-2f45-535320425350}&amp;lt;/nowiki&amp;gt;}} now.&lt;br /&gt;
:If it does, do:&lt;br /&gt;
:{{cmdroot|mkdir -p /etc/bioapi/pam/$SERIAL}}&lt;br /&gt;
:{{cmdroot|cp &amp;lt;username&amp;gt;.bir /etc/bioapi/pam/$SERIAL}}&lt;br /&gt;
:If not, you might just try&lt;br /&gt;
:{{cmdroot|SERIAL&amp;lt;nowiki&amp;gt;={5550454b-2054-464d-2f45-535320425350}&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
:as this value is hardcoded into the UPEK docs.&lt;br /&gt;
&lt;br /&gt;
===Configuring pam===&lt;br /&gt;
The following part is distribution specific. On {{Ubuntu}} or {{SUSE}} you can modify {{path|/etc/pam.d/common-auth}} (on {{Gentoo}} and {{Fedora}} it is {{path|/etc/pam.d/system-auth}}) to look like this:&lt;br /&gt;
&lt;br /&gt;
 #&lt;br /&gt;
 # /etc/pam.d/common-auth - authentication settings common to all services&lt;br /&gt;
 #&lt;br /&gt;
 # This file is included from other service-specific PAM config files,&lt;br /&gt;
 # and should contain a list of the authentication modules that define&lt;br /&gt;
 # the central authentication scheme for use on the system&lt;br /&gt;
 # (e.g., /etc/shadow, LDAP, Kerberos, etc.).  The default is to use the&lt;br /&gt;
 # traditional Unix authentication mechanisms.&lt;br /&gt;
 #&lt;br /&gt;
 auth       sufficient   pam_bioapi.so {5550454b-2054-464d-2f45-535320425350} /etc/bioapi/pam/&lt;br /&gt;
 password   sufficient   pam_bioapi.so {5550454b-2054-464d-2f45-535320425350} /etc/bioapi/pam/&lt;br /&gt;
 auth       required     pam_unix.so nullok_secure&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
For '''Gentoo'''-Users - this allows you to attempt a password first. If you simply press enter, it then prompts for a fingerprints. Create a file named {{path|/etc/pam.d/bioapi}}. This also means that remote services, such as SSH keep working:&lt;br /&gt;
&lt;br /&gt;
 auth       required     pam_env.so&lt;br /&gt;
 auth       sufficient   pam_unix.so likeauth nullok&lt;br /&gt;
 auth       sufficient   pam_bioapi.so {5550454b-2054-464d-2f45-535320425350} /etc/bioapi/pam/&lt;br /&gt;
 auth       required     pam_deny.so&lt;br /&gt;
 &lt;br /&gt;
 account    required     pam_unix.so&lt;br /&gt;
 &lt;br /&gt;
 session    required     pam_limits.so&lt;br /&gt;
 session    required     pam_unix.so&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Now, simply replace &amp;quot;auth include system-auth&amp;quot; in all services that you wish to use fingerprint for with &amp;quot;auth include bioapi&amp;quot;. For example, {{path|/etc/pam.d/kde}} by default contains&lt;br /&gt;
&lt;br /&gt;
  auth       include      system-auth&lt;br /&gt;
  auth       required     pam_nologin.so&lt;br /&gt;
  &lt;br /&gt;
  account    include      system-auth&lt;br /&gt;
  &lt;br /&gt;
  password   include      system-auth&lt;br /&gt;
  &lt;br /&gt;
  session    include      system-auth&lt;br /&gt;
&lt;br /&gt;
Simply replace the first &amp;quot;system-auth&amp;quot; with bioapi and you can also get rid of KDE desktop lock with a fingerprint. If you do not wish to allow for &amp;quot;password fallback&amp;quot; then remove &lt;br /&gt;
&lt;br /&gt;
 auth       sufficient   pam_unix.so likeauth nullok&lt;br /&gt;
&lt;br /&gt;
from {{path|/etc/pam.d/bioapi}}.&lt;br /&gt;
&lt;br /&gt;
{{WARN|If su/sudo expects to receive the root password (SuSE 10), you need to have fingerprint settings for root (that is, copy in a root.bir as well as a your-username.bir).  Otherwise, they get a segmentation fault.  Which is a little unfortunate, given that you need to su or sudo to change your settings...}}&lt;br /&gt;
&lt;br /&gt;
Note that sshd may pick up the fingerprint settings from {{path|/etc/pam.d/common-auth}}.  I didn't want that, so I removed the &amp;quot;auth include common-auth&amp;quot; line from {{path|/etc/pam.d/sshd}} and replaced it with the lines that were originally in my {{path|/etc/pam.d/common-auth}}.  That way most local services use the fingerprint reader, but sshd does not.&lt;br /&gt;
&lt;br /&gt;
Another way to do this is to create a file ({{path|/etc/pam.d/bioapi|}} for example) which contains the {{cmd|pam_bioapi.so|}} lines, and explicitly {{cmd|@include|}} this '''before''' {{path|/etc/pam.d/common-auth|}} in the files for services which should use the fingerprint reader.  In this case you should leave {{path|/etc/pam.d/common-auth|}} alone.&lt;br /&gt;
&lt;br /&gt;
{{NOTE|This was discovered through trial and success, if it is plain wrong, wikorrect it, please.}}&lt;br /&gt;
&lt;br /&gt;
In {{Fedora}} the original 'session' terms in {{path|/etc/pam.d/system-auth}} need to be kept.&lt;br /&gt;
&lt;br /&gt;
{{HINT|The setup described above will/could affect remote ssh logins to also use biometric logins, which is a bit silly (who wants to remote ssh to the laptop, and then have to walk over to it and swipe your finger)&amp;lt;br /&amp;gt;To avoid that you can copy the default &amp;lt;tt&amp;gt;/etc/pam.d/system-auth&amp;lt;/tt&amp;gt; to &amp;lt;tt&amp;gt;/etc/pam.d/sshd&amp;lt;/tt&amp;gt; which will allow the sshd service to use the standard authentication procedure.}}&lt;br /&gt;
&lt;br /&gt;
You can do some useful testing with [http://pamtester.sourceforge.net/ {{cmd|pamtester|}}], which calls the pam modules as if it were a program of your choice.  Examples:&lt;br /&gt;
:{{cmdroot|pamtester xdm yourusername authenticate}}&lt;br /&gt;
:{{cmduser|pamtester xscreensaver yourusername authenticate}}&lt;br /&gt;
where {{cmd|yourusername|}} is your username.  Note that {{cmd|pamtester|}} should run as root if and only if the program in question does.&lt;br /&gt;
&lt;br /&gt;
===Application support===&lt;br /&gt;
The implementation of fingerprint scanning support in the relevant applications varies.&lt;br /&gt;
&lt;br /&gt;
Here is the behaviour of the most common ones:&lt;br /&gt;
* gdm should pop up an (ugly) image to swipe your finger and... magic - you can login without a password.&lt;br /&gt;
* kdm doesn't give any visual indication, other than that the cursor stops blinking. Just swipe your finger and hope it lets you log in.&lt;br /&gt;
* In xdm, enter your username and a blank password, then swipe (there is no popup as well).&lt;br /&gt;
* The KDE screen saver in SUSE 10 requires you to enter an empty password (or select the correct user and then enter an empty password) in order to get the fingerprint prompt.&lt;br /&gt;
* For Fedora users, the redhat-config tools will crash if no root.bir presents. Also, there won't be any visual idication unless X server is properly configured for root to access. Just swipe your finger when the HDD stopped blinking or issue the following command in advance:&lt;br /&gt;
:{{cmduser|xhost +local:}}&lt;br /&gt;
&lt;br /&gt;
===kdm support===&lt;br /&gt;
To add graphical popup to kdm, you need following:&lt;br /&gt;
* Patch for pam_bioapi. This patch adds third parameter to {{path|pam_bioapi.so}} module, which is a name of file with additional environment variables that will be supplied to the UPEK driver.&lt;br /&gt;
:{{cmdroot|wget http://upir.cz/linux/patches/pam_bioapi-0.2.1-alter-environ.patch}}&lt;br /&gt;
:{{cmdroot|patch -p1 &amp;lt; pam_bioapi-0.2.1-alter-environ.patch}}&lt;br /&gt;
* Edit your {{path|Xsetup}} file (on SUSE 10 it's {{path|/etc/X11/xdm/Xsetup}}) and add these lines:&lt;br /&gt;
 echo &amp;quot;XAUTHORITY=$XAUTHORITY&amp;quot; &amp;gt; /var/lib/xdm/kdm_env&lt;br /&gt;
 echo &amp;quot;DISPLAY=$DISPLAY&amp;quot; &amp;gt;&amp;gt; /var/lib/xdm/kdm_env&lt;br /&gt;
* In {{path|/etc/pam.d/xdm}} file, add {{path|/var/lib/xdm/kdm_env}} as a third parameter for {{path|pam_bioapi.so}} module:&lt;br /&gt;
 auth sufficient pam_bioapi.so {5550454b-2054-464d-2f45-535320425350} /etc/bioapi/pam/ /var/lib/xdm/kdm_env&lt;br /&gt;
&lt;br /&gt;
Please note, that this won't work if you have more than one Xserver.&lt;br /&gt;
&lt;br /&gt;
==Make xscreensaver use the scanner==&lt;br /&gt;
*Get the needed xscreensaver sources:&lt;br /&gt;
:{{cmduser|wget http://www.jwz.org/xscreensaver/xscreensaver-4.23.tar.gz}}&lt;br /&gt;
:{{cmduser|tar xzf xscreensaver-4.23.tar.gz}}&lt;br /&gt;
:{{cmduser|cd xscreensaver-4.23}}&lt;br /&gt;
:{{cmduser|wget http://nax.hn.org/pub/bioapi/xscreensaver-4.22_alternativeAuth.diff}}&lt;br /&gt;
*After reviewing the patch (it's small and straightforward), do&lt;br /&gt;
:{{cmduser|patch -p1 &amp;lt; xscreensaver-4.22_alternativeAuth.diff}}&amp;lt;br /&amp;gt;The patch prevents xscreensaver from opening an authentification window and dispatches the authentification request to another program, in our case &amp;lt;tt&amp;gt;pam&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;pam_bioapi&amp;lt;/tt&amp;gt;. It should apply with some offset, don't mind that. If it says something about rejected though, then there's a problem.&lt;br /&gt;
*Compile with&lt;br /&gt;
:{{cmduser|./configure --with-pam &amp;amp;&amp;amp; make}}&amp;lt;br /&amp;gt;&lt;br /&gt;
*If you recieve an error like &amp;quot;undefined reference to `XmuPrintDefaultErrorMessage'&amp;quot; then install the libxmu-dev package and run the previous line again&lt;br /&gt;
*and then install as root with&lt;br /&gt;
:{{cmduser|su -c make install}} .&lt;br /&gt;
*Make sure that the newly compiled xscreensaver is used:&lt;br /&gt;
:{{cmduser|which xscreensaver}} should return&lt;br /&gt;
:{{cmdresult|/usr/local/bin/xscreensaver}} .&lt;br /&gt;
:*In case it doesn't, try &lt;br /&gt;
::{{cmduser|1=export PATH=/usr/local/bin:$PATH}}&amp;lt;br /&amp;gt;and retry.&lt;br /&gt;
*Kill the running instance of xscreensaver:&lt;br /&gt;
:{{cmduser|xscreensaver-command -exit}} &lt;br /&gt;
*Make sure you have the following line in your {{path|~/.xscreensaver}}:&lt;br /&gt;
 alternativeAuth: True&lt;br /&gt;
*Now edit {{path|/etc/pam.d/xscreensaver}} to include the following line (If you're on {{Ubuntu}} Breezy and you already changed {{path|/etc/pam.d/common-auth}} you should not need to do this.):&lt;br /&gt;
 auth    sufficient      pam_bioapi.so {5550454b-2054-464d-2f45-535320425350} /etc/bioapi/pam/&lt;br /&gt;
*Start the new xscreensaver&lt;br /&gt;
:{{cmduser|xscreensaver}}&amp;lt;br /&amp;gt;There should be a splash screen with version 4.23.&lt;br /&gt;
*Now try:&lt;br /&gt;
:{{cmduser|xscreensaver-command -lock}}&lt;br /&gt;
&lt;br /&gt;
If you have questions or problems with this procedure, ask: t43fingerprint (at) badcode.de .&lt;br /&gt;
&lt;br /&gt;
===Package for Debian sid===&lt;br /&gt;
&lt;br /&gt;
If you're running {{Debian}} sid (the unstable branch) you can also try the patched .deb-package (built from current Debian sources fetched with {{cmd|apt-get source|}}) from [http://linux.spiney.org/debian_gnu_linux_on_an_ibm_thinkpad_t43p_fingerprint_reader this page], which also has Debian-specific instructions on how to setup the fingerprint reader. Use it on your own risk.&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting and Hints==&lt;br /&gt;
# After installing the driver, don't forget to reboot!&lt;br /&gt;
## This might not be necessary. it worked here without having to reboot.&lt;br /&gt;
# To see if the fingerprint device is know on the USB bus do:&lt;br /&gt;
:{{cmdroot|lsusb}}&lt;br /&gt;
:as root and you should see a line like:&lt;br /&gt;
:{{cmdresult|Bus 003 Device 004: ID 0483:2016 SGS Thomson Microelectronics}}&lt;br /&gt;
:The bus and device number can be different. This should work without the driver installed. If the device does not show up, you have a hardware problem/quirk, Rebooting or removing/inserting USB kernel modules might fix this.&lt;br /&gt;
# For some installation, after installing the driver as in section [[#Installing the driver|Installing the driver]] and makingÂ´sure the device is recognized, try to test it  by going to {{path|NonGUI_Sample}} directory and run {{cmdroot|./Sample}}, one get segmentation fault. In this case, try getting the Beta1 instead of Beta2 of the driver and installing it&lt;br /&gt;
# There was some confusion about the /etc/bioapi1.10/pam{5550454b-2054-464d-2f45-535320425350} path, this has been fixed in the howto, if you have problems, check the section again, the path needs to have the '-' in them&lt;br /&gt;
# When something goes wrong look at the tail of {{path|/var/log/auth.log}}. (on {{Fedora}} it is {{path|/var/log/secure}}) Specifically if you see an entry saying something like&lt;br /&gt;
 pam_bioapi[10480]: Unable to load BioAPI BSP with UUID of {5550454b-2054-464d-2f45-535320425350}, BioAPI error &amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt;194d.&lt;br /&gt;
Check whether your {{path|/proc/bus/usb}} directory permissions are set up as in the &lt;br /&gt;
section [[#Installing the driver|Installing the driver]].&lt;br /&gt;
# To get the xscreensaver compiled you might need a bunch of header files (depending on which xscreensaver features you want), in my case I need the following:&lt;br /&gt;
#*python-gtk2-dev&lt;br /&gt;
#*libgstreamer0.8-dev&lt;br /&gt;
#*xlibs-dev&lt;br /&gt;
# Sometimes {{path|$HOME/.xscreensaver}} got overwritten, try changing it to read-only.&lt;br /&gt;
# If after suspending to RAM and resume, lsusb no longer have &amp;quot;SGS Thomson Microelectronics&amp;quot; entry, try adding a line &lt;br /&gt;
 /etc/init.d/hotplug restart&lt;br /&gt;
to your {{path|/etc/acpi/resume.sh}} file&lt;br /&gt;
#If after resume lsusb shows the device but xscreensaver does not ask for fingerprint for login, you might want to check the permission of the usb bus in the appropriate {{path|/proc/bus/usb/}} entry. If necessesary you might need to add a line to {{path|/etc/acpi/resume.sh}} as in section [[#Installing the driver|Installing the driver]] to set the permission right.&lt;br /&gt;
-----&lt;br /&gt;
If it still doesn't work, ask me for help (and make sure all usefull stuff makes it back into this wiki :)&lt;br /&gt;
to get a starting point as to where your problem is please include the output of:&lt;br /&gt;
&lt;br /&gt;
:{{cmduser|lsusb}}&lt;br /&gt;
&lt;br /&gt;
:{{cmdroot|ldconfig -p &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; grep bioapi}}&lt;br /&gt;
&lt;br /&gt;
:{{cmdroot|updatedb &amp;amp;&amp;amp; locate bioapi}}&lt;br /&gt;
&lt;br /&gt;
t43fingerprint (at) badcode.de&lt;/div&gt;</summary>
		<author><name>Pebolle</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=User_talk:Pebolle&amp;diff=20545</id>
		<title>User talk:Pebolle</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=User_talk:Pebolle&amp;diff=20545"/>
		<updated>2006-03-03T13:45:05Z</updated>

		<summary type="html">&lt;p&gt;Pebolle: forgot sig&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Removing the discussion on the PreDesktop Area Talk page is fine. ;-) I added some of the information from the IBM link discussion into the article, though, since i think it sheds more light into the difference between PSAs and RPs.&lt;br /&gt;
&lt;br /&gt;
[[User:Wyrfel|Wyrfel]] 12:39, 5 Nov 2005 (CET)&lt;br /&gt;
----&lt;br /&gt;
Nice to hear. Edits are fine with me (until I change my mind and invoke the power to reedit that a Wiki gives its users ...)&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 22:40, 5 Nov 2005 (CET)&lt;br /&gt;
----&lt;br /&gt;
Hei, just wanted to tell you that i appreciate what you did to the PreDesktop Area pages (reorg). [[User:Wyrfel|Wyrfel]] 03:18, 21 January 2006 (CET)&lt;br /&gt;
----&lt;br /&gt;
Nice to hear. Thanks.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 00:35, 24 January 2006 (CET)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Just saw your edit in [[Talk:Predesktop Area]]. ;-) If you have such a long result output, just surround it by &amp;amp;gt;pre&amp;amp;gt;&amp;amp;lt;/pre&amp;amp;gt; tags. Especially on talk pages it doesn't matter that much.&lt;br /&gt;
&lt;br /&gt;
I believe that when ThinkWiki uses MediaWiki 1.6, i can modify the templates to make things (like multiline) more simple.&lt;br /&gt;
&lt;br /&gt;
[[User:Wyrfel|Wyrfel]] 22:30, 24 January 2006 (CET)&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==HPAFS==&lt;br /&gt;
Hei, you might wanna create a separate &amp;quot;hpafs&amp;quot; page for your driver and categorize it as a driver page.&lt;br /&gt;
&lt;br /&gt;
[[User:Wyrfel|Wyrfel]] 01:41, 3 March 2006 (CET)&lt;br /&gt;
&lt;br /&gt;
Well I said &amp;quot;alpha quality&amp;quot; (or something similar). Maybe that's even too optimistic: proof of concept might be better. I know the mantra is &amp;quot;release early, release often&amp;quot; but this might be too early ...&lt;br /&gt;
&lt;br /&gt;
By the way, would hpafs really qualify as a &amp;quot;driver&amp;quot;? I'd say it's more a &amp;quot;tool&amp;quot; or a &amp;quot;utility&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 14:45, 3 March 2006 (CET)&lt;/div&gt;</summary>
		<author><name>Pebolle</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=User_talk:Pebolle&amp;diff=20544</id>
		<title>User talk:Pebolle</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=User_talk:Pebolle&amp;diff=20544"/>
		<updated>2006-03-03T13:44:29Z</updated>

		<summary type="html">&lt;p&gt;Pebolle: HPAFS: some reservations&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Removing the discussion on the PreDesktop Area Talk page is fine. ;-) I added some of the information from the IBM link discussion into the article, though, since i think it sheds more light into the difference between PSAs and RPs.&lt;br /&gt;
&lt;br /&gt;
[[User:Wyrfel|Wyrfel]] 12:39, 5 Nov 2005 (CET)&lt;br /&gt;
----&lt;br /&gt;
Nice to hear. Edits are fine with me (until I change my mind and invoke the power to reedit that a Wiki gives its users ...)&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 22:40, 5 Nov 2005 (CET)&lt;br /&gt;
----&lt;br /&gt;
Hei, just wanted to tell you that i appreciate what you did to the PreDesktop Area pages (reorg). [[User:Wyrfel|Wyrfel]] 03:18, 21 January 2006 (CET)&lt;br /&gt;
----&lt;br /&gt;
Nice to hear. Thanks.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 00:35, 24 January 2006 (CET)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Just saw your edit in [[Talk:Predesktop Area]]. ;-) If you have such a long result output, just surround it by &amp;amp;gt;pre&amp;amp;gt;&amp;amp;lt;/pre&amp;amp;gt; tags. Especially on talk pages it doesn't matter that much.&lt;br /&gt;
&lt;br /&gt;
I believe that when ThinkWiki uses MediaWiki 1.6, i can modify the templates to make things (like multiline) more simple.&lt;br /&gt;
&lt;br /&gt;
[[User:Wyrfel|Wyrfel]] 22:30, 24 January 2006 (CET)&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==HPAFS==&lt;br /&gt;
Hei, you might wanna create a separate &amp;quot;hpafs&amp;quot; page for your driver and categorize it as a driver page.&lt;br /&gt;
&lt;br /&gt;
[[User:Wyrfel|Wyrfel]] 01:41, 3 March 2006 (CET)&lt;br /&gt;
&lt;br /&gt;
Well I said &amp;quot;alpha quality&amp;quot; (or something similar). Maybe that's even too optimistic: proof of concept might be better. I know the mantra is &amp;quot;release early, release often&amp;quot; but this might be too early ...&lt;br /&gt;
&lt;br /&gt;
By the way, would hpafs really qualify as a &amp;quot;driver&amp;quot;? I'd say it's more a &amp;quot;tool&amp;quot; or a &amp;quot;utility&amp;quot;.&lt;/div&gt;</summary>
		<author><name>Pebolle</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Talk:Predesktop_Area&amp;diff=20492</id>
		<title>Talk:Predesktop Area</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Talk:Predesktop_Area&amp;diff=20492"/>
		<updated>2006-03-02T00:04:28Z</updated>

		<summary type="html">&lt;p&gt;Pebolle: reformatting: partial succes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Use the HPA for GNU/Linux?==&lt;br /&gt;
More interesting than removing the HPA (which includes a.o. Acces IBM Predesktop Area, some other tools and a backup of the pre-installed OS) would be to use this area for GNU/Linux too. At least, removing the HPA only saves 3,5 GB on my 60 GB hard disk. It would be worth a try to see whether the backup of the pre-installed OS on the largest PSA could be replaced by a backup of your favourite GNU/Linux distribution.&lt;br /&gt;
&lt;br /&gt;
Elaborating on my ideas a few days later, I'd guess the following could be tried:&lt;br /&gt;
* see whether GRUB can be made to boot the Access IBM Predekstop Area (I guess by &amp;quot;chainloading&amp;quot; the bootsector of its PSA). Right now GRUB refuses to load sectors outside the partioned area. I've got absolutely no idea if it's possible to write a hack to overcome that restriction. Need to contact the GRUB people about that ...&lt;br /&gt;
* write some userspace tools for the HPA/the SPAs (things like: dumpbeer, printDoS).&lt;br /&gt;
&lt;br /&gt;
It should be clear these are basically random ideas. Still feedback would be appreciated ...&lt;br /&gt;
----&lt;br /&gt;
Hei,&lt;br /&gt;
&lt;br /&gt;
interesting ideas, but i'd only see a point in it if one could keep Win and Linux rescue stuff in the HPA. That means it would need to be expandable or fit the stuff for both systems.&lt;br /&gt;
[[User:Wyrfel|Wyrfel]] 20:03, 15 Mar 2005 (CET)&lt;br /&gt;
----&lt;br /&gt;
Thanks.&lt;br /&gt;
&lt;br /&gt;
Short answer: that should be possible.&lt;br /&gt;
&lt;br /&gt;
Long answer: I see little in the specs (as I understand them now) to stop one from adding (say) an extra 3 GB GNU/Linux-rescue PSA or something like that. We might try to do that first by changing the BEER and DoS manually. (Not sure whether Phoenix added some proprietary stuff to keep you from booting it. The PSA should always be accesable with the proper BIOS setting.) It might be mandatory to put it on a FAT filesystem. The hard part probably is to have it show up in the Access IBM Predesktop Area. (My guess is you need to regenerate the FirstSight &amp;quot;graphical shell&amp;quot;. If that's correct we probably only can use the FirstWare tools &amp;quot;hidden&amp;quot; on their little PSA. That's no fun. Well it might a little fun if we try FreeDOS). &lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle (not logged in)]]&lt;br /&gt;
----&lt;br /&gt;
Update: a trivial patch to grub allows it to also work outside the partioned area:&lt;br /&gt;
&lt;br /&gt;
 --- /var/tmp/rpm/BUILD/grub-0.95/stage2/disk_io.c.oud   2004-05-23 18:35:24.000000000 +0200&lt;br /&gt;
 +++ /var/tmp/rpm/BUILD/grub-0.95/stage2/disk_io.c       2005-03-18 22:38:30.050907408 +0100&lt;br /&gt;
 @@ -297,8 +297,8 @@&lt;br /&gt;
     *  Check partition boundaries&lt;br /&gt;
     */&lt;br /&gt;
    if (sector &amp;lt; 0&lt;br /&gt;
 -      || ((sector + ((byte_offset + byte_len - 1) &amp;gt;&amp;gt; SECTOR_BITS))&lt;br /&gt;
 -         &amp;gt;= part_length))&lt;br /&gt;
 +      /*|| ((sector + ((byte_offset + byte_len - 1) &amp;gt;&amp;gt; SECTOR_BITS))&lt;br /&gt;
 +         &amp;gt;= part_length)*/)&lt;br /&gt;
      {&lt;br /&gt;
        errnum = ERR_OUTSIDE_PART;&lt;br /&gt;
        return 0;&lt;br /&gt;
&lt;br /&gt;
I made a grub CD with a grub patched with the above. Now I can &amp;quot;cat&amp;quot; the bootsector of the Predesktop Area from the grub shell (when booting of that grub CD). But I haven't yet managed to boot the Predesktop Area (dangerous stuff!) To be continued ...&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] Fri Mar 18 22:42:43 CET 2005&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I've been playing around with the predesktop area tonight.  I was simply trying to just leave the diagnostics stuff and remove the windows part.  I wrote some programs to read/write the BEER data and stuff, but I wasn't able to get the system to boot it, it kept erroring &amp;quot;Authentication of System Services failed&amp;quot; (or something along those lines).  I will play around with this some more later&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[User:Invisi|Tim Nordell]]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A quick look with a hexeditor gave me two instances of &amp;quot;Application authentication has failed!&amp;quot; in the FirstSight application. Does that sound familair? &lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] Fri Apr 1 19:35:30 CEST 2005&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Actually it wasn't that.  I did a search of that too, the message itself was not in the predesktop area at all.  What also is interesting is the fw*.exe utilities for manipulating the predesktop area, contains the string &amp;quot;MD5&amp;quot; which makes me wonder if there is an md5 hash of each &amp;quot;predesktop&amp;quot; partition.  I know on the IBM whitepaper it states there being a signature so that non-signed applications can not be run.  Could a simple &amp;quot;md5&amp;quot; be the signature?&lt;br /&gt;
&lt;br /&gt;
[[User:Invisi|Tim Nordell]] 12:01, 3 Apr 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*What is it that you were trying to do (what did trigger the error you saw)?&lt;br /&gt;
&lt;br /&gt;
*About ten of the fw*.exe utilities contain the phrase &amp;quot;MD5 Checksums do not match&amp;quot;. So they could very well be using MD5 sums for some sort of validation. But they could use the MD5 sums in a lot of ways actually, so I won't yet speculate ...&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] Sun Apr  3 15:11:10 CEST 2005&lt;br /&gt;
&lt;br /&gt;
== Predesktop Area ==&lt;br /&gt;
&lt;br /&gt;
I made a program that takes the BEER record at the end, parses it out to a &amp;quot;.cfg&amp;quot; file, lets you modify it, recalibrate the start spots for the records, and write it out to disk again.  It doesn't directly access hda, 'cept for reading the original beer record.  It makes a script file to go with the files you have, to read in the HPA data, and to write it out again with the new record.&lt;br /&gt;
&lt;br /&gt;
Anyways, I tried simply removing the last record from the BEER, which is the windows recovery partition.  It didn't like that.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Did you update the two's complement checksum at the end of the BEER?&lt;br /&gt;
&lt;br /&gt;
[[user:Pebolle|Paul Bolle]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Yep, I updated that.  If I don't update that, it doesn't even say that failed message.  I also made a seperate program to update the checksum so you can also modify the beer record by hand with a hex editor and have valid checksums.&lt;br /&gt;
&lt;br /&gt;
== Linux kernel support ==&lt;br /&gt;
{{Todo|research and add to article}}&lt;br /&gt;
* Add a section on dmesg and hdparm -I output:&lt;br /&gt;
 (...)&lt;br /&gt;
 Commands/features:&lt;br /&gt;
        Enabled Supported:&lt;br /&gt;
 (...)&lt;br /&gt;
           *    Host Protected Area feature set&lt;br /&gt;
 (...)&lt;br /&gt;
                SET MAX security extension&lt;br /&gt;
                Address Offset Reserved Area Boot&lt;br /&gt;
 (...)&lt;br /&gt;
&lt;br /&gt;
* Recent (2.6.10 and up?) kernels disable HPAs automatically (in drivers/ide/ide-disk.c). Dmesg example:&lt;br /&gt;
&lt;br /&gt;
 hda: Host Protected Area detected.&lt;br /&gt;
        current capacity is 110194034 sectors (56419 MB)&lt;br /&gt;
         native  capacity is 117210240 sectors (60011 MB)&lt;br /&gt;
 hda: Host Protected Area disabled.&lt;br /&gt;
&lt;br /&gt;
This should be (further researched and) added to this section (maybe with some pointers to the unexpected consequences of this new approach ...)&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 22:06, 6 Sep 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
* SRCMOS24.EXE&lt;br /&gt;
&lt;br /&gt;
In the PSA used by the Predesktop Area I found a &amp;quot;hidden&amp;quot; executable: SRCMOS24.EXE (it is not mentioned in the FAT). This executable can capture and update CMOS data. It might only be used by the FirstSight program to display (part of) the BIOS info. It might be nice to see what it can do and if similar things are possible under GNU/Linux.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 22:01, 7 Sep 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
== Newer thinkpads don't use Phoenix Firstware? ==&lt;br /&gt;
&lt;br /&gt;
On my T42 that arrived yesterday, the predesktop area looks a lot like MS Windows. The widget set, the fonts, even the boot sequence looks exactly like Windows 2000. Debian-installer indentified it as &amp;quot;Microsoft Windows NT/2000/XP&amp;quot;, while it identified my XP partition as &amp;quot;Microsoft Windows XP Professional&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Has Lenovo/IBM changed their system, or is this Phoenix stuff really just Windows?&lt;br /&gt;
&lt;br /&gt;
-- [[Evan.Heidtmann]]&lt;br /&gt;
&lt;br /&gt;
Evan,&lt;br /&gt;
&lt;br /&gt;
Could it be that you're talking about the preinstalled version of Windows here? As far as I know (using information to be found on the internet, not personal research) the preinstalled OS will reformat its partition from FAT32 to NTFS at first boot. That could explain the difference in the identification by the Debian installer (which I never really used).&lt;br /&gt;
&lt;br /&gt;
Moreover the Predesktop Area is part of the HPA and the HPA is not an partition. It seems unlikely that the Debain installer notices the HPA. As far as I know there are at present no GNU/Linux tools with a (useful) support of HPAs.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 15:43, 4 Aug 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
My T42P (model 2373HSG) is using a cut-down version of Windows XP as the pre-desktop area.  I'm not sure whether it's a special IBM thing or just a [http://www.microsoft.com/licensing/programs/sa/benefits/winpe.mspx Windows PE] (preinstallation environment) setup.  It includes Java and Python, which are used by some of the IBM tools, and the Opera web browser.&lt;br /&gt;
&lt;br /&gt;
It's no longer an HPA but a 487MB hidden FAT32 called IBM_SERVICE located at the end of the disk.&lt;br /&gt;
&lt;br /&gt;
--[[User:Korourke|Korourke]]&lt;br /&gt;
&lt;br /&gt;
== Rescue and Recovery via grub? ==&lt;br /&gt;
&lt;br /&gt;
Did anyone get the Rescue and Recovery partition to boot via grub on recent models? On a T43 with&lt;br /&gt;
 rootnoverify (hd0,1)&lt;br /&gt;
 chainloader +1&lt;br /&gt;
the Rescue and Recovery partition starts booting nicely and then, a few seconds in the R&amp;amp;R loading sequence, chokes with a &lt;br /&gt;
 STOP: c000021a {Fatal System Error}&lt;br /&gt;
 The Session Manager Initialization system process terminated unexpectedly with a status of 0xc000003a (0x00000000 0x00000000).&lt;br /&gt;
 The system has been shut down. &lt;br /&gt;
The problem started right after installing grub into the MBR (I couldn't get the preinstalled MBR to boot grub from an active primary partition). It seems oblivious to the Predesktop BIOS setting.&lt;br /&gt;
&lt;br /&gt;
The same problem has been reported by others with other models (for example [http://forums.fedoraforum.org/archive/index.php/t-19433.html here] for a T42).&lt;br /&gt;
&lt;br /&gt;
[[User:Thinker|Thinker]] 11:35, 30 Sep 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
Your &amp;quot;Rescue and Recovery partition&amp;quot; seems not to be a HPA (which isn't a partition). Maybe we should open a new page for that system.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 21:54, 30 Sep 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
It may very well not be an HPA , but the BIOS stil calls it a &amp;quot;Predesktop Area&amp;quot;. Anyway, the partition is actually a VFAT partition (even though it has type 0x12, &amp;quot;Compaq Diagnostics&amp;quot;). It seems to boot into PC-DOS (using {{path|NTDETECT.EXE}} so it looks like Windows startup) and then its {{path|AUTOEXEC.BAT}} runs a fancy GUI.&lt;br /&gt;
--[[User:Thinker|Thinker]] 23:31, 30 Sep 2005 (CEST)&lt;br /&gt;
----&lt;br /&gt;
Right, there has been a lot of confusion about this, we should have a separate page. Introduced an edit link (called Rescue and Recovery) on the [[ThinkPad Technologies]] page for that purpose.&lt;br /&gt;
&lt;br /&gt;
== Suggestions for projects ==&lt;br /&gt;
&lt;br /&gt;
I'd guess it would be rather nice to have GNU/Linux tools (like sfdisk and parted) HPA aware. The most urgent change would be to have those programs at least recognize and respect a HPA (e.g.: do not write in or otherwise use the HPA area; unless the user gives a --force option or something similar).&lt;br /&gt;
&lt;br /&gt;
As for now, I realize I caused this error: ENOPATCH.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 22:56, 5 Nov 2005 (CET)&lt;br /&gt;
&lt;br /&gt;
== Keeping functionality of the blue AccessIBM button ==&lt;br /&gt;
&lt;br /&gt;
Somebody figured out [http://sharadware.com/2005/07/11/suse-linux-winxp-access-ibm-on-the-thinkpad-t43/|how to keep the AccessIBM functionality] when installing Linux, quite easy fix. How come nobody thought about it before? :)&lt;br /&gt;
(link got from [[Installing_Ubuntu_5.04_on_a_ThinkPad_T43_%281875%29 here]])&lt;br /&gt;
&lt;br /&gt;
--[[User:Micampe|Micampe]] 17:39, 9 Dec 2005 (CET)&lt;br /&gt;
&lt;br /&gt;
The relevant part of that page:&lt;br /&gt;
&lt;br /&gt;
''Set the IBM Predesktop Area (in the BIOS) to â€œSecureâ€. Boot using the SUSE DVD. Shrink the Windows partition as required. Follow the instructions and go through the regular installation process. Create a primary partition for /boot (the other stuff can go into the extended partitions) and when the time comes to install GRUB (you do prefer GRUB to LILO, donâ€™t you?), make sure you install it into the boot sector of the boot partition. Set this partition as active. Leave the MBR alone.''&lt;br /&gt;
&lt;br /&gt;
That's the first thing I tried on my T43. Didn't work: setting the active partition to /boot had no effect, it was still booting the first (Windows) partition. So I had to install Grub into MBR, thereby killing R&amp;amp;R. Anyway, there's another solution in the article page (didn't try it since I saw it only after purging my R&amp;amp;R partition).&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
--[[User:Thinker|Thinker]] 19:18, 9 Dec 2005 (CET)&lt;br /&gt;
&lt;br /&gt;
== Parsing the HPA information (BEER/DOS) ==&lt;br /&gt;
&lt;br /&gt;
I too have been writing a program to parse the BEER and DOS info. Sample output:&lt;br /&gt;
:{{cmdresult| beer.signature: 0xBEEF}}&lt;br /&gt;
:{{cmdresult| beer.size: 128}}&lt;br /&gt;
:{{cmdresult| beer.flags: 41}}&lt;br /&gt;
:{{cmdresult|    Read Only:}}&lt;br /&gt;
:{{cmdresult|    Generated Record:}}&lt;br /&gt;
:{{cmdresult|    Use Reserved Area Boot Code Address: yes}}&lt;br /&gt;
:{{cmdresult|    Configuration Time Stamp is valid:}}&lt;br /&gt;
:{{cmdresult|    Device Supports LBA:                 yes}}&lt;br /&gt;
:{{cmdresult|    Directory of Services is Present}}&lt;br /&gt;
:{{cmdresult|    Formatted Geometry Valid}}&lt;br /&gt;
:{{cmdresult|    Reported Geometry Valid              yes}}&lt;br /&gt;
:{{cmdresult| beer.reported_cylinders: 16383}}&lt;br /&gt;
:{{cmdresult| beer.reported_heads: 16}}&lt;br /&gt;
:{{cmdresult| beer.reported_sectors: 63}}&lt;br /&gt;
:{{cmdresult| beer.reported_bytes_sector: 512}}&lt;br /&gt;
:{{cmdresult| beer.reported_sectors_device: 117210240}}&lt;br /&gt;
:{{cmdresult| beer.formatted_cylinders: 16383}}&lt;br /&gt;
:{{cmdresult| beer.formatted_heads: 16}}&lt;br /&gt;
:{{cmdresult| beer.formatted_sectors: 63}}&lt;br /&gt;
:{{cmdresult| beer.formatted_bytes_sector: 512}}&lt;br /&gt;
:{{cmdresult| beer.formatted_sectors_device: 117210240}}&lt;br /&gt;
:{{cmdresult| year: 2004}}&lt;br /&gt;
:{{cmdresult| day: 313}}&lt;br /&gt;
:{{cmdresult| beer.timestamp: 1426063684}}&lt;br /&gt;
:{{cmdresult| beer.device_index: 0x80}}&lt;br /&gt;
:{{cmdresult| beer.hpa_start: 110194034}}&lt;br /&gt;
:{{cmdresult| beer.boot_code_address: 117002545}}&lt;br /&gt;
:{{cmdresult| beer.num_entries: 8}}&lt;br /&gt;
:{{cmdresult| beer.dir_length: 64}}&lt;br /&gt;
:{{cmdresult| beer.revision: 0}}&lt;br /&gt;
:{{cmdresult| dev_name: HTS726060M9AT00}}&lt;br /&gt;
:{{cmdresult| beer.checksum: -26982}}&lt;br /&gt;
:{{cmdresult| dos[0].flags: 3}}&lt;br /&gt;
:{{cmdresult|    Service area is available as B:}}&lt;br /&gt;
:{{cmdresult|    Diagnostic Service:}}&lt;br /&gt;
:{{cmdresult|    Service Area is Read Only:}}&lt;br /&gt;
:{{cmdresult|    This Boot:}}&lt;br /&gt;
:{{cmdresult|    Empty Service Area:}}&lt;br /&gt;
:{{cmdresult|    Hidden Service Area:                 yes}}&lt;br /&gt;
:{{cmdresult|    Service Area is bootable as A:       yes}}&lt;br /&gt;
:{{cmdresult| dos[0].service_area_start: 117005431}}&lt;br /&gt;
:{{cmdresult| dos[0].service_area_size: 204800}}&lt;br /&gt;
:{{cmdresult| dos[0].load_sectors: 1}}&lt;br /&gt;
:{{cmdresult| dos[0].load_address: 0x7:C000}}&lt;br /&gt;
:{{cmdresult| dos[0].service_area_id: 0}}&lt;br /&gt;
:{{cmdresult| dos[0] id_str: FirstWare Reserved Area}}&lt;br /&gt;
:{{cmdresult| dos[0].checksum: -22271}}&lt;br /&gt;
:{{cmdresult| [...]}}&lt;br /&gt;
&lt;br /&gt;
Very rough code. Send me an e-mail (at the address found at my user page) if you want a (GPL'd) copy, but only if you're willing to test and improve the code.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 01:15, 24 January 2006 (CET)&lt;br /&gt;
&lt;br /&gt;
== SET MAX Security Extensions ==&lt;br /&gt;
&lt;br /&gt;
I've hacked Andries Brouwer's setmax tool (see: Google) to support the SET MAX security extensions (SET MAX SET PASSWORD, SET MAX LOCK, SET MAX UNLOCK, SET MAX FREEZE). Very rough code once again. Mail me if you're willing to brick your HDD.&lt;br /&gt;
&lt;br /&gt;
A few random observations:&lt;br /&gt;
&lt;br /&gt;
- secure mode: the Phoenix BIOS probably sets a SET MAX password in the HDD, does a non-volatile SET MAX and LOCKs (or FREEZEs) the HDD.&lt;br /&gt;
&lt;br /&gt;
- normal mode: the Phoenix BIOS might set a SET MAX password in the HDD, does a (volatile?) SET MAX but does not LOCK the HDD. The HDD will accept another SET MAX, a new SET MAX SET PASSWORD, etc.&lt;br /&gt;
&lt;br /&gt;
- normal mode: Linux 2.6.x disables the HPA in normal mode (by doing a volatile SET MAX to maximum native address). After a suspend the HDD reenables the HPA (by returning to the latest non-volatile value of SET MAX). It thus treats the suspend cycle as a power cycle (it also discards a SET MAX password, unlocks or unfreezes the HPA etc). I'm not sure whether that is a correct implementation of the ATA spec. (The HDD doesn't do this in secure mode. I would like to know how the Phoenix BIOS and/or Hitachi HDD people have managed this.) &lt;br /&gt;
&lt;br /&gt;
This can lead to some problems if a partition ends within the limits of the HPA (which is then actually (partly) overwritten by that partition). Maybe the best solution would be to have the kernel do a non-volatile SET MAX to the native maximum address. Then a resume from suspend will in effect not reenable the HPA.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 01:40, 20 February 2006 (CET)&lt;br /&gt;
&lt;br /&gt;
== hpafs ==&lt;br /&gt;
&lt;br /&gt;
I've written a (read only) FUSE for the hpa: hpafs. Alpha quality at best. Mail me if you'd like to test it, hack on it. Now about 1100 LOC. The binary is a mere 33 KB (this is with debugging symbols). Rather i386 centric. &lt;br /&gt;
&lt;br /&gt;
hpafs will only work if the Predesktop Area is disabled (but that is more or less obvious). It basically turns each PSA into a file:&lt;br /&gt;
&lt;br /&gt;
{{cmdresult|$ sudo hpafs /dev/hda /mnt/hpa -o allow_other&amp;lt;br/&amp;gt;&lt;br /&gt;
$ ll /mnt/hpa/&amp;lt;br/&amp;gt;&lt;br /&gt;
total 0&amp;lt;br/&amp;gt;&lt;br /&gt;
-r--r--r--  1 root root    2097152 Jan  1  1970 BIOSWORKAREA&amp;lt;br/&amp;gt;&lt;br /&gt;
-r--r--r--  1 root root    7710720 Jan  1  1970 Create Diagnostic Diskettes&amp;lt;br/&amp;gt;&lt;br /&gt;
-r--r--r--  1 root root  104857600 Jan  1  1970 FirstWare Reserved Area&amp;lt;br/&amp;gt;&lt;br /&gt;
-r--r--r--  1 root root     7710720 Jan  1  1970 Rec Boot&amp;lt;br/&amp;gt;&lt;br /&gt;
-r--r--r--  1 root root 3459252224 Jan  1  1970 Rec Data&amp;lt;br/&amp;gt;&lt;br /&gt;
-r--r--r--  1 root root    1476096 Jan  1  1970 Restore from backup&amp;lt;br/&amp;gt;&lt;br /&gt;
-r--r--r--  1 root root    7710720 Jan  1  1970 Run Diagnostics&amp;lt;br/&amp;gt;&lt;br /&gt;
-r--r--r--  1 root root    1477632 Jan  1  1970 SIGHT}}&lt;br /&gt;
&lt;br /&gt;
This FUSE file can easily be copied with basic GNU tools (cat, dd, etc). Even more fun is to loop mount such a FUSE file (if the corresponding PSA is a bootable image). Then the PSA is a (read only) part of your mounted filesystems. So now you do not need to use dd on /dev/hda to copy the Predesktop Area: you can just mount it!&lt;br /&gt;
&lt;br /&gt;
{{cmdresult|$ sudo mount -o loop,ro,users  /mnt/hpa/Rec\ Data /mnt/tmp&amp;lt;br/&amp;gt;&lt;br /&gt;
$ ll /mnt/tmp/&amp;lt;br/&amp;gt;&lt;br /&gt;
total 1454&amp;lt;br/&amp;gt;&lt;br /&gt;
-rwxr-xr-x  1 root root      64 Sep 27  2002 bootcat.bin&amp;lt;br/&amp;gt;&lt;br /&gt;
-rwxr-xr-x  1 root root 1474560 Oct  3  2002 bootimg.bin&amp;lt;br/&amp;gt;&lt;br /&gt;
drwxr-xr-x  2 root root    2048 Mar 13  2004 country&amp;lt;br/&amp;gt;&lt;br /&gt;
drwxr-xr-x  2 root root    2048 Mar 13  2004 ibmwork&amp;lt;br/&amp;gt;&lt;br /&gt;
drwxr-xr-x  3 root root    8192 Mar 13  2004 recovery&amp;lt;br/&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
To be continued ...&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 00:56, 2 March 2006 (CET)&lt;/div&gt;</summary>
		<author><name>Pebolle</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Talk:Predesktop_Area&amp;diff=20491</id>
		<title>Talk:Predesktop Area</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Talk:Predesktop_Area&amp;diff=20491"/>
		<updated>2006-03-01T23:56:30Z</updated>

		<summary type="html">&lt;p&gt;Pebolle: hpafs&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Use the HPA for GNU/Linux?==&lt;br /&gt;
More interesting than removing the HPA (which includes a.o. Acces IBM Predesktop Area, some other tools and a backup of the pre-installed OS) would be to use this area for GNU/Linux too. At least, removing the HPA only saves 3,5 GB on my 60 GB hard disk. It would be worth a try to see whether the backup of the pre-installed OS on the largest PSA could be replaced by a backup of your favourite GNU/Linux distribution.&lt;br /&gt;
&lt;br /&gt;
Elaborating on my ideas a few days later, I'd guess the following could be tried:&lt;br /&gt;
* see whether GRUB can be made to boot the Access IBM Predekstop Area (I guess by &amp;quot;chainloading&amp;quot; the bootsector of its PSA). Right now GRUB refuses to load sectors outside the partioned area. I've got absolutely no idea if it's possible to write a hack to overcome that restriction. Need to contact the GRUB people about that ...&lt;br /&gt;
* write some userspace tools for the HPA/the SPAs (things like: dumpbeer, printDoS).&lt;br /&gt;
&lt;br /&gt;
It should be clear these are basically random ideas. Still feedback would be appreciated ...&lt;br /&gt;
----&lt;br /&gt;
Hei,&lt;br /&gt;
&lt;br /&gt;
interesting ideas, but i'd only see a point in it if one could keep Win and Linux rescue stuff in the HPA. That means it would need to be expandable or fit the stuff for both systems.&lt;br /&gt;
[[User:Wyrfel|Wyrfel]] 20:03, 15 Mar 2005 (CET)&lt;br /&gt;
----&lt;br /&gt;
Thanks.&lt;br /&gt;
&lt;br /&gt;
Short answer: that should be possible.&lt;br /&gt;
&lt;br /&gt;
Long answer: I see little in the specs (as I understand them now) to stop one from adding (say) an extra 3 GB GNU/Linux-rescue PSA or something like that. We might try to do that first by changing the BEER and DoS manually. (Not sure whether Phoenix added some proprietary stuff to keep you from booting it. The PSA should always be accesable with the proper BIOS setting.) It might be mandatory to put it on a FAT filesystem. The hard part probably is to have it show up in the Access IBM Predesktop Area. (My guess is you need to regenerate the FirstSight &amp;quot;graphical shell&amp;quot;. If that's correct we probably only can use the FirstWare tools &amp;quot;hidden&amp;quot; on their little PSA. That's no fun. Well it might a little fun if we try FreeDOS). &lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle (not logged in)]]&lt;br /&gt;
----&lt;br /&gt;
Update: a trivial patch to grub allows it to also work outside the partioned area:&lt;br /&gt;
&lt;br /&gt;
 --- /var/tmp/rpm/BUILD/grub-0.95/stage2/disk_io.c.oud   2004-05-23 18:35:24.000000000 +0200&lt;br /&gt;
 +++ /var/tmp/rpm/BUILD/grub-0.95/stage2/disk_io.c       2005-03-18 22:38:30.050907408 +0100&lt;br /&gt;
 @@ -297,8 +297,8 @@&lt;br /&gt;
     *  Check partition boundaries&lt;br /&gt;
     */&lt;br /&gt;
    if (sector &amp;lt; 0&lt;br /&gt;
 -      || ((sector + ((byte_offset + byte_len - 1) &amp;gt;&amp;gt; SECTOR_BITS))&lt;br /&gt;
 -         &amp;gt;= part_length))&lt;br /&gt;
 +      /*|| ((sector + ((byte_offset + byte_len - 1) &amp;gt;&amp;gt; SECTOR_BITS))&lt;br /&gt;
 +         &amp;gt;= part_length)*/)&lt;br /&gt;
      {&lt;br /&gt;
        errnum = ERR_OUTSIDE_PART;&lt;br /&gt;
        return 0;&lt;br /&gt;
&lt;br /&gt;
I made a grub CD with a grub patched with the above. Now I can &amp;quot;cat&amp;quot; the bootsector of the Predesktop Area from the grub shell (when booting of that grub CD). But I haven't yet managed to boot the Predesktop Area (dangerous stuff!) To be continued ...&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] Fri Mar 18 22:42:43 CET 2005&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I've been playing around with the predesktop area tonight.  I was simply trying to just leave the diagnostics stuff and remove the windows part.  I wrote some programs to read/write the BEER data and stuff, but I wasn't able to get the system to boot it, it kept erroring &amp;quot;Authentication of System Services failed&amp;quot; (or something along those lines).  I will play around with this some more later&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[User:Invisi|Tim Nordell]]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A quick look with a hexeditor gave me two instances of &amp;quot;Application authentication has failed!&amp;quot; in the FirstSight application. Does that sound familair? &lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] Fri Apr 1 19:35:30 CEST 2005&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Actually it wasn't that.  I did a search of that too, the message itself was not in the predesktop area at all.  What also is interesting is the fw*.exe utilities for manipulating the predesktop area, contains the string &amp;quot;MD5&amp;quot; which makes me wonder if there is an md5 hash of each &amp;quot;predesktop&amp;quot; partition.  I know on the IBM whitepaper it states there being a signature so that non-signed applications can not be run.  Could a simple &amp;quot;md5&amp;quot; be the signature?&lt;br /&gt;
&lt;br /&gt;
[[User:Invisi|Tim Nordell]] 12:01, 3 Apr 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*What is it that you were trying to do (what did trigger the error you saw)?&lt;br /&gt;
&lt;br /&gt;
*About ten of the fw*.exe utilities contain the phrase &amp;quot;MD5 Checksums do not match&amp;quot;. So they could very well be using MD5 sums for some sort of validation. But they could use the MD5 sums in a lot of ways actually, so I won't yet speculate ...&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] Sun Apr  3 15:11:10 CEST 2005&lt;br /&gt;
&lt;br /&gt;
== Predesktop Area ==&lt;br /&gt;
&lt;br /&gt;
I made a program that takes the BEER record at the end, parses it out to a &amp;quot;.cfg&amp;quot; file, lets you modify it, recalibrate the start spots for the records, and write it out to disk again.  It doesn't directly access hda, 'cept for reading the original beer record.  It makes a script file to go with the files you have, to read in the HPA data, and to write it out again with the new record.&lt;br /&gt;
&lt;br /&gt;
Anyways, I tried simply removing the last record from the BEER, which is the windows recovery partition.  It didn't like that.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Did you update the two's complement checksum at the end of the BEER?&lt;br /&gt;
&lt;br /&gt;
[[user:Pebolle|Paul Bolle]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Yep, I updated that.  If I don't update that, it doesn't even say that failed message.  I also made a seperate program to update the checksum so you can also modify the beer record by hand with a hex editor and have valid checksums.&lt;br /&gt;
&lt;br /&gt;
== Linux kernel support ==&lt;br /&gt;
{{Todo|research and add to article}}&lt;br /&gt;
* Add a section on dmesg and hdparm -I output:&lt;br /&gt;
 (...)&lt;br /&gt;
 Commands/features:&lt;br /&gt;
        Enabled Supported:&lt;br /&gt;
 (...)&lt;br /&gt;
           *    Host Protected Area feature set&lt;br /&gt;
 (...)&lt;br /&gt;
                SET MAX security extension&lt;br /&gt;
                Address Offset Reserved Area Boot&lt;br /&gt;
 (...)&lt;br /&gt;
&lt;br /&gt;
* Recent (2.6.10 and up?) kernels disable HPAs automatically (in drivers/ide/ide-disk.c). Dmesg example:&lt;br /&gt;
&lt;br /&gt;
 hda: Host Protected Area detected.&lt;br /&gt;
        current capacity is 110194034 sectors (56419 MB)&lt;br /&gt;
         native  capacity is 117210240 sectors (60011 MB)&lt;br /&gt;
 hda: Host Protected Area disabled.&lt;br /&gt;
&lt;br /&gt;
This should be (further researched and) added to this section (maybe with some pointers to the unexpected consequences of this new approach ...)&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 22:06, 6 Sep 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
* SRCMOS24.EXE&lt;br /&gt;
&lt;br /&gt;
In the PSA used by the Predesktop Area I found a &amp;quot;hidden&amp;quot; executable: SRCMOS24.EXE (it is not mentioned in the FAT). This executable can capture and update CMOS data. It might only be used by the FirstSight program to display (part of) the BIOS info. It might be nice to see what it can do and if similar things are possible under GNU/Linux.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 22:01, 7 Sep 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
== Newer thinkpads don't use Phoenix Firstware? ==&lt;br /&gt;
&lt;br /&gt;
On my T42 that arrived yesterday, the predesktop area looks a lot like MS Windows. The widget set, the fonts, even the boot sequence looks exactly like Windows 2000. Debian-installer indentified it as &amp;quot;Microsoft Windows NT/2000/XP&amp;quot;, while it identified my XP partition as &amp;quot;Microsoft Windows XP Professional&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Has Lenovo/IBM changed their system, or is this Phoenix stuff really just Windows?&lt;br /&gt;
&lt;br /&gt;
-- [[Evan.Heidtmann]]&lt;br /&gt;
&lt;br /&gt;
Evan,&lt;br /&gt;
&lt;br /&gt;
Could it be that you're talking about the preinstalled version of Windows here? As far as I know (using information to be found on the internet, not personal research) the preinstalled OS will reformat its partition from FAT32 to NTFS at first boot. That could explain the difference in the identification by the Debian installer (which I never really used).&lt;br /&gt;
&lt;br /&gt;
Moreover the Predesktop Area is part of the HPA and the HPA is not an partition. It seems unlikely that the Debain installer notices the HPA. As far as I know there are at present no GNU/Linux tools with a (useful) support of HPAs.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 15:43, 4 Aug 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
My T42P (model 2373HSG) is using a cut-down version of Windows XP as the pre-desktop area.  I'm not sure whether it's a special IBM thing or just a [http://www.microsoft.com/licensing/programs/sa/benefits/winpe.mspx Windows PE] (preinstallation environment) setup.  It includes Java and Python, which are used by some of the IBM tools, and the Opera web browser.&lt;br /&gt;
&lt;br /&gt;
It's no longer an HPA but a 487MB hidden FAT32 called IBM_SERVICE located at the end of the disk.&lt;br /&gt;
&lt;br /&gt;
--[[User:Korourke|Korourke]]&lt;br /&gt;
&lt;br /&gt;
== Rescue and Recovery via grub? ==&lt;br /&gt;
&lt;br /&gt;
Did anyone get the Rescue and Recovery partition to boot via grub on recent models? On a T43 with&lt;br /&gt;
 rootnoverify (hd0,1)&lt;br /&gt;
 chainloader +1&lt;br /&gt;
the Rescue and Recovery partition starts booting nicely and then, a few seconds in the R&amp;amp;R loading sequence, chokes with a &lt;br /&gt;
 STOP: c000021a {Fatal System Error}&lt;br /&gt;
 The Session Manager Initialization system process terminated unexpectedly with a status of 0xc000003a (0x00000000 0x00000000).&lt;br /&gt;
 The system has been shut down. &lt;br /&gt;
The problem started right after installing grub into the MBR (I couldn't get the preinstalled MBR to boot grub from an active primary partition). It seems oblivious to the Predesktop BIOS setting.&lt;br /&gt;
&lt;br /&gt;
The same problem has been reported by others with other models (for example [http://forums.fedoraforum.org/archive/index.php/t-19433.html here] for a T42).&lt;br /&gt;
&lt;br /&gt;
[[User:Thinker|Thinker]] 11:35, 30 Sep 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
Your &amp;quot;Rescue and Recovery partition&amp;quot; seems not to be a HPA (which isn't a partition). Maybe we should open a new page for that system.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 21:54, 30 Sep 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
It may very well not be an HPA , but the BIOS stil calls it a &amp;quot;Predesktop Area&amp;quot;. Anyway, the partition is actually a VFAT partition (even though it has type 0x12, &amp;quot;Compaq Diagnostics&amp;quot;). It seems to boot into PC-DOS (using {{path|NTDETECT.EXE}} so it looks like Windows startup) and then its {{path|AUTOEXEC.BAT}} runs a fancy GUI.&lt;br /&gt;
--[[User:Thinker|Thinker]] 23:31, 30 Sep 2005 (CEST)&lt;br /&gt;
----&lt;br /&gt;
Right, there has been a lot of confusion about this, we should have a separate page. Introduced an edit link (called Rescue and Recovery) on the [[ThinkPad Technologies]] page for that purpose.&lt;br /&gt;
&lt;br /&gt;
== Suggestions for projects ==&lt;br /&gt;
&lt;br /&gt;
I'd guess it would be rather nice to have GNU/Linux tools (like sfdisk and parted) HPA aware. The most urgent change would be to have those programs at least recognize and respect a HPA (e.g.: do not write in or otherwise use the HPA area; unless the user gives a --force option or something similar).&lt;br /&gt;
&lt;br /&gt;
As for now, I realize I caused this error: ENOPATCH.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 22:56, 5 Nov 2005 (CET)&lt;br /&gt;
&lt;br /&gt;
== Keeping functionality of the blue AccessIBM button ==&lt;br /&gt;
&lt;br /&gt;
Somebody figured out [http://sharadware.com/2005/07/11/suse-linux-winxp-access-ibm-on-the-thinkpad-t43/|how to keep the AccessIBM functionality] when installing Linux, quite easy fix. How come nobody thought about it before? :)&lt;br /&gt;
(link got from [[Installing_Ubuntu_5.04_on_a_ThinkPad_T43_%281875%29 here]])&lt;br /&gt;
&lt;br /&gt;
--[[User:Micampe|Micampe]] 17:39, 9 Dec 2005 (CET)&lt;br /&gt;
&lt;br /&gt;
The relevant part of that page:&lt;br /&gt;
&lt;br /&gt;
''Set the IBM Predesktop Area (in the BIOS) to â€œSecureâ€. Boot using the SUSE DVD. Shrink the Windows partition as required. Follow the instructions and go through the regular installation process. Create a primary partition for /boot (the other stuff can go into the extended partitions) and when the time comes to install GRUB (you do prefer GRUB to LILO, donâ€™t you?), make sure you install it into the boot sector of the boot partition. Set this partition as active. Leave the MBR alone.''&lt;br /&gt;
&lt;br /&gt;
That's the first thing I tried on my T43. Didn't work: setting the active partition to /boot had no effect, it was still booting the first (Windows) partition. So I had to install Grub into MBR, thereby killing R&amp;amp;R. Anyway, there's another solution in the article page (didn't try it since I saw it only after purging my R&amp;amp;R partition).&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
--[[User:Thinker|Thinker]] 19:18, 9 Dec 2005 (CET)&lt;br /&gt;
&lt;br /&gt;
== Parsing the HPA information (BEER/DOS) ==&lt;br /&gt;
&lt;br /&gt;
I too have been writing a program to parse the BEER and DOS info. Sample output:&lt;br /&gt;
:{{cmdresult| beer.signature: 0xBEEF}}&lt;br /&gt;
:{{cmdresult| beer.size: 128}}&lt;br /&gt;
:{{cmdresult| beer.flags: 41}}&lt;br /&gt;
:{{cmdresult|    Read Only:}}&lt;br /&gt;
:{{cmdresult|    Generated Record:}}&lt;br /&gt;
:{{cmdresult|    Use Reserved Area Boot Code Address: yes}}&lt;br /&gt;
:{{cmdresult|    Configuration Time Stamp is valid:}}&lt;br /&gt;
:{{cmdresult|    Device Supports LBA:                 yes}}&lt;br /&gt;
:{{cmdresult|    Directory of Services is Present}}&lt;br /&gt;
:{{cmdresult|    Formatted Geometry Valid}}&lt;br /&gt;
:{{cmdresult|    Reported Geometry Valid              yes}}&lt;br /&gt;
:{{cmdresult| beer.reported_cylinders: 16383}}&lt;br /&gt;
:{{cmdresult| beer.reported_heads: 16}}&lt;br /&gt;
:{{cmdresult| beer.reported_sectors: 63}}&lt;br /&gt;
:{{cmdresult| beer.reported_bytes_sector: 512}}&lt;br /&gt;
:{{cmdresult| beer.reported_sectors_device: 117210240}}&lt;br /&gt;
:{{cmdresult| beer.formatted_cylinders: 16383}}&lt;br /&gt;
:{{cmdresult| beer.formatted_heads: 16}}&lt;br /&gt;
:{{cmdresult| beer.formatted_sectors: 63}}&lt;br /&gt;
:{{cmdresult| beer.formatted_bytes_sector: 512}}&lt;br /&gt;
:{{cmdresult| beer.formatted_sectors_device: 117210240}}&lt;br /&gt;
:{{cmdresult| year: 2004}}&lt;br /&gt;
:{{cmdresult| day: 313}}&lt;br /&gt;
:{{cmdresult| beer.timestamp: 1426063684}}&lt;br /&gt;
:{{cmdresult| beer.device_index: 0x80}}&lt;br /&gt;
:{{cmdresult| beer.hpa_start: 110194034}}&lt;br /&gt;
:{{cmdresult| beer.boot_code_address: 117002545}}&lt;br /&gt;
:{{cmdresult| beer.num_entries: 8}}&lt;br /&gt;
:{{cmdresult| beer.dir_length: 64}}&lt;br /&gt;
:{{cmdresult| beer.revision: 0}}&lt;br /&gt;
:{{cmdresult| dev_name: HTS726060M9AT00}}&lt;br /&gt;
:{{cmdresult| beer.checksum: -26982}}&lt;br /&gt;
:{{cmdresult| dos[0].flags: 3}}&lt;br /&gt;
:{{cmdresult|    Service area is available as B:}}&lt;br /&gt;
:{{cmdresult|    Diagnostic Service:}}&lt;br /&gt;
:{{cmdresult|    Service Area is Read Only:}}&lt;br /&gt;
:{{cmdresult|    This Boot:}}&lt;br /&gt;
:{{cmdresult|    Empty Service Area:}}&lt;br /&gt;
:{{cmdresult|    Hidden Service Area:                 yes}}&lt;br /&gt;
:{{cmdresult|    Service Area is bootable as A:       yes}}&lt;br /&gt;
:{{cmdresult| dos[0].service_area_start: 117005431}}&lt;br /&gt;
:{{cmdresult| dos[0].service_area_size: 204800}}&lt;br /&gt;
:{{cmdresult| dos[0].load_sectors: 1}}&lt;br /&gt;
:{{cmdresult| dos[0].load_address: 0x7:C000}}&lt;br /&gt;
:{{cmdresult| dos[0].service_area_id: 0}}&lt;br /&gt;
:{{cmdresult| dos[0] id_str: FirstWare Reserved Area}}&lt;br /&gt;
:{{cmdresult| dos[0].checksum: -22271}}&lt;br /&gt;
:{{cmdresult| [...]}}&lt;br /&gt;
&lt;br /&gt;
Very rough code. Send me an e-mail (at the address found at my user page) if you want a (GPL'd) copy, but only if you're willing to test and improve the code.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 01:15, 24 January 2006 (CET)&lt;br /&gt;
&lt;br /&gt;
== SET MAX Security Extensions ==&lt;br /&gt;
&lt;br /&gt;
I've hacked Andries Brouwer's setmax tool (see: Google) to support the SET MAX security extensions (SET MAX SET PASSWORD, SET MAX LOCK, SET MAX UNLOCK, SET MAX FREEZE). Very rough code once again. Mail me if you're willing to brick your HDD.&lt;br /&gt;
&lt;br /&gt;
A few random observations:&lt;br /&gt;
&lt;br /&gt;
- secure mode: the Phoenix BIOS probably sets a SET MAX password in the HDD, does a non-volatile SET MAX and LOCKs (or FREEZEs) the HDD.&lt;br /&gt;
&lt;br /&gt;
- normal mode: the Phoenix BIOS might set a SET MAX password in the HDD, does a (volatile?) SET MAX but does not LOCK the HDD. The HDD will accept another SET MAX, a new SET MAX SET PASSWORD, etc.&lt;br /&gt;
&lt;br /&gt;
- normal mode: Linux 2.6.x disables the HPA in normal mode (by doing a volatile SET MAX to maximum native address). After a suspend the HDD reenables the HPA (by returning to the latest non-volatile value of SET MAX). It thus treats the suspend cycle as a power cycle (it also discards a SET MAX password, unlocks or unfreezes the HPA etc). I'm not sure whether that is a correct implementation of the ATA spec. (The HDD doesn't do this in secure mode. I would like to know how the Phoenix BIOS and/or Hitachi HDD people have managed this.) &lt;br /&gt;
&lt;br /&gt;
This can lead to some problems if a partition ends within the limits of the HPA (which is then actually (partly) overwritten by that partition). Maybe the best solution would be to have the kernel do a non-volatile SET MAX to the native maximum address. Then a resume from suspend will in effect not reenable the HPA.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 01:40, 20 February 2006 (CET)&lt;br /&gt;
&lt;br /&gt;
== hpafs ==&lt;br /&gt;
&lt;br /&gt;
I've written a (read only) FUSE for the hpa: hpafs. Alpha quality at best. Mail me if you'd like to test it, hack on it. Now about 1100 LOC. The binary is a mere 33 KB (this is with debugging symbols). Rather i386 centric. &lt;br /&gt;
&lt;br /&gt;
hpafs will only work if the Predesktop Area is disabled (but that is more or less obvious). It basically turns each PSA into a file:&lt;br /&gt;
&lt;br /&gt;
$ ll /mnt/hpa/&lt;br /&gt;
total 0&lt;br /&gt;
-r--r--r--  1 root root    2097152 Jan  1  1970 BIOSWORKAREA&lt;br /&gt;
-r--r--r--  1 root root    7710720 Jan  1  1970 Create Diagnostic Diskettes&lt;br /&gt;
-r--r--r--  1 root root  104857600 Jan  1  1970 FirstWare Reserved Area&lt;br /&gt;
-r--r--r--  1 root root    7710720 Jan  1  1970 Rec Boot&lt;br /&gt;
-r--r--r--  1 root root 3459252224 Jan  1  1970 Rec Data&lt;br /&gt;
-r--r--r--  1 root root    1476096 Jan  1  1970 Restore from backup&lt;br /&gt;
-r--r--r--  1 root root    7710720 Jan  1  1970 Run Diagnostics&lt;br /&gt;
-r--r--r--  1 root root    1477632 Jan  1  1970 SIGHT&lt;br /&gt;
&lt;br /&gt;
This FUSE file can easily be copied with basic GNU tools (cat, dd, etc). Even more fun is to loop mount such a FUSE file (if the corresponding PSA is a bootable image). Then the PSA is a (read only) part of your mounted filesystems. So now you do not need to use dd on /dev/hda to copy the Predesktop Area: you can just mount it!&lt;br /&gt;
&lt;br /&gt;
$ sudo mount -o loop,ro,users  /mnt/hpa/Rec\ Data /mnt/tmp&lt;br /&gt;
Password:&lt;br /&gt;
$ ll /mnt/tmp/&lt;br /&gt;
total 1454&lt;br /&gt;
-rwxr-xr-x  1 root root      64 Sep 27  2002 bootcat.bin&lt;br /&gt;
-rwxr-xr-x  1 root root 1474560 Oct  3  2002 bootimg.bin&lt;br /&gt;
drwxr-xr-x  2 root root    2048 Mar 13  2004 country&lt;br /&gt;
drwxr-xr-x  2 root root    2048 Mar 13  2004 ibmwork&lt;br /&gt;
drwxr-xr-x  3 root root    8192 Mar 13  2004 recovery&lt;br /&gt;
&lt;br /&gt;
To be continued ...&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 00:56, 2 March 2006 (CET)&lt;/div&gt;</summary>
		<author><name>Pebolle</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Talk:Predesktop_Area&amp;diff=20490</id>
		<title>Talk:Predesktop Area</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Talk:Predesktop_Area&amp;diff=20490"/>
		<updated>2006-03-01T23:36:22Z</updated>

		<summary type="html">&lt;p&gt;Pebolle: hpafs: works!&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Use the HPA for GNU/Linux?==&lt;br /&gt;
More interesting than removing the HPA (which includes a.o. Acces IBM Predesktop Area, some other tools and a backup of the pre-installed OS) would be to use this area for GNU/Linux too. At least, removing the HPA only saves 3,5 GB on my 60 GB hard disk. It would be worth a try to see whether the backup of the pre-installed OS on the largest PSA could be replaced by a backup of your favourite GNU/Linux distribution.&lt;br /&gt;
&lt;br /&gt;
Elaborating on my ideas a few days later, I'd guess the following could be tried:&lt;br /&gt;
* see whether GRUB can be made to boot the Access IBM Predekstop Area (I guess by &amp;quot;chainloading&amp;quot; the bootsector of its PSA). Right now GRUB refuses to load sectors outside the partioned area. I've got absolutely no idea if it's possible to write a hack to overcome that restriction. Need to contact the GRUB people about that ...&lt;br /&gt;
* write some userspace tools for the HPA/the SPAs (things like: dumpbeer, printDoS).&lt;br /&gt;
&lt;br /&gt;
It should be clear these are basically random ideas. Still feedback would be appreciated ...&lt;br /&gt;
----&lt;br /&gt;
Hei,&lt;br /&gt;
&lt;br /&gt;
interesting ideas, but i'd only see a point in it if one could keep Win and Linux rescue stuff in the HPA. That means it would need to be expandable or fit the stuff for both systems.&lt;br /&gt;
[[User:Wyrfel|Wyrfel]] 20:03, 15 Mar 2005 (CET)&lt;br /&gt;
----&lt;br /&gt;
Thanks.&lt;br /&gt;
&lt;br /&gt;
Short answer: that should be possible.&lt;br /&gt;
&lt;br /&gt;
Long answer: I see little in the specs (as I understand them now) to stop one from adding (say) an extra 3 GB GNU/Linux-rescue PSA or something like that. We might try to do that first by changing the BEER and DoS manually. (Not sure whether Phoenix added some proprietary stuff to keep you from booting it. The PSA should always be accesable with the proper BIOS setting.) It might be mandatory to put it on a FAT filesystem. The hard part probably is to have it show up in the Access IBM Predesktop Area. (My guess is you need to regenerate the FirstSight &amp;quot;graphical shell&amp;quot;. If that's correct we probably only can use the FirstWare tools &amp;quot;hidden&amp;quot; on their little PSA. That's no fun. Well it might a little fun if we try FreeDOS). &lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle (not logged in)]]&lt;br /&gt;
----&lt;br /&gt;
Update: a trivial patch to grub allows it to also work outside the partioned area:&lt;br /&gt;
&lt;br /&gt;
 --- /var/tmp/rpm/BUILD/grub-0.95/stage2/disk_io.c.oud   2004-05-23 18:35:24.000000000 +0200&lt;br /&gt;
 +++ /var/tmp/rpm/BUILD/grub-0.95/stage2/disk_io.c       2005-03-18 22:38:30.050907408 +0100&lt;br /&gt;
 @@ -297,8 +297,8 @@&lt;br /&gt;
     *  Check partition boundaries&lt;br /&gt;
     */&lt;br /&gt;
    if (sector &amp;lt; 0&lt;br /&gt;
 -      || ((sector + ((byte_offset + byte_len - 1) &amp;gt;&amp;gt; SECTOR_BITS))&lt;br /&gt;
 -         &amp;gt;= part_length))&lt;br /&gt;
 +      /*|| ((sector + ((byte_offset + byte_len - 1) &amp;gt;&amp;gt; SECTOR_BITS))&lt;br /&gt;
 +         &amp;gt;= part_length)*/)&lt;br /&gt;
      {&lt;br /&gt;
        errnum = ERR_OUTSIDE_PART;&lt;br /&gt;
        return 0;&lt;br /&gt;
&lt;br /&gt;
I made a grub CD with a grub patched with the above. Now I can &amp;quot;cat&amp;quot; the bootsector of the Predesktop Area from the grub shell (when booting of that grub CD). But I haven't yet managed to boot the Predesktop Area (dangerous stuff!) To be continued ...&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] Fri Mar 18 22:42:43 CET 2005&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I've been playing around with the predesktop area tonight.  I was simply trying to just leave the diagnostics stuff and remove the windows part.  I wrote some programs to read/write the BEER data and stuff, but I wasn't able to get the system to boot it, it kept erroring &amp;quot;Authentication of System Services failed&amp;quot; (or something along those lines).  I will play around with this some more later&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[User:Invisi|Tim Nordell]]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A quick look with a hexeditor gave me two instances of &amp;quot;Application authentication has failed!&amp;quot; in the FirstSight application. Does that sound familair? &lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] Fri Apr 1 19:35:30 CEST 2005&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Actually it wasn't that.  I did a search of that too, the message itself was not in the predesktop area at all.  What also is interesting is the fw*.exe utilities for manipulating the predesktop area, contains the string &amp;quot;MD5&amp;quot; which makes me wonder if there is an md5 hash of each &amp;quot;predesktop&amp;quot; partition.  I know on the IBM whitepaper it states there being a signature so that non-signed applications can not be run.  Could a simple &amp;quot;md5&amp;quot; be the signature?&lt;br /&gt;
&lt;br /&gt;
[[User:Invisi|Tim Nordell]] 12:01, 3 Apr 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*What is it that you were trying to do (what did trigger the error you saw)?&lt;br /&gt;
&lt;br /&gt;
*About ten of the fw*.exe utilities contain the phrase &amp;quot;MD5 Checksums do not match&amp;quot;. So they could very well be using MD5 sums for some sort of validation. But they could use the MD5 sums in a lot of ways actually, so I won't yet speculate ...&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] Sun Apr  3 15:11:10 CEST 2005&lt;br /&gt;
&lt;br /&gt;
== Predesktop Area ==&lt;br /&gt;
&lt;br /&gt;
I made a program that takes the BEER record at the end, parses it out to a &amp;quot;.cfg&amp;quot; file, lets you modify it, recalibrate the start spots for the records, and write it out to disk again.  It doesn't directly access hda, 'cept for reading the original beer record.  It makes a script file to go with the files you have, to read in the HPA data, and to write it out again with the new record.&lt;br /&gt;
&lt;br /&gt;
Anyways, I tried simply removing the last record from the BEER, which is the windows recovery partition.  It didn't like that.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Did you update the two's complement checksum at the end of the BEER?&lt;br /&gt;
&lt;br /&gt;
[[user:Pebolle|Paul Bolle]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Yep, I updated that.  If I don't update that, it doesn't even say that failed message.  I also made a seperate program to update the checksum so you can also modify the beer record by hand with a hex editor and have valid checksums.&lt;br /&gt;
&lt;br /&gt;
== Linux kernel support ==&lt;br /&gt;
{{Todo|research and add to article}}&lt;br /&gt;
* Add a section on dmesg and hdparm -I output:&lt;br /&gt;
 (...)&lt;br /&gt;
 Commands/features:&lt;br /&gt;
        Enabled Supported:&lt;br /&gt;
 (...)&lt;br /&gt;
           *    Host Protected Area feature set&lt;br /&gt;
 (...)&lt;br /&gt;
                SET MAX security extension&lt;br /&gt;
                Address Offset Reserved Area Boot&lt;br /&gt;
 (...)&lt;br /&gt;
&lt;br /&gt;
* Recent (2.6.10 and up?) kernels disable HPAs automatically (in drivers/ide/ide-disk.c). Dmesg example:&lt;br /&gt;
&lt;br /&gt;
 hda: Host Protected Area detected.&lt;br /&gt;
        current capacity is 110194034 sectors (56419 MB)&lt;br /&gt;
         native  capacity is 117210240 sectors (60011 MB)&lt;br /&gt;
 hda: Host Protected Area disabled.&lt;br /&gt;
&lt;br /&gt;
This should be (further researched and) added to this section (maybe with some pointers to the unexpected consequences of this new approach ...)&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 22:06, 6 Sep 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
* SRCMOS24.EXE&lt;br /&gt;
&lt;br /&gt;
In the PSA used by the Predesktop Area I found a &amp;quot;hidden&amp;quot; executable: SRCMOS24.EXE (it is not mentioned in the FAT). This executable can capture and update CMOS data. It might only be used by the FirstSight program to display (part of) the BIOS info. It might be nice to see what it can do and if similar things are possible under GNU/Linux.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 22:01, 7 Sep 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
== Newer thinkpads don't use Phoenix Firstware? ==&lt;br /&gt;
&lt;br /&gt;
On my T42 that arrived yesterday, the predesktop area looks a lot like MS Windows. The widget set, the fonts, even the boot sequence looks exactly like Windows 2000. Debian-installer indentified it as &amp;quot;Microsoft Windows NT/2000/XP&amp;quot;, while it identified my XP partition as &amp;quot;Microsoft Windows XP Professional&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Has Lenovo/IBM changed their system, or is this Phoenix stuff really just Windows?&lt;br /&gt;
&lt;br /&gt;
-- [[Evan.Heidtmann]]&lt;br /&gt;
&lt;br /&gt;
Evan,&lt;br /&gt;
&lt;br /&gt;
Could it be that you're talking about the preinstalled version of Windows here? As far as I know (using information to be found on the internet, not personal research) the preinstalled OS will reformat its partition from FAT32 to NTFS at first boot. That could explain the difference in the identification by the Debian installer (which I never really used).&lt;br /&gt;
&lt;br /&gt;
Moreover the Predesktop Area is part of the HPA and the HPA is not an partition. It seems unlikely that the Debain installer notices the HPA. As far as I know there are at present no GNU/Linux tools with a (useful) support of HPAs.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 15:43, 4 Aug 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
My T42P (model 2373HSG) is using a cut-down version of Windows XP as the pre-desktop area.  I'm not sure whether it's a special IBM thing or just a [http://www.microsoft.com/licensing/programs/sa/benefits/winpe.mspx Windows PE] (preinstallation environment) setup.  It includes Java and Python, which are used by some of the IBM tools, and the Opera web browser.&lt;br /&gt;
&lt;br /&gt;
It's no longer an HPA but a 487MB hidden FAT32 called IBM_SERVICE located at the end of the disk.&lt;br /&gt;
&lt;br /&gt;
--[[User:Korourke|Korourke]]&lt;br /&gt;
&lt;br /&gt;
== Rescue and Recovery via grub? ==&lt;br /&gt;
&lt;br /&gt;
Did anyone get the Rescue and Recovery partition to boot via grub on recent models? On a T43 with&lt;br /&gt;
 rootnoverify (hd0,1)&lt;br /&gt;
 chainloader +1&lt;br /&gt;
the Rescue and Recovery partition starts booting nicely and then, a few seconds in the R&amp;amp;R loading sequence, chokes with a &lt;br /&gt;
 STOP: c000021a {Fatal System Error}&lt;br /&gt;
 The Session Manager Initialization system process terminated unexpectedly with a status of 0xc000003a (0x00000000 0x00000000).&lt;br /&gt;
 The system has been shut down. &lt;br /&gt;
The problem started right after installing grub into the MBR (I couldn't get the preinstalled MBR to boot grub from an active primary partition). It seems oblivious to the Predesktop BIOS setting.&lt;br /&gt;
&lt;br /&gt;
The same problem has been reported by others with other models (for example [http://forums.fedoraforum.org/archive/index.php/t-19433.html here] for a T42).&lt;br /&gt;
&lt;br /&gt;
[[User:Thinker|Thinker]] 11:35, 30 Sep 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
Your &amp;quot;Rescue and Recovery partition&amp;quot; seems not to be a HPA (which isn't a partition). Maybe we should open a new page for that system.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 21:54, 30 Sep 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
It may very well not be an HPA , but the BIOS stil calls it a &amp;quot;Predesktop Area&amp;quot;. Anyway, the partition is actually a VFAT partition (even though it has type 0x12, &amp;quot;Compaq Diagnostics&amp;quot;). It seems to boot into PC-DOS (using {{path|NTDETECT.EXE}} so it looks like Windows startup) and then its {{path|AUTOEXEC.BAT}} runs a fancy GUI.&lt;br /&gt;
--[[User:Thinker|Thinker]] 23:31, 30 Sep 2005 (CEST)&lt;br /&gt;
----&lt;br /&gt;
Right, there has been a lot of confusion about this, we should have a separate page. Introduced an edit link (called Rescue and Recovery) on the [[ThinkPad Technologies]] page for that purpose.&lt;br /&gt;
&lt;br /&gt;
== Suggestions for projects ==&lt;br /&gt;
&lt;br /&gt;
I'd guess it would be rather nice to have GNU/Linux tools (like sfdisk and parted) HPA aware. The most urgent change would be to have those programs at least recognize and respect a HPA (e.g.: do not write in or otherwise use the HPA area; unless the user gives a --force option or something similar).&lt;br /&gt;
&lt;br /&gt;
As for now, I realize I caused this error: ENOPATCH.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 22:56, 5 Nov 2005 (CET)&lt;br /&gt;
&lt;br /&gt;
== Keeping functionality of the blue AccessIBM button ==&lt;br /&gt;
&lt;br /&gt;
Somebody figured out [http://sharadware.com/2005/07/11/suse-linux-winxp-access-ibm-on-the-thinkpad-t43/|how to keep the AccessIBM functionality] when installing Linux, quite easy fix. How come nobody thought about it before? :)&lt;br /&gt;
(link got from [[Installing_Ubuntu_5.04_on_a_ThinkPad_T43_%281875%29 here]])&lt;br /&gt;
&lt;br /&gt;
--[[User:Micampe|Micampe]] 17:39, 9 Dec 2005 (CET)&lt;br /&gt;
&lt;br /&gt;
The relevant part of that page:&lt;br /&gt;
&lt;br /&gt;
''Set the IBM Predesktop Area (in the BIOS) to â€œSecureâ€. Boot using the SUSE DVD. Shrink the Windows partition as required. Follow the instructions and go through the regular installation process. Create a primary partition for /boot (the other stuff can go into the extended partitions) and when the time comes to install GRUB (you do prefer GRUB to LILO, donâ€™t you?), make sure you install it into the boot sector of the boot partition. Set this partition as active. Leave the MBR alone.''&lt;br /&gt;
&lt;br /&gt;
That's the first thing I tried on my T43. Didn't work: setting the active partition to /boot had no effect, it was still booting the first (Windows) partition. So I had to install Grub into MBR, thereby killing R&amp;amp;R. Anyway, there's another solution in the article page (didn't try it since I saw it only after purging my R&amp;amp;R partition).&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
--[[User:Thinker|Thinker]] 19:18, 9 Dec 2005 (CET)&lt;br /&gt;
&lt;br /&gt;
== Parsing the HPA information (BEER/DOS) ==&lt;br /&gt;
&lt;br /&gt;
I too have been writing a program to parse the BEER and DOS info. Sample output:&lt;br /&gt;
:{{cmdresult| beer.signature: 0xBEEF}}&lt;br /&gt;
:{{cmdresult| beer.size: 128}}&lt;br /&gt;
:{{cmdresult| beer.flags: 41}}&lt;br /&gt;
:{{cmdresult|    Read Only:}}&lt;br /&gt;
:{{cmdresult|    Generated Record:}}&lt;br /&gt;
:{{cmdresult|    Use Reserved Area Boot Code Address: yes}}&lt;br /&gt;
:{{cmdresult|    Configuration Time Stamp is valid:}}&lt;br /&gt;
:{{cmdresult|    Device Supports LBA:                 yes}}&lt;br /&gt;
:{{cmdresult|    Directory of Services is Present}}&lt;br /&gt;
:{{cmdresult|    Formatted Geometry Valid}}&lt;br /&gt;
:{{cmdresult|    Reported Geometry Valid              yes}}&lt;br /&gt;
:{{cmdresult| beer.reported_cylinders: 16383}}&lt;br /&gt;
:{{cmdresult| beer.reported_heads: 16}}&lt;br /&gt;
:{{cmdresult| beer.reported_sectors: 63}}&lt;br /&gt;
:{{cmdresult| beer.reported_bytes_sector: 512}}&lt;br /&gt;
:{{cmdresult| beer.reported_sectors_device: 117210240}}&lt;br /&gt;
:{{cmdresult| beer.formatted_cylinders: 16383}}&lt;br /&gt;
:{{cmdresult| beer.formatted_heads: 16}}&lt;br /&gt;
:{{cmdresult| beer.formatted_sectors: 63}}&lt;br /&gt;
:{{cmdresult| beer.formatted_bytes_sector: 512}}&lt;br /&gt;
:{{cmdresult| beer.formatted_sectors_device: 117210240}}&lt;br /&gt;
:{{cmdresult| year: 2004}}&lt;br /&gt;
:{{cmdresult| day: 313}}&lt;br /&gt;
:{{cmdresult| beer.timestamp: 1426063684}}&lt;br /&gt;
:{{cmdresult| beer.device_index: 0x80}}&lt;br /&gt;
:{{cmdresult| beer.hpa_start: 110194034}}&lt;br /&gt;
:{{cmdresult| beer.boot_code_address: 117002545}}&lt;br /&gt;
:{{cmdresult| beer.num_entries: 8}}&lt;br /&gt;
:{{cmdresult| beer.dir_length: 64}}&lt;br /&gt;
:{{cmdresult| beer.revision: 0}}&lt;br /&gt;
:{{cmdresult| dev_name: HTS726060M9AT00}}&lt;br /&gt;
:{{cmdresult| beer.checksum: -26982}}&lt;br /&gt;
:{{cmdresult| dos[0].flags: 3}}&lt;br /&gt;
:{{cmdresult|    Service area is available as B:}}&lt;br /&gt;
:{{cmdresult|    Diagnostic Service:}}&lt;br /&gt;
:{{cmdresult|    Service Area is Read Only:}}&lt;br /&gt;
:{{cmdresult|    This Boot:}}&lt;br /&gt;
:{{cmdresult|    Empty Service Area:}}&lt;br /&gt;
:{{cmdresult|    Hidden Service Area:                 yes}}&lt;br /&gt;
:{{cmdresult|    Service Area is bootable as A:       yes}}&lt;br /&gt;
:{{cmdresult| dos[0].service_area_start: 117005431}}&lt;br /&gt;
:{{cmdresult| dos[0].service_area_size: 204800}}&lt;br /&gt;
:{{cmdresult| dos[0].load_sectors: 1}}&lt;br /&gt;
:{{cmdresult| dos[0].load_address: 0x7:C000}}&lt;br /&gt;
:{{cmdresult| dos[0].service_area_id: 0}}&lt;br /&gt;
:{{cmdresult| dos[0] id_str: FirstWare Reserved Area}}&lt;br /&gt;
:{{cmdresult| dos[0].checksum: -22271}}&lt;br /&gt;
:{{cmdresult| [...]}}&lt;br /&gt;
&lt;br /&gt;
Very rough code. Send me an e-mail (at the address found at my user page) if you want a (GPL'd) copy, but only if you're willing to test and improve the code.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 01:15, 24 January 2006 (CET)&lt;br /&gt;
&lt;br /&gt;
== SET MAX Security Extensions ==&lt;br /&gt;
&lt;br /&gt;
I've hacked Andries Brouwer's setmax tool (see: Google) to support the SET MAX security extensions (SET MAX SET PASSWORD, SET MAX LOCK, SET MAX UNLOCK, SET MAX FREEZE). Very rough code once again. Mail me if you're willing to brick your HDD.&lt;br /&gt;
&lt;br /&gt;
A few random observations:&lt;br /&gt;
&lt;br /&gt;
- secure mode: the Phoenix BIOS probably sets a SET MAX password in the HDD, does a non-volatile SET MAX and LOCKs (or FREEZEs) the HDD.&lt;br /&gt;
&lt;br /&gt;
- normal mode: the Phoenix BIOS might set a SET MAX password in the HDD, does a (volatile?) SET MAX but does not LOCK the HDD. The HDD will accept another SET MAX, a new SET MAX SET PASSWORD, etc.&lt;br /&gt;
&lt;br /&gt;
- normal mode: Linux 2.6.x disables the HPA in normal mode (by doing a volatile SET MAX to maximum native address). After a suspend the HDD reenables the HPA (by returning to the latest non-volatile value of SET MAX). It thus treats the suspend cycle as a power cycle (it also discards a SET MAX password, unlocks or unfreezes the HPA etc). I'm not sure whether that is a correct implementation of the ATA spec. (The HDD doesn't do this in secure mode. I would like to know how the Phoenix BIOS and/or Hitachi HDD people have managed this.) &lt;br /&gt;
&lt;br /&gt;
This can lead to some problems if a partition ends within the limits of the HPA (which is then actually (partly) overwritten by that partition). Maybe the best solution would be to have the kernel do a non-volatile SET MAX to the native maximum address. Then a resume from suspend will in effect not reenable the HPA.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 01:40, 20 February 2006 (CET)&lt;/div&gt;</summary>
		<author><name>Pebolle</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Talk:Predesktop_Area&amp;diff=20257</id>
		<title>Talk:Predesktop Area</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Talk:Predesktop_Area&amp;diff=20257"/>
		<updated>2006-02-20T22:32:59Z</updated>

		<summary type="html">&lt;p&gt;Pebolle: minor clarifications, typos&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Use the HPA for GNU/Linux?==&lt;br /&gt;
More interesting than removing the HPA (which includes a.o. Acces IBM Predesktop Area, some other tools and a backup of the pre-installed OS) would be to use this area for GNU/Linux too. At least, removing the HPA only saves 3,5 GB on my 60 GB hard disk. It would be worth a try to see whether the backup of the pre-installed OS on the largest PSA could be replaced by a backup of your favourite GNU/Linux distribution.&lt;br /&gt;
&lt;br /&gt;
Elaborating on my ideas a few days later, I'd guess the following could be tried:&lt;br /&gt;
* see whether GRUB can be made to boot the Access IBM Predekstop Area (I guess by &amp;quot;chainloading&amp;quot; the bootsector of its PSA). Right now GRUB refuses to load sectors outside the partioned area. I've got absolutely no idea if it's possible to write a hack to overcome that restriction. Need to contact the GRUB people about that ...&lt;br /&gt;
* write a HPA or SPA driver. That driver should provide something like &amp;quot;/dev/hpa&amp;quot;, &amp;quot;/dev/hpa0&amp;quot;, etc or &amp;quot;/dev/spa&amp;quot;, &amp;quot;/dev/spa0&amp;quot;, whatever. The idea here is that it allows you to simply mount (ro!) the Hidden Protected Area (given the correct BIOS settings). Probably just an addaption of the current drivers for (IDE?) harddisks. (This might mean &amp;quot;/dev/hda&amp;quot; and &amp;quot;/dev/hpa&amp;quot; overlap: dangerous?) That would probably need - way - more coding skills than I have ...&lt;br /&gt;
* probably much easier would be to write a FUSE for the HPA: hpafs.&lt;br /&gt;
* write some userspace tools for the HPA/the SPAs (things like: dumpbeer, printDoS).&lt;br /&gt;
&lt;br /&gt;
It should be clear these are basically random ideas. Still feedback would be appreciated ...&lt;br /&gt;
----&lt;br /&gt;
Hei,&lt;br /&gt;
&lt;br /&gt;
interesting ideas, but i'd only see a point in it if one could keep Win and Linux rescue stuff in the HPA. That means it would need to be expandable or fit the stuff for both systems.&lt;br /&gt;
[[User:Wyrfel|Wyrfel]] 20:03, 15 Mar 2005 (CET)&lt;br /&gt;
----&lt;br /&gt;
Thanks.&lt;br /&gt;
&lt;br /&gt;
Short answer: that should be possible.&lt;br /&gt;
&lt;br /&gt;
Long answer: I see little in the specs (as I understand them now) to stop one from adding (say) an extra 3 GB GNU/Linux-rescue PSA or something like that. We might try to do that first by changing the BEER and DoS manually. (Not sure whether Phoenix added some proprietary stuff to keep you from booting it. The PSA should always be accesable with the proper BIOS setting.) It might be mandatory to put it on a FAT filesystem. The hard part probably is to have it show up in the Access IBM Predesktop Area. (My guess is you need to regenerate the FirstSight &amp;quot;graphical shell&amp;quot;. If that's correct we probably only can use the FirstWare tools &amp;quot;hidden&amp;quot; on their little PSA. That's no fun. Well it might a little fun if we try FreeDOS). &lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle (not logged in)]]&lt;br /&gt;
----&lt;br /&gt;
Update: a trivial patch to grub allows it to also work outside the partioned area:&lt;br /&gt;
&lt;br /&gt;
 --- /var/tmp/rpm/BUILD/grub-0.95/stage2/disk_io.c.oud   2004-05-23 18:35:24.000000000 +0200&lt;br /&gt;
 +++ /var/tmp/rpm/BUILD/grub-0.95/stage2/disk_io.c       2005-03-18 22:38:30.050907408 +0100&lt;br /&gt;
 @@ -297,8 +297,8 @@&lt;br /&gt;
     *  Check partition boundaries&lt;br /&gt;
     */&lt;br /&gt;
    if (sector &amp;lt; 0&lt;br /&gt;
 -      || ((sector + ((byte_offset + byte_len - 1) &amp;gt;&amp;gt; SECTOR_BITS))&lt;br /&gt;
 -         &amp;gt;= part_length))&lt;br /&gt;
 +      /*|| ((sector + ((byte_offset + byte_len - 1) &amp;gt;&amp;gt; SECTOR_BITS))&lt;br /&gt;
 +         &amp;gt;= part_length)*/)&lt;br /&gt;
      {&lt;br /&gt;
        errnum = ERR_OUTSIDE_PART;&lt;br /&gt;
        return 0;&lt;br /&gt;
&lt;br /&gt;
I made a grub CD with a grub patched with the above. Now I can &amp;quot;cat&amp;quot; the bootsector of the Predesktop Area from the grub shell (when booting of that grub CD). But I haven't yet managed to boot the Predesktop Area (dangerous stuff!) To be continued ...&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] Fri Mar 18 22:42:43 CET 2005&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I've been playing around with the predesktop area tonight.  I was simply trying to just leave the diagnostics stuff and remove the windows part.  I wrote some programs to read/write the BEER data and stuff, but I wasn't able to get the system to boot it, it kept erroring &amp;quot;Authentication of System Services failed&amp;quot; (or something along those lines).  I will play around with this some more later&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[User:Invisi|Tim Nordell]]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A quick look with a hexeditor gave me two instances of &amp;quot;Application authentication has failed!&amp;quot; in the FirstSight application. Does that sound familair? &lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] Fri Apr 1 19:35:30 CEST 2005&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Actually it wasn't that.  I did a search of that too, the message itself was not in the predesktop area at all.  What also is interesting is the fw*.exe utilities for manipulating the predesktop area, contains the string &amp;quot;MD5&amp;quot; which makes me wonder if there is an md5 hash of each &amp;quot;predesktop&amp;quot; partition.  I know on the IBM whitepaper it states there being a signature so that non-signed applications can not be run.  Could a simple &amp;quot;md5&amp;quot; be the signature?&lt;br /&gt;
&lt;br /&gt;
[[User:Invisi|Tim Nordell]] 12:01, 3 Apr 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*What is it that you were trying to do (what did trigger the error you saw)?&lt;br /&gt;
&lt;br /&gt;
*About ten of the fw*.exe utilities contain the phrase &amp;quot;MD5 Checksums do not match&amp;quot;. So they could very well be using MD5 sums for some sort of validation. But they could use the MD5 sums in a lot of ways actually, so I won't yet speculate ...&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] Sun Apr  3 15:11:10 CEST 2005&lt;br /&gt;
&lt;br /&gt;
== Predesktop Area ==&lt;br /&gt;
&lt;br /&gt;
I made a program that takes the BEER record at the end, parses it out to a &amp;quot;.cfg&amp;quot; file, lets you modify it, recalibrate the start spots for the records, and write it out to disk again.  It doesn't directly access hda, 'cept for reading the original beer record.  It makes a script file to go with the files you have, to read in the HPA data, and to write it out again with the new record.&lt;br /&gt;
&lt;br /&gt;
Anyways, I tried simply removing the last record from the BEER, which is the windows recovery partition.  It didn't like that.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Did you update the two's complement checksum at the end of the BEER?&lt;br /&gt;
&lt;br /&gt;
[[user:Pebolle|Paul Bolle]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Yep, I updated that.  If I don't update that, it doesn't even say that failed message.  I also made a seperate program to update the checksum so you can also modify the beer record by hand with a hex editor and have valid checksums.&lt;br /&gt;
&lt;br /&gt;
== Linux kernel support ==&lt;br /&gt;
{{Todo|research and add to article}}&lt;br /&gt;
* Add a section on dmesg and hdparm -I output:&lt;br /&gt;
 (...)&lt;br /&gt;
 Commands/features:&lt;br /&gt;
        Enabled Supported:&lt;br /&gt;
 (...)&lt;br /&gt;
           *    Host Protected Area feature set&lt;br /&gt;
 (...)&lt;br /&gt;
                SET MAX security extension&lt;br /&gt;
                Address Offset Reserved Area Boot&lt;br /&gt;
 (...)&lt;br /&gt;
&lt;br /&gt;
* Recent (2.6.10 and up?) kernels disable HPAs automatically (in drivers/ide/ide-disk.c). Dmesg example:&lt;br /&gt;
&lt;br /&gt;
 hda: Host Protected Area detected.&lt;br /&gt;
        current capacity is 110194034 sectors (56419 MB)&lt;br /&gt;
         native  capacity is 117210240 sectors (60011 MB)&lt;br /&gt;
 hda: Host Protected Area disabled.&lt;br /&gt;
&lt;br /&gt;
This should be (further researched and) added to this section (maybe with some pointers to the unexpected consequences of this new approach ...)&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 22:06, 6 Sep 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
* SRCMOS24.EXE&lt;br /&gt;
&lt;br /&gt;
In the PSA used by the Predesktop Area I found a &amp;quot;hidden&amp;quot; executable: SRCMOS24.EXE (it is not mentioned in the FAT). This executable can capture and update CMOS data. It might only be used by the FirstSight program to display (part of) the BIOS info. It might be nice to see what it can do and if similar things are possible under GNU/Linux.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 22:01, 7 Sep 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
== Newer thinkpads don't use Phoenix Firstware? ==&lt;br /&gt;
&lt;br /&gt;
On my T42 that arrived yesterday, the predesktop area looks a lot like MS Windows. The widget set, the fonts, even the boot sequence looks exactly like Windows 2000. Debian-installer indentified it as &amp;quot;Microsoft Windows NT/2000/XP&amp;quot;, while it identified my XP partition as &amp;quot;Microsoft Windows XP Professional&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Has Lenovo/IBM changed their system, or is this Phoenix stuff really just Windows?&lt;br /&gt;
&lt;br /&gt;
-- [[Evan.Heidtmann]]&lt;br /&gt;
&lt;br /&gt;
Evan,&lt;br /&gt;
&lt;br /&gt;
Could it be that you're talking about the preinstalled version of Windows here? As far as I know (using information to be found on the internet, not personal research) the preinstalled OS will reformat its partition from FAT32 to NTFS at first boot. That could explain the difference in the identification by the Debian installer (which I never really used).&lt;br /&gt;
&lt;br /&gt;
Moreover the Predesktop Area is part of the HPA and the HPA is not an partition. It seems unlikely that the Debain installer notices the HPA. As far as I know there are at present no GNU/Linux tools with a (useful) support of HPAs.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 15:43, 4 Aug 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
My T42P (model 2373HSG) is using a cut-down version of Windows XP as the pre-desktop area.  I'm not sure whether it's a special IBM thing or just a [http://www.microsoft.com/licensing/programs/sa/benefits/winpe.mspx Windows PE] (preinstallation environment) setup.  It includes Java and Python, which are used by some of the IBM tools, and the Opera web browser.&lt;br /&gt;
&lt;br /&gt;
It's no longer an HPA but a 487MB hidden FAT32 called IBM_SERVICE located at the end of the disk.&lt;br /&gt;
&lt;br /&gt;
--[[User:Korourke|Korourke]]&lt;br /&gt;
&lt;br /&gt;
== Rescue and Recovery via grub? ==&lt;br /&gt;
&lt;br /&gt;
Did anyone get the Rescue and Recovery partition to boot via grub on recent models? On a T43 with&lt;br /&gt;
 rootnoverify (hd0,1)&lt;br /&gt;
 chainloader +1&lt;br /&gt;
the Rescue and Recovery partition starts booting nicely and then, a few seconds in the R&amp;amp;R loading sequence, chokes with a &lt;br /&gt;
 STOP: c000021a {Fatal System Error}&lt;br /&gt;
 The Session Manager Initialization system process terminated unexpectedly with a status of 0xc000003a (0x00000000 0x00000000).&lt;br /&gt;
 The system has been shut down. &lt;br /&gt;
The problem started right after installing grub into the MBR (I couldn't get the preinstalled MBR to boot grub from an active primary partition). It seems oblivious to the Predesktop BIOS setting.&lt;br /&gt;
&lt;br /&gt;
The same problem has been reported by others with other models (for example [http://forums.fedoraforum.org/archive/index.php/t-19433.html here] for a T42).&lt;br /&gt;
&lt;br /&gt;
[[User:Thinker|Thinker]] 11:35, 30 Sep 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
Your &amp;quot;Rescue and Recovery partition&amp;quot; seems not to be a HPA (which isn't a partition). Maybe we should open a new page for that system.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 21:54, 30 Sep 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
It may very well not be an HPA , but the BIOS stil calls it a &amp;quot;Predesktop Area&amp;quot;. Anyway, the partition is actually a VFAT partition (even though it has type 0x12, &amp;quot;Compaq Diagnostics&amp;quot;). It seems to boot into PC-DOS (using {{path|NTDETECT.EXE}} so it looks like Windows startup) and then its {{path|AUTOEXEC.BAT}} runs a fancy GUI.&lt;br /&gt;
--[[User:Thinker|Thinker]] 23:31, 30 Sep 2005 (CEST)&lt;br /&gt;
----&lt;br /&gt;
Right, there has been a lot of confusion about this, we should have a separate page. Introduced an edit link (called Rescue and Recovery) on the [[ThinkPad Technologies]] page for that purpose.&lt;br /&gt;
&lt;br /&gt;
== Suggestions for projects ==&lt;br /&gt;
&lt;br /&gt;
I'd guess it would be rather nice to have GNU/Linux tools (like sfdisk and parted) HPA aware. The most urgent change would be to have those programs at least recognize and respect a HPA (e.g.: do not write in or otherwise use the HPA area; unless the user gives a --force option or something similar).&lt;br /&gt;
&lt;br /&gt;
As for now, I realize I caused this error: ENOPATCH.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 22:56, 5 Nov 2005 (CET)&lt;br /&gt;
&lt;br /&gt;
== Keeping functionality of the blue AccessIBM button ==&lt;br /&gt;
&lt;br /&gt;
Somebody figured out [http://sharadware.com/2005/07/11/suse-linux-winxp-access-ibm-on-the-thinkpad-t43/|how to keep the AccessIBM functionality] when installing Linux, quite easy fix. How come nobody thought about it before? :)&lt;br /&gt;
(link got from [[Installing_Ubuntu_5.04_on_a_ThinkPad_T43_%281875%29 here]])&lt;br /&gt;
&lt;br /&gt;
--[[User:Micampe|Micampe]] 17:39, 9 Dec 2005 (CET)&lt;br /&gt;
&lt;br /&gt;
The relevant part of that page:&lt;br /&gt;
&lt;br /&gt;
''Set the IBM Predesktop Area (in the BIOS) to â€œSecureâ€. Boot using the SUSE DVD. Shrink the Windows partition as required. Follow the instructions and go through the regular installation process. Create a primary partition for /boot (the other stuff can go into the extended partitions) and when the time comes to install GRUB (you do prefer GRUB to LILO, donâ€™t you?), make sure you install it into the boot sector of the boot partition. Set this partition as active. Leave the MBR alone.''&lt;br /&gt;
&lt;br /&gt;
That's the first thing I tried on my T43. Didn't work: setting the active partition to /boot had no effect, it was still booting the first (Windows) partition. So I had to install Grub into MBR, thereby killing R&amp;amp;R. Anyway, there's another solution in the article page (didn't try it since I saw it only after purging my R&amp;amp;R partition).&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
--[[User:Thinker|Thinker]] 19:18, 9 Dec 2005 (CET)&lt;br /&gt;
&lt;br /&gt;
== Parsing the HPA information (BEER/DOS) ==&lt;br /&gt;
&lt;br /&gt;
I too have been writing a program to parse the BEER and DOS info. Sample output:&lt;br /&gt;
:{{cmdresult| beer.signature: 0xBEEF}}&lt;br /&gt;
:{{cmdresult| beer.size: 128}}&lt;br /&gt;
:{{cmdresult| beer.flags: 41}}&lt;br /&gt;
:{{cmdresult|    Read Only:}}&lt;br /&gt;
:{{cmdresult|    Generated Record:}}&lt;br /&gt;
:{{cmdresult|    Use Reserved Area Boot Code Address: yes}}&lt;br /&gt;
:{{cmdresult|    Configuration Time Stamp is valid:}}&lt;br /&gt;
:{{cmdresult|    Device Supports LBA:                 yes}}&lt;br /&gt;
:{{cmdresult|    Directory of Services is Present}}&lt;br /&gt;
:{{cmdresult|    Formatted Geometry Valid}}&lt;br /&gt;
:{{cmdresult|    Reported Geometry Valid              yes}}&lt;br /&gt;
:{{cmdresult| beer.reported_cylinders: 16383}}&lt;br /&gt;
:{{cmdresult| beer.reported_heads: 16}}&lt;br /&gt;
:{{cmdresult| beer.reported_sectors: 63}}&lt;br /&gt;
:{{cmdresult| beer.reported_bytes_sector: 512}}&lt;br /&gt;
:{{cmdresult| beer.reported_sectors_device: 117210240}}&lt;br /&gt;
:{{cmdresult| beer.formatted_cylinders: 16383}}&lt;br /&gt;
:{{cmdresult| beer.formatted_heads: 16}}&lt;br /&gt;
:{{cmdresult| beer.formatted_sectors: 63}}&lt;br /&gt;
:{{cmdresult| beer.formatted_bytes_sector: 512}}&lt;br /&gt;
:{{cmdresult| beer.formatted_sectors_device: 117210240}}&lt;br /&gt;
:{{cmdresult| year: 2004}}&lt;br /&gt;
:{{cmdresult| day: 313}}&lt;br /&gt;
:{{cmdresult| beer.timestamp: 1426063684}}&lt;br /&gt;
:{{cmdresult| beer.device_index: 0x80}}&lt;br /&gt;
:{{cmdresult| beer.hpa_start: 110194034}}&lt;br /&gt;
:{{cmdresult| beer.boot_code_address: 117002545}}&lt;br /&gt;
:{{cmdresult| beer.num_entries: 8}}&lt;br /&gt;
:{{cmdresult| beer.dir_length: 64}}&lt;br /&gt;
:{{cmdresult| beer.revision: 0}}&lt;br /&gt;
:{{cmdresult| dev_name: HTS726060M9AT00}}&lt;br /&gt;
:{{cmdresult| beer.checksum: -26982}}&lt;br /&gt;
:{{cmdresult| dos[0].flags: 3}}&lt;br /&gt;
:{{cmdresult|    Service area is available as B:}}&lt;br /&gt;
:{{cmdresult|    Diagnostic Service:}}&lt;br /&gt;
:{{cmdresult|    Service Area is Read Only:}}&lt;br /&gt;
:{{cmdresult|    This Boot:}}&lt;br /&gt;
:{{cmdresult|    Empty Service Area:}}&lt;br /&gt;
:{{cmdresult|    Hidden Service Area:                 yes}}&lt;br /&gt;
:{{cmdresult|    Service Area is bootable as A:       yes}}&lt;br /&gt;
:{{cmdresult| dos[0].service_area_start: 117005431}}&lt;br /&gt;
:{{cmdresult| dos[0].service_area_size: 204800}}&lt;br /&gt;
:{{cmdresult| dos[0].load_sectors: 1}}&lt;br /&gt;
:{{cmdresult| dos[0].load_address: 0x7:C000}}&lt;br /&gt;
:{{cmdresult| dos[0].service_area_id: 0}}&lt;br /&gt;
:{{cmdresult| dos[0] id_str: FirstWare Reserved Area}}&lt;br /&gt;
:{{cmdresult| dos[0].checksum: -22271}}&lt;br /&gt;
:{{cmdresult| [...]}}&lt;br /&gt;
&lt;br /&gt;
Very rough code. Send me an e-mail (at the address found at my user page) if you want a (GPL'd) copy, but only if you're willing to test and improve the code.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 01:15, 24 January 2006 (CET)&lt;br /&gt;
&lt;br /&gt;
== SET MAX Security Extensions ==&lt;br /&gt;
&lt;br /&gt;
I've hacked Andries Brouwer's setmax tool (see: Google) to support the SET MAX security extensions (SET MAX SET PASSWORD, SET MAX LOCK, SET MAX UNLOCK, SET MAX FREEZE). Very rough code once again. Mail me if you're willing to brick your HDD.&lt;br /&gt;
&lt;br /&gt;
A few random observations:&lt;br /&gt;
&lt;br /&gt;
- secure mode: the Phoenix BIOS probably sets a SET MAX password in the HDD, does a non-volatile SET MAX and LOCKs (or FREEZEs) the HDD.&lt;br /&gt;
&lt;br /&gt;
- normal mode: the Phoenix BIOS might set a SET MAX password in the HDD, does a (volatile?) SET MAX but does not LOCK the HDD. The HDD will accept another SET MAX, a new SET MAX SET PASSWORD, etc.&lt;br /&gt;
&lt;br /&gt;
- normal mode: Linux 2.6.x disables the HPA in normal mode (by doing a volatile SET MAX to maximum native address). After a suspend the HDD reenables the HPA (by returning to the latest non-volatile value of SET MAX). It thus treats the suspend cycle as a power cycle (it also discards a SET MAX password, unlocks or unfreezes the HPA etc). I'm not sure whether that is a correct implementation of the ATA spec. (The HDD doesn't do this in secure mode. I would like to know how the Phoenix BIOS and/or Hitachi HDD people have managed this.) &lt;br /&gt;
&lt;br /&gt;
This can lead to some problems if a partition ends within the limits of the HPA (which is then actually (partly) overwritten by that partition). Maybe the best solution would be to have the kernel do a non-volatile SET MAX to the native maximum address. Then a resume from suspend will in effect not reenable the HPA.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 01:40, 20 February 2006 (CET)&lt;/div&gt;</summary>
		<author><name>Pebolle</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Talk:Predesktop_Area&amp;diff=20239</id>
		<title>Talk:Predesktop Area</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Talk:Predesktop_Area&amp;diff=20239"/>
		<updated>2006-02-20T00:44:15Z</updated>

		<summary type="html">&lt;p&gt;Pebolle: typo, layout&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Use the HPA for GNU/Linux?==&lt;br /&gt;
More interesting than removing the HPA (which includes a.o. Acces IBM Predesktop Area, some other tools and a backup of the pre-installed OS) would be to use this area for GNU/Linux too. At least, removing the HPA only saves 3,5 GB on my 60 GB hard disk. It would be worth a try to see whether the backup of the pre-installed OS on the largest PSA could be replaced by a backup of your favourite GNU/Linux distribution.&lt;br /&gt;
&lt;br /&gt;
Elaborating on my ideas a few days later, I'd guess the following could be tried:&lt;br /&gt;
* see whether GRUB can be made to boot the Access IBM Predekstop Area (I guess by &amp;quot;chainloading&amp;quot; the bootsector of its PSA). Right now GRUB refuses to load sectors outside the partioned area. I've got absolutely no idea if it's possible to write a hack to overcome that restriction. Need to contact the GRUB people about that ...&lt;br /&gt;
* write a HPA or SPA driver. That driver should provide something like &amp;quot;/dev/hpa&amp;quot;, &amp;quot;/dev/hpa0&amp;quot;, etc or &amp;quot;/dev/spa&amp;quot;, &amp;quot;/dev/spa0&amp;quot;, whatever. The idea here is that it allows you to simply mount (ro!) the Hidden Protected Area (given the correct BIOS settings). Probably just an addaption of the current drivers for (IDE?) harddisks. (This might mean &amp;quot;/dev/hda&amp;quot; and &amp;quot;/dev/hpa&amp;quot; overlap: dangerous?) That would probably need - way - more coding skills than I have ...&lt;br /&gt;
* probably much easier would be to write a FUSE for the HPA: hpafs.&lt;br /&gt;
* write some userspace tools for the HPA/the SPAs (things like: dumpbeer, printDoS).&lt;br /&gt;
&lt;br /&gt;
It should be clear these are basically random ideas. Still feedback would be appreciated ...&lt;br /&gt;
----&lt;br /&gt;
Hei,&lt;br /&gt;
&lt;br /&gt;
interesting ideas, but i'd only see a point in it if one could keep Win and Linux rescue stuff in the HPA. That means it would need to be expandable or fit the stuff for both systems.&lt;br /&gt;
[[User:Wyrfel|Wyrfel]] 20:03, 15 Mar 2005 (CET)&lt;br /&gt;
----&lt;br /&gt;
Thanks.&lt;br /&gt;
&lt;br /&gt;
Short answer: that should be possible.&lt;br /&gt;
&lt;br /&gt;
Long answer: I see little in the specs (as I understand them now) to stop one from adding (say) an extra 3 GB GNU/Linux-rescue PSA or something like that. We might try to do that first by changing the BEER and DoS manually. (Not sure whether Phoenix added some proprietary stuff to keep you from booting it. The PSA should always be accesable with the proper BIOS setting.) It might be mandatory to put it on a FAT filesystem. The hard part probably is to have it show up in the Access IBM Predesktop Area. (My guess is you need to regenerate the FirstSight &amp;quot;graphical shell&amp;quot;. If that's correct we probably only can use the FirstWare tools &amp;quot;hidden&amp;quot; on their little PSA. That's no fun. Well it might a little fun if we try FreeDOS). &lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle (not logged in)]]&lt;br /&gt;
----&lt;br /&gt;
Update: a trivial patch to grub allows it to also work outside the partioned area:&lt;br /&gt;
&lt;br /&gt;
 --- /var/tmp/rpm/BUILD/grub-0.95/stage2/disk_io.c.oud   2004-05-23 18:35:24.000000000 +0200&lt;br /&gt;
 +++ /var/tmp/rpm/BUILD/grub-0.95/stage2/disk_io.c       2005-03-18 22:38:30.050907408 +0100&lt;br /&gt;
 @@ -297,8 +297,8 @@&lt;br /&gt;
     *  Check partition boundaries&lt;br /&gt;
     */&lt;br /&gt;
    if (sector &amp;lt; 0&lt;br /&gt;
 -      || ((sector + ((byte_offset + byte_len - 1) &amp;gt;&amp;gt; SECTOR_BITS))&lt;br /&gt;
 -         &amp;gt;= part_length))&lt;br /&gt;
 +      /*|| ((sector + ((byte_offset + byte_len - 1) &amp;gt;&amp;gt; SECTOR_BITS))&lt;br /&gt;
 +         &amp;gt;= part_length)*/)&lt;br /&gt;
      {&lt;br /&gt;
        errnum = ERR_OUTSIDE_PART;&lt;br /&gt;
        return 0;&lt;br /&gt;
&lt;br /&gt;
I made a grub CD with a grub patched with the above. Now I can &amp;quot;cat&amp;quot; the bootsector of the Predesktop Area from the grub shell (when booting of that grub CD). But I haven't yet managed to boot the Predesktop Area (dangerous stuff!) To be continued ...&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] Fri Mar 18 22:42:43 CET 2005&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I've been playing around with the predesktop area tonight.  I was simply trying to just leave the diagnostics stuff and remove the windows part.  I wrote some programs to read/write the BEER data and stuff, but I wasn't able to get the system to boot it, it kept erroring &amp;quot;Authentication of System Services failed&amp;quot; (or something along those lines).  I will play around with this some more later&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[User:Invisi|Tim Nordell]]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A quick look with a hexeditor gave me two instances of &amp;quot;Application authentication has failed!&amp;quot; in the FirstSight application. Does that sound familair? &lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] Fri Apr 1 19:35:30 CEST 2005&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Actually it wasn't that.  I did a search of that too, the message itself was not in the predesktop area at all.  What also is interesting is the fw*.exe utilities for manipulating the predesktop area, contains the string &amp;quot;MD5&amp;quot; which makes me wonder if there is an md5 hash of each &amp;quot;predesktop&amp;quot; partition.  I know on the IBM whitepaper it states there being a signature so that non-signed applications can not be run.  Could a simple &amp;quot;md5&amp;quot; be the signature?&lt;br /&gt;
&lt;br /&gt;
[[User:Invisi|Tim Nordell]] 12:01, 3 Apr 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*What is it that you were trying to do (what did trigger the error you saw)?&lt;br /&gt;
&lt;br /&gt;
*About ten of the fw*.exe utilities contain the phrase &amp;quot;MD5 Checksums do not match&amp;quot;. So they could very well be using MD5 sums for some sort of validation. But they could use the MD5 sums in a lot of ways actually, so I won't yet speculate ...&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] Sun Apr  3 15:11:10 CEST 2005&lt;br /&gt;
&lt;br /&gt;
== Predesktop Area ==&lt;br /&gt;
&lt;br /&gt;
I made a program that takes the BEER record at the end, parses it out to a &amp;quot;.cfg&amp;quot; file, lets you modify it, recalibrate the start spots for the records, and write it out to disk again.  It doesn't directly access hda, 'cept for reading the original beer record.  It makes a script file to go with the files you have, to read in the HPA data, and to write it out again with the new record.&lt;br /&gt;
&lt;br /&gt;
Anyways, I tried simply removing the last record from the BEER, which is the windows recovery partition.  It didn't like that.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Did you update the two's complement checksum at the end of the BEER?&lt;br /&gt;
&lt;br /&gt;
[[user:Pebolle|Paul Bolle]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Yep, I updated that.  If I don't update that, it doesn't even say that failed message.  I also made a seperate program to update the checksum so you can also modify the beer record by hand with a hex editor and have valid checksums.&lt;br /&gt;
&lt;br /&gt;
== Linux kernel support ==&lt;br /&gt;
{{Todo|research and add to article}}&lt;br /&gt;
* Add a section on dmesg and hdparm -I output:&lt;br /&gt;
 (...)&lt;br /&gt;
 Commands/features:&lt;br /&gt;
        Enabled Supported:&lt;br /&gt;
 (...)&lt;br /&gt;
           *    Host Protected Area feature set&lt;br /&gt;
 (...)&lt;br /&gt;
                SET MAX security extension&lt;br /&gt;
                Address Offset Reserved Area Boot&lt;br /&gt;
 (...)&lt;br /&gt;
&lt;br /&gt;
* Recent (2.6.10 and up?) kernels disable HPAs automatically (in drivers/ide/ide-disk.c). Dmesg example:&lt;br /&gt;
&lt;br /&gt;
 hda: Host Protected Area detected.&lt;br /&gt;
        current capacity is 110194034 sectors (56419 MB)&lt;br /&gt;
         native  capacity is 117210240 sectors (60011 MB)&lt;br /&gt;
 hda: Host Protected Area disabled.&lt;br /&gt;
&lt;br /&gt;
This should be (further researched and) added to this section (maybe with some pointers to the unexpected consequences of this new approach ...)&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 22:06, 6 Sep 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
* SRCMOS24.EXE&lt;br /&gt;
&lt;br /&gt;
In the PSA used by the Predesktop Area I found a &amp;quot;hidden&amp;quot; executable: SRCMOS24.EXE (it is not mentioned in the FAT). This executable can capture and update CMOS data. It might only be used by the FirstSight program to display (part of) the BIOS info. It might be nice to see what it can do and if similar things are possible under GNU/Linux.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 22:01, 7 Sep 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
== Newer thinkpads don't use Phoenix Firstware? ==&lt;br /&gt;
&lt;br /&gt;
On my T42 that arrived yesterday, the predesktop area looks a lot like MS Windows. The widget set, the fonts, even the boot sequence looks exactly like Windows 2000. Debian-installer indentified it as &amp;quot;Microsoft Windows NT/2000/XP&amp;quot;, while it identified my XP partition as &amp;quot;Microsoft Windows XP Professional&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Has Lenovo/IBM changed their system, or is this Phoenix stuff really just Windows?&lt;br /&gt;
&lt;br /&gt;
-- [[Evan.Heidtmann]]&lt;br /&gt;
&lt;br /&gt;
Evan,&lt;br /&gt;
&lt;br /&gt;
Could it be that you're talking about the preinstalled version of Windows here? As far as I know (using information to be found on the internet, not personal research) the preinstalled OS will reformat its partition from FAT32 to NTFS at first boot. That could explain the difference in the identification by the Debian installer (which I never really used).&lt;br /&gt;
&lt;br /&gt;
Moreover the Predesktop Area is part of the HPA and the HPA is not an partition. It seems unlikely that the Debain installer notices the HPA. As far as I know there are at present no GNU/Linux tools with a (useful) support of HPAs.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 15:43, 4 Aug 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
My T42P (model 2373HSG) is using a cut-down version of Windows XP as the pre-desktop area.  I'm not sure whether it's a special IBM thing or just a [http://www.microsoft.com/licensing/programs/sa/benefits/winpe.mspx Windows PE] (preinstallation environment) setup.  It includes Java and Python, which are used by some of the IBM tools, and the Opera web browser.&lt;br /&gt;
&lt;br /&gt;
It's no longer an HPA but a 487MB hidden FAT32 called IBM_SERVICE located at the end of the disk.&lt;br /&gt;
&lt;br /&gt;
--[[User:Korourke|Korourke]]&lt;br /&gt;
&lt;br /&gt;
== Rescue and Recovery via grub? ==&lt;br /&gt;
&lt;br /&gt;
Did anyone get the Rescue and Recovery partition to boot via grub on recent models? On a T43 with&lt;br /&gt;
 rootnoverify (hd0,1)&lt;br /&gt;
 chainloader +1&lt;br /&gt;
the Rescue and Recovery partition starts booting nicely and then, a few seconds in the R&amp;amp;R loading sequence, chokes with a &lt;br /&gt;
 STOP: c000021a {Fatal System Error}&lt;br /&gt;
 The Session Manager Initialization system process terminated unexpectedly with a status of 0xc000003a (0x00000000 0x00000000).&lt;br /&gt;
 The system has been shut down. &lt;br /&gt;
The problem started right after installing grub into the MBR (I couldn't get the preinstalled MBR to boot grub from an active primary partition). It seems oblivious to the Predesktop BIOS setting.&lt;br /&gt;
&lt;br /&gt;
The same problem has been reported by others with other models (for example [http://forums.fedoraforum.org/archive/index.php/t-19433.html here] for a T42).&lt;br /&gt;
&lt;br /&gt;
[[User:Thinker|Thinker]] 11:35, 30 Sep 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
Your &amp;quot;Rescue and Recovery partition&amp;quot; seems not to be a HPA (which isn't a partition). Maybe we should open a new page for that system.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 21:54, 30 Sep 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
It may very well not be an HPA , but the BIOS stil calls it a &amp;quot;Predesktop Area&amp;quot;. Anyway, the partition is actually a VFAT partition (even though it has type 0x12, &amp;quot;Compaq Diagnostics&amp;quot;). It seems to boot into PC-DOS (using {{path|NTDETECT.EXE}} so it looks like Windows startup) and then its {{path|AUTOEXEC.BAT}} runs a fancy GUI.&lt;br /&gt;
--[[User:Thinker|Thinker]] 23:31, 30 Sep 2005 (CEST)&lt;br /&gt;
----&lt;br /&gt;
Right, there has been a lot of confusion about this, we should have a separate page. Introduced an edit link (called Rescue and Recovery) on the [[ThinkPad Technologies]] page for that purpose.&lt;br /&gt;
&lt;br /&gt;
== Suggestions for projects ==&lt;br /&gt;
&lt;br /&gt;
I'd guess it would be rather nice to have GNU/Linux tools (like sfdisk and parted) HPA aware. The most urgent change would be to have those programs at least recognize and respect a HPA (e.g.: do not write in or otherwise use the HPA area; unless the user gives a --force option or something similar).&lt;br /&gt;
&lt;br /&gt;
As for now, I realize I caused this error: ENOPATCH.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 22:56, 5 Nov 2005 (CET)&lt;br /&gt;
&lt;br /&gt;
== Keeping functionality of the blue AccessIBM button ==&lt;br /&gt;
&lt;br /&gt;
Somebody figured out [http://sharadware.com/2005/07/11/suse-linux-winxp-access-ibm-on-the-thinkpad-t43/|how to keep the AccessIBM functionality] when installing Linux, quite easy fix. How come nobody thought about it before? :)&lt;br /&gt;
(link got from [[Installing_Ubuntu_5.04_on_a_ThinkPad_T43_%281875%29 here]])&lt;br /&gt;
&lt;br /&gt;
--[[User:Micampe|Micampe]] 17:39, 9 Dec 2005 (CET)&lt;br /&gt;
&lt;br /&gt;
The relevant part of that page:&lt;br /&gt;
&lt;br /&gt;
''Set the IBM Predesktop Area (in the BIOS) to â€œSecureâ€. Boot using the SUSE DVD. Shrink the Windows partition as required. Follow the instructions and go through the regular installation process. Create a primary partition for /boot (the other stuff can go into the extended partitions) and when the time comes to install GRUB (you do prefer GRUB to LILO, donâ€™t you?), make sure you install it into the boot sector of the boot partition. Set this partition as active. Leave the MBR alone.''&lt;br /&gt;
&lt;br /&gt;
That's the first thing I tried on my T43. Didn't work: setting the active partition to /boot had no effect, it was still booting the first (Windows) partition. So I had to install Grub into MBR, thereby killing R&amp;amp;R. Anyway, there's another solution in the article page (didn't try it since I saw it only after purging my R&amp;amp;R partition).&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
--[[User:Thinker|Thinker]] 19:18, 9 Dec 2005 (CET)&lt;br /&gt;
&lt;br /&gt;
== Parsing the HPA information (BEER/DOS) ==&lt;br /&gt;
&lt;br /&gt;
I too have been writing a program to parse the BEER and DOS info. Sample output:&lt;br /&gt;
:{{cmdresult| beer.signature: 0xBEEF}}&lt;br /&gt;
:{{cmdresult| beer.size: 128}}&lt;br /&gt;
:{{cmdresult| beer.flags: 41}}&lt;br /&gt;
:{{cmdresult|    Read Only:}}&lt;br /&gt;
:{{cmdresult|    Generated Record:}}&lt;br /&gt;
:{{cmdresult|    Use Reserved Area Boot Code Address: yes}}&lt;br /&gt;
:{{cmdresult|    Configuration Time Stamp is valid:}}&lt;br /&gt;
:{{cmdresult|    Device Supports LBA:                 yes}}&lt;br /&gt;
:{{cmdresult|    Directory of Services is Present}}&lt;br /&gt;
:{{cmdresult|    Formatted Geometry Valid}}&lt;br /&gt;
:{{cmdresult|    Reported Geometry Valid              yes}}&lt;br /&gt;
:{{cmdresult| beer.reported_cylinders: 16383}}&lt;br /&gt;
:{{cmdresult| beer.reported_heads: 16}}&lt;br /&gt;
:{{cmdresult| beer.reported_sectors: 63}}&lt;br /&gt;
:{{cmdresult| beer.reported_bytes_sector: 512}}&lt;br /&gt;
:{{cmdresult| beer.reported_sectors_device: 117210240}}&lt;br /&gt;
:{{cmdresult| beer.formatted_cylinders: 16383}}&lt;br /&gt;
:{{cmdresult| beer.formatted_heads: 16}}&lt;br /&gt;
:{{cmdresult| beer.formatted_sectors: 63}}&lt;br /&gt;
:{{cmdresult| beer.formatted_bytes_sector: 512}}&lt;br /&gt;
:{{cmdresult| beer.formatted_sectors_device: 117210240}}&lt;br /&gt;
:{{cmdresult| year: 2004}}&lt;br /&gt;
:{{cmdresult| day: 313}}&lt;br /&gt;
:{{cmdresult| beer.timestamp: 1426063684}}&lt;br /&gt;
:{{cmdresult| beer.device_index: 0x80}}&lt;br /&gt;
:{{cmdresult| beer.hpa_start: 110194034}}&lt;br /&gt;
:{{cmdresult| beer.boot_code_address: 117002545}}&lt;br /&gt;
:{{cmdresult| beer.num_entries: 8}}&lt;br /&gt;
:{{cmdresult| beer.dir_length: 64}}&lt;br /&gt;
:{{cmdresult| beer.revision: 0}}&lt;br /&gt;
:{{cmdresult| dev_name: HTS726060M9AT00}}&lt;br /&gt;
:{{cmdresult| beer.checksum: -26982}}&lt;br /&gt;
:{{cmdresult| dos[0].flags: 3}}&lt;br /&gt;
:{{cmdresult|    Service area is available as B:}}&lt;br /&gt;
:{{cmdresult|    Diagnostic Service:}}&lt;br /&gt;
:{{cmdresult|    Service Area is Read Only:}}&lt;br /&gt;
:{{cmdresult|    This Boot:}}&lt;br /&gt;
:{{cmdresult|    Empty Service Area:}}&lt;br /&gt;
:{{cmdresult|    Hidden Service Area:                 yes}}&lt;br /&gt;
:{{cmdresult|    Service Area is bootable as A:       yes}}&lt;br /&gt;
:{{cmdresult| dos[0].service_area_start: 117005431}}&lt;br /&gt;
:{{cmdresult| dos[0].service_area_size: 204800}}&lt;br /&gt;
:{{cmdresult| dos[0].load_sectors: 1}}&lt;br /&gt;
:{{cmdresult| dos[0].load_address: 0x7:C000}}&lt;br /&gt;
:{{cmdresult| dos[0].service_area_id: 0}}&lt;br /&gt;
:{{cmdresult| dos[0] id_str: FirstWare Reserved Area}}&lt;br /&gt;
:{{cmdresult| dos[0].checksum: -22271}}&lt;br /&gt;
:{{cmdresult| [...]}}&lt;br /&gt;
&lt;br /&gt;
Very rough code. Send me an e-mail (at the address found at my user page) if you want a (GPL'd) copy, but only if you're willing to test and improve the code.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 01:15, 24 January 2006 (CET)&lt;br /&gt;
&lt;br /&gt;
== SET MAX Security Extensions ==&lt;br /&gt;
&lt;br /&gt;
I've hacked Andries Brouwer's setmax tool (see: Google) to support the SET MAX security extensions (SET MAX SET PASSWORD, SET MAX LOCK, SET MAX UNLOCK, SET MAX FREEZE). Very rough code once again. Mail me if you're willing to brick your HDD.&lt;br /&gt;
&lt;br /&gt;
A few random observations:&lt;br /&gt;
&lt;br /&gt;
- secure mode: the Phoenix BIOS probably sets a SET MAX password in the HDD, does a non-volatile SET MAX and LOCKs (or FREEZEs) the HDD.&lt;br /&gt;
&lt;br /&gt;
- normal mode: the Phoenix BIOS might set a SET MAX password in the HDD, does a (non-volatile?) SET MAX but does not LOCK the HDD. You can do another SET MAX, a new SET MAX SET PASSWORD, etc. etc.&lt;br /&gt;
&lt;br /&gt;
- normal mode: Linux 2.6.x disables the HPA in normal mode (by doing a volatile SET MAX to maximum native address). After a suspend the HDD reenables the HPA (by returning to the latest non-volatile value of SET MAX). It thus treats the suspend cycle as a power cycle (it also discards a SET MAX password, unlock or unfreeze the HPA etc). I'm not sure whether that is a correct implementation of the ATA spec. (It doesn't do this in secure mode. I would like to know how the Phoenix BIOS and/or Hitachi HDD people have managed this/) &lt;br /&gt;
&lt;br /&gt;
This can lead to some problems if a partition ends within the limits of the HPA (which is actually overwritten by a normal partition). Maybe the best solution would be to have the kernel do a non-volatile SET MAX to the native maximum address. Then a resume from suspend will in effect not reenable the (still overwritten) HPA.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 01:40, 20 February 2006 (CET)&lt;/div&gt;</summary>
		<author><name>Pebolle</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Talk:Predesktop_Area&amp;diff=20238</id>
		<title>Talk:Predesktop Area</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Talk:Predesktop_Area&amp;diff=20238"/>
		<updated>2006-02-20T00:40:41Z</updated>

		<summary type="html">&lt;p&gt;Pebolle: Set Max Security Extensions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Use the HPA for GNU/Linux?==&lt;br /&gt;
More interesting than removing the HPA (which includes a.o. Acces IBM Predesktop Area, some other tools and a backup of the pre-installed OS) would be to use this area for GNU/Linux too. At least, removing the HPA only saves 3,5 GB on my 60 GB hard disk. It would be worth a try to see whether the backup of the pre-installed OS on the largest PSA could be replaced by a backup of your favourite GNU/Linux distribution.&lt;br /&gt;
&lt;br /&gt;
Elaborating on my ideas a few days later, I'd guess the following could be tried:&lt;br /&gt;
* see whether GRUB can be made to boot the Access IBM Predekstop Area (I guess by &amp;quot;chainloading&amp;quot; the bootsector of its PSA). Right now GRUB refuses to load sectors outside the partioned area. I've got absolutely no idea if it's possible to write a hack to overcome that restriction. Need to contact the GRUB people about that ...&lt;br /&gt;
* write a HPA or SPA driver. That driver should provide something like &amp;quot;/dev/hpa&amp;quot;, &amp;quot;/dev/hpa0&amp;quot;, etc or &amp;quot;/dev/spa&amp;quot;, &amp;quot;/dev/spa0&amp;quot;, whatever. The idea here is that it allows you to simply mount (ro!) the Hidden Protected Area (given the correct BIOS settings). Probably just an addaption of the current drivers for (IDE?) harddisks. (This might mean &amp;quot;/dev/hda&amp;quot; and &amp;quot;/dev/hpa&amp;quot; overlap: dangerous?) That would probably need - way - more coding skills than I have ...&lt;br /&gt;
* probably much easier would be to write a FUSE for the HPA: hpafs.&lt;br /&gt;
* write some userspace tools for the HPA/the SPAs (things like: dumpbeer, printDoS).&lt;br /&gt;
&lt;br /&gt;
It should be clear these are basically random ideas. Still feedback would be appreciated ...&lt;br /&gt;
----&lt;br /&gt;
Hei,&lt;br /&gt;
&lt;br /&gt;
interesting ideas, but i'd only see a point in it if one could keep Win and Linux rescue stuff in the HPA. That means it would need to be expandable or fit the stuff for both systems.&lt;br /&gt;
[[User:Wyrfel|Wyrfel]] 20:03, 15 Mar 2005 (CET)&lt;br /&gt;
----&lt;br /&gt;
Thanks.&lt;br /&gt;
&lt;br /&gt;
Short answer: that should be possible.&lt;br /&gt;
&lt;br /&gt;
Long answer: I see little in the specs (as I understand them now) to stop one from adding (say) an extra 3 GB GNU/Linux-rescue PSA or something like that. We might try to do that first by changing the BEER and DoS manually. (Not sure whether Phoenix added some proprietary stuff to keep you from booting it. The PSA should always be accesable with the proper BIOS setting.) It might be mandatory to put it on a FAT filesystem. The hard part probably is to have it show up in the Access IBM Predesktop Area. (My guess is you need to regenerate the FirstSight &amp;quot;graphical shell&amp;quot;. If that's correct we probably only can use the FirstWare tools &amp;quot;hidden&amp;quot; on their little PSA. That's no fun. Well it might a little fun if we try FreeDOS). &lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle (not logged in)]]&lt;br /&gt;
----&lt;br /&gt;
Update: a trivial patch to grub allows it to also work outside the partioned area:&lt;br /&gt;
&lt;br /&gt;
 --- /var/tmp/rpm/BUILD/grub-0.95/stage2/disk_io.c.oud   2004-05-23 18:35:24.000000000 +0200&lt;br /&gt;
 +++ /var/tmp/rpm/BUILD/grub-0.95/stage2/disk_io.c       2005-03-18 22:38:30.050907408 +0100&lt;br /&gt;
 @@ -297,8 +297,8 @@&lt;br /&gt;
     *  Check partition boundaries&lt;br /&gt;
     */&lt;br /&gt;
    if (sector &amp;lt; 0&lt;br /&gt;
 -      || ((sector + ((byte_offset + byte_len - 1) &amp;gt;&amp;gt; SECTOR_BITS))&lt;br /&gt;
 -         &amp;gt;= part_length))&lt;br /&gt;
 +      /*|| ((sector + ((byte_offset + byte_len - 1) &amp;gt;&amp;gt; SECTOR_BITS))&lt;br /&gt;
 +         &amp;gt;= part_length)*/)&lt;br /&gt;
      {&lt;br /&gt;
        errnum = ERR_OUTSIDE_PART;&lt;br /&gt;
        return 0;&lt;br /&gt;
&lt;br /&gt;
I made a grub CD with a grub patched with the above. Now I can &amp;quot;cat&amp;quot; the bootsector of the Predesktop Area from the grub shell (when booting of that grub CD). But I haven't yet managed to boot the Predesktop Area (dangerous stuff!) To be continued ...&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] Fri Mar 18 22:42:43 CET 2005&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I've been playing around with the predesktop area tonight.  I was simply trying to just leave the diagnostics stuff and remove the windows part.  I wrote some programs to read/write the BEER data and stuff, but I wasn't able to get the system to boot it, it kept erroring &amp;quot;Authentication of System Services failed&amp;quot; (or something along those lines).  I will play around with this some more later&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[User:Invisi|Tim Nordell]]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A quick look with a hexeditor gave me two instances of &amp;quot;Application authentication has failed!&amp;quot; in the FirstSight application. Does that sound familair? &lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] Fri Apr 1 19:35:30 CEST 2005&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Actually it wasn't that.  I did a search of that too, the message itself was not in the predesktop area at all.  What also is interesting is the fw*.exe utilities for manipulating the predesktop area, contains the string &amp;quot;MD5&amp;quot; which makes me wonder if there is an md5 hash of each &amp;quot;predesktop&amp;quot; partition.  I know on the IBM whitepaper it states there being a signature so that non-signed applications can not be run.  Could a simple &amp;quot;md5&amp;quot; be the signature?&lt;br /&gt;
&lt;br /&gt;
[[User:Invisi|Tim Nordell]] 12:01, 3 Apr 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*What is it that you were trying to do (what did trigger the error you saw)?&lt;br /&gt;
&lt;br /&gt;
*About ten of the fw*.exe utilities contain the phrase &amp;quot;MD5 Checksums do not match&amp;quot;. So they could very well be using MD5 sums for some sort of validation. But they could use the MD5 sums in a lot of ways actually, so I won't yet speculate ...&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] Sun Apr  3 15:11:10 CEST 2005&lt;br /&gt;
&lt;br /&gt;
== Predesktop Area ==&lt;br /&gt;
&lt;br /&gt;
I made a program that takes the BEER record at the end, parses it out to a &amp;quot;.cfg&amp;quot; file, lets you modify it, recalibrate the start spots for the records, and write it out to disk again.  It doesn't directly access hda, 'cept for reading the original beer record.  It makes a script file to go with the files you have, to read in the HPA data, and to write it out again with the new record.&lt;br /&gt;
&lt;br /&gt;
Anyways, I tried simply removing the last record from the BEER, which is the windows recovery partition.  It didn't like that.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Did you update the two's complement checksum at the end of the BEER?&lt;br /&gt;
&lt;br /&gt;
[[user:Pebolle|Paul Bolle]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Yep, I updated that.  If I don't update that, it doesn't even say that failed message.  I also made a seperate program to update the checksum so you can also modify the beer record by hand with a hex editor and have valid checksums.&lt;br /&gt;
&lt;br /&gt;
== Linux kernel support ==&lt;br /&gt;
{{Todo|research and add to article}}&lt;br /&gt;
* Add a section on dmesg and hdparm -I output:&lt;br /&gt;
 (...)&lt;br /&gt;
 Commands/features:&lt;br /&gt;
        Enabled Supported:&lt;br /&gt;
 (...)&lt;br /&gt;
           *    Host Protected Area feature set&lt;br /&gt;
 (...)&lt;br /&gt;
                SET MAX security extension&lt;br /&gt;
                Address Offset Reserved Area Boot&lt;br /&gt;
 (...)&lt;br /&gt;
&lt;br /&gt;
* Recent (2.6.10 and up?) kernels disable HPAs automatically (in drivers/ide/ide-disk.c). Dmesg example:&lt;br /&gt;
&lt;br /&gt;
 hda: Host Protected Area detected.&lt;br /&gt;
        current capacity is 110194034 sectors (56419 MB)&lt;br /&gt;
         native  capacity is 117210240 sectors (60011 MB)&lt;br /&gt;
 hda: Host Protected Area disabled.&lt;br /&gt;
&lt;br /&gt;
This should be (further researched and) added to this section (maybe with some pointers to the unexpected consequences of this new approach ...)&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 22:06, 6 Sep 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
* SRCMOS24.EXE&lt;br /&gt;
&lt;br /&gt;
In the PSA used by the Predesktop Area I found a &amp;quot;hidden&amp;quot; executable: SRCMOS24.EXE (it is not mentioned in the FAT). This executable can capture and update CMOS data. It might only be used by the FirstSight program to display (part of) the BIOS info. It might be nice to see what it can do and if similar things are possible under GNU/Linux.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 22:01, 7 Sep 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
== Newer thinkpads don't use Phoenix Firstware? ==&lt;br /&gt;
&lt;br /&gt;
On my T42 that arrived yesterday, the predesktop area looks a lot like MS Windows. The widget set, the fonts, even the boot sequence looks exactly like Windows 2000. Debian-installer indentified it as &amp;quot;Microsoft Windows NT/2000/XP&amp;quot;, while it identified my XP partition as &amp;quot;Microsoft Windows XP Professional&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Has Lenovo/IBM changed their system, or is this Phoenix stuff really just Windows?&lt;br /&gt;
&lt;br /&gt;
-- [[Evan.Heidtmann]]&lt;br /&gt;
&lt;br /&gt;
Evan,&lt;br /&gt;
&lt;br /&gt;
Could it be that you're talking about the preinstalled version of Windows here? As far as I know (using information to be found on the internet, not personal research) the preinstalled OS will reformat its partition from FAT32 to NTFS at first boot. That could explain the difference in the identification by the Debian installer (which I never really used).&lt;br /&gt;
&lt;br /&gt;
Moreover the Predesktop Area is part of the HPA and the HPA is not an partition. It seems unlikely that the Debain installer notices the HPA. As far as I know there are at present no GNU/Linux tools with a (useful) support of HPAs.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 15:43, 4 Aug 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
My T42P (model 2373HSG) is using a cut-down version of Windows XP as the pre-desktop area.  I'm not sure whether it's a special IBM thing or just a [http://www.microsoft.com/licensing/programs/sa/benefits/winpe.mspx Windows PE] (preinstallation environment) setup.  It includes Java and Python, which are used by some of the IBM tools, and the Opera web browser.&lt;br /&gt;
&lt;br /&gt;
It's no longer an HPA but a 487MB hidden FAT32 called IBM_SERVICE located at the end of the disk.&lt;br /&gt;
&lt;br /&gt;
--[[User:Korourke|Korourke]]&lt;br /&gt;
&lt;br /&gt;
== Rescue and Recovery via grub? ==&lt;br /&gt;
&lt;br /&gt;
Did anyone get the Rescue and Recovery partition to boot via grub on recent models? On a T43 with&lt;br /&gt;
 rootnoverify (hd0,1)&lt;br /&gt;
 chainloader +1&lt;br /&gt;
the Rescue and Recovery partition starts booting nicely and then, a few seconds in the R&amp;amp;R loading sequence, chokes with a &lt;br /&gt;
 STOP: c000021a {Fatal System Error}&lt;br /&gt;
 The Session Manager Initialization system process terminated unexpectedly with a status of 0xc000003a (0x00000000 0x00000000).&lt;br /&gt;
 The system has been shut down. &lt;br /&gt;
The problem started right after installing grub into the MBR (I couldn't get the preinstalled MBR to boot grub from an active primary partition). It seems oblivious to the Predesktop BIOS setting.&lt;br /&gt;
&lt;br /&gt;
The same problem has been reported by others with other models (for example [http://forums.fedoraforum.org/archive/index.php/t-19433.html here] for a T42).&lt;br /&gt;
&lt;br /&gt;
[[User:Thinker|Thinker]] 11:35, 30 Sep 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
Your &amp;quot;Rescue and Recovery partition&amp;quot; seems not to be a HPA (which isn't a partition). Maybe we should open a new page for that system.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 21:54, 30 Sep 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
It may very well not be an HPA , but the BIOS stil calls it a &amp;quot;Predesktop Area&amp;quot;. Anyway, the partition is actually a VFAT partition (even though it has type 0x12, &amp;quot;Compaq Diagnostics&amp;quot;). It seems to boot into PC-DOS (using {{path|NTDETECT.EXE}} so it looks like Windows startup) and then its {{path|AUTOEXEC.BAT}} runs a fancy GUI.&lt;br /&gt;
--[[User:Thinker|Thinker]] 23:31, 30 Sep 2005 (CEST)&lt;br /&gt;
----&lt;br /&gt;
Right, there has been a lot of confusion about this, we should have a separate page. Introduced an edit link (called Rescue and Recovery) on the [[ThinkPad Technologies]] page for that purpose.&lt;br /&gt;
&lt;br /&gt;
== Suggestions for projects ==&lt;br /&gt;
&lt;br /&gt;
I'd guess it would be rather nice to have GNU/Linux tools (like sfdisk and parted) HPA aware. The most urgent change would be to have those programs at least recognize and respect a HPA (e.g.: do not write in or otherwise use the HPA area; unless the user gives a --force option or something similar).&lt;br /&gt;
&lt;br /&gt;
As for now, I realize I caused this error: ENOPATCH.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 22:56, 5 Nov 2005 (CET)&lt;br /&gt;
&lt;br /&gt;
== Keeping functionality of the blue AccessIBM button ==&lt;br /&gt;
&lt;br /&gt;
Somebody figured out [http://sharadware.com/2005/07/11/suse-linux-winxp-access-ibm-on-the-thinkpad-t43/|how to keep the AccessIBM functionality] when installing Linux, quite easy fix. How come nobody thought about it before? :)&lt;br /&gt;
(link got from [[Installing_Ubuntu_5.04_on_a_ThinkPad_T43_%281875%29 here]])&lt;br /&gt;
&lt;br /&gt;
--[[User:Micampe|Micampe]] 17:39, 9 Dec 2005 (CET)&lt;br /&gt;
&lt;br /&gt;
The relevant part of that page:&lt;br /&gt;
&lt;br /&gt;
''Set the IBM Predesktop Area (in the BIOS) to â€œSecureâ€. Boot using the SUSE DVD. Shrink the Windows partition as required. Follow the instructions and go through the regular installation process. Create a primary partition for /boot (the other stuff can go into the extended partitions) and when the time comes to install GRUB (you do prefer GRUB to LILO, donâ€™t you?), make sure you install it into the boot sector of the boot partition. Set this partition as active. Leave the MBR alone.''&lt;br /&gt;
&lt;br /&gt;
That's the first thing I tried on my T43. Didn't work: setting the active partition to /boot had no effect, it was still booting the first (Windows) partition. So I had to install Grub into MBR, thereby killing R&amp;amp;R. Anyway, there's another solution in the article page (didn't try it since I saw it only after purging my R&amp;amp;R partition).&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
--[[User:Thinker|Thinker]] 19:18, 9 Dec 2005 (CET)&lt;br /&gt;
&lt;br /&gt;
== Parsing the HPA information (BEER/DOS) ==&lt;br /&gt;
&lt;br /&gt;
I too have been writing a program to parse the BEER and DOS info. Sample output:&lt;br /&gt;
:{{cmdresult| beer.signature: 0xBEEF}}&lt;br /&gt;
:{{cmdresult| beer.size: 128}}&lt;br /&gt;
:{{cmdresult| beer.flags: 41}}&lt;br /&gt;
:{{cmdresult|    Read Only:}}&lt;br /&gt;
:{{cmdresult|    Generated Record:}}&lt;br /&gt;
:{{cmdresult|    Use Reserved Area Boot Code Address: yes}}&lt;br /&gt;
:{{cmdresult|    Configuration Time Stamp is valid:}}&lt;br /&gt;
:{{cmdresult|    Device Supports LBA:                 yes}}&lt;br /&gt;
:{{cmdresult|    Directory of Services is Present}}&lt;br /&gt;
:{{cmdresult|    Formatted Geometry Valid}}&lt;br /&gt;
:{{cmdresult|    Reported Geometry Valid              yes}}&lt;br /&gt;
:{{cmdresult| beer.reported_cylinders: 16383}}&lt;br /&gt;
:{{cmdresult| beer.reported_heads: 16}}&lt;br /&gt;
:{{cmdresult| beer.reported_sectors: 63}}&lt;br /&gt;
:{{cmdresult| beer.reported_bytes_sector: 512}}&lt;br /&gt;
:{{cmdresult| beer.reported_sectors_device: 117210240}}&lt;br /&gt;
:{{cmdresult| beer.formatted_cylinders: 16383}}&lt;br /&gt;
:{{cmdresult| beer.formatted_heads: 16}}&lt;br /&gt;
:{{cmdresult| beer.formatted_sectors: 63}}&lt;br /&gt;
:{{cmdresult| beer.formatted_bytes_sector: 512}}&lt;br /&gt;
:{{cmdresult| beer.formatted_sectors_device: 117210240}}&lt;br /&gt;
:{{cmdresult| year: 2004}}&lt;br /&gt;
:{{cmdresult| day: 313}}&lt;br /&gt;
:{{cmdresult| beer.timestamp: 1426063684}}&lt;br /&gt;
:{{cmdresult| beer.device_index: 0x80}}&lt;br /&gt;
:{{cmdresult| beer.hpa_start: 110194034}}&lt;br /&gt;
:{{cmdresult| beer.boot_code_address: 117002545}}&lt;br /&gt;
:{{cmdresult| beer.num_entries: 8}}&lt;br /&gt;
:{{cmdresult| beer.dir_length: 64}}&lt;br /&gt;
:{{cmdresult| beer.revision: 0}}&lt;br /&gt;
:{{cmdresult| dev_name: HTS726060M9AT00}}&lt;br /&gt;
:{{cmdresult| beer.checksum: -26982}}&lt;br /&gt;
:{{cmdresult| dos[0].flags: 3}}&lt;br /&gt;
:{{cmdresult|    Service area is available as B:}}&lt;br /&gt;
:{{cmdresult|    Diagnostic Service:}}&lt;br /&gt;
:{{cmdresult|    Service Area is Read Only:}}&lt;br /&gt;
:{{cmdresult|    This Boot:}}&lt;br /&gt;
:{{cmdresult|    Empty Service Area:}}&lt;br /&gt;
:{{cmdresult|    Hidden Service Area:                 yes}}&lt;br /&gt;
:{{cmdresult|    Service Area is bootable as A:       yes}}&lt;br /&gt;
:{{cmdresult| dos[0].service_area_start: 117005431}}&lt;br /&gt;
:{{cmdresult| dos[0].service_area_size: 204800}}&lt;br /&gt;
:{{cmdresult| dos[0].load_sectors: 1}}&lt;br /&gt;
:{{cmdresult| dos[0].load_address: 0x7:C000}}&lt;br /&gt;
:{{cmdresult| dos[0].service_area_id: 0}}&lt;br /&gt;
:{{cmdresult| dos[0] id_str: FirstWare Reserved Area}}&lt;br /&gt;
:{{cmdresult| dos[0].checksum: -22271}}&lt;br /&gt;
:{{cmdresult| [...]}}&lt;br /&gt;
&lt;br /&gt;
Very rough code. Send me an e-mail (at the address found at my user page) if you want a (GPL'd) copy, but only if you're willing to test and improve the code.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 01:15, 24 January 2006 (CET)&lt;br /&gt;
&lt;br /&gt;
== SET MAX Security Extensions ==&lt;br /&gt;
&lt;br /&gt;
I've hacked Andries Brouwer's setmax tool (see: Google) to support the SET MAX security extensions (SET MAX SET PASSWORD, SET MAX LOCK, SET MAX UNLOCK, SET MAX FREEZE). Very rough code once again. Mail me if you're willing to brick your HDD.&lt;br /&gt;
&lt;br /&gt;
A few random observations:&lt;br /&gt;
- secure mode: the Phoenix BIOS probably sets a SET MAX password in the HDD, does a non-volatile SET MAX and LOCKs (or FREEZEs) the HDD.&lt;br /&gt;
&lt;br /&gt;
- normal mode: the Phoenix BIOS might set a SET MAX password in the HDD, does a (non-volatile?) SET MAX but does not LOCK the HDD. You can do another SET MAX, a new SET MAX SET PASSWORD, etc. etc.&lt;br /&gt;
&lt;br /&gt;
- normal mode: Linux 2.6.x disables the HPA in normal mode (by doing a volatile SET MAX to maximum native address). After a suspend the HDD reenables the HPA (by returning to the latest non-volatile value of SET MAX). It thus treats the suspend cycle as a power cycle (it also discards a SET MAX password, unlock or unfreeze the HPA etc). I'm not sure whether that is a correct implementation of the ATA spec. (It doesn't do this in sucre mode. I would like to know how the Phoenix BIOS and/or Hitachi HDD people have managed this/) &lt;br /&gt;
&lt;br /&gt;
This can lead to some problems if a partition ends within the limits of the HPA (which is actually overwritten by a normal partition). Maybe the best solution would be to have the kernel do a non-volatile SET MAX to the native maximum address. Then a resume from suspend will in effect not reenable the (still overwritten) HPA.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 01:40, 20 February 2006 (CET)&lt;/div&gt;</summary>
		<author><name>Pebolle</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Talk:Predesktop_Area&amp;diff=20237</id>
		<title>Talk:Predesktop Area</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Talk:Predesktop_Area&amp;diff=20237"/>
		<updated>2006-02-20T00:21:10Z</updated>

		<summary type="html">&lt;p&gt;Pebolle: Write a FUSE for the HPA&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Use the HPA for GNU/Linux?==&lt;br /&gt;
More interesting than removing the HPA (which includes a.o. Acces IBM Predesktop Area, some other tools and a backup of the pre-installed OS) would be to use this area for GNU/Linux too. At least, removing the HPA only saves 3,5 GB on my 60 GB hard disk. It would be worth a try to see whether the backup of the pre-installed OS on the largest PSA could be replaced by a backup of your favourite GNU/Linux distribution.&lt;br /&gt;
&lt;br /&gt;
Elaborating on my ideas a few days later, I'd guess the following could be tried:&lt;br /&gt;
* see whether GRUB can be made to boot the Access IBM Predekstop Area (I guess by &amp;quot;chainloading&amp;quot; the bootsector of its PSA). Right now GRUB refuses to load sectors outside the partioned area. I've got absolutely no idea if it's possible to write a hack to overcome that restriction. Need to contact the GRUB people about that ...&lt;br /&gt;
* write a HPA or SPA driver. That driver should provide something like &amp;quot;/dev/hpa&amp;quot;, &amp;quot;/dev/hpa0&amp;quot;, etc or &amp;quot;/dev/spa&amp;quot;, &amp;quot;/dev/spa0&amp;quot;, whatever. The idea here is that it allows you to simply mount (ro!) the Hidden Protected Area (given the correct BIOS settings). Probably just an addaption of the current drivers for (IDE?) harddisks. (This might mean &amp;quot;/dev/hda&amp;quot; and &amp;quot;/dev/hpa&amp;quot; overlap: dangerous?) That would probably need - way - more coding skills than I have ...&lt;br /&gt;
* probably much easier would be to write a FUSE for the HPA: hpafs.&lt;br /&gt;
* write some userspace tools for the HPA/the SPAs (things like: dumpbeer, printDoS).&lt;br /&gt;
&lt;br /&gt;
It should be clear these are basically random ideas. Still feedback would be appreciated ...&lt;br /&gt;
----&lt;br /&gt;
Hei,&lt;br /&gt;
&lt;br /&gt;
interesting ideas, but i'd only see a point in it if one could keep Win and Linux rescue stuff in the HPA. That means it would need to be expandable or fit the stuff for both systems.&lt;br /&gt;
[[User:Wyrfel|Wyrfel]] 20:03, 15 Mar 2005 (CET)&lt;br /&gt;
----&lt;br /&gt;
Thanks.&lt;br /&gt;
&lt;br /&gt;
Short answer: that should be possible.&lt;br /&gt;
&lt;br /&gt;
Long answer: I see little in the specs (as I understand them now) to stop one from adding (say) an extra 3 GB GNU/Linux-rescue PSA or something like that. We might try to do that first by changing the BEER and DoS manually. (Not sure whether Phoenix added some proprietary stuff to keep you from booting it. The PSA should always be accesable with the proper BIOS setting.) It might be mandatory to put it on a FAT filesystem. The hard part probably is to have it show up in the Access IBM Predesktop Area. (My guess is you need to regenerate the FirstSight &amp;quot;graphical shell&amp;quot;. If that's correct we probably only can use the FirstWare tools &amp;quot;hidden&amp;quot; on their little PSA. That's no fun. Well it might a little fun if we try FreeDOS). &lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle (not logged in)]]&lt;br /&gt;
----&lt;br /&gt;
Update: a trivial patch to grub allows it to also work outside the partioned area:&lt;br /&gt;
&lt;br /&gt;
 --- /var/tmp/rpm/BUILD/grub-0.95/stage2/disk_io.c.oud   2004-05-23 18:35:24.000000000 +0200&lt;br /&gt;
 +++ /var/tmp/rpm/BUILD/grub-0.95/stage2/disk_io.c       2005-03-18 22:38:30.050907408 +0100&lt;br /&gt;
 @@ -297,8 +297,8 @@&lt;br /&gt;
     *  Check partition boundaries&lt;br /&gt;
     */&lt;br /&gt;
    if (sector &amp;lt; 0&lt;br /&gt;
 -      || ((sector + ((byte_offset + byte_len - 1) &amp;gt;&amp;gt; SECTOR_BITS))&lt;br /&gt;
 -         &amp;gt;= part_length))&lt;br /&gt;
 +      /*|| ((sector + ((byte_offset + byte_len - 1) &amp;gt;&amp;gt; SECTOR_BITS))&lt;br /&gt;
 +         &amp;gt;= part_length)*/)&lt;br /&gt;
      {&lt;br /&gt;
        errnum = ERR_OUTSIDE_PART;&lt;br /&gt;
        return 0;&lt;br /&gt;
&lt;br /&gt;
I made a grub CD with a grub patched with the above. Now I can &amp;quot;cat&amp;quot; the bootsector of the Predesktop Area from the grub shell (when booting of that grub CD). But I haven't yet managed to boot the Predesktop Area (dangerous stuff!) To be continued ...&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] Fri Mar 18 22:42:43 CET 2005&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I've been playing around with the predesktop area tonight.  I was simply trying to just leave the diagnostics stuff and remove the windows part.  I wrote some programs to read/write the BEER data and stuff, but I wasn't able to get the system to boot it, it kept erroring &amp;quot;Authentication of System Services failed&amp;quot; (or something along those lines).  I will play around with this some more later&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[User:Invisi|Tim Nordell]]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A quick look with a hexeditor gave me two instances of &amp;quot;Application authentication has failed!&amp;quot; in the FirstSight application. Does that sound familair? &lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] Fri Apr 1 19:35:30 CEST 2005&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Actually it wasn't that.  I did a search of that too, the message itself was not in the predesktop area at all.  What also is interesting is the fw*.exe utilities for manipulating the predesktop area, contains the string &amp;quot;MD5&amp;quot; which makes me wonder if there is an md5 hash of each &amp;quot;predesktop&amp;quot; partition.  I know on the IBM whitepaper it states there being a signature so that non-signed applications can not be run.  Could a simple &amp;quot;md5&amp;quot; be the signature?&lt;br /&gt;
&lt;br /&gt;
[[User:Invisi|Tim Nordell]] 12:01, 3 Apr 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*What is it that you were trying to do (what did trigger the error you saw)?&lt;br /&gt;
&lt;br /&gt;
*About ten of the fw*.exe utilities contain the phrase &amp;quot;MD5 Checksums do not match&amp;quot;. So they could very well be using MD5 sums for some sort of validation. But they could use the MD5 sums in a lot of ways actually, so I won't yet speculate ...&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] Sun Apr  3 15:11:10 CEST 2005&lt;br /&gt;
&lt;br /&gt;
== Predesktop Area ==&lt;br /&gt;
&lt;br /&gt;
I made a program that takes the BEER record at the end, parses it out to a &amp;quot;.cfg&amp;quot; file, lets you modify it, recalibrate the start spots for the records, and write it out to disk again.  It doesn't directly access hda, 'cept for reading the original beer record.  It makes a script file to go with the files you have, to read in the HPA data, and to write it out again with the new record.&lt;br /&gt;
&lt;br /&gt;
Anyways, I tried simply removing the last record from the BEER, which is the windows recovery partition.  It didn't like that.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Did you update the two's complement checksum at the end of the BEER?&lt;br /&gt;
&lt;br /&gt;
[[user:Pebolle|Paul Bolle]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Yep, I updated that.  If I don't update that, it doesn't even say that failed message.  I also made a seperate program to update the checksum so you can also modify the beer record by hand with a hex editor and have valid checksums.&lt;br /&gt;
&lt;br /&gt;
== Linux kernel support ==&lt;br /&gt;
{{Todo|research and add to article}}&lt;br /&gt;
* Add a section on dmesg and hdparm -I output:&lt;br /&gt;
 (...)&lt;br /&gt;
 Commands/features:&lt;br /&gt;
        Enabled Supported:&lt;br /&gt;
 (...)&lt;br /&gt;
           *    Host Protected Area feature set&lt;br /&gt;
 (...)&lt;br /&gt;
                SET MAX security extension&lt;br /&gt;
                Address Offset Reserved Area Boot&lt;br /&gt;
 (...)&lt;br /&gt;
&lt;br /&gt;
* Recent (2.6.10 and up?) kernels disable HPAs automatically (in drivers/ide/ide-disk.c). Dmesg example:&lt;br /&gt;
&lt;br /&gt;
 hda: Host Protected Area detected.&lt;br /&gt;
        current capacity is 110194034 sectors (56419 MB)&lt;br /&gt;
         native  capacity is 117210240 sectors (60011 MB)&lt;br /&gt;
 hda: Host Protected Area disabled.&lt;br /&gt;
&lt;br /&gt;
This should be (further researched and) added to this section (maybe with some pointers to the unexpected consequences of this new approach ...)&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 22:06, 6 Sep 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
* SRCMOS24.EXE&lt;br /&gt;
&lt;br /&gt;
In the PSA used by the Predesktop Area I found a &amp;quot;hidden&amp;quot; executable: SRCMOS24.EXE (it is not mentioned in the FAT). This executable can capture and update CMOS data. It might only be used by the FirstSight program to display (part of) the BIOS info. It might be nice to see what it can do and if similar things are possible under GNU/Linux.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 22:01, 7 Sep 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
== Newer thinkpads don't use Phoenix Firstware? ==&lt;br /&gt;
&lt;br /&gt;
On my T42 that arrived yesterday, the predesktop area looks a lot like MS Windows. The widget set, the fonts, even the boot sequence looks exactly like Windows 2000. Debian-installer indentified it as &amp;quot;Microsoft Windows NT/2000/XP&amp;quot;, while it identified my XP partition as &amp;quot;Microsoft Windows XP Professional&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Has Lenovo/IBM changed their system, or is this Phoenix stuff really just Windows?&lt;br /&gt;
&lt;br /&gt;
-- [[Evan.Heidtmann]]&lt;br /&gt;
&lt;br /&gt;
Evan,&lt;br /&gt;
&lt;br /&gt;
Could it be that you're talking about the preinstalled version of Windows here? As far as I know (using information to be found on the internet, not personal research) the preinstalled OS will reformat its partition from FAT32 to NTFS at first boot. That could explain the difference in the identification by the Debian installer (which I never really used).&lt;br /&gt;
&lt;br /&gt;
Moreover the Predesktop Area is part of the HPA and the HPA is not an partition. It seems unlikely that the Debain installer notices the HPA. As far as I know there are at present no GNU/Linux tools with a (useful) support of HPAs.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 15:43, 4 Aug 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
My T42P (model 2373HSG) is using a cut-down version of Windows XP as the pre-desktop area.  I'm not sure whether it's a special IBM thing or just a [http://www.microsoft.com/licensing/programs/sa/benefits/winpe.mspx Windows PE] (preinstallation environment) setup.  It includes Java and Python, which are used by some of the IBM tools, and the Opera web browser.&lt;br /&gt;
&lt;br /&gt;
It's no longer an HPA but a 487MB hidden FAT32 called IBM_SERVICE located at the end of the disk.&lt;br /&gt;
&lt;br /&gt;
--[[User:Korourke|Korourke]]&lt;br /&gt;
&lt;br /&gt;
== Rescue and Recovery via grub? ==&lt;br /&gt;
&lt;br /&gt;
Did anyone get the Rescue and Recovery partition to boot via grub on recent models? On a T43 with&lt;br /&gt;
 rootnoverify (hd0,1)&lt;br /&gt;
 chainloader +1&lt;br /&gt;
the Rescue and Recovery partition starts booting nicely and then, a few seconds in the R&amp;amp;R loading sequence, chokes with a &lt;br /&gt;
 STOP: c000021a {Fatal System Error}&lt;br /&gt;
 The Session Manager Initialization system process terminated unexpectedly with a status of 0xc000003a (0x00000000 0x00000000).&lt;br /&gt;
 The system has been shut down. &lt;br /&gt;
The problem started right after installing grub into the MBR (I couldn't get the preinstalled MBR to boot grub from an active primary partition). It seems oblivious to the Predesktop BIOS setting.&lt;br /&gt;
&lt;br /&gt;
The same problem has been reported by others with other models (for example [http://forums.fedoraforum.org/archive/index.php/t-19433.html here] for a T42).&lt;br /&gt;
&lt;br /&gt;
[[User:Thinker|Thinker]] 11:35, 30 Sep 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
Your &amp;quot;Rescue and Recovery partition&amp;quot; seems not to be a HPA (which isn't a partition). Maybe we should open a new page for that system.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 21:54, 30 Sep 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
It may very well not be an HPA , but the BIOS stil calls it a &amp;quot;Predesktop Area&amp;quot;. Anyway, the partition is actually a VFAT partition (even though it has type 0x12, &amp;quot;Compaq Diagnostics&amp;quot;). It seems to boot into PC-DOS (using {{path|NTDETECT.EXE}} so it looks like Windows startup) and then its {{path|AUTOEXEC.BAT}} runs a fancy GUI.&lt;br /&gt;
--[[User:Thinker|Thinker]] 23:31, 30 Sep 2005 (CEST)&lt;br /&gt;
----&lt;br /&gt;
Right, there has been a lot of confusion about this, we should have a separate page. Introduced an edit link (called Rescue and Recovery) on the [[ThinkPad Technologies]] page for that purpose.&lt;br /&gt;
&lt;br /&gt;
== Suggestions for projects ==&lt;br /&gt;
&lt;br /&gt;
I'd guess it would be rather nice to have GNU/Linux tools (like sfdisk and parted) HPA aware. The most urgent change would be to have those programs at least recognize and respect a HPA (e.g.: do not write in or otherwise use the HPA area; unless the user gives a --force option or something similar).&lt;br /&gt;
&lt;br /&gt;
As for now, I realize I caused this error: ENOPATCH.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 22:56, 5 Nov 2005 (CET)&lt;br /&gt;
&lt;br /&gt;
== Keeping functionality of the blue AccessIBM button ==&lt;br /&gt;
&lt;br /&gt;
Somebody figured out [http://sharadware.com/2005/07/11/suse-linux-winxp-access-ibm-on-the-thinkpad-t43/|how to keep the AccessIBM functionality] when installing Linux, quite easy fix. How come nobody thought about it before? :)&lt;br /&gt;
(link got from [[Installing_Ubuntu_5.04_on_a_ThinkPad_T43_%281875%29 here]])&lt;br /&gt;
&lt;br /&gt;
--[[User:Micampe|Micampe]] 17:39, 9 Dec 2005 (CET)&lt;br /&gt;
&lt;br /&gt;
The relevant part of that page:&lt;br /&gt;
&lt;br /&gt;
''Set the IBM Predesktop Area (in the BIOS) to â€œSecureâ€. Boot using the SUSE DVD. Shrink the Windows partition as required. Follow the instructions and go through the regular installation process. Create a primary partition for /boot (the other stuff can go into the extended partitions) and when the time comes to install GRUB (you do prefer GRUB to LILO, donâ€™t you?), make sure you install it into the boot sector of the boot partition. Set this partition as active. Leave the MBR alone.''&lt;br /&gt;
&lt;br /&gt;
That's the first thing I tried on my T43. Didn't work: setting the active partition to /boot had no effect, it was still booting the first (Windows) partition. So I had to install Grub into MBR, thereby killing R&amp;amp;R. Anyway, there's another solution in the article page (didn't try it since I saw it only after purging my R&amp;amp;R partition).&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
--[[User:Thinker|Thinker]] 19:18, 9 Dec 2005 (CET)&lt;br /&gt;
&lt;br /&gt;
== Parsing the HPA information (BEER/DOS) ==&lt;br /&gt;
&lt;br /&gt;
I too have been writing a program to parse the BEER and DOS info. Sample output:&lt;br /&gt;
:{{cmdresult| beer.signature: 0xBEEF}}&lt;br /&gt;
:{{cmdresult| beer.size: 128}}&lt;br /&gt;
:{{cmdresult| beer.flags: 41}}&lt;br /&gt;
:{{cmdresult|    Read Only:}}&lt;br /&gt;
:{{cmdresult|    Generated Record:}}&lt;br /&gt;
:{{cmdresult|    Use Reserved Area Boot Code Address: yes}}&lt;br /&gt;
:{{cmdresult|    Configuration Time Stamp is valid:}}&lt;br /&gt;
:{{cmdresult|    Device Supports LBA:                 yes}}&lt;br /&gt;
:{{cmdresult|    Directory of Services is Present}}&lt;br /&gt;
:{{cmdresult|    Formatted Geometry Valid}}&lt;br /&gt;
:{{cmdresult|    Reported Geometry Valid              yes}}&lt;br /&gt;
:{{cmdresult| beer.reported_cylinders: 16383}}&lt;br /&gt;
:{{cmdresult| beer.reported_heads: 16}}&lt;br /&gt;
:{{cmdresult| beer.reported_sectors: 63}}&lt;br /&gt;
:{{cmdresult| beer.reported_bytes_sector: 512}}&lt;br /&gt;
:{{cmdresult| beer.reported_sectors_device: 117210240}}&lt;br /&gt;
:{{cmdresult| beer.formatted_cylinders: 16383}}&lt;br /&gt;
:{{cmdresult| beer.formatted_heads: 16}}&lt;br /&gt;
:{{cmdresult| beer.formatted_sectors: 63}}&lt;br /&gt;
:{{cmdresult| beer.formatted_bytes_sector: 512}}&lt;br /&gt;
:{{cmdresult| beer.formatted_sectors_device: 117210240}}&lt;br /&gt;
:{{cmdresult| year: 2004}}&lt;br /&gt;
:{{cmdresult| day: 313}}&lt;br /&gt;
:{{cmdresult| beer.timestamp: 1426063684}}&lt;br /&gt;
:{{cmdresult| beer.device_index: 0x80}}&lt;br /&gt;
:{{cmdresult| beer.hpa_start: 110194034}}&lt;br /&gt;
:{{cmdresult| beer.boot_code_address: 117002545}}&lt;br /&gt;
:{{cmdresult| beer.num_entries: 8}}&lt;br /&gt;
:{{cmdresult| beer.dir_length: 64}}&lt;br /&gt;
:{{cmdresult| beer.revision: 0}}&lt;br /&gt;
:{{cmdresult| dev_name: HTS726060M9AT00}}&lt;br /&gt;
:{{cmdresult| beer.checksum: -26982}}&lt;br /&gt;
:{{cmdresult| dos[0].flags: 3}}&lt;br /&gt;
:{{cmdresult|    Service area is available as B:}}&lt;br /&gt;
:{{cmdresult|    Diagnostic Service:}}&lt;br /&gt;
:{{cmdresult|    Service Area is Read Only:}}&lt;br /&gt;
:{{cmdresult|    This Boot:}}&lt;br /&gt;
:{{cmdresult|    Empty Service Area:}}&lt;br /&gt;
:{{cmdresult|    Hidden Service Area:                 yes}}&lt;br /&gt;
:{{cmdresult|    Service Area is bootable as A:       yes}}&lt;br /&gt;
:{{cmdresult| dos[0].service_area_start: 117005431}}&lt;br /&gt;
:{{cmdresult| dos[0].service_area_size: 204800}}&lt;br /&gt;
:{{cmdresult| dos[0].load_sectors: 1}}&lt;br /&gt;
:{{cmdresult| dos[0].load_address: 0x7:C000}}&lt;br /&gt;
:{{cmdresult| dos[0].service_area_id: 0}}&lt;br /&gt;
:{{cmdresult| dos[0] id_str: FirstWare Reserved Area}}&lt;br /&gt;
:{{cmdresult| dos[0].checksum: -22271}}&lt;br /&gt;
:{{cmdresult| [...]}}&lt;br /&gt;
&lt;br /&gt;
Very rough code. Send me an e-mail (at the address found at my user page) if you want a (GPL'd) copy, but only if you're willing to test and improve the code.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 01:15, 24 January 2006 (CET)&lt;/div&gt;</summary>
		<author><name>Pebolle</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Talk:Predesktop_Area&amp;diff=20236</id>
		<title>Talk:Predesktop Area</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Talk:Predesktop_Area&amp;diff=20236"/>
		<updated>2006-02-20T00:15:04Z</updated>

		<summary type="html">&lt;p&gt;Pebolle: hda=stroke got dropped (IIRC somewhere in the 2.5 development cycle)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Use the HPA for GNU/Linux?==&lt;br /&gt;
More interesting than removing the HPA (which includes a.o. Acces IBM Predesktop Area, some other tools and a backup of the pre-installed OS) would be to use this area for GNU/Linux too. At least, removing the HPA only saves 3,5 GB on my 60 GB hard disk. It would be worth a try to see whether the backup of the pre-installed OS on the largest PSA could be replaced by a backup of your favourite GNU/Linux distribution.&lt;br /&gt;
&lt;br /&gt;
Elaborating on my ideas a few days later, I'd guess the following could be tried:&lt;br /&gt;
* see whether GRUB can be made to boot the Access IBM Predekstop Area (I guess by &amp;quot;chainloading&amp;quot; the bootsector of its PSA). Right now GRUB refuses to load sectors outside the partioned area. I've got absolutely no idea if it's possible to write a hack to overcome that restriction. Need to contact the GRUB people about that ...&lt;br /&gt;
* write a HPA or SPA driver. That driver should provide something like &amp;quot;/dev/hpa&amp;quot;, &amp;quot;/dev/hpa0&amp;quot;, etc or &amp;quot;/dev/spa&amp;quot;, &amp;quot;/dev/spa0&amp;quot;, whatever. The idea here is that it allows you to simply mount (ro!) the Hidden Protected Area (given the correct BIOS settings). Probably just an addaption of the current drivers for (IDE?) harddisks. (This might mean &amp;quot;/dev/hda&amp;quot; and &amp;quot;/dev/hpa&amp;quot; overlap: dangerous?) That would probably need - way - more coding skills than I have ...&lt;br /&gt;
* write some userspace tools for the HPA/the SPAs (things like: dumpbeer, printDoS).&lt;br /&gt;
&lt;br /&gt;
It should be clear these are basically random ideas. Still feedback would be appreciated ...&lt;br /&gt;
----&lt;br /&gt;
Hei,&lt;br /&gt;
&lt;br /&gt;
interesting ideas, but i'd only see a point in it if one could keep Win and Linux rescue stuff in the HPA. That means it would need to be expandable or fit the stuff for both systems.&lt;br /&gt;
[[User:Wyrfel|Wyrfel]] 20:03, 15 Mar 2005 (CET)&lt;br /&gt;
----&lt;br /&gt;
Thanks.&lt;br /&gt;
&lt;br /&gt;
Short answer: that should be possible.&lt;br /&gt;
&lt;br /&gt;
Long answer: I see little in the specs (as I understand them now) to stop one from adding (say) an extra 3 GB GNU/Linux-rescue PSA or something like that. We might try to do that first by changing the BEER and DoS manually. (Not sure whether Phoenix added some proprietary stuff to keep you from booting it. The PSA should always be accesable with the proper BIOS setting.) It might be mandatory to put it on a FAT filesystem. The hard part probably is to have it show up in the Access IBM Predesktop Area. (My guess is you need to regenerate the FirstSight &amp;quot;graphical shell&amp;quot;. If that's correct we probably only can use the FirstWare tools &amp;quot;hidden&amp;quot; on their little PSA. That's no fun. Well it might a little fun if we try FreeDOS). &lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle (not logged in)]]&lt;br /&gt;
----&lt;br /&gt;
Update: a trivial patch to grub allows it to also work outside the partioned area:&lt;br /&gt;
&lt;br /&gt;
 --- /var/tmp/rpm/BUILD/grub-0.95/stage2/disk_io.c.oud   2004-05-23 18:35:24.000000000 +0200&lt;br /&gt;
 +++ /var/tmp/rpm/BUILD/grub-0.95/stage2/disk_io.c       2005-03-18 22:38:30.050907408 +0100&lt;br /&gt;
 @@ -297,8 +297,8 @@&lt;br /&gt;
     *  Check partition boundaries&lt;br /&gt;
     */&lt;br /&gt;
    if (sector &amp;lt; 0&lt;br /&gt;
 -      || ((sector + ((byte_offset + byte_len - 1) &amp;gt;&amp;gt; SECTOR_BITS))&lt;br /&gt;
 -         &amp;gt;= part_length))&lt;br /&gt;
 +      /*|| ((sector + ((byte_offset + byte_len - 1) &amp;gt;&amp;gt; SECTOR_BITS))&lt;br /&gt;
 +         &amp;gt;= part_length)*/)&lt;br /&gt;
      {&lt;br /&gt;
        errnum = ERR_OUTSIDE_PART;&lt;br /&gt;
        return 0;&lt;br /&gt;
&lt;br /&gt;
I made a grub CD with a grub patched with the above. Now I can &amp;quot;cat&amp;quot; the bootsector of the Predesktop Area from the grub shell (when booting of that grub CD). But I haven't yet managed to boot the Predesktop Area (dangerous stuff!) To be continued ...&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] Fri Mar 18 22:42:43 CET 2005&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I've been playing around with the predesktop area tonight.  I was simply trying to just leave the diagnostics stuff and remove the windows part.  I wrote some programs to read/write the BEER data and stuff, but I wasn't able to get the system to boot it, it kept erroring &amp;quot;Authentication of System Services failed&amp;quot; (or something along those lines).  I will play around with this some more later&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[User:Invisi|Tim Nordell]]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A quick look with a hexeditor gave me two instances of &amp;quot;Application authentication has failed!&amp;quot; in the FirstSight application. Does that sound familair? &lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] Fri Apr 1 19:35:30 CEST 2005&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Actually it wasn't that.  I did a search of that too, the message itself was not in the predesktop area at all.  What also is interesting is the fw*.exe utilities for manipulating the predesktop area, contains the string &amp;quot;MD5&amp;quot; which makes me wonder if there is an md5 hash of each &amp;quot;predesktop&amp;quot; partition.  I know on the IBM whitepaper it states there being a signature so that non-signed applications can not be run.  Could a simple &amp;quot;md5&amp;quot; be the signature?&lt;br /&gt;
&lt;br /&gt;
[[User:Invisi|Tim Nordell]] 12:01, 3 Apr 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*What is it that you were trying to do (what did trigger the error you saw)?&lt;br /&gt;
&lt;br /&gt;
*About ten of the fw*.exe utilities contain the phrase &amp;quot;MD5 Checksums do not match&amp;quot;. So they could very well be using MD5 sums for some sort of validation. But they could use the MD5 sums in a lot of ways actually, so I won't yet speculate ...&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] Sun Apr  3 15:11:10 CEST 2005&lt;br /&gt;
&lt;br /&gt;
== Predesktop Area ==&lt;br /&gt;
&lt;br /&gt;
I made a program that takes the BEER record at the end, parses it out to a &amp;quot;.cfg&amp;quot; file, lets you modify it, recalibrate the start spots for the records, and write it out to disk again.  It doesn't directly access hda, 'cept for reading the original beer record.  It makes a script file to go with the files you have, to read in the HPA data, and to write it out again with the new record.&lt;br /&gt;
&lt;br /&gt;
Anyways, I tried simply removing the last record from the BEER, which is the windows recovery partition.  It didn't like that.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Did you update the two's complement checksum at the end of the BEER?&lt;br /&gt;
&lt;br /&gt;
[[user:Pebolle|Paul Bolle]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Yep, I updated that.  If I don't update that, it doesn't even say that failed message.  I also made a seperate program to update the checksum so you can also modify the beer record by hand with a hex editor and have valid checksums.&lt;br /&gt;
&lt;br /&gt;
== Linux kernel support ==&lt;br /&gt;
{{Todo|research and add to article}}&lt;br /&gt;
* Add a section on dmesg and hdparm -I output:&lt;br /&gt;
 (...)&lt;br /&gt;
 Commands/features:&lt;br /&gt;
        Enabled Supported:&lt;br /&gt;
 (...)&lt;br /&gt;
           *    Host Protected Area feature set&lt;br /&gt;
 (...)&lt;br /&gt;
                SET MAX security extension&lt;br /&gt;
                Address Offset Reserved Area Boot&lt;br /&gt;
 (...)&lt;br /&gt;
&lt;br /&gt;
* Recent (2.6.10 and up?) kernels disable HPAs automatically (in drivers/ide/ide-disk.c). Dmesg example:&lt;br /&gt;
&lt;br /&gt;
 hda: Host Protected Area detected.&lt;br /&gt;
        current capacity is 110194034 sectors (56419 MB)&lt;br /&gt;
         native  capacity is 117210240 sectors (60011 MB)&lt;br /&gt;
 hda: Host Protected Area disabled.&lt;br /&gt;
&lt;br /&gt;
This should be (further researched and) added to this section (maybe with some pointers to the unexpected consequences of this new approach ...)&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 22:06, 6 Sep 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
* SRCMOS24.EXE&lt;br /&gt;
&lt;br /&gt;
In the PSA used by the Predesktop Area I found a &amp;quot;hidden&amp;quot; executable: SRCMOS24.EXE (it is not mentioned in the FAT). This executable can capture and update CMOS data. It might only be used by the FirstSight program to display (part of) the BIOS info. It might be nice to see what it can do and if similar things are possible under GNU/Linux.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 22:01, 7 Sep 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
== Newer thinkpads don't use Phoenix Firstware? ==&lt;br /&gt;
&lt;br /&gt;
On my T42 that arrived yesterday, the predesktop area looks a lot like MS Windows. The widget set, the fonts, even the boot sequence looks exactly like Windows 2000. Debian-installer indentified it as &amp;quot;Microsoft Windows NT/2000/XP&amp;quot;, while it identified my XP partition as &amp;quot;Microsoft Windows XP Professional&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Has Lenovo/IBM changed their system, or is this Phoenix stuff really just Windows?&lt;br /&gt;
&lt;br /&gt;
-- [[Evan.Heidtmann]]&lt;br /&gt;
&lt;br /&gt;
Evan,&lt;br /&gt;
&lt;br /&gt;
Could it be that you're talking about the preinstalled version of Windows here? As far as I know (using information to be found on the internet, not personal research) the preinstalled OS will reformat its partition from FAT32 to NTFS at first boot. That could explain the difference in the identification by the Debian installer (which I never really used).&lt;br /&gt;
&lt;br /&gt;
Moreover the Predesktop Area is part of the HPA and the HPA is not an partition. It seems unlikely that the Debain installer notices the HPA. As far as I know there are at present no GNU/Linux tools with a (useful) support of HPAs.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 15:43, 4 Aug 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
My T42P (model 2373HSG) is using a cut-down version of Windows XP as the pre-desktop area.  I'm not sure whether it's a special IBM thing or just a [http://www.microsoft.com/licensing/programs/sa/benefits/winpe.mspx Windows PE] (preinstallation environment) setup.  It includes Java and Python, which are used by some of the IBM tools, and the Opera web browser.&lt;br /&gt;
&lt;br /&gt;
It's no longer an HPA but a 487MB hidden FAT32 called IBM_SERVICE located at the end of the disk.&lt;br /&gt;
&lt;br /&gt;
--[[User:Korourke|Korourke]]&lt;br /&gt;
&lt;br /&gt;
== Rescue and Recovery via grub? ==&lt;br /&gt;
&lt;br /&gt;
Did anyone get the Rescue and Recovery partition to boot via grub on recent models? On a T43 with&lt;br /&gt;
 rootnoverify (hd0,1)&lt;br /&gt;
 chainloader +1&lt;br /&gt;
the Rescue and Recovery partition starts booting nicely and then, a few seconds in the R&amp;amp;R loading sequence, chokes with a &lt;br /&gt;
 STOP: c000021a {Fatal System Error}&lt;br /&gt;
 The Session Manager Initialization system process terminated unexpectedly with a status of 0xc000003a (0x00000000 0x00000000).&lt;br /&gt;
 The system has been shut down. &lt;br /&gt;
The problem started right after installing grub into the MBR (I couldn't get the preinstalled MBR to boot grub from an active primary partition). It seems oblivious to the Predesktop BIOS setting.&lt;br /&gt;
&lt;br /&gt;
The same problem has been reported by others with other models (for example [http://forums.fedoraforum.org/archive/index.php/t-19433.html here] for a T42).&lt;br /&gt;
&lt;br /&gt;
[[User:Thinker|Thinker]] 11:35, 30 Sep 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
Your &amp;quot;Rescue and Recovery partition&amp;quot; seems not to be a HPA (which isn't a partition). Maybe we should open a new page for that system.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 21:54, 30 Sep 2005 (CEST)&lt;br /&gt;
&lt;br /&gt;
It may very well not be an HPA , but the BIOS stil calls it a &amp;quot;Predesktop Area&amp;quot;. Anyway, the partition is actually a VFAT partition (even though it has type 0x12, &amp;quot;Compaq Diagnostics&amp;quot;). It seems to boot into PC-DOS (using {{path|NTDETECT.EXE}} so it looks like Windows startup) and then its {{path|AUTOEXEC.BAT}} runs a fancy GUI.&lt;br /&gt;
--[[User:Thinker|Thinker]] 23:31, 30 Sep 2005 (CEST)&lt;br /&gt;
----&lt;br /&gt;
Right, there has been a lot of confusion about this, we should have a separate page. Introduced an edit link (called Rescue and Recovery) on the [[ThinkPad Technologies]] page for that purpose.&lt;br /&gt;
&lt;br /&gt;
== Suggestions for projects ==&lt;br /&gt;
&lt;br /&gt;
I'd guess it would be rather nice to have GNU/Linux tools (like sfdisk and parted) HPA aware. The most urgent change would be to have those programs at least recognize and respect a HPA (e.g.: do not write in or otherwise use the HPA area; unless the user gives a --force option or something similar).&lt;br /&gt;
&lt;br /&gt;
As for now, I realize I caused this error: ENOPATCH.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 22:56, 5 Nov 2005 (CET)&lt;br /&gt;
&lt;br /&gt;
== Keeping functionality of the blue AccessIBM button ==&lt;br /&gt;
&lt;br /&gt;
Somebody figured out [http://sharadware.com/2005/07/11/suse-linux-winxp-access-ibm-on-the-thinkpad-t43/|how to keep the AccessIBM functionality] when installing Linux, quite easy fix. How come nobody thought about it before? :)&lt;br /&gt;
(link got from [[Installing_Ubuntu_5.04_on_a_ThinkPad_T43_%281875%29 here]])&lt;br /&gt;
&lt;br /&gt;
--[[User:Micampe|Micampe]] 17:39, 9 Dec 2005 (CET)&lt;br /&gt;
&lt;br /&gt;
The relevant part of that page:&lt;br /&gt;
&lt;br /&gt;
''Set the IBM Predesktop Area (in the BIOS) to â€œSecureâ€. Boot using the SUSE DVD. Shrink the Windows partition as required. Follow the instructions and go through the regular installation process. Create a primary partition for /boot (the other stuff can go into the extended partitions) and when the time comes to install GRUB (you do prefer GRUB to LILO, donâ€™t you?), make sure you install it into the boot sector of the boot partition. Set this partition as active. Leave the MBR alone.''&lt;br /&gt;
&lt;br /&gt;
That's the first thing I tried on my T43. Didn't work: setting the active partition to /boot had no effect, it was still booting the first (Windows) partition. So I had to install Grub into MBR, thereby killing R&amp;amp;R. Anyway, there's another solution in the article page (didn't try it since I saw it only after purging my R&amp;amp;R partition).&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
--[[User:Thinker|Thinker]] 19:18, 9 Dec 2005 (CET)&lt;br /&gt;
&lt;br /&gt;
== Parsing the HPA information (BEER/DOS) ==&lt;br /&gt;
&lt;br /&gt;
I too have been writing a program to parse the BEER and DOS info. Sample output:&lt;br /&gt;
:{{cmdresult| beer.signature: 0xBEEF}}&lt;br /&gt;
:{{cmdresult| beer.size: 128}}&lt;br /&gt;
:{{cmdresult| beer.flags: 41}}&lt;br /&gt;
:{{cmdresult|    Read Only:}}&lt;br /&gt;
:{{cmdresult|    Generated Record:}}&lt;br /&gt;
:{{cmdresult|    Use Reserved Area Boot Code Address: yes}}&lt;br /&gt;
:{{cmdresult|    Configuration Time Stamp is valid:}}&lt;br /&gt;
:{{cmdresult|    Device Supports LBA:                 yes}}&lt;br /&gt;
:{{cmdresult|    Directory of Services is Present}}&lt;br /&gt;
:{{cmdresult|    Formatted Geometry Valid}}&lt;br /&gt;
:{{cmdresult|    Reported Geometry Valid              yes}}&lt;br /&gt;
:{{cmdresult| beer.reported_cylinders: 16383}}&lt;br /&gt;
:{{cmdresult| beer.reported_heads: 16}}&lt;br /&gt;
:{{cmdresult| beer.reported_sectors: 63}}&lt;br /&gt;
:{{cmdresult| beer.reported_bytes_sector: 512}}&lt;br /&gt;
:{{cmdresult| beer.reported_sectors_device: 117210240}}&lt;br /&gt;
:{{cmdresult| beer.formatted_cylinders: 16383}}&lt;br /&gt;
:{{cmdresult| beer.formatted_heads: 16}}&lt;br /&gt;
:{{cmdresult| beer.formatted_sectors: 63}}&lt;br /&gt;
:{{cmdresult| beer.formatted_bytes_sector: 512}}&lt;br /&gt;
:{{cmdresult| beer.formatted_sectors_device: 117210240}}&lt;br /&gt;
:{{cmdresult| year: 2004}}&lt;br /&gt;
:{{cmdresult| day: 313}}&lt;br /&gt;
:{{cmdresult| beer.timestamp: 1426063684}}&lt;br /&gt;
:{{cmdresult| beer.device_index: 0x80}}&lt;br /&gt;
:{{cmdresult| beer.hpa_start: 110194034}}&lt;br /&gt;
:{{cmdresult| beer.boot_code_address: 117002545}}&lt;br /&gt;
:{{cmdresult| beer.num_entries: 8}}&lt;br /&gt;
:{{cmdresult| beer.dir_length: 64}}&lt;br /&gt;
:{{cmdresult| beer.revision: 0}}&lt;br /&gt;
:{{cmdresult| dev_name: HTS726060M9AT00}}&lt;br /&gt;
:{{cmdresult| beer.checksum: -26982}}&lt;br /&gt;
:{{cmdresult| dos[0].flags: 3}}&lt;br /&gt;
:{{cmdresult|    Service area is available as B:}}&lt;br /&gt;
:{{cmdresult|    Diagnostic Service:}}&lt;br /&gt;
:{{cmdresult|    Service Area is Read Only:}}&lt;br /&gt;
:{{cmdresult|    This Boot:}}&lt;br /&gt;
:{{cmdresult|    Empty Service Area:}}&lt;br /&gt;
:{{cmdresult|    Hidden Service Area:                 yes}}&lt;br /&gt;
:{{cmdresult|    Service Area is bootable as A:       yes}}&lt;br /&gt;
:{{cmdresult| dos[0].service_area_start: 117005431}}&lt;br /&gt;
:{{cmdresult| dos[0].service_area_size: 204800}}&lt;br /&gt;
:{{cmdresult| dos[0].load_sectors: 1}}&lt;br /&gt;
:{{cmdresult| dos[0].load_address: 0x7:C000}}&lt;br /&gt;
:{{cmdresult| dos[0].service_area_id: 0}}&lt;br /&gt;
:{{cmdresult| dos[0] id_str: FirstWare Reserved Area}}&lt;br /&gt;
:{{cmdresult| dos[0].checksum: -22271}}&lt;br /&gt;
:{{cmdresult| [...]}}&lt;br /&gt;
&lt;br /&gt;
Very rough code. Send me an e-mail (at the address found at my user page) if you want a (GPL'd) copy, but only if you're willing to test and improve the code.&lt;br /&gt;
&lt;br /&gt;
[[User:Pebolle|Paul Bolle]] 01:15, 24 January 2006 (CET)&lt;/div&gt;</summary>
		<author><name>Pebolle</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Rescue_and_Recovery&amp;diff=19223</id>
		<title>Rescue and Recovery</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Rescue_and_Recovery&amp;diff=19223"/>
		<updated>2006-02-01T23:45:26Z</updated>

		<summary type="html">&lt;p&gt;Pebolle: Proper MBR: slightly reorg'd (does the MBR code really catch the key press?)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=&amp;quot;100%&amp;quot;&lt;br /&gt;
|style=&amp;quot;vertical-align:top;padding-right:20px;width:10px;&amp;quot; | __NOTOC__&lt;br /&gt;
|style=&amp;quot;vertical-align:top&amp;quot; |&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin: 0; margin-right:10px; border: 1px solid #dfdfdf; padding: 0em 1em 1em 1em; background-color:#F8F8FF; align:right;&amp;quot;&amp;gt;&lt;br /&gt;
===Rescue and Recovery===&lt;br /&gt;
Rescue and Recovery version 3.0 consists of a bootable partition containing various system recovery tools, including full recovery of the preinstalled Windows XP partition. It can be activated by pressing the {{ibmkey|ThinkPad|#494949}}, {{ibmkey|Access IBM|#495988}} or {{ibmkey|ThinkVantage|#495988}} [[ThinkPad Button|Button]] during system boot. It contains a FAT filesystem (labeled &amp;quot;IBM_SERVICE&amp;quot;), and has partition type 0x12 (&amp;quot;Compaq diagnostics&amp;quot; in &amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
As opposed to a [[Hidden Protected Area|Hidden Protected Area]] Recovery partitions are ordinary partitions, accessible through the partition table. As they are ordinary partitions they are accessible by ordinary partitioning tools. They should be dealt carefully with.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
==Proper MBR==&lt;br /&gt;
{{WARN|Tinkering with the default MBR and the Rescue &amp;amp; Recovery partition puts risk to your system. It can result in rendering the system completely unusable and severe data loss. You follow any instructions described here on your own risk.}}&lt;br /&gt;
&lt;br /&gt;
Consideration 6 of the Readme states:&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&amp;quot;The Master Boot Record (MBR) must be configured properly for the Rescue and Recovery application to function properly.  When possible, the Rescue and Recovery application attempts to ensure the proper configuration of the MBR.  This can only occur if the Rescue and Recovery application is installed after other applications that requires the MBR.&amp;quot;&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Apparently, the MBR is not &amp;quot;configured properly&amp;quot; if LILO or GRUB has been installed in it as the following is the case:&lt;br /&gt;
*the default MBR seems to ignore the active bit and always boots the first partition instead&lt;br /&gt;
*the default MBR contains code to catch a press of the appropriate button during bootup and boot the R&amp;amp;R partition in that case&lt;br /&gt;
*before booting the R&amp;amp;R, the default MBR changes it's partition type to 0x0b, otherwise it changes it to 0x12 (to hide it from Windows)&lt;br /&gt;
*the R&amp;amp;R software assumes that the first partition contains Windows&lt;br /&gt;
*the R&amp;amp;R partition needs to be of type 0x0b (FAT32) for the R&amp;amp;R software to work&lt;br /&gt;
&lt;br /&gt;
Since neither LILO nor GRUB can catch the press of the button (an undocumented mechanism anyway) it is not possible to invoke Rescue and Recovery by pressing the appropriate button during system boot, once LILO or GRUB have altered the MBR for their boot procedure.&lt;br /&gt;
&lt;br /&gt;
===GRUB in the MBR===&lt;br /&gt;
You can, however, boot the Rescue and Recovery partition from within a GRUB residing in your MBR. However if you leave its partitions type to 0x12 (Compaq disgnostics) this will result in an error message &amp;quot;c000021a, Fatal System Error&amp;quot; if you try to boot it. To avoid that and to make sure the recovery partition always is of the right type, add a line to change the partition type to 0x0b to the recovery partitions entry in your {{path|/boot/grub/menu.lst}}. Assuming your recovery partition is the second partition,  it should look like this:&lt;br /&gt;
  title           IBM Rescue and Recovery&lt;br /&gt;
  root            (hd0,1)&lt;br /&gt;
  '''parttype        (hd0,1) 0x0b'''&lt;br /&gt;
  '''unhide          (hd0,1)'''&lt;br /&gt;
  chainloader     +1&lt;br /&gt;
&lt;br /&gt;
We also add an &amp;lt;tt&amp;gt;unhide&amp;lt;/tt&amp;gt; line here because we are going to hide the recovery partition on every boot of Windows, so we need to unhide it, when the recovery partition is booted. This is because if we wouldn't hide the partition when booting Windows, it would be visible and accessable there and that's not what we want. So, assuming that Windows is on the first partition, the Windows entry should now look like this:&lt;br /&gt;
  title           Windows&lt;br /&gt;
  root            (hd0,0)&lt;br /&gt;
  '''hide            (hd0,1)'''&lt;br /&gt;
  chainloader     +1&lt;br /&gt;
&lt;br /&gt;
Now you should be able to boot the R&amp;amp;R partition from withing GRUB, residing in your MBR.&lt;br /&gt;
&lt;br /&gt;
===GRUB in a partitions boot sector===&lt;br /&gt;
A way to have your Access IBM button still functional on bootup, is to create a separate {{path|/boot}} partition, install GRUB to that partition and make it active.&lt;br /&gt;
{{NOTE|If the above finding is true that the MBR ignores the active bit, that partition has to be the first one.}}&lt;br /&gt;
*In the BIOS, set the IBM Predesktop Area to 'Secure'.&lt;br /&gt;
*Boot your Linux distributions installation CD.&lt;br /&gt;
*Follow the instructions and go through the regular installation process.&lt;br /&gt;
*Create a primary partition for /boot (the other stuff can go into the extended partitions) and when the time comes to install GRUB, make sure you install it into the boot sector of the boot partition.&lt;br /&gt;
*Set this partition as active. Leave the MBR alone.&lt;br /&gt;
&lt;br /&gt;
===grub4dos===&lt;br /&gt;
Another way to solve the trouble is using grub4dos, installed on your windows partition.&lt;br /&gt;
{{Fixme|This is insufficient information for a solution}}&lt;br /&gt;
&lt;br /&gt;
==External Sources==&lt;br /&gt;
* IBM page on [http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-4Q2QAK ThinkVantage Rescue and Recovery].&lt;br /&gt;
* [ftp://ftp.software.ibm.com/pc/pccbbs/thinkvantage_en/tvtrnr3_1027en.txt Rescue and Recovery Readme]&lt;br /&gt;
* [http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-46088    	&lt;br /&gt;
IBMs page about accessing the Recovery Partition if Linux has been installed and the F11 button no longer works]&lt;br /&gt;
* [http://sharadware.com/2005/07/11/suse-linux-winxp-access-ibm-on-the-thinkpad-t43/#comment-165 original GRUB R&amp;amp;R boot success report on SharedWare]&lt;br /&gt;
* [http://sharadware.com/2005/07/11/suse-linux-winxp-access-ibm-on-the-thinkpad-t43/ how to keep the AccessIBM functionality]&lt;br /&gt;
* [http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-54483 IBM Rescue &amp;amp; Recovery repair diskette]&lt;br /&gt;
&lt;br /&gt;
==Models featuring this technology==&lt;br /&gt;
* ThinkPad {{T42}}&lt;br /&gt;
* ThinkPad {{T43}}, {{T43p}}&lt;br /&gt;
* ThinkPad {{R52}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Glossary]]&lt;/div&gt;</summary>
		<author><name>Pebolle</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Rescue_and_Recovery&amp;diff=19222</id>
		<title>Rescue and Recovery</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Rescue_and_Recovery&amp;diff=19222"/>
		<updated>2006-02-01T23:15:08Z</updated>

		<summary type="html">&lt;p&gt;Pebolle: This is not a fault of the distro's&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=&amp;quot;100%&amp;quot;&lt;br /&gt;
|style=&amp;quot;vertical-align:top;padding-right:20px;width:10px;&amp;quot; | __NOTOC__&lt;br /&gt;
|style=&amp;quot;vertical-align:top&amp;quot; |&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin: 0; margin-right:10px; border: 1px solid #dfdfdf; padding: 0em 1em 1em 1em; background-color:#F8F8FF; align:right;&amp;quot;&amp;gt;&lt;br /&gt;
===Rescue and Recovery===&lt;br /&gt;
Rescue and Recovery version 3.0 consists of a bootable partition containing various system recovery tools, including full recovery of the preinstalled Windows XP partition. It can be activated by pressing the {{ibmkey|ThinkPad|#494949}}, {{ibmkey|Access IBM|#495988}} or {{ibmkey|ThinkVantage|#495988}} [[ThinkPad Button|Button]] during system boot. It contains a FAT filesystem (labeled &amp;quot;IBM_SERVICE&amp;quot;), and has partition type 0x12 (&amp;quot;Compaq diagnostics&amp;quot; in &amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
As opposed to a [[Hidden Protected Area|Hidden Protected Area]] Recovery partitions are ordinary partitions, accessible through the partition table. As they are ordinary partitions they are accessible by ordinary partitioning tools. They should be dealt carefully with.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
==Proper MBR==&lt;br /&gt;
{{WARN|Tinkering with the default MBR and the Rescue &amp;amp; Recovery partition puts risk to your system. It can result in rendering the system completely unusable and severe data loss. You follow any instructions described here on your own risk.}}&lt;br /&gt;
&lt;br /&gt;
Consideration 6 of the Readme states:&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&amp;quot;The Master Boot Record (MBR) must be configured properly for the Rescue and Recovery application to function properly.  When possible, the Rescue and Recovery application attempts to ensure the proper configuration of the MBR.  This can only occur if the Rescue and Recovery application is installed after other applications that requires the MBR.&amp;quot;&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To translate that, people found that the following is the case:&lt;br /&gt;
*the default MBR seems to ignore the active bit and always boots the first partition instead&lt;br /&gt;
*the default MBR contains code to catch a press of the appropriate button during bootup and boot the R&amp;amp;R partition in that case&lt;br /&gt;
*before booting the R&amp;amp;R, the default MBR changes it's partition type to 0x0b, otherwise it changes it to 0x12 (to hide it from Windows)&lt;br /&gt;
*the R&amp;amp;R software assumes that the first partition contains Windows&lt;br /&gt;
*the R&amp;amp;R partition needs to be of type 0x0b (FAT32) for the R&amp;amp;R software to work&lt;br /&gt;
&lt;br /&gt;
Apparently, the MBR is not &amp;quot;configured properly&amp;quot; if LILO or GRUB has been installed in it. Since they do not include code for triggering the button press, it is not possible to invoke Rescue and Recovery by pressing the appropriate button during system boot, once LILO or GRUB have been installed in the MBR.&lt;br /&gt;
&lt;br /&gt;
===GRUB in the MBR===&lt;br /&gt;
You can, however, boot the Rescue and Recovery partition from within a GRUB residing in your MBR. However if you leave its partitions type to 0x12 (Compaq disgnostics) this will result in an error message &amp;quot;c000021a, Fatal System Error&amp;quot; if you try to boot it. To avoid that and to make sure the recovery partition always is of the right type, add a line to change the partition type to 0x0b to the recovery partitions entry in your {{path|/boot/grub/menu.lst}}. Assuming your recovery partition is the second partition,  it should look like this:&lt;br /&gt;
  title           IBM Rescue and Recovery&lt;br /&gt;
  root            (hd0,1)&lt;br /&gt;
  '''parttype        (hd0,1) 0x0b'''&lt;br /&gt;
  '''unhide          (hd0,1)'''&lt;br /&gt;
  chainloader     +1&lt;br /&gt;
&lt;br /&gt;
We also add an &amp;lt;tt&amp;gt;unhide&amp;lt;/tt&amp;gt; line here because we are going to hide the recovery partition on every boot of Windows, so we need to unhide it, when the recovery partition is booted. This is because if we wouldn't hide the partition when booting Windows, it would be visible and accessable there and that's not what we want. So, assuming that Windows is on the first partition, the Windows entry should now look like this:&lt;br /&gt;
  title           Windows&lt;br /&gt;
  root            (hd0,0)&lt;br /&gt;
  '''hide            (hd0,1)'''&lt;br /&gt;
  chainloader     +1&lt;br /&gt;
&lt;br /&gt;
Now you should be able to boot the R&amp;amp;R partition from withing GRUB, residing in your MBR.&lt;br /&gt;
&lt;br /&gt;
===GRUB in a partitions boot sector===&lt;br /&gt;
A way to have your Access IBM button still functional on bootup, is to create a separate {{path|/boot}} partition, install GRUB to that partition and make it active.&lt;br /&gt;
{{NOTE|If the above finding is true that the MBR ignores the active bit, that partition has to be the first one.}}&lt;br /&gt;
*In the BIOS, set the IBM Predesktop Area to 'Secure'.&lt;br /&gt;
*Boot your Linux distributions installation CD.&lt;br /&gt;
*Follow the instructions and go through the regular installation process.&lt;br /&gt;
*Create a primary partition for /boot (the other stuff can go into the extended partitions) and when the time comes to install GRUB, make sure you install it into the boot sector of the boot partition.&lt;br /&gt;
*Set this partition as active. Leave the MBR alone.&lt;br /&gt;
&lt;br /&gt;
===grub4dos===&lt;br /&gt;
Another way to solve the trouble is using grub4dos, installed on your windows partition.&lt;br /&gt;
{{Fixme|This is insufficient information for a solution}}&lt;br /&gt;
&lt;br /&gt;
==External Sources==&lt;br /&gt;
* IBM page on [http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-4Q2QAK ThinkVantage Rescue and Recovery].&lt;br /&gt;
* [ftp://ftp.software.ibm.com/pc/pccbbs/thinkvantage_en/tvtrnr3_1027en.txt Rescue and Recovery Readme]&lt;br /&gt;
* [http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-46088    	&lt;br /&gt;
IBMs page about accessing the Recovery Partition if Linux has been installed and the F11 button no longer works]&lt;br /&gt;
* [http://sharadware.com/2005/07/11/suse-linux-winxp-access-ibm-on-the-thinkpad-t43/#comment-165 original GRUB R&amp;amp;R boot success report on SharedWare]&lt;br /&gt;
* [http://sharadware.com/2005/07/11/suse-linux-winxp-access-ibm-on-the-thinkpad-t43/ how to keep the AccessIBM functionality]&lt;br /&gt;
* [http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-54483 IBM Rescue &amp;amp; Recovery repair diskette]&lt;br /&gt;
&lt;br /&gt;
==Models featuring this technology==&lt;br /&gt;
* ThinkPad {{T42}}&lt;br /&gt;
* ThinkPad {{T43}}, {{T43p}}&lt;br /&gt;
* ThinkPad {{R52}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Glossary]]&lt;/div&gt;</summary>
		<author><name>Pebolle</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Rescue_and_Recovery&amp;diff=19221</id>
		<title>Rescue and Recovery</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Rescue_and_Recovery&amp;diff=19221"/>
		<updated>2006-02-01T23:04:00Z</updated>

		<summary type="html">&lt;p&gt;Pebolle: grub4dos needs to be fixed&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=&amp;quot;100%&amp;quot;&lt;br /&gt;
|style=&amp;quot;vertical-align:top;padding-right:20px;width:10px;&amp;quot; | __NOTOC__&lt;br /&gt;
|style=&amp;quot;vertical-align:top&amp;quot; |&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin: 0; margin-right:10px; border: 1px solid #dfdfdf; padding: 0em 1em 1em 1em; background-color:#F8F8FF; align:right;&amp;quot;&amp;gt;&lt;br /&gt;
===Rescue and Recovery===&lt;br /&gt;
Rescue and Recovery version 3.0 consists of a bootable partition containing various system recovery tools, including full recovery of the preinstalled Windows XP partition. It can be activated by pressing the {{ibmkey|ThinkPad|#494949}}, {{ibmkey|Access IBM|#495988}} or {{ibmkey|ThinkVantage|#495988}} [[ThinkPad Button|Button]] during system boot. It contains a FAT filesystem (labeled &amp;quot;IBM_SERVICE&amp;quot;), and has partition type 0x12 (&amp;quot;Compaq diagnostics&amp;quot; in &amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
As opposed to a [[Hidden Protected Area|Hidden Protected Area]] Recovery partitions are ordinary partitions, accessible through the partition table. As they are ordinary partitions they are accessible by ordinary partitioning tools. They should be dealt carefully with.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
==Proper MBR==&lt;br /&gt;
{{WARN|Tinkering with the default MBR and the Rescue &amp;amp; Recovery partition puts risk to your system. It can result in rendering the system completely unusable and severe data loss. You follow any instructions described here on your own risk.}}&lt;br /&gt;
&lt;br /&gt;
Consideration 6 of the Readme states:&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&amp;quot;The Master Boot Record (MBR) must be configured properly for the Rescue and Recovery application to function properly.  When possible, the Rescue and Recovery application attempts to ensure the proper configuration of the MBR.  This can only occur if the Rescue and Recovery application is installed after other applications that requires the MBR.&amp;quot;&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To translate that, people found that the following is the case:&lt;br /&gt;
*the default MBR seems to ignore the active bit and always boots the first partition instead&lt;br /&gt;
*the default MBR contains code to catch a press of the appropriate button during bootup and boot the R&amp;amp;R partition in that case&lt;br /&gt;
*before booting the R&amp;amp;R, the default MBR changes it's partition type to 0x0b, otherwise it changes it to 0x12 (to hide it from Windows)&lt;br /&gt;
*the R&amp;amp;R software assumes that the first partition contains Windows&lt;br /&gt;
*the R&amp;amp;R partition needs to be of type 0x0b (FAT32) for the R&amp;amp;R software to work&lt;br /&gt;
&lt;br /&gt;
Apparently, the MBR is not &amp;quot;configured properly&amp;quot; if LILO or GRUB has been installed in it. Since they do not include code for triggering the button press, it is not possible to invoke Rescue and Recovery by pressing the appropriate button during system boot, once LILO or GRUB have been installed in the MBR.&lt;br /&gt;
&lt;br /&gt;
===GRUB in the MBR===&lt;br /&gt;
You can, however, boot the Rescue and Recovery partition from within a GRUB residing in your MBR. It has been reported, that many Linux distributions change the recovery partitions type to 0x12 (Compaq disgnostics), which, if you try booting it, results in an error message &amp;quot;c000021a, Fatal System Error&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
To avoid that and make sure the recovery partition always is of the right type, add a line to change the partition type to 0x0b to the recovery partitions entry in your {{path|/boot/grub/menu.lst}}. Assuming your recovery partition is the second partition,  it should look like this:&lt;br /&gt;
  title           IBM Rescue and Recovery&lt;br /&gt;
  root            (hd0,1)&lt;br /&gt;
  '''parttype        (hd0,1) 0x0b'''&lt;br /&gt;
  '''unhide          (hd0,1)'''&lt;br /&gt;
  chainloader     +1&lt;br /&gt;
&lt;br /&gt;
We also add an &amp;lt;tt&amp;gt;unhide&amp;lt;/tt&amp;gt; line here because we are going to hide the recovery partition on every boot of Windows, so we need to unhide it, when the recovery partition is booted. This is because if we wouldn't hide the partition when booting Windows, it would be visible and accessable there and that's not what we want. So, assuming that Windows is on the first partition, the Windows entry should now look like this:&lt;br /&gt;
  title           Windows&lt;br /&gt;
  root            (hd0,0)&lt;br /&gt;
  '''hide            (hd0,1)'''&lt;br /&gt;
  chainloader     +1&lt;br /&gt;
&lt;br /&gt;
Now you should be able to boot the R&amp;amp;R partition from withing GRUB, residing in your MBR.&lt;br /&gt;
&lt;br /&gt;
===GRUB in a partitions boot sector===&lt;br /&gt;
A way to have your Access IBM button still functional on bootup, is to create a separate {{path|/boot}} partition, install GRUB to that partition and make it active.&lt;br /&gt;
{{NOTE|If the above finding is true that the MBR ignores the active bit, that partition has to be the first one.}}&lt;br /&gt;
*In the BIOS, set the IBM Predesktop Area to 'Secure'.&lt;br /&gt;
*Boot your Linux distributions installation CD.&lt;br /&gt;
*Follow the instructions and go through the regular installation process.&lt;br /&gt;
*Create a primary partition for /boot (the other stuff can go into the extended partitions) and when the time comes to install GRUB, make sure you install it into the boot sector of the boot partition.&lt;br /&gt;
*Set this partition as active. Leave the MBR alone.&lt;br /&gt;
&lt;br /&gt;
===grub4dos===&lt;br /&gt;
Another way to solve the trouble is using grub4dos, installed on your windows partition.&lt;br /&gt;
{{Fixme|This is insufficient information for a solution}}&lt;br /&gt;
&lt;br /&gt;
==External Sources==&lt;br /&gt;
* IBM page on [http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-4Q2QAK ThinkVantage Rescue and Recovery].&lt;br /&gt;
* [ftp://ftp.software.ibm.com/pc/pccbbs/thinkvantage_en/tvtrnr3_1027en.txt Rescue and Recovery Readme]&lt;br /&gt;
* [http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-46088    	&lt;br /&gt;
IBMs page about accessing the Recovery Partition if Linux has been installed and the F11 button no longer works]&lt;br /&gt;
* [http://sharadware.com/2005/07/11/suse-linux-winxp-access-ibm-on-the-thinkpad-t43/#comment-165 original GRUB R&amp;amp;R boot success report on SharedWare]&lt;br /&gt;
* [http://sharadware.com/2005/07/11/suse-linux-winxp-access-ibm-on-the-thinkpad-t43/ how to keep the AccessIBM functionality]&lt;br /&gt;
* [http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-54483 IBM Rescue &amp;amp; Recovery repair diskette]&lt;br /&gt;
&lt;br /&gt;
==Models featuring this technology==&lt;br /&gt;
* ThinkPad {{T42}}&lt;br /&gt;
* ThinkPad {{T43}}, {{T43p}}&lt;br /&gt;
* ThinkPad {{R52}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Glossary]]&lt;/div&gt;</summary>
		<author><name>Pebolle</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Rescue_and_Recovery&amp;diff=19220</id>
		<title>Rescue and Recovery</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Rescue_and_Recovery&amp;diff=19220"/>
		<updated>2006-02-01T22:58:00Z</updated>

		<summary type="html">&lt;p&gt;Pebolle: unneeded remark on using GRUB vs. using LILO&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=&amp;quot;100%&amp;quot;&lt;br /&gt;
|style=&amp;quot;vertical-align:top;padding-right:20px;width:10px;&amp;quot; | __NOTOC__&lt;br /&gt;
|style=&amp;quot;vertical-align:top&amp;quot; |&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin: 0; margin-right:10px; border: 1px solid #dfdfdf; padding: 0em 1em 1em 1em; background-color:#F8F8FF; align:right;&amp;quot;&amp;gt;&lt;br /&gt;
===Rescue and Recovery===&lt;br /&gt;
Rescue and Recovery version 3.0 consists of a bootable partition containing various system recovery tools, including full recovery of the preinstalled Windows XP partition. It can be activated by pressing the {{ibmkey|ThinkPad|#494949}}, {{ibmkey|Access IBM|#495988}} or {{ibmkey|ThinkVantage|#495988}} [[ThinkPad Button|Button]] during system boot. It contains a FAT filesystem (labeled &amp;quot;IBM_SERVICE&amp;quot;), and has partition type 0x12 (&amp;quot;Compaq diagnostics&amp;quot; in &amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
As opposed to a [[Hidden Protected Area|Hidden Protected Area]] Recovery partitions are ordinary partitions, accessible through the partition table. As they are ordinary partitions they are accessible by ordinary partitioning tools. They should be dealt carefully with.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
==Proper MBR==&lt;br /&gt;
{{WARN|Tinkering with the default MBR and the Rescue &amp;amp; Recovery partition puts risk to your system. It can result in rendering the system completely unusable and severe data loss. You follow any instructions described here on your own risk.}}&lt;br /&gt;
&lt;br /&gt;
Consideration 6 of the Readme states:&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&amp;quot;The Master Boot Record (MBR) must be configured properly for the Rescue and Recovery application to function properly.  When possible, the Rescue and Recovery application attempts to ensure the proper configuration of the MBR.  This can only occur if the Rescue and Recovery application is installed after other applications that requires the MBR.&amp;quot;&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To translate that, people found that the following is the case:&lt;br /&gt;
*the default MBR seems to ignore the active bit and always boots the first partition instead&lt;br /&gt;
*the default MBR contains code to catch a press of the appropriate button during bootup and boot the R&amp;amp;R partition in that case&lt;br /&gt;
*before booting the R&amp;amp;R, the default MBR changes it's partition type to 0x0b, otherwise it changes it to 0x12 (to hide it from Windows)&lt;br /&gt;
*the R&amp;amp;R software assumes that the first partition contains Windows&lt;br /&gt;
*the R&amp;amp;R partition needs to be of type 0x0b (FAT32) for the R&amp;amp;R software to work&lt;br /&gt;
&lt;br /&gt;
Apparently, the MBR is not &amp;quot;configured properly&amp;quot; if LILO or GRUB has been installed in it. Since they do not include code for triggering the button press, it is not possible to invoke Rescue and Recovery by pressing the appropriate button during system boot, once LILO or GRUB have been installed in the MBR.&lt;br /&gt;
&lt;br /&gt;
===GRUB in the MBR===&lt;br /&gt;
You can, however, boot the Rescue and Recovery partition from within a GRUB residing in your MBR. It has been reported, that many Linux distributions change the recovery partitions type to 0x12 (Compaq disgnostics), which, if you try booting it, results in an error message &amp;quot;c000021a, Fatal System Error&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
To avoid that and make sure the recovery partition always is of the right type, add a line to change the partition type to 0x0b to the recovery partitions entry in your {{path|/boot/grub/menu.lst}}. Assuming your recovery partition is the second partition,  it should look like this:&lt;br /&gt;
  title           IBM Rescue and Recovery&lt;br /&gt;
  root            (hd0,1)&lt;br /&gt;
  '''parttype        (hd0,1) 0x0b'''&lt;br /&gt;
  '''unhide          (hd0,1)'''&lt;br /&gt;
  chainloader     +1&lt;br /&gt;
&lt;br /&gt;
We also add an &amp;lt;tt&amp;gt;unhide&amp;lt;/tt&amp;gt; line here because we are going to hide the recovery partition on every boot of Windows, so we need to unhide it, when the recovery partition is booted. This is because if we wouldn't hide the partition when booting Windows, it would be visible and accessable there and that's not what we want. So, assuming that Windows is on the first partition, the Windows entry should now look like this:&lt;br /&gt;
  title           Windows&lt;br /&gt;
  root            (hd0,0)&lt;br /&gt;
  '''hide            (hd0,1)'''&lt;br /&gt;
  chainloader     +1&lt;br /&gt;
&lt;br /&gt;
Now you should be able to boot the R&amp;amp;R partition from withing GRUB, residing in your MBR.&lt;br /&gt;
&lt;br /&gt;
===GRUB in a partitions boot sector===&lt;br /&gt;
A way to have your Access IBM button still functional on bootup, is to create a separate {{path|/boot}} partition, install GRUB to that partition and make it active.&lt;br /&gt;
{{NOTE|If the above finding is true that the MBR ignores the active bit, that partition has to be the first one.}}&lt;br /&gt;
*In the BIOS, set the IBM Predesktop Area to 'Secure'.&lt;br /&gt;
*Boot your Linux distributions installation CD.&lt;br /&gt;
*Follow the instructions and go through the regular installation process.&lt;br /&gt;
*Create a primary partition for /boot (the other stuff can go into the extended partitions) and when the time comes to install GRUB, make sure you install it into the boot sector of the boot partition.&lt;br /&gt;
*Set this partition as active. Leave the MBR alone.&lt;br /&gt;
&lt;br /&gt;
===grub4dos===&lt;br /&gt;
Another way to solve the trouble is using grub4dos, installed on your windows partition.&lt;br /&gt;
&lt;br /&gt;
==External Sources==&lt;br /&gt;
* IBM page on [http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-4Q2QAK ThinkVantage Rescue and Recovery].&lt;br /&gt;
* [ftp://ftp.software.ibm.com/pc/pccbbs/thinkvantage_en/tvtrnr3_1027en.txt Rescue and Recovery Readme]&lt;br /&gt;
* [http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-46088    	&lt;br /&gt;
IBMs page about accessing the Recovery Partition if Linux has been installed and the F11 button no longer works]&lt;br /&gt;
* [http://sharadware.com/2005/07/11/suse-linux-winxp-access-ibm-on-the-thinkpad-t43/#comment-165 original GRUB R&amp;amp;R boot success report on SharedWare]&lt;br /&gt;
* [http://sharadware.com/2005/07/11/suse-linux-winxp-access-ibm-on-the-thinkpad-t43/ how to keep the AccessIBM functionality]&lt;br /&gt;
* [http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-54483 IBM Rescue &amp;amp; Recovery repair diskette]&lt;br /&gt;
&lt;br /&gt;
==Models featuring this technology==&lt;br /&gt;
* ThinkPad {{T42}}&lt;br /&gt;
* ThinkPad {{T43}}, {{T43p}}&lt;br /&gt;
* ThinkPad {{R52}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Glossary]]&lt;/div&gt;</summary>
		<author><name>Pebolle</name></author>
		
	</entry>
</feed>