<?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=Roo</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=Roo"/>
	<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/wiki/Special:Contributions/Roo"/>
	<updated>2026-04-17T09:07:16Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.12</generator>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=User:Roo&amp;diff=54768</id>
		<title>User:Roo</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=User:Roo&amp;diff=54768"/>
		<updated>2013-08-16T19:29:29Z</updated>

		<summary type="html">&lt;p&gt;Roo: Ping Edit&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Email roo -At- eserver.homelinux.org&amp;lt;br /&amp;gt;&lt;br /&gt;
xmpp  root -At- eserver.homelinux.org&lt;br /&gt;
&lt;br /&gt;
== Machine ==&lt;br /&gt;
&lt;br /&gt;
[[:Category:T61p|Thinkpad T61p]]&lt;br /&gt;
&lt;br /&gt;
== Ping Edit ==&lt;br /&gt;
account is alive&lt;/div&gt;</summary>
		<author><name>Roo</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Category:T61p&amp;diff=53564</id>
		<title>Category:T61p</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Category:T61p&amp;diff=53564"/>
		<updated>2012-03-06T08:20:21Z</updated>

		<summary type="html">&lt;p&gt;Roo: Removed Maintenace Manual for the non p Version&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot;&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;
=== ThinkPad T61p ===&lt;br /&gt;
This pages gives an overview of all ThinkPad T61p related topics.&lt;br /&gt;
&lt;br /&gt;
ref: {{LNVDOCURL|PD004986|Lenovo Support &amp;amp; downloads - Overview - ThinkPad T61, T61p}}&amp;lt;br&amp;gt;&lt;br /&gt;
ref: {{LNVDOCURL|PD008989|Lenovo Detailed Specifications - ThinkPad T61/T61p}}&lt;br /&gt;
&lt;br /&gt;
==== Standard Features ====&lt;br /&gt;
* One of the following standard voltage processors:&lt;br /&gt;
** [[Intel Core 2 Duo (Merom)]] 1.8, 2.0, 2.2, 2.4 or 2.6 GHz 800MHz, 2-4MB L2 Cache CPU&lt;br /&gt;
** [[Intel Core 2 Duo (Penryn)]]  2.1, 2.4, 2.5, 2.6 GHz 800MHz FSB, 3-6MB L2 Cache CPU&lt;br /&gt;
* One of the following discrete graphics adapters:&lt;br /&gt;
** [[nVidia Quadro FX 570M]] (128 MB) (Only in 14.1&amp;quot;)&lt;br /&gt;
** [[nVidia Quadro FX 570M]] (256 MB) (Only in 15.4&amp;quot;)&lt;br /&gt;
* One of the following displays:&lt;br /&gt;
** 14.1&amp;quot; TFT display with 1400x1050 (SXGA+) resolution&lt;br /&gt;
** 14.1&amp;quot; TFT display with 1400x900  (WXGA+) resolution&lt;br /&gt;
** 15.4&amp;quot; TFT display with 1680x1050 (WSXGA+) resolution&lt;br /&gt;
** 15.4&amp;quot; TFT display with 1920x1200 (WUXGA) resolution&lt;br /&gt;
* 1 or 2 GB [[PC2-5300]] memory standard upgradable to 4 GB (Also see the [[unofficial maximum memory specs]] for this model.)&lt;br /&gt;
* 60, 80, 100, 120, or 160 GB 5400 rpm 2.5&amp;quot; SATA HDD&lt;br /&gt;
* 60, 100, 120, 160, or 200 GB 7200 rpm 2.5&amp;quot; SATA HDD&lt;br /&gt;
** [[Full Disk Encryption (FDE)]] Available on some models&lt;br /&gt;
* Intel HD Audio with [[AD1984|AD1984JCP]] codec&lt;br /&gt;
* [[Intel Gigabit Ethernet (10/100/1000) PCI-Express]]&lt;br /&gt;
* [[UltraBay|UltraBay Slim]] with one of the following:&lt;br /&gt;
** [[UltraBay Slim Super Multi-Burner Drive]]&lt;br /&gt;
* [[MiniPCI Express slot]] 1 with one of the following:&lt;br /&gt;
** None (empty)&lt;br /&gt;
** [[ThinkPad 11a/b/g Wireless LAN Mini Express Adapter]]&lt;br /&gt;
** [[ThinkPad 11a/b/g/n Wireless LAN Mini Express Adapter]]&lt;br /&gt;
** [[Intel PRO/Wireless 3945ABG Mini-PCI Express Adapter]]&lt;br /&gt;
** [[Intel PRO/Wireless 4965AGN Mini-PCI Express Adapter]]&lt;br /&gt;
* [[MiniPCI Express slot]] 2 with one of the following:&lt;br /&gt;
** None (empty, not upgradable)&lt;br /&gt;
** [[Sierra Wireless MC5720|Verizon 1xEV-DO WWAN Adapter]]&lt;br /&gt;
** 1GB [[Intel® Turbo Memory hard drive cache]]&lt;br /&gt;
* [[MiniPCI Express slot]] 3 with one of the following:&lt;br /&gt;
** None (empty, not upgradable)&lt;br /&gt;
** [[Wireless USB (UWB)]]&lt;br /&gt;
* 1 [[CardBus slot]] (Type 2)&lt;br /&gt;
* 1 Slot with one of the following:&lt;br /&gt;
** [[ExpressCard slot|ExpressCard/54 slot]] &lt;br /&gt;
** [[Lenovo_Integrated_Smart_Card_Reader|SmartCard reader]]&lt;br /&gt;
* [[Ricoh_R5C843|4-in-1 Memory reader]]&lt;br /&gt;
* [[Embedded Security Subsystem|Trusted Computing Group TPM 1.2]]&lt;br /&gt;
* [[Active Protection System]]&lt;br /&gt;
* [[Integrated Fingerprint Reader]] on select models&lt;br /&gt;
* [[ThinkPad_Bluetooth_with_Enhanced_Data_Rate_(BDC-2)|Bluetooth]] on select models&lt;br /&gt;
* [[ThinkPad 56K Modem (MDC-1.5)]]&lt;br /&gt;
* [[UltraNav]] (TrackPoint / Touchpad combo)&lt;br /&gt;
* [[Firewire Port|Firewire 400]] (IEEE1394a) on select models&lt;br /&gt;
* [[Intel Active Management Technology (AMT)]] on select models&lt;br /&gt;
* [[Centrino Pro]] on select models&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|style=&amp;quot;vertical-align:top&amp;quot; |&lt;br /&gt;
[[Image:t60-models_nov06.jpg|ThinkPad T61]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Resources ====&lt;br /&gt;
* {{LNVDOCURL|PD004986|T61 Product Overview}}&lt;br /&gt;
* {{LNVDOCURL|UM000396|T61/p 15.4&amp;quot; Widescreen Hardware Maintenance Manual}}&lt;br /&gt;
* {{LNVDOCURL|UM001177|T61,T61p 14.1&amp;quot; standard screen Hardware Maintenance Manual}}&lt;br /&gt;
* {{LNVDOCURL|UM000546|T60/p Service and Troubleshooting Guide}}&lt;br /&gt;
* {{LNVDOCURL|UM001438|T61 Setup Guide}}&lt;br /&gt;
* [http://www5.pc.ibm.com/europe/me.nsf/LenovoDetail?OpenAgent&amp;amp;key=Notebooks:ThinkPad:ThinkPad+T+Series:Data+Sheet:English&amp;amp;&amp;amp;cntry=EUROPE-L T61 DataSheet]&lt;br /&gt;
* {{LNVDOCURL|PD004527|T61/p 14.1&amp;quot; (standard screen) System service parts}}&lt;br /&gt;
* {{LNVDOCURL|PD004343|T61/p 15.4&amp;quot; System service parts}}&lt;br /&gt;
&lt;br /&gt;
==== Reviews ====&lt;br /&gt;
* [http://www.xyzcomputing.com/index.php?option=content&amp;amp;task=view&amp;amp;id=1134 XYZ Computing], 2007-08-20&lt;br /&gt;
* [http://www.laptopmag.com/Review/Lenovo-ThinkPad-T61p.htm LAPTOP Magazine], 2007-08-08&lt;br /&gt;
* [http://www.notebookreview.com/default.asp?newsID=3889 NotebookReview.com], 2007-08-14&lt;br /&gt;
* [http://reviews.digitaltrends.com/review4745.html DigitalTrends], 2007-09-11&lt;br /&gt;
* [http://www.notebookcheck.com/Test-Lenovo-Thinkpad-T61p-Notebook.4401.0.html Notebookcheck.com], ??-08-2007 (german)&lt;br /&gt;
&lt;br /&gt;
====Installation Instructions====&lt;br /&gt;
* [[Installation instructions for the ThinkPad T61p]]&lt;br /&gt;
&lt;br /&gt;
[[Category:T Series]]&lt;/div&gt;</summary>
		<author><name>Roo</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Category:T61p&amp;diff=53563</id>
		<title>Category:T61p</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Category:T61p&amp;diff=53563"/>
		<updated>2012-03-06T08:19:08Z</updated>

		<summary type="html">&lt;p&gt;Roo: Added Maintenance Manuals for the different Versions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot;&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;
=== ThinkPad T61p ===&lt;br /&gt;
This pages gives an overview of all ThinkPad T61p related topics.&lt;br /&gt;
&lt;br /&gt;
ref: {{LNVDOCURL|PD004986|Lenovo Support &amp;amp; downloads - Overview - ThinkPad T61, T61p}}&amp;lt;br&amp;gt;&lt;br /&gt;
ref: {{LNVDOCURL|PD008989|Lenovo Detailed Specifications - ThinkPad T61/T61p}}&lt;br /&gt;
&lt;br /&gt;
==== Standard Features ====&lt;br /&gt;
* One of the following standard voltage processors:&lt;br /&gt;
** [[Intel Core 2 Duo (Merom)]] 1.8, 2.0, 2.2, 2.4 or 2.6 GHz 800MHz, 2-4MB L2 Cache CPU&lt;br /&gt;
** [[Intel Core 2 Duo (Penryn)]]  2.1, 2.4, 2.5, 2.6 GHz 800MHz FSB, 3-6MB L2 Cache CPU&lt;br /&gt;
* One of the following discrete graphics adapters:&lt;br /&gt;
** [[nVidia Quadro FX 570M]] (128 MB) (Only in 14.1&amp;quot;)&lt;br /&gt;
** [[nVidia Quadro FX 570M]] (256 MB) (Only in 15.4&amp;quot;)&lt;br /&gt;
* One of the following displays:&lt;br /&gt;
** 14.1&amp;quot; TFT display with 1400x1050 (SXGA+) resolution&lt;br /&gt;
** 14.1&amp;quot; TFT display with 1400x900  (WXGA+) resolution&lt;br /&gt;
** 15.4&amp;quot; TFT display with 1680x1050 (WSXGA+) resolution&lt;br /&gt;
** 15.4&amp;quot; TFT display with 1920x1200 (WUXGA) resolution&lt;br /&gt;
* 1 or 2 GB [[PC2-5300]] memory standard upgradable to 4 GB (Also see the [[unofficial maximum memory specs]] for this model.)&lt;br /&gt;
* 60, 80, 100, 120, or 160 GB 5400 rpm 2.5&amp;quot; SATA HDD&lt;br /&gt;
* 60, 100, 120, 160, or 200 GB 7200 rpm 2.5&amp;quot; SATA HDD&lt;br /&gt;
** [[Full Disk Encryption (FDE)]] Available on some models&lt;br /&gt;
* Intel HD Audio with [[AD1984|AD1984JCP]] codec&lt;br /&gt;
* [[Intel Gigabit Ethernet (10/100/1000) PCI-Express]]&lt;br /&gt;
* [[UltraBay|UltraBay Slim]] with one of the following:&lt;br /&gt;
** [[UltraBay Slim Super Multi-Burner Drive]]&lt;br /&gt;
* [[MiniPCI Express slot]] 1 with one of the following:&lt;br /&gt;
** None (empty)&lt;br /&gt;
** [[ThinkPad 11a/b/g Wireless LAN Mini Express Adapter]]&lt;br /&gt;
** [[ThinkPad 11a/b/g/n Wireless LAN Mini Express Adapter]]&lt;br /&gt;
** [[Intel PRO/Wireless 3945ABG Mini-PCI Express Adapter]]&lt;br /&gt;
** [[Intel PRO/Wireless 4965AGN Mini-PCI Express Adapter]]&lt;br /&gt;
* [[MiniPCI Express slot]] 2 with one of the following:&lt;br /&gt;
** None (empty, not upgradable)&lt;br /&gt;
** [[Sierra Wireless MC5720|Verizon 1xEV-DO WWAN Adapter]]&lt;br /&gt;
** 1GB [[Intel® Turbo Memory hard drive cache]]&lt;br /&gt;
* [[MiniPCI Express slot]] 3 with one of the following:&lt;br /&gt;
** None (empty, not upgradable)&lt;br /&gt;
** [[Wireless USB (UWB)]]&lt;br /&gt;
* 1 [[CardBus slot]] (Type 2)&lt;br /&gt;
* 1 Slot with one of the following:&lt;br /&gt;
** [[ExpressCard slot|ExpressCard/54 slot]] &lt;br /&gt;
** [[Lenovo_Integrated_Smart_Card_Reader|SmartCard reader]]&lt;br /&gt;
* [[Ricoh_R5C843|4-in-1 Memory reader]]&lt;br /&gt;
* [[Embedded Security Subsystem|Trusted Computing Group TPM 1.2]]&lt;br /&gt;
* [[Active Protection System]]&lt;br /&gt;
* [[Integrated Fingerprint Reader]] on select models&lt;br /&gt;
* [[ThinkPad_Bluetooth_with_Enhanced_Data_Rate_(BDC-2)|Bluetooth]] on select models&lt;br /&gt;
* [[ThinkPad 56K Modem (MDC-1.5)]]&lt;br /&gt;
* [[UltraNav]] (TrackPoint / Touchpad combo)&lt;br /&gt;
* [[Firewire Port|Firewire 400]] (IEEE1394a) on select models&lt;br /&gt;
* [[Intel Active Management Technology (AMT)]] on select models&lt;br /&gt;
* [[Centrino Pro]] on select models&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|style=&amp;quot;vertical-align:top&amp;quot; |&lt;br /&gt;
[[Image:t60-models_nov06.jpg|ThinkPad T61]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Resources ====&lt;br /&gt;
* {{LNVDOCURL|PD004986|T61 Product Overview}}&lt;br /&gt;
* {{LNVDOCURL|UM000396|T61/p 15.4&amp;quot; Widescreen Hardware Maintenance Manual}}&lt;br /&gt;
* {{LNVDOCURL|UM001583|T61 14.1 Hardware Maintenance Manual}}&lt;br /&gt;
* {{LNVDOCURL|UM001177|T61,T61p 14.1&amp;quot; standard screen Hardware Maintenance Manual}}&lt;br /&gt;
* {{LNVDOCURL|UM000546|T60/p Service and Troubleshooting Guide}}&lt;br /&gt;
* {{LNVDOCURL|UM001438|T61 Setup Guide}}&lt;br /&gt;
* [http://www5.pc.ibm.com/europe/me.nsf/LenovoDetail?OpenAgent&amp;amp;key=Notebooks:ThinkPad:ThinkPad+T+Series:Data+Sheet:English&amp;amp;&amp;amp;cntry=EUROPE-L T61 DataSheet]&lt;br /&gt;
* {{LNVDOCURL|PD004527|T61/p 14.1&amp;quot; (standard screen) System service parts}}&lt;br /&gt;
* {{LNVDOCURL|PD004343|T61/p 15.4&amp;quot; System service parts}}&lt;br /&gt;
&lt;br /&gt;
==== Reviews ====&lt;br /&gt;
* [http://www.xyzcomputing.com/index.php?option=content&amp;amp;task=view&amp;amp;id=1134 XYZ Computing], 2007-08-20&lt;br /&gt;
* [http://www.laptopmag.com/Review/Lenovo-ThinkPad-T61p.htm LAPTOP Magazine], 2007-08-08&lt;br /&gt;
* [http://www.notebookreview.com/default.asp?newsID=3889 NotebookReview.com], 2007-08-14&lt;br /&gt;
* [http://reviews.digitaltrends.com/review4745.html DigitalTrends], 2007-09-11&lt;br /&gt;
* [http://www.notebookcheck.com/Test-Lenovo-Thinkpad-T61p-Notebook.4401.0.html Notebookcheck.com], ??-08-2007 (german)&lt;br /&gt;
&lt;br /&gt;
====Installation Instructions====&lt;br /&gt;
* [[Installation instructions for the ThinkPad T61p]]&lt;br /&gt;
&lt;br /&gt;
[[Category:T Series]]&lt;/div&gt;</summary>
		<author><name>Roo</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=CompactFlash_boot_drive&amp;diff=53262</id>
		<title>CompactFlash boot drive</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=CompactFlash_boot_drive&amp;diff=53262"/>
		<updated>2011-12-27T18:59:44Z</updated>

		<summary type="html">&lt;p&gt;Roo: /* useful links */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
[[image:Addonics.JPG|thumb|Addonics Dual CF-IDE HDD Adapter with 8GB SanDisk Extreme IV CompactFlash]]&lt;br /&gt;
Changing your HDD for a CF boot drive (CompactFlash card on CF-PATA/SATA adapter) is an alternative to using SSD to boost the performance.&lt;br /&gt;
&lt;br /&gt;
This is primarily done by ThinkPad {{X40}}, {{X41}} and {{X41 Tablet}} series owners due to the extremely slow speed of 1.8&amp;quot; HDD.&lt;br /&gt;
&lt;br /&gt;
Previously, using Compact Flash cards meant giving up on storage capacity. Nowadays the biggest available CF sizes are up to 100 GB so you even gain more storage space compared to a classic 1.8&amp;quot; HDD.&lt;br /&gt;
&lt;br /&gt;
ThinkPads utilizing PATA controller for the HDD slot can recognize both CF cards installed on a dual adapter. While newer ThinkPads, such as X41, which utilize SATA controller, can only recognize the single card installed on the primary slot.&lt;br /&gt;
&lt;br /&gt;
===Advantages of CF boot drive===&lt;br /&gt;
* Much faster access time (&amp;lt;1ms for CF, &amp;gt;20ms for 4200RPM HDD and &amp;gt;15ms for 5400RPM HDD)&lt;br /&gt;
* Higher read throughput for &amp;gt;8KB blocks (may differ depending on brand, model, partition type and cluster size)&lt;br /&gt;
* Higher write throughput for &amp;gt;64KB blocks (may differ depending on brand, model, partition type and cluster size)&lt;br /&gt;
* Minimal risk of mechanical damage due to shock and vibration. [[Active Protection System]] is therefore unnecessary)&lt;br /&gt;
* Does not generate any noise or vibrations&lt;br /&gt;
* (Possibly) a slight increase in battery life&lt;br /&gt;
* (Possibly) less heat being generated&lt;br /&gt;
&lt;br /&gt;
===Disadvantages of CF boot drive===&lt;br /&gt;
* Lower read throughput for &amp;lt;8KB blocks (may differ depending on brand, model, partition type and cluster size)&lt;br /&gt;
* Lower write throughput for &amp;lt;64KB blocks (may differ depending on brand, model, partition type and cluster size)&lt;br /&gt;
* Lower capacity&lt;br /&gt;
* Higher price per GB&lt;br /&gt;
* Not officially supported&lt;br /&gt;
* Invoke boot error 2010 on certain ThinkPads, including the X41 series&lt;br /&gt;
&lt;br /&gt;
{{NOTE|A often mentioned disadvantage of flash-based storage is the limited number of write cycles (typically 100,000 for the current generation Single-Level Cell (SLC) NAND, the type usually used in the faster CF cards). This should not however be as much of an issue because...&amp;lt;br&amp;gt;&lt;br /&gt;
* The 100,000 write cycles applies to each address block separately in the card, not to the card as a whole&amp;lt;br&amp;gt;&lt;br /&gt;
* The flash controller automatically distribute write operations evenly (wear leveling), so that the number of writes to each address block is kept low&amp;lt;br&amp;gt;&lt;br /&gt;
Therefore, it should take years of typical real world usage to render a current flash memory card based on SLC NAND unusable&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, manufacturers have started in 2008 using Multi-Level Cell (MLC) NAND to make SSD. MLC NAND typically has only about 10,000 write cycles. To complicate things further a company called EasyCo claims her Managed Flash Technology (MFT) &amp;quot;increases the write-life of Flash Disks more than 50-fold&amp;quot;, which could be what made possible the launch of SSD based on MLC NAND. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If in doubt, check with the manufacturer directly for details.&lt;br /&gt;
&lt;br /&gt;
See [http://www.storagesearch.com/ssdmyths-endurance.html] and [http://www.storagesearch.com/ssd-slc-mlc-notes.html] for more information.}}&lt;br /&gt;
&lt;br /&gt;
==What you need==&lt;br /&gt;
* A passive CF to PATA/SATA adapter&lt;br /&gt;
** Sadly, the X30's native CF slot does not appear to be bootable, so you're stuck using an adapter in the PATA drive sled like everyone else.&lt;br /&gt;
* One or more CompactFlash cards with the following parameters:&lt;br /&gt;
** (For Windows) Identify itself as a fixed disk instead of removable media&lt;br /&gt;
** (Preferably) UDMA support&lt;br /&gt;
** (Preferably) 266X speed or better&lt;br /&gt;
&lt;br /&gt;
==CF to PATA/SATA adapter==&lt;br /&gt;
===CF to PATA (IDE)===&lt;br /&gt;
These adapters will work with both ThinkPads with 1.8&amp;quot; and 2.5&amp;quot; HDD slot with PATA interface&lt;br /&gt;
* Addonics AD44MIDECF (single slot) [http://www.addonics.com/products/flash_memory_reader/ad44midecf.asp]&lt;br /&gt;
* Addonics AD44MIDE2CF (dual slot) [http://www.addonics.com/products/flash_memory_reader/ad44midecf.asp]&lt;br /&gt;
&lt;br /&gt;
{{WARN|Many of the adapters sold in eBay may not be usable for x40 as their #1 pin is on the left side (looking from the top, usually marked by a white diagonal line). The #1 pin should be on the right side as the Addonics series. Flipping the insertion of popular &amp;quot;V B1&amp;quot; adapter works but there is no guarantee of performance and space may not permit. On the other hand PA-CF18H adapter has been reported to work fine and may be a good alternative for Addonics converters. Please read page 15 of the forum discussion link below this page.}}&lt;br /&gt;
&lt;br /&gt;
{{WARN|The second (slave) slots on dual slot adapters do not work on newer ThinkPads, including the {{X41}}, {{X41T}}, {{T43}}, {{T43p}} and {{R52}}. Because their IDE interface is actually connected to the SATA controller via an IDE-SATA bridge.&lt;br /&gt;
The second slot works fine on the others, like the X40, which use a native PATA controller, and 2 separated drives will be recognized.}}&lt;br /&gt;
&lt;br /&gt;
{{WARN|On the {{X41}}, {{X41T}}, {{T43}}, {{T43p}} and {{R52}}, the system will complain that an unsupported disk is installed (Error 2010), but will continue to boot after 5-10 seconds or after pressing enter (assuming you have a recent BIOS installed). The beeps can be muted by using the hardware mute button before the last shutdown/reboot}}&lt;br /&gt;
&lt;br /&gt;
===CF to SATA===&lt;br /&gt;
These adapters are needed for newer ThinkPads with native SATA interface.&lt;br /&gt;
{{Todo|If someone has tested any, please add them here}}&lt;br /&gt;
&lt;br /&gt;
==CompactFlash cards==&lt;br /&gt;
&lt;br /&gt;
===Speed===&lt;br /&gt;
While many CF cards claim to have high throughput, it's not necessarily a good indicator. As the claimed throughput is usually only attainable in specific situations (usually sequential and large block operations). But in typical usage as a boot drive, it usually involves lots of random and small block operations.&lt;br /&gt;
&lt;br /&gt;
Therefore, the actual performance figures can only be found out via real world benchmarks.&lt;br /&gt;
&lt;br /&gt;
Below is a list of some of the cards reported to be working, it's by no mean authoritative and final.&lt;br /&gt;
&lt;br /&gt;
{{WARN|&lt;br /&gt;
Most CompactFlash cards by default identify themselves as '''removable media''' instead of '''fixed disk'''. Which is fine for Linux, but not for Windows.&lt;br /&gt;
&lt;br /&gt;
If you have to use a CF card that has the type bits set to Removable and want to install Windows XP you can work around it as follows;&lt;br /&gt;
* Use Linux to partition the drive with a FAT32 partition (you can boot from one of the LiveCD/LiveUSB distributions for this), and set the partition bootable.&lt;br /&gt;
* Start the install of Windows, during install you will be given the opportunity to migrate to NTFS&lt;br /&gt;
* After the install is finished you will need to install the Hitachi microdrive disk drivers (google for XPfildrvr1224.zip), which will mask the removable bits and should allow suspend and other operations that fail on a removable drive to work.}}&lt;br /&gt;
&lt;br /&gt;
===Transcend 133X/266X/300X===&lt;br /&gt;
These cards are known to identify themselves as fixed disk via CF-IDE adapters without any manual intervention, and is of good value, and speed (for 266X/300X).&lt;br /&gt;
&lt;br /&gt;
===SanDisk Extreme===&lt;br /&gt;
SanDisk used to provide a utility (when asked) under NDA to change the type bit to Fixed disk. It has however changed it stance on this and now refuses to provide it. This utility (ATCFWCHG.COM) however can be found for download at various places (try Google).&lt;br /&gt;
&lt;br /&gt;
You will need to boot DOS and run it with the CF configured as either the master on the primary IDE interface or the master on the secondary interface. It will not work if the drive is attached as a slave or to any other interfaces.&lt;br /&gt;
&lt;br /&gt;
To set a SanDisk Extreme adapter attached to the primary IDE interface to Fixed disk&lt;br /&gt;
 ATCFWCHG.COM /P /F&lt;br /&gt;
To set a SanDisk Extreme adapter attached to the secondary IDE interface (Ultrabay) to Fixed disk&lt;br /&gt;
 ATCFWCHG.COM /S /F&lt;br /&gt;
&lt;br /&gt;
{{NOTE|It seems that the ATCFWCHG.EXE utility is incompatible with SATA to IDE bridges, such as found in the X41. In those cases you will have to connect the CF card to another computer or ThinkPad with a regular IDE (PATA) interface to change the flag, after which you can put it into the ThinkPad X41.}}&lt;br /&gt;
&lt;br /&gt;
===SanDisk Ultra II 4 GB===&lt;br /&gt;
This card doesn't work with the Debian stable 2.6.26 kernel in a X41 tablet with SATA controller, it seems to be to slow.&lt;br /&gt;
&lt;br /&gt;
===Kingston Ultimate===&lt;br /&gt;
The Kingston Ultimate CF card ships as CF-Removable, and although Kingston admits it is possible to change the type to Fixed disk, it was not willing when asked to provide a tool/application for this purpose.&lt;br /&gt;
&lt;br /&gt;
But supposedly the Kingston card automatically changes ID based on the adapter used, so it will ID as fixed disk when used with an IDE-CF or SATA-CF adapter, but will ID as CF-Removable when used with a PCMCIA adapter.&lt;br /&gt;
&lt;br /&gt;
===Silicon Power 300X===&lt;br /&gt;
to be updated&lt;br /&gt;
&lt;br /&gt;
===Photofast 533X===&lt;br /&gt;
Works fine, read performance up to 43mbit/s acording to hdparm&lt;br /&gt;
&lt;br /&gt;
==Storage capacity issues==&lt;br /&gt;
Due to the limited capacity for high speed CF cards, the space may not be enough for some users. As a typical OS may already consume 3-4GB already. Here are some suggestions on how to work around it. Each of the below suggestion has its pros and cons, and should be selected on a case-to-case basis.&lt;br /&gt;
* Put only the OS and frequently accessed files on the main CF card&lt;br /&gt;
* (If dual-CF is possible) Add a second CF card, which will show up as an additional drive. Moreover since the speed needs not be as fast as the main CF card, a slower card with larger capacity could be desirable.&lt;br /&gt;
* On certain ThinkPads, there is an internal card reader (e.g. CF on X20/X30, and SD/SDHC on X40/X41/X60/X61) which can house another flash card. However, the speed is certainly to be worse than connecting to the PATA/SATA interface.&lt;br /&gt;
* Use a PC Card/ExpressCard SSD drive. However, the price of SSD is likely to be more expensive than flash cards.&lt;br /&gt;
* Use a PC Card/ExpressCard flash reader to house another flash card.&lt;br /&gt;
* Use a USB drive. Take mind that the drive will stick out, which is less desirable as a permanent solution (appearance/damage/speed especially if USB 2.0 is not supported)&lt;br /&gt;
* (If network access is readily available) Store the files on a network drive (e.g. server disk/NAS)&lt;br /&gt;
&lt;br /&gt;
==Linux issues==&lt;br /&gt;
With the Addonics adapters listed above (and possibly with other ones as well), the kernel's libata driver might warn about a 40-wire cable and default to UDMA/33 operation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[ 27.831146] ata1.00: limited to UDMA/33 due to 40-wire cable&lt;br /&gt;
[ 27.846808] ata1.00: configured for UDMA/33&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This has been observed with version 2.6.24 of the kernel, and it may affect older ones, too.  A patch is available from [http://permalink.gmane.org/gmane.linux.ide/26879] that adds a &amp;lt;tt&amp;gt;force_cbl&amp;lt;/tt&amp;gt; kernel parameter.  After applying the patch and recompiling the kernel, you can then set &amp;lt;tt&amp;gt;force_cbl=80&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[    7.140864] ata1: forcing 80c&lt;br /&gt;
[    7.140886] ata1.00: CFA: LEXAR ATA FLASH CARD, 20071016, max UDMA/100&lt;br /&gt;
[    7.140890] ata1.00: 7831152 sectors, multi 0: LBA &lt;br /&gt;
[    7.140908] ata1.00: forcing 80c&lt;br /&gt;
[    7.141625] ata1.00: configured for UDMA/100&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With the patch enabled, the above system achieves 42MB/sec read performance according to &amp;lt;tt&amp;gt;hdparm&amp;lt;/tt&amp;gt;.  Without it, performance suffers: 23MB/sec.&lt;br /&gt;
&lt;br /&gt;
==Linux tuning==&lt;br /&gt;
* edit /etc/fstab and add the option noatime to disable writing of last access timestamps on each file or directory access for each ext3 filesystem&lt;br /&gt;
 LABEL=/ / ext3 defaults,noatime 1 1&lt;br /&gt;
* disable swap (remove swap volume from /etc/fstab), just make sure you have enough memory installed (which since memory is cheap, should be easy to just max out the machine!)&lt;br /&gt;
* increase writeback time (add the following line to /etc/rc.local)&lt;br /&gt;
 echo 1500 &amp;gt; /proc/sys/vm/dirty_writeback_centisecs&lt;br /&gt;
* remove beagle (if installed) from your system, it indexes the filesystem, but causes disk activity and keeps your cpu busy&lt;br /&gt;
 rpm -e beagle beagle-gnome beagle-evolution&lt;br /&gt;
&lt;br /&gt;
== Windows tuning==&lt;br /&gt;
*** Instead of throwing together all kind of tweaks here, it's probably better to keep the tweaks be CF boot-specific... And link to another page showing the more generic tweaks... ***&lt;br /&gt;
Due to the space constraints of CF, you will want to do some tuning of Windows. In addition there are some tunes that help performance, and can even help in the case where your not changing your HDD to CF.&lt;br /&gt;
* Do a minimal Windows XP install (not a recovery) with nLite, this allows you to remove components of Windows before they even get to the HDD, such as Movie Maker, Windows Messenger and Outlook Express that you might not need, while at the same time slipstreaming the latest ServicePack (SP3 for XP). Alternatively if you cannot reinstall, you can try the public domain xplite program, but for it to be useful you need to pay, and it does not work with SP3.&lt;br /&gt;
* Disable NTFS from updating the last access of a file or directory on each access. This causes NTFS to do a write for each file read operation and writes are always slower, and with flash storage might not be a good idea, for this you need to set NtfsDisableLastAccessUpdate in your registry.&lt;br /&gt;
* Disable Indexing of the drive (drive properties)&lt;br /&gt;
* Compress the drive (NTFS only), this saves space and might in some cases even be faster as it will require less disk access (drive properties)&lt;br /&gt;
* Disable swap (system properties), just make sure you have enough memory (just max out the machine, RAM is cheap these days)&lt;br /&gt;
* Disable windows system restore (system properties), if you feel you can live without it. It reserves a defined amount of space for this purpose&lt;br /&gt;
* Do not enable Hibernation, it requires a huge hibernation file and suspend should be good enough.&lt;br /&gt;
* Disable programs from starting on boot that you do not need (do you really need Java, Adobe, Apple iTunes, etc from starting on boot each time?) with a program such as MSCONFIG (-&amp;gt;Start -&amp;gt;Run -&amp;gt; msconfig)&lt;br /&gt;
* Disable Windows services that you do not need from starting on boot&lt;br /&gt;
* Only install the IBM/Lenovo applications you truly know you will need (in my case, only the Hotkey utility and the Wireless drivers package to be able to disable wireless with Fn-F5)&lt;br /&gt;
* Never do a full install of an application, do a custom install and prune the options to remove all the stuff you will never use&lt;br /&gt;
* Disable HW devices in device manager that you do not need (in my case, the Modem and Infrared)&lt;br /&gt;
* Only install drivers you actually need (video, ethernet, wireless and sound in my case), and remove the C:\DRIVERS directory after your done.&lt;br /&gt;
* Do not run defrag, it is pointless on flash media and just causes unnecessary writes!&lt;br /&gt;
With this I was able to Install Windows XP (SP3) with Office 2003 (SP2), IE7, WMP 11, Symantec Client Security, Adobe acrobat reader, Firefox, Thunderbird, Pidgin and Palm Desktop in addition to the necessary drivers in under 4GB of an 8GB CF card on a ThinkPad X40.&lt;br /&gt;
&lt;br /&gt;
==useful links==&lt;br /&gt;
* [http://forum.thinkpads.com/viewtopic.php?t=41568 ThinkPads Forum discussion on the subject]&lt;br /&gt;
* [http://www.hjreggel.net/cardspeed/index.html Flash memory speed - check out the UDMA CF link]&lt;br /&gt;
* [http://www.nliteos.com/ nLite - Utility to create a minimal Windows install CD with fixes and drivers]&lt;br /&gt;
* [http://www.daniel-boehmer.de/cf-ssd.html using Compact Flash cards as SSD alternative]&lt;/div&gt;</summary>
		<author><name>Roo</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Category:T61p&amp;diff=53121</id>
		<title>Category:T61p</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Category:T61p&amp;diff=53121"/>
		<updated>2011-11-05T18:43:28Z</updated>

		<summary type="html">&lt;p&gt;Roo: replaced old ibm MIGR URLS with LNVDOCURL template&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot;&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;
=== ThinkPad T61p ===&lt;br /&gt;
This pages gives an overview of all ThinkPad T61p related topics.&lt;br /&gt;
&lt;br /&gt;
ref: {{LNVDOCURL|PD004986|Lenovo Support &amp;amp; downloads - Overview - ThinkPad T61, T61p}}&amp;lt;br&amp;gt;&lt;br /&gt;
ref: {{LNVDOCURL|PD008989|Lenovo Detailed Specifications - ThinkPad T61/T61p}}&lt;br /&gt;
&lt;br /&gt;
==== Standard Features ====&lt;br /&gt;
* One of the following standard voltage processors:&lt;br /&gt;
** [[Intel Core 2 Duo (Merom)]] 1.8, 2.0, 2.2, 2.4 or 2.6 GHz 800MHz, 2-4MB L2 Cache CPU&lt;br /&gt;
** [[Intel Core 2 Duo (Penryn)]]  2.1, 2.4, 2.5, 2.6 GHz 800MHz FSB, 3-6MB L2 Cache CPU&lt;br /&gt;
* One of the following discrete graphics adapters:&lt;br /&gt;
** [[nVidia Quadro FX 570M]] (128 MB) (Only in 14.1&amp;quot;)&lt;br /&gt;
** [[nVidia Quadro FX 570M]] (256 MB) (Only in 15.4&amp;quot;)&lt;br /&gt;
* One of the following displays:&lt;br /&gt;
** 14.1&amp;quot; TFT display with 1400x1050 (SXGA+) resolution&lt;br /&gt;
** 14.1&amp;quot; TFT display with 1400x900  (WXGA+) resolution&lt;br /&gt;
** 15.4&amp;quot; TFT display with 1680x1050 (WSXGA+) resolution&lt;br /&gt;
** 15.4&amp;quot; TFT display with 1920x1200 (WUXGA) resolution&lt;br /&gt;
* 1 or 2 GB [[PC2-5300]] memory standard upgradable to 4 GB (Also see the [[unofficial maximum memory specs]] for this model.)&lt;br /&gt;
* 60, 80, 100, 120, or 160 GB 5400 rpm 2.5&amp;quot; SATA HDD&lt;br /&gt;
* 60, 100, 120, 160, or 200 GB 7200 rpm 2.5&amp;quot; SATA HDD&lt;br /&gt;
** [[Full Disk Encryption (FDE)]] Available on some models&lt;br /&gt;
* Intel HD Audio with [[AD1984|AD1984JCP]] codec&lt;br /&gt;
* [[Intel Gigabit Ethernet (10/100/1000) PCI-Express]]&lt;br /&gt;
* [[UltraBay|UltraBay Slim]] with one of the following:&lt;br /&gt;
** [[UltraBay Slim Super Multi-Burner Drive]]&lt;br /&gt;
* [[MiniPCI Express slot]] 1 with one of the following:&lt;br /&gt;
** None (empty)&lt;br /&gt;
** [[ThinkPad 11a/b/g Wireless LAN Mini Express Adapter]]&lt;br /&gt;
** [[ThinkPad 11a/b/g/n Wireless LAN Mini Express Adapter]]&lt;br /&gt;
** [[Intel PRO/Wireless 3945ABG Mini-PCI Express Adapter]]&lt;br /&gt;
** [[Intel PRO/Wireless 4965AGN Mini-PCI Express Adapter]]&lt;br /&gt;
* [[MiniPCI Express slot]] 2 with one of the following:&lt;br /&gt;
** None (empty, not upgradable)&lt;br /&gt;
** [[Sierra Wireless MC5720|Verizon 1xEV-DO WWAN Adapter]]&lt;br /&gt;
** 1GB [[Intel® Turbo Memory hard drive cache]]&lt;br /&gt;
* [[MiniPCI Express slot]] 3 with one of the following:&lt;br /&gt;
** None (empty, not upgradable)&lt;br /&gt;
** [[Wireless USB (UWB)]]&lt;br /&gt;
* 1 [[CardBus slot]] (Type 2)&lt;br /&gt;
* 1 Slot with one of the following:&lt;br /&gt;
** [[ExpressCard slot|ExpressCard/54 slot]] &lt;br /&gt;
** [[Lenovo_Integrated_Smart_Card_Reader|SmartCard reader]]&lt;br /&gt;
* [[Ricoh_R5C843|4-in-1 Memory reader]]&lt;br /&gt;
* [[Embedded Security Subsystem|Trusted Computing Group TPM 1.2]]&lt;br /&gt;
* [[Active Protection System]]&lt;br /&gt;
* [[Integrated Fingerprint Reader]] on select models&lt;br /&gt;
* [[ThinkPad_Bluetooth_with_Enhanced_Data_Rate_(BDC-2)|Bluetooth]] on select models&lt;br /&gt;
* [[ThinkPad 56K Modem (MDC-1.5)]]&lt;br /&gt;
* [[UltraNav]] (TrackPoint / Touchpad combo)&lt;br /&gt;
* [[Firewire Port|Firewire 400]] (IEEE1394a) on select models&lt;br /&gt;
* [[Intel Active Management Technology (AMT)]] on select models&lt;br /&gt;
* [[Centrino Pro]] on select models&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|style=&amp;quot;vertical-align:top&amp;quot; |&lt;br /&gt;
[[Image:t60-models_nov06.jpg|ThinkPad T61]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Resources ====&lt;br /&gt;
* {{LNVDOCURL|PD004986|T61 Product Overview}}&lt;br /&gt;
* {{LNVDOCURL|UM001583|T61 Hardware Maintenance Manual}}&lt;br /&gt;
* {{LNVDOCURL|UM000546|T60/p Service and Troubleshooting Guide}}&lt;br /&gt;
* {{LNVDOCURL|UM001438|T61 Setup Guide}}&lt;br /&gt;
* [http://www5.pc.ibm.com/europe/me.nsf/LenovoDetail?OpenAgent&amp;amp;key=Notebooks:ThinkPad:ThinkPad+T+Series:Data+Sheet:English&amp;amp;&amp;amp;cntry=EUROPE-L T61 DataSheet]&lt;br /&gt;
* {{LNVDOCURL|PD004527|T61/p 14.1&amp;quot; (standard screen) System service parts}}&lt;br /&gt;
* {{LNVDOCURL|PD004343|T61/p 15.4&amp;quot; System service parts}}&lt;br /&gt;
&lt;br /&gt;
==== Reviews ====&lt;br /&gt;
* [http://www.xyzcomputing.com/index.php?option=content&amp;amp;task=view&amp;amp;id=1134 XYZ Computing], 2007-08-20&lt;br /&gt;
* [http://www.laptopmag.com/Review/Lenovo-ThinkPad-T61p.htm LAPTOP Magazine], 2007-08-08&lt;br /&gt;
* [http://www.notebookreview.com/default.asp?newsID=3889 NotebookReview.com], 2007-08-14&lt;br /&gt;
* [http://reviews.digitaltrends.com/review4745.html DigitalTrends], 2007-09-11&lt;br /&gt;
* [http://www.notebookcheck.com/Test-Lenovo-Thinkpad-T61p-Notebook.4401.0.html Notebookcheck.com], ??-08-2007 (german)&lt;br /&gt;
&lt;br /&gt;
====Installation Instructions====&lt;br /&gt;
* [[Installation instructions for the ThinkPad T61p]]&lt;br /&gt;
&lt;br /&gt;
[[Category:T Series]]&lt;/div&gt;</summary>
		<author><name>Roo</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Template_talk:IBMDOCURL&amp;diff=53120</id>
		<title>Template talk:IBMDOCURL</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Template_talk:IBMDOCURL&amp;diff=53120"/>
		<updated>2011-11-05T18:29:37Z</updated>

		<summary type="html">&lt;p&gt;Roo: /* moved description to the mainpage */ new section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Usage guidelines =&lt;br /&gt;
&lt;br /&gt;
{{WARN|MIGR Documents are being moved to Lenovo's support website, and getting renamed to DC123456 format. Luckily they put in a legacy link we can use for now, but where possible the new format should be used, for which a new [[Template_talk:LNVDOCURL|LNVDOCURL]] template has been created.}}&lt;br /&gt;
&lt;br /&gt;
Use this template to link to any IBM/Lenovo MIGR documents.  The MIGR and other Lenovo and IBM documents are kept in a database system accessed by a base URI.  That base URI has been changed at least three times already, which causes a MASSIVE amount of broken links everywhere in ThinkWiki.&lt;br /&gt;
&lt;br /&gt;
By using this template, we can fix them all in a central location.&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 {{IBMDOCURL|MIGR-12345|Hardware documentation for ThinkPad AK-47}}&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== moved description to the mainpage ==&lt;br /&gt;
&lt;br /&gt;
i've moved the usage/description to the mainpage --[[User:Roo|Roo]] 19:29, 5 November 2011 (CET)&lt;/div&gt;</summary>
		<author><name>Roo</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Template:ThinkWiki_News&amp;diff=53119</id>
		<title>Template:ThinkWiki News</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Template:ThinkWiki_News&amp;diff=53119"/>
		<updated>2011-11-05T17:01:48Z</updated>

		<summary type="html">&lt;p&gt;Roo: replaced Template_talk:IBMDOCURL|LNVDOCURL with Template:IBMDOCURL|LNCDOCURL&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{|&lt;br /&gt;
{{News|15.10.2011|We are pleases to announce our new partnership with [http://www.thinkpads.com/ thinkpads.com]}}&lt;br /&gt;
{{News|28.06.2011|ThinkWiki has been upgraded to [[Special:Version|MediaWiki 1.17.0]].}}&lt;br /&gt;
{{News|07.06.2011|'''ibm.com MIGR Doc links are dead!''' Please convert any dead links to use the [[Template:IBMDOCURL|IBMDOCURL]] or [[Template:LNVDOCURL|LNVDOCURL]] template}}&lt;br /&gt;
{{News|20.03.2011|User account creation temporarily disabled, until we have an effective way to reduce SPAM.}}&lt;br /&gt;
{{News|08.02.2011|ThinkWiki has been upgraded to [[Special:Version|MediaWiki 1.16.2]].}}&lt;br /&gt;
{{News|17.05.2010|ThinkWiki got shiny new [[ThinkWiki:Hardware|hardware]]!}}&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Roo</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Category:X61_Tablet&amp;diff=53118</id>
		<title>Category:X61 Tablet</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Category:X61_Tablet&amp;diff=53118"/>
		<updated>2011-11-05T16:59:16Z</updated>

		<summary type="html">&lt;p&gt;Roo: replaced old ibm MIGR URLS with LNVDOCURL template&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot;&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;
= ThinkPad X61 Tablet =&lt;br /&gt;
&lt;br /&gt;
This page gives an overview of all ThinkPad X61 Tablet related topics.&lt;br /&gt;
==== Standard Features ====&lt;br /&gt;
* One of the following low-voltage processors:&lt;br /&gt;
** [[Intel Core 2 Duo]] CPU L7300 (1.40 GHz)&lt;br /&gt;
** [[Intel Core 2 Duo]] CPU L7500 (1.60 GHz)&lt;br /&gt;
** [[Intel Core 2 Duo]] CPU L7700 (1.80 GHz)&lt;br /&gt;
* [[Intel Graphics Media Accelerator X3100]]&lt;br /&gt;
** 12.1&amp;quot; TFT display with 1024x768 resolution (106 ppi)&lt;br /&gt;
** 12.1&amp;quot; TFT display with 1024x768 resolution and MultiView/MultiTouch (106 ppi)&lt;br /&gt;
** 12.1&amp;quot; TFT display with 1400x1050 resolution and Super-Wide Viewing Angle (145 ppi) AFFS-IPS Panel&lt;br /&gt;
* 1 GiB [[PC2-5300]] memory standard, 4 GiB max&lt;br /&gt;
* 80 GB SATA 2.5&amp;quot; HDD&lt;br /&gt;
* [[Active Protection System]]&lt;br /&gt;
* Intel HD Audio with [[AD1984]] codec&lt;br /&gt;
* [[Intel Gigabit Ethernet (10/100/1000) PCI-Express]]&lt;br /&gt;
* [[Intel PRO/Wireless 3945ABG Mini-PCI Express Adapter]] / [[Intel PRO/Wireless 4965AGN Mini-PCI Express Adapter]]&lt;br /&gt;
* [[ThinkPad_Bluetooth_with_Enhanced_Data_Rate_(BDC-2)|Bluetooth 2.0 EDR]]&lt;br /&gt;
* [[Embedded Security Subsystem|Trusted Computing Group TPM 1.2]]&lt;br /&gt;
* [[Integrated Fingerprint Reader]] in some models&lt;br /&gt;
* [[Ricoh_R5C843|Ricoh R5C843 Controller]] with the following functions:&lt;br /&gt;
** [[SD Card slot]] with IO support&lt;br /&gt;
** [[CardBus slot]] (Type 2)&lt;br /&gt;
** [[Firewire Port|Firewire 400]] (IEEE1394a)&lt;br /&gt;
* [[Wacom Serial Tablet PC Stylus]]&lt;br /&gt;
* [[Tablet Hardware Buttons]]&lt;br /&gt;
* [[Active Rotate]]&lt;br /&gt;
* [[Intel Active Management Technology (AMT)]] on select models&lt;br /&gt;
* [[Centrino Pro]] on select models&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|style=&amp;quot;vertical-align:top&amp;quot; |&lt;br /&gt;
[[image:X61_Tablet.jpg]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Hardware Maintenance Manual====&lt;br /&gt;
* {{LNVDOCURL|UM000651|ThinkPad X60 Tablet and X61 Tablet Hardware Maintenance Manual}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Problems====&lt;br /&gt;
* Screen bezel separating from the Screen: http://forum.tabletpcreview.com/showthread.php?t=8282&lt;br /&gt;
: Official fix (warranty repaired): {{LNVDOCURL|HT004998|here}}&lt;br /&gt;
&lt;br /&gt;
[[Category:X Series]]&lt;br /&gt;
&lt;br /&gt;
==== Accessories ====&lt;br /&gt;
*[[ThinkPad X6 Tablet UltraBase]]&lt;br /&gt;
&lt;br /&gt;
Note that the [[ThinkPad X6 UltraBase]] is '''not''' compatible.&lt;/div&gt;</summary>
		<author><name>Roo</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Template:IBMDOCURL&amp;diff=53117</id>
		<title>Template:IBMDOCURL</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Template:IBMDOCURL&amp;diff=53117"/>
		<updated>2011-11-05T16:57:16Z</updated>

		<summary type="html">&lt;p&gt;Roo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Usage guidelines =&lt;br /&gt;
&lt;br /&gt;
{{WARN|MIGR Documents are being moved to Lenovo's support website, and getting renamed to DC123456 format. Luckily they put in a legacy link we can use for now, but where possible the new format should be used, for which a new [[Template_talk:LNVDOCURL|LNVDOCURL]] template has been created.}}&lt;br /&gt;
&lt;br /&gt;
Use this template to link to any IBM/Lenovo MIGR documents.  The MIGR and other Lenovo and IBM documents are kept in a database system accessed by a base URI.  That base URI has been changed at least three times already, which causes a MASSIVE amount of broken links everywhere in ThinkWiki.&lt;br /&gt;
&lt;br /&gt;
By using this template, we can fix them all in a central location.&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 {{IBMDOCURL|MIGR-12345|Hardware documentation for ThinkPad AK-47}}&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;onlyinclude&amp;gt;[http://support.lenovo.com/en_US/downloads/detail.page?&amp;amp;LegacyDocID={{{1}}} {{{2}}}]&amp;lt;/onlyinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Roo</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Template:LNVDOCURL&amp;diff=53116</id>
		<title>Template:LNVDOCURL</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Template:LNVDOCURL&amp;diff=53116"/>
		<updated>2011-11-05T16:55:37Z</updated>

		<summary type="html">&lt;p&gt;Roo: replaced noinclude with onlyinclude&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Usage guidelines =&lt;br /&gt;
&lt;br /&gt;
Use this template to link to any Lenovo DS documents.  The DS and other Lenovo documents are kept in a database system accessed by a base URI.  That base URI has been changed at least twice already, which causes a MASSIVE amount of broken links everywhere in ThinkWiki.&lt;br /&gt;
&lt;br /&gt;
By using this template, we can fix them all in a central location.&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 {{LNVDOCURL|DS12345|Hardware documentation for ThinkPad AK-47}}&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;onlyinclude&amp;gt;[http://support.lenovo.com/en_US/downloads/detail.page?DocID={{{1}}} {{{2}}}]&amp;lt;/onlyinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Roo</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Template:LNVDOCURL&amp;diff=53115</id>
		<title>Template:LNVDOCURL</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Template:LNVDOCURL&amp;diff=53115"/>
		<updated>2011-11-05T16:49:49Z</updated>

		<summary type="html">&lt;p&gt;Roo: copied the usage description to the template with noinclude&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
= Usage guidelines =&lt;br /&gt;
&lt;br /&gt;
Use this template to link to any Lenovo DS documents.  The DS and other Lenovo documents are kept in a database system accessed by a base URI.  That base URI has been changed at least twice already, which causes a MASSIVE amount of broken links everywhere in ThinkWiki.&lt;br /&gt;
&lt;br /&gt;
By using this template, we can fix them all in a central location.&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 {{LNVDOCURL|DS12345|Hardware documentation for ThinkPad AK-47}}&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
[http://support.lenovo.com/en_US/downloads/detail.page?DocID={{{1}}} {{{2}}}]&lt;/div&gt;</summary>
		<author><name>Roo</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Template:IBMDOCURL&amp;diff=53114</id>
		<title>Template:IBMDOCURL</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Template:IBMDOCURL&amp;diff=53114"/>
		<updated>2011-11-05T16:46:43Z</updated>

		<summary type="html">&lt;p&gt;Roo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
= Usage guidelines =&lt;br /&gt;
&lt;br /&gt;
{{WARN|MIGR Documents are being moved to Lenovo's support website, and getting renamed to DC123456 format. Luckily they put in a legacy link we can use for now, but where possible the new format should be used, for which a new [[Template_talk:LNVDOCURL|LNVDOCURL]] template has been created.}}&lt;br /&gt;
&lt;br /&gt;
Use this template to link to any IBM/Lenovo MIGR documents.  The MIGR and other Lenovo and IBM documents are kept in a database system accessed by a base URI.  That base URI has been changed at least three times already, which causes a MASSIVE amount of broken links everywhere in ThinkWiki.&lt;br /&gt;
&lt;br /&gt;
By using this template, we can fix them all in a central location.&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 {{IBMDOCURL|MIGR-12345|Hardware documentation for ThinkPad AK-47}}&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
[http://support.lenovo.com/en_US/downloads/detail.page?&amp;amp;LegacyDocID={{{1}}} {{{2}}}]&lt;/div&gt;</summary>
		<author><name>Roo</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Template:IBMDOCURL&amp;diff=53113</id>
		<title>Template:IBMDOCURL</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Template:IBMDOCURL&amp;diff=53113"/>
		<updated>2011-11-05T16:43:30Z</updated>

		<summary type="html">&lt;p&gt;Roo: copied the usage description to the template with noinclude&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
= Usage guidelines =&lt;br /&gt;
&lt;br /&gt;
{{WARN|MIGR Documents are being moved to Lenovo's support website, and getting renamed to DC123456 format. Luckily they put in a legacy link we can use for now, but where possible the new format should be used, for which a new [[Template_talk:LNVDOCURL|LNVDOCURL]] template has been created.}}&lt;br /&gt;
&lt;br /&gt;
Use this template to link to any IBM/Lenovo MIGR documents.  The MIGR and other Lenovo and IBM documents are kept in a database system accessed by a base URI.  That base URI has been changed at least three times already, which causes a MASSIVE amount of broken links everywhere in ThinkWiki.&lt;br /&gt;
&lt;br /&gt;
By using this template, we can fix them all in a central location.&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 {{IBMDOCURL|MIGR-12345|Hardware documentation for ThinkPad AK-47}}&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://support.lenovo.com/en_US/downloads/detail.page?&amp;amp;LegacyDocID={{{1}}} {{{2}}}]&lt;/div&gt;</summary>
		<author><name>Roo</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=How_to_hotswap_Ultrabay_devices&amp;diff=45341</id>
		<title>How to hotswap Ultrabay devices</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=How_to_hotswap_Ultrabay_devices&amp;diff=45341"/>
		<updated>2010-01-08T16:50:25Z</updated>

		<summary type="html">&lt;p&gt;Roo: /* Script for Ultrabay eject */  added link to possible fix on discussion page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The following discusses hotswap (AKA &amp;quot;hotplug&amp;quot;) of devices in the [[Ultrabay]].&lt;br /&gt;
&lt;br /&gt;
This page has a lot of old information.  Some cleanup might be useful.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Which driver?==&lt;br /&gt;
This may be confusing, so first a quick history lesson.&lt;br /&gt;
&lt;br /&gt;
Older ThinkPads (up to the R51, T42p and X40) were fully IDE (PATA) for both the internal HDD and Ultrabay. For these there are two drivers, the modern libata based {{path|ata_piix}} and the old legacy {{path|piix}}/{{path|ide-disk}} combo. Most modern distributions will default to the {{path|ata_piix}} driver, which is really what you want anyway.&lt;br /&gt;
&lt;br /&gt;
ThinkPads like the R52, T43, T43p, X41 and X41 Tablet are strange hybrids. They have a Serial-ATA (SATA) chipset for the internal disk controller, but the actual disk is still legacy IDE, using a separate SATA-PATA bridge chip. The Ultrabay, though, is still connected to the legacy IDE host controller. This results in a setup where the internal disk is handled by a SATA driver and the Ultrabay is handled by either {{path|ata_piix}} or {{path|piix}}/{{path|ide-disk}}.&lt;br /&gt;
&lt;br /&gt;
ThinkPads like the R60, T60 and Z60 series are also hybrids, but they use a native SATA HDD internal. Ultrabay still uses legacy IDE (PATA) though. So just like with the previous models you end up with two separate drivers for the internal HDD and the Ultrabay.&lt;br /&gt;
&lt;br /&gt;
The latest generation ThinkPads like the R400, R500, T400, T500, W500, W700, X200, and X301 are all fully SATA for both the internal HDD and the Ultrabay device, so both are handled by the same SATA driver.&lt;br /&gt;
{{Todo|Figure out in which category the X60 series ThinkPads truly belong. Some of these machines might have been shipped with a 1.8&amp;quot; HDD which is likely to be PATA, in fact the HMM even states so. But tabook and ltwbook only lists SATA models, so the 1.8&amp;quot; model might never have shipped. But even if it did there will be a SATA-PATA bridge chip, so from the OS it will look like SATA.}}&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
|+Overview of disk interface types&lt;br /&gt;
! Thinkpad !! internal HDD !! Ultrabay !! Modern Driver !! Old Driver&lt;br /&gt;
|-&lt;br /&gt;
| {{A20m}}, {{A20p}}, {{A21e}}, {{A21m}}, {{A21p}}, {{A22e}}, {{A22m}}, {{A22p}}, {{A30}}, {{A30p}}, {{A31}}, {{A31p}} || Legacy 2.5&amp;quot; IDE (PATA) || Legacy IDE (PATA) || ata_piix || piix + ide-disk&lt;br /&gt;
|-&lt;br /&gt;
| {{R30}}, {{R31}}, {{R32}}, {{R40}}, {{R50}}, {{R50e}}, {{R50p}}, {{R51}} || Legacy 2.5&amp;quot; IDE (PATA) || Legacy IDE (PATA) || ata_piix || piix + ide-disk&lt;br /&gt;
|-&lt;br /&gt;
| {{R52}} || Legacy 2.5&amp;quot; PATA HDD with conversion to SATA || Legacy IDE (PATA) || ahci + ata_piix || -&lt;br /&gt;
|-&lt;br /&gt;
| {{R60}}, {{R61}} || 2.5&amp;quot; SATA || Legacy IDE (PATA)  || ahci + ata_piix || -&lt;br /&gt;
|-&lt;br /&gt;
| {{R400}}, {{R500}} ||2.5&amp;quot; SATA || SATA || ahci || -&lt;br /&gt;
|-&lt;br /&gt;
| {{T20}}, {{T21}}, {{T22}}, {{T23}}, {{T30}}, {{T40}}, {{T40p}}, {{T41}}, {{T41p}}, {{T42}}, {{T42p}} || Legacy 2.5&amp;quot; IDE (PATA) || Legacy IDE (PATA) || ata_piix || piix + ide-disk&lt;br /&gt;
|-&lt;br /&gt;
| {{T43}}, {{T43p}} || Legacy 2.5&amp;quot; PATA HDD with conversion to SATA || Legacy IDE (PATA) || ahci + ata_piix || -&lt;br /&gt;
|-&lt;br /&gt;
| {{T60}}, {{T60p}}, {{T61}}, {{T61p}} || 2.5&amp;quot; SATA || Legacy IDE (PATA)  || ahci + ata_piix || -&lt;br /&gt;
|-&lt;br /&gt;
| {{T400}}, {{T500}} ||2.5&amp;quot; SATA || SATA || ahci || -&lt;br /&gt;
|-&lt;br /&gt;
| {{X20}}, {{X21}}, {{X22}}, {{X23}}, {{X24}}, {{X30}}, {{X31}}, {{X32}} || Legacy 2.5&amp;quot; IDE (PATA) || Legacy IDE (PATA) || ata_piix || piix + ide-disk&lt;br /&gt;
|-&lt;br /&gt;
| {{X40}} || Legacy 1.8&amp;quot; IDE (PATA) || Legacy IDE (PATA) || ata_piix || piix + ide-disk&lt;br /&gt;
|-&lt;br /&gt;
| {{X41}}, {{X41t}} || Legacy 1.8&amp;quot; PATA HDD with conversion to SATA || Legacy IDE (PATA) || ahci + ata_piix || -&lt;br /&gt;
|-&lt;br /&gt;
| {{X60}}, {{X60s}}, {{x60t}}, {{x61}}, {{x61s}}, {{x61t}} || 2.5&amp;quot; HDD is SATA, 1.8&amp;quot; HDD is PATA with SATA conversion || Legacy IDE (PATA) || ahci + ata_piix || -&lt;br /&gt;
|-&lt;br /&gt;
| {{X300}} ||2.5&amp;quot; SATA || Legacy IDE (PATA) || ahci + ata_piix || -&lt;br /&gt;
|-&lt;br /&gt;
| {{X200}}, {{X200 Tablet}}, {{X301}} ||2.5&amp;quot; SATA || SATA || ahci || -&lt;br /&gt;
|-&lt;br /&gt;
| {{W500}}, {{W700}} ||2.5&amp;quot; SATA || SATA || ahci || -&lt;br /&gt;
|-&lt;br /&gt;
| {{Z60m}}, {{Z60t}}, {{Z61e}}, {{Z61m}}, {{Z61p}}, {{Z61t}} || 2.5&amp;quot; SATA || Legacy IDE (PATA) || ahci + ata_piix || -&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{NOTE|Debian users: at least up the the kernel released with Lenny, Debian applies a patch in the Debian kernel sources which prevents the use of &amp;lt;tt&amp;gt;ata_piix&amp;lt;/tt&amp;gt; with PATA devices (like the IDE bus for the Ultrabay). You will have to either use an upstream kernel or (re)patch the Debian kernel sources. &lt;br /&gt;
You may want to have a look at the following Debian bug reports as well: [http://bugs.debian.org/444182 #444182], [http://bugs.debian.org/463833 #463833].}}&lt;br /&gt;
&lt;br /&gt;
==Modern systems (using the &amp;lt;tt&amp;gt;ahci&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;ata_piix&amp;lt;/tt&amp;gt; drivers)==&lt;br /&gt;
The following applies when using the &amp;lt;tt&amp;gt;ahci&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;ata_piix&amp;lt;/tt&amp;gt; driver (which supercedes the old &amp;lt;tt&amp;gt;ide_disk&amp;lt;/tt&amp;gt; driver).&lt;br /&gt;
&lt;br /&gt;
You should at least be using a distribution with kernel 2.6.23. If you have a distribution with an older kernel, please update your distribution, as in addition to a newer kernel, you will need some of the newer userland tools.&lt;br /&gt;
&lt;br /&gt;
===Using libata-acpi and udev===&lt;br /&gt;
&lt;br /&gt;
Starting from kernel 2.6.26-rc5, it's possible to use &amp;lt;tt&amp;gt;libata-acpi&amp;lt;/tt&amp;gt; in combination with udev to hotswap. Please check if CONFIG_ATA_ACPI is enabled in your kernel configuration.&lt;br /&gt;
&lt;br /&gt;
For 2.6.25, you need two patches which can be easily backported ([http://article.gmane.org/gmane.linux.acpi.devel/31159],[http://article.gmane.org/gmane.linux.acpi.devel/31369]).&lt;br /&gt;
&lt;br /&gt;
Create a file {{path|/etc/udev/rules.d/50-thinkpad-ultrabay.rules}} with the following contents:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ENV{BAY_EVENT}==&amp;quot;3&amp;quot;, ACTION==&amp;quot;change&amp;quot;, SUBSYSTEM==&amp;quot;scsi&amp;quot;, RUN+=&amp;quot;/usr/local/sbin/ultrabay_eject&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then ensure it has the right permissions&lt;br /&gt;
 chown root:root /etc/udev/rules.d/50-thinkpad-ultrabay.rules&lt;br /&gt;
 chmod 644 /etc/udev/rules.d/50-thinkpad-ultrabay.rules&lt;br /&gt;
For Red Hat/Fedora and other systems with selinux, you also need to set the security context:&lt;br /&gt;
 chcon system_u:object_r:etc_runtime_t:s0 /etc/udev/rules.d/50-thinkpad-ultrabay.rules&lt;br /&gt;
&lt;br /&gt;
Now create the below ultrabay-eject script&lt;br /&gt;
&lt;br /&gt;
===Script for Ultrabay eject===&lt;br /&gt;
&lt;br /&gt;
The following script does the following:&lt;br /&gt;
* Automatically unmounts the relevant filesystems and power off the Ultrabay when the Ultrabay eject lever is released. Screams if some filesystem can't be unmounted.&lt;br /&gt;
&lt;br /&gt;
Create a executable file {{path|/usr/local/sbin/ultrabay_eject}} with the following content. Note if you want to be able to run it directly (not by the UDEV eject script), then you need to manually edit the DEVPATH variable near the top of the script.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Change the following DEVPATH= to match your system, if you want to run this directly instead of having it called by the udev eject script&lt;br /&gt;
# To find the right value, insert the UltraBay optical drive and run:&lt;br /&gt;
# udevadm info --query=path --name=/dev/sr0 | perl -pe 's!/block/...$!!'&lt;br /&gt;
if [ &amp;quot;$DEVPATH&amp;quot; = &amp;quot;&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
   DEVPATH=&amp;quot;/devices/pci0000:00/0000:00:1f.2/host1/target1:0:0/1:0:0:0&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
shopt -s nullglob&lt;br /&gt;
export DISPLAY=:0.0 # required for notify-send&lt;br /&gt;
ULTRABAY_SYSDIR=/sys$DEVPATH&lt;br /&gt;
&lt;br /&gt;
# Find generic dock interface for UltraBay&lt;br /&gt;
dock=$( /bin/grep -l ata_bay /sys/devices/platform/dock.?/type )&lt;br /&gt;
dock=${dock%%/type}&lt;br /&gt;
if [ -n &amp;quot;$dock&amp;quot; -a -d &amp;quot;$dock&amp;quot; ]; then&lt;br /&gt;
        logger ultrabay_eject starting eject of $dock&lt;br /&gt;
else&lt;br /&gt;
        logger ultrabay_eject cannot locate bay dock device&lt;br /&gt;
        notify-send -u critical -t 100000 &amp;quot;ThinkPad Ultrabay eject failed&amp;quot; &amp;quot;Cannot locate bay dock device&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
# Umount the filesystem(s) backed by the given major:minor device(s)&lt;br /&gt;
unmount_rdev() { perl - &amp;quot;$@&amp;quot; &amp;lt;&amp;lt;'EOPERL'  # let's do it in Perl&lt;br /&gt;
        for $major_minor (@ARGV) {&lt;br /&gt;
                $major_minor =~ m/^(\d+):(\d+)$/ or die;&lt;br /&gt;
                push(@tgt_rdevs, ($1&amp;lt;&amp;lt;8)|$2);&lt;br /&gt;
        }&lt;br /&gt;
        # Sort by reverse length of mount point, to unmount sub-directories first&lt;br /&gt;
        open MOUNTS,&amp;quot;&amp;lt;/proc/mounts&amp;quot; or die &amp;quot;$!&amp;quot;;&lt;br /&gt;
        @mounts=sort { length($b-&amp;gt;[1]) &amp;lt;=&amp;gt; length($a-&amp;gt;[1]) } map { [ split ] } &amp;lt;MOUNTS&amp;gt;;&lt;br /&gt;
        close MOUNTS;&lt;br /&gt;
        foreach $m (@mounts) {&lt;br /&gt;
                ($dev,$dir)=@$m;&lt;br /&gt;
                next unless -b $dev;  $rdev=(stat($dev))[6];&lt;br /&gt;
                next unless grep($_==$rdev, @tgt_rdevs);&lt;br /&gt;
                system(&amp;quot;umount&amp;quot;,&amp;quot;-v&amp;quot;,&amp;quot;$dir&amp;quot;)==0  or  $bad=1;&lt;br /&gt;
                if ($bad == 1) {&lt;br /&gt;
                        system(&amp;quot;logger&amp;quot;,&amp;quot;ultrabay_eject&amp;quot;,&amp;quot;ERROR unmounting&amp;quot;,$dev,$dir);&lt;br /&gt;
                        system(&amp;quot;notify-send -u critical -t 100000 \&amp;quot;Error unmounting $dir\&amp;quot; \&amp;quot;Unmounting of $dir on $dev failed!\&amp;quot;&amp;quot;);&lt;br /&gt;
                } else {&lt;br /&gt;
                        system(&amp;quot;logger&amp;quot;,&amp;quot;ultrabay_eject&amp;quot;,&amp;quot;unmounted&amp;quot;,$dev,$dir);&lt;br /&gt;
                        system(&amp;quot;notify-send -u normal -t 5000 \&amp;quot;Unmounted $dir\&amp;quot;&amp;quot;);&lt;br /&gt;
                };&lt;br /&gt;
        }&lt;br /&gt;
        exit 1 if $bad;&lt;br /&gt;
EOPERL&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# Get the UltraBay's /dev/foo block device node&lt;br /&gt;
ultrabay_dev_node() {&lt;br /&gt;
        UDEV_PATH=&amp;quot;`readlink -e &amp;quot;$ULTRABAY_SYSDIR/block/&amp;quot;*`&amp;quot; || return 1&lt;br /&gt;
        UDEV_NAME=&amp;quot;`udevadm info --query=name --path=$UDEV_PATH`&amp;quot; || return 1&lt;br /&gt;
        echo /dev/$UDEV_NAME&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
if [ $( cat $dock/docked ) == 0 ]; then&lt;br /&gt;
        logger ultrabay_eject dock reports empty&lt;br /&gt;
else &lt;br /&gt;
	if [ -d $ULTRABAY_SYSDIR ]; then&lt;br /&gt;
		logger ultrabay_eject dock occupied, shutting down storage device $DEVPATH&lt;br /&gt;
		sync&lt;br /&gt;
		# Unmount filesystems backed by this device&lt;br /&gt;
		## This seems to be very inelegant and prone to failure&lt;br /&gt;
		unmount_rdev `cat $ULTRABAY_SYSDIR/block/*/dev     \&lt;br /&gt;
				  $ULTRABAY_SYSDIR/block/*/*/dev`  \&lt;br /&gt;
		|| {&lt;br /&gt;
			logger ultrabay_eject umounting failed&lt;br /&gt;
			echo 2 &amp;gt; /proc/acpi/ibm/beep  # triple error tone&lt;br /&gt;
			notify-send -u critical -t 100000 &amp;quot;ThinkPad Ultrabay eject failed&amp;quot; &amp;quot;Please do not pull the device, doing so could cause file corruption and possibly hang the system. Unmounting of the filesystem on the ThinkPad Ultrabay device failed. Please put the eject leaver back in place, and try to unmount the filesystem manually. If this succeeds you can try the eject again&amp;quot;&lt;br /&gt;
			exit 1;&lt;br /&gt;
		}&lt;br /&gt;
		sync&lt;br /&gt;
		# Nicely power off the device&lt;br /&gt;
		DEVNODE=`ultrabay_dev_node` &amp;amp;&amp;amp; hdparm -Y $DEVNODE&lt;br /&gt;
		# Let HAL+KDE notice the unmount and let the disk spin down&lt;br /&gt;
		sleep 0.5&lt;br /&gt;
		# Unregister this SCSI device:&lt;br /&gt;
		sync&lt;br /&gt;
		echo 1 &amp;gt; $ULTRABAY_SYSDIR/delete&lt;br /&gt;
	else&lt;br /&gt;
		logger ultrabay_eject bay occupied but incorrect device path $DEVPATH&lt;br /&gt;
		notify-send -u critical -t 100000 &amp;quot;ThinkPad Ultrabay eject failed&amp;quot; &amp;quot;Bay occupied but incorrect device path&amp;quot;&lt;br /&gt;
		echo 2 &amp;gt; /proc/acpi/ibm/beep  # triple error tone&lt;br /&gt;
		exit 1&lt;br /&gt;
	fi&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
# We need sleep here so someone can disconnect the bay and the drive&lt;br /&gt;
sleep 1&lt;br /&gt;
&lt;br /&gt;
# Turn off power to the UltraBay&lt;br /&gt;
logger ultrabay_eject undocking $dock&lt;br /&gt;
echo 1 &amp;gt; $dock/undock&lt;br /&gt;
&lt;br /&gt;
# Tell the user we're OK&lt;br /&gt;
logger ultrabay_eject done&lt;br /&gt;
echo 12 &amp;gt; /proc/acpi/ibm/beep&lt;br /&gt;
notify-send -u normal -t 10000 &amp;quot;Safe to remove device&amp;quot; &amp;quot;The ThinkPad Ultrabay device can now safely be removed&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
an possible fix for the notify not working thing is here [[Talk:How_to_hotswap_Ultrabay_devices#get_notify-send_working]]&lt;br /&gt;
&lt;br /&gt;
Then make sure ownership and permissions are set correct&lt;br /&gt;
 chown root:root /usr/local/sbin/ultrabay_eject&lt;br /&gt;
 chmod 555 /usr/local/sbin/ultrabay_eject&lt;br /&gt;
&lt;br /&gt;
If the &amp;lt;tt&amp;gt;ata_piix&amp;lt;/tt&amp;gt; driver is built in the kernel, it will catch bay events and you will see the&lt;br /&gt;
following message in your system log:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
thinkpad_acpi: another device driver is already handling bay events&lt;br /&gt;
thinkpad_acpi: disabling subdriver bay&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You should load &amp;lt;tt&amp;gt;thinkpad_acpi&amp;lt;/tt&amp;gt; before &amp;lt;tt&amp;gt;ata_piix&amp;lt;/tt&amp;gt; if you want it to handle bay events.&lt;br /&gt;
&lt;br /&gt;
===Script for Ultrabay insert===&lt;br /&gt;
{{WARN|Only needed for kernels prior to 2.6.26}}&lt;br /&gt;
Create {{path|/usr/local/sbin/ultrabay_insert}} with the following content:&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 echo 12 &amp;gt; /proc/acpi/ibm/beep&lt;br /&gt;
 sync&lt;br /&gt;
 echo 0 0 0 &amp;gt; /sys/class/scsi_host/host1/scan&lt;br /&gt;
&lt;br /&gt;
and set the right permissions&lt;br /&gt;
 chown root:root /usr/local/sbin/ultrabay_insert&lt;br /&gt;
 chmod 555 /usr/local/sbin/ultrabay_insert&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Using the generic bay driver and udev===&lt;br /&gt;
{{WARN|If you have kernel 2.6.26 or newer, please use the above [[#Using libata-acpi and udev]] method instead}}&lt;br /&gt;
Starting from kernel 2.6.23-rc3, it's possible to use the generic &amp;lt;tt&amp;gt;bay&amp;lt;/tt&amp;gt; driver in combination with udev to hotswap. Please check if CONFIG_ACPI_BAY is enabled (module or built-in) in your kernel configuration.&lt;br /&gt;
&lt;br /&gt;
Create {{path|/etc/udev/rules.d/ibm-ultrabay.rules}}:&lt;br /&gt;
 ENV{BAY_EVENT}==&amp;quot;3&amp;quot;, KERNEL==&amp;quot;bay.0&amp;quot;, ACTION==&amp;quot;change&amp;quot;, SUBSYSTEM==&amp;quot;platform&amp;quot;, RUN+=&amp;quot;/usr/local/sbin/ultrabay_eject&amp;quot;&lt;br /&gt;
 ENV{BAY_EVENT}==&amp;quot;1&amp;quot;, KERNEL==&amp;quot;bay.0&amp;quot;, ACTION==&amp;quot;change&amp;quot;, SUBSYSTEM==&amp;quot;platform&amp;quot;, RUN+=&amp;quot;/usr/local/sbin/ultrabay_insert&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Starting with kernel 2.6.28, the &amp;lt;tt&amp;gt;bay&amp;lt;/tt&amp;gt; driver was removed from the mainline kernel. The &amp;lt;tt&amp;gt;dock&amp;lt;/tt&amp;gt; driver replaced it completely. Make sure CONFIG_ACPI_DOCK is enabled in the kernel, and use the following udev rules:&lt;br /&gt;
&lt;br /&gt;
 ENV{EVENT}==&amp;quot;undock&amp;quot;, KERNEL==&amp;quot;dock.2&amp;quot;, ACTION==&amp;quot;change&amp;quot;, SUBSYSTEM==&amp;quot;platform&amp;quot;, RUN+=&amp;quot;/usr/local/sbin/ultrabay_eject&amp;quot;&lt;br /&gt;
 ENV{EVENT}==&amp;quot;dock&amp;quot;, KERNEL==&amp;quot;dock.2&amp;quot;, ACTION==&amp;quot;change&amp;quot;, SUBSYSTEM==&amp;quot;platform&amp;quot;, RUN+=&amp;quot;/usr/local/sbin/ultrabay_insert&amp;quot;&lt;br /&gt;
&lt;br /&gt;
However, the ultra_eject script needs to be changed, otherwise udev goes into an infinite event loop. It will send undock events every few seconds forever. That means as soon as the ultrabay is plugged in again, it will be immediately ejected. For kernels 2.6.28 and higher, the bay cannot be powered off using this method, so change the end of the script to read:&lt;br /&gt;
 # Turn off power to the UltraBay:&lt;br /&gt;
 if [ -d /sys/devices/platform/bay.0 ]; then&lt;br /&gt;
 	echo 1 &amp;gt; /sys/devices/platform/bay.0/eject&lt;br /&gt;
 elif [ -e /proc/acpi/ibm/bay ]; then&lt;br /&gt;
 	echo eject &amp;gt; /proc/acpi/ibm/bay&lt;br /&gt;
 fi&lt;br /&gt;
 # Tell the user we're OK&lt;br /&gt;
 echo 12 &amp;gt; /proc/acpi/ibm/beep&lt;br /&gt;
&lt;br /&gt;
Alternatively, instead of modifying the script, use the libata-acpi method below.&lt;br /&gt;
This was tested on a T61p running Gentoo with tuxonice 2.6.28-r8 without any issues.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===HAL support===&lt;br /&gt;
{{HELP| If the script below does not work, please provide your lshal output on the [[Talk:How_to_hotswap_Ultrabay_devices]] page}}&lt;br /&gt;
{{NOTE| If your HAL version is older then 0.5.11, you need to replace &amp;quot;info.parent&amp;quot; with &amp;quot;storage.physical_device&amp;quot;.}}&lt;br /&gt;
&lt;br /&gt;
HAL support is only needed for proper notification to your desktop applications, such as Gnome and KDE. You will still require the udev script to handle the proper removal.&lt;br /&gt;
&lt;br /&gt;
To tell HAL that devices connected to the UltraBay port are hotpluggable, you need to create a file {{path|/etc/hal/fdi/information/10-thinkpad-ultrabay.fdi}} with the following content:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;ISO-8859-1&amp;quot;?&amp;gt; &amp;lt;!-- -*- SGML -*- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
HAL config file to set ThinkPad Ultrabay eject capability flag.&lt;br /&gt;
Note that ThinkPad model matching is done on a partial match, so T40 will also match T40p, which is what we want.&lt;br /&gt;
&lt;br /&gt;
If your ThinkPad model is not listed, please check with lspci what PCI ID your disk controller is&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;deviceinfo version=&amp;quot;0.2&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;device&amp;gt;&lt;br /&gt;
    &amp;lt;match key=&amp;quot;/org/freedesktop/Hal/devices/computer:system.hardware.version&amp;quot; prefix=&amp;quot;ThinkPad&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;match key=&amp;quot;/org/freedesktop/Hal/devices/computer:system.hardware.vendor&amp;quot; string=&amp;quot;IBM&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;!-- IBM ThinkPad A20m, A20p, A21e, A21m, A21p, A22e, A22m, A22p, T20, T21, T22, X20 and X21 --&amp;gt;&lt;br /&gt;
        &amp;lt;match key=&amp;quot;/org/freedesktop/Hal/devices/computer:system.hardware.version&amp;quot; contains_outof=&amp;quot;A20;A21;A22;T20;T21;T22;X20;X21&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;match key=&amp;quot;storage.bus&amp;quot; string_outof=&amp;quot;pci;scsi&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;match key=&amp;quot;info.parent&amp;quot; string=&amp;quot;/org/freedesktop/Hal/devices/pci_8086_7111_scsi_host_0_scsi_device_lun0&amp;quot;&amp;gt;&lt;br /&gt;
              &amp;lt;merge key=&amp;quot;storage.hotpluggable&amp;quot; type=&amp;quot;bool&amp;quot;&amp;gt;true&amp;lt;/merge&amp;gt;&lt;br /&gt;
            &amp;lt;/match&amp;gt;&lt;br /&gt;
          &amp;lt;/match&amp;gt;&lt;br /&gt;
        &amp;lt;/match&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;!-- IBM ThinkPad T23, T30, X22, X23, X24 and X30 --&amp;gt;&lt;br /&gt;
        &amp;lt;match key=&amp;quot;/org/freedesktop/Hal/devices/computer:system.hardware.version&amp;quot; contains_outof=&amp;quot;T23;T30;X22;X23;X24;X30&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;match key=&amp;quot;storage.bus&amp;quot; string_outof=&amp;quot;pci;scsi&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;match key=&amp;quot;info.parent&amp;quot; string=&amp;quot;/org/freedesktop/Hal/devices/pci_8086_248a_scsi_host_0_scsi_device_lun0&amp;quot;&amp;gt;&lt;br /&gt;
              &amp;lt;merge key=&amp;quot;storage.hotpluggable&amp;quot; type=&amp;quot;bool&amp;quot;&amp;gt;true&amp;lt;/merge&amp;gt;&lt;br /&gt;
            &amp;lt;/match&amp;gt;&lt;br /&gt;
          &amp;lt;/match&amp;gt;&lt;br /&gt;
        &amp;lt;/match&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;!-- IBM ThinkPad A30, A30p, A31 and A31p - 2 Ultrabay devices--&amp;gt;&lt;br /&gt;
        &amp;lt;match key=&amp;quot;/org/freedesktop/Hal/devices/computer:system.hardware.version&amp;quot; contains_outof=&amp;quot;A30;A31&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;match key=&amp;quot;storage.bus&amp;quot; string_outof=&amp;quot;pci;scsi&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;match key=&amp;quot;info.parent&amp;quot; string=&amp;quot;/org/freedesktop/Hal/devices/pci_8086_248a_scsi_host_scsi_device_lun0_0&amp;quot;&amp;gt;&lt;br /&gt;
              &amp;lt;merge key=&amp;quot;storage.hotpluggable&amp;quot; type=&amp;quot;bool&amp;quot;&amp;gt;true&amp;lt;/merge&amp;gt;&lt;br /&gt;
            &amp;lt;/match&amp;gt;&lt;br /&gt;
            &amp;lt;match key=&amp;quot;info.parent&amp;quot; string=&amp;quot;/org/freedesktop/Hal/devices/pci_8086_248a_scsi_host_0_scsi_device_lun0&amp;quot;&amp;gt;&lt;br /&gt;
              &amp;lt;merge key=&amp;quot;storage.hotpluggable&amp;quot; type=&amp;quot;bool&amp;quot;&amp;gt;true&amp;lt;/merge&amp;gt;&lt;br /&gt;
            &amp;lt;/match&amp;gt;&lt;br /&gt;
          &amp;lt;/match&amp;gt;&lt;br /&gt;
        &amp;lt;/match&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;!-- IBM ThinkPad R50, R51, T40, T40p, T41, T41p, X31, X32 and X40 --&amp;gt;&lt;br /&gt;
        &amp;lt;match key=&amp;quot;/org/freedesktop/Hal/devices/computer:system.hardware.version&amp;quot; contains_outof=&amp;quot;R50;R51;T40;T41;T42;X31;X32;X40&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;match key=&amp;quot;storage.bus&amp;quot; string_outof=&amp;quot;pci;scsi&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;match key=&amp;quot;info.parent&amp;quot; string=&amp;quot;/org/freedesktop/Hal/devices/pci_8086_24ca_scsi_host_0_scsi_device_lun0&amp;quot;&amp;gt;&lt;br /&gt;
              &amp;lt;merge key=&amp;quot;storage.hotpluggable&amp;quot; type=&amp;quot;bool&amp;quot;&amp;gt;true&amp;lt;/merge&amp;gt;&lt;br /&gt;
            &amp;lt;/match&amp;gt;&lt;br /&gt;
          &amp;lt;/match&amp;gt;&lt;br /&gt;
        &amp;lt;/match&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;!-- IBM ThinkPad R52, T43, T43p, X41, Z60m and Z60p --&amp;gt;&lt;br /&gt;
        &amp;lt;match key=&amp;quot;/org/freedesktop/Hal/devices/computer:system.hardware.version&amp;quot; contains_outof=&amp;quot;R52;T43;X41;Z60&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;match key=&amp;quot;storage.bus&amp;quot; string_outof=&amp;quot;pci;scsi&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;match key=&amp;quot;info.parent&amp;quot; string=&amp;quot;/org/freedesktop/Hal/devices/pci_8086_2653_scsi_host_scsi_device_lun0&amp;quot;&amp;gt;&lt;br /&gt;
              &amp;lt;merge key=&amp;quot;storage.hotpluggable&amp;quot; type=&amp;quot;bool&amp;quot;&amp;gt;true&amp;lt;/merge&amp;gt;&lt;br /&gt;
            &amp;lt;/match&amp;gt;&lt;br /&gt;
          &amp;lt;/match&amp;gt;&lt;br /&gt;
        &amp;lt;/match&amp;gt;&lt;br /&gt;
&lt;br /&gt;
      &amp;lt;/match&amp;gt;&lt;br /&gt;
      &amp;lt;match key=&amp;quot;/org/freedesktop/Hal/devices/computer:system.hardware.vendor&amp;quot; string=&amp;quot;LENOVO&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;!-- Lenovo ThinkPad T60, T60p, Z61m, Z61t and Z61p --&amp;gt;&lt;br /&gt;
        &amp;lt;match key=&amp;quot;/org/freedesktop/Hal/devices/computer:system.hardware.version&amp;quot; contains_outof=&amp;quot;T60;Z61&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;match key=&amp;quot;storage.bus&amp;quot; string_outof=&amp;quot;pci;scsi&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;match key=&amp;quot;info.parent&amp;quot; string=&amp;quot;/org/freedesktop/Hal/devices/pci_8086_27df_scsi_host_scsi_device_lun0&amp;quot;&amp;gt;&lt;br /&gt;
              &amp;lt;merge key=&amp;quot;storage.hotpluggable&amp;quot; type=&amp;quot;bool&amp;quot;&amp;gt;true&amp;lt;/merge&amp;gt;&lt;br /&gt;
            &amp;lt;/match&amp;gt;&lt;br /&gt;
          &amp;lt;/match&amp;gt;&lt;br /&gt;
        &amp;lt;/match&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;!-- Lenovo ThinkPad R60 and X60 --&amp;gt;&lt;br /&gt;
        &amp;lt;match key=&amp;quot;/org/freedesktop/Hal/devices/computer:system.hardware.version&amp;quot; contains_outof=&amp;quot;R60;X60&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;match key=&amp;quot;storage.bus&amp;quot; string_outof=&amp;quot;pci;scsi&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;match key=&amp;quot;info.parent&amp;quot; string=&amp;quot;/org/freedesktop/Hal/devices/pci_8086_27c4_scsi_host_scsi_device_lun0&amp;quot;&amp;gt;&lt;br /&gt;
              &amp;lt;merge key=&amp;quot;storage.hotpluggable&amp;quot; type=&amp;quot;bool&amp;quot;&amp;gt;true&amp;lt;/merge&amp;gt;&lt;br /&gt;
            &amp;lt;/match&amp;gt;&lt;br /&gt;
          &amp;lt;/match&amp;gt;&lt;br /&gt;
        &amp;lt;/match&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;!-- Lenovo ThinkPad R61, T61, T61p and X300 --&amp;gt;&lt;br /&gt;
        &amp;lt;match key=&amp;quot;/org/freedesktop/Hal/devices/computer:system.hardware.version&amp;quot; contains_outof=&amp;quot;R61;T61;X300&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;match key=&amp;quot;storage.bus&amp;quot; string_outof=&amp;quot;pci;scsi&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;match key=&amp;quot;info.parent&amp;quot; string=&amp;quot;/org/freedesktop/Hal/devices/pci_8086_2850_scsi_host_scsi_device_lun0&amp;quot;&amp;gt;&lt;br /&gt;
              &amp;lt;merge key=&amp;quot;storage.hotpluggable&amp;quot; type=&amp;quot;bool&amp;quot;&amp;gt;true&amp;lt;/merge&amp;gt;&lt;br /&gt;
            &amp;lt;/match&amp;gt;&lt;br /&gt;
          &amp;lt;/match&amp;gt;&lt;br /&gt;
        &amp;lt;/match&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;!-- Lenovo ThinkPad R400, R500, T400, T500, W500, W700, X200 and X301 --&amp;gt;&lt;br /&gt;
        &amp;lt;match key=&amp;quot;/org/freedesktop/Hal/devices/computer:system.hardware.version&amp;quot; contains_outof=&amp;quot;R400;R500;T400;T500;W500;W700;X200;X301&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;match key=&amp;quot;storage.bus&amp;quot; string_outof=&amp;quot;pci;scsi&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;match key=&amp;quot;info.parent&amp;quot; string=&amp;quot;/org/freedesktop/Hal/devices/pci_8086_2929_scsi_host_0_scsi_device_lun0&amp;quot;&amp;gt;&lt;br /&gt;
              &amp;lt;merge key=&amp;quot;storage.hotpluggable&amp;quot; type=&amp;quot;bool&amp;quot;&amp;gt;true&amp;lt;/merge&amp;gt;&lt;br /&gt;
            &amp;lt;/match&amp;gt;&lt;br /&gt;
          &amp;lt;/match&amp;gt;&lt;br /&gt;
        &amp;lt;/match&amp;gt;&lt;br /&gt;
&lt;br /&gt;
      &amp;lt;/match&amp;gt;&lt;br /&gt;
    &amp;lt;/match&amp;gt;&lt;br /&gt;
  &amp;lt;/device&amp;gt;&lt;br /&gt;
&amp;lt;/deviceinfo&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then ensure it has the right permissions&lt;br /&gt;
&lt;br /&gt;
 chown root:root /etc/hal/fdi/information/10-thinkpad-ultrabay.fdi&lt;br /&gt;
 chmod 644 /etc/hal/fdi/information/10-thinkpad-ultrabay.fdi&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To check the effect, look at your lshal output, the section for your optical disk (/dev/sr0 typically) or your 2nd hdd (/dev/sdb typically) should have storage.hotpluggable = true after restarting your hal deamon or rebooting.&lt;br /&gt;
&lt;br /&gt;
==When using the &amp;lt;tt&amp;gt;ide-disk&amp;lt;/tt&amp;gt; driver==&lt;br /&gt;
The following applies if you use the &amp;lt;tt&amp;gt;ide-disk&amp;lt;/tt&amp;gt; driver for the UltraBay device.&amp;lt;BR&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Note that essentially, you shouldn't be using this driver, and use ata_piix instead unless you're running an older kernel where ata_piix won't work for you&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Hotswapping is supposed to be supported as well, using either hdparm/[http://packages.debian.org/unstable/admin/hotswap Debian hotswap] or [[lt_hotswap]] to (un)register IDE devices. The latter is the recommended method with kernels from 2.6, since it will leave DMA working. However, for recent models (R52, T43, X41, Z60 and later) no method is known to work while maintaining DMA support; see [[Problems with SATA and Linux]].&lt;br /&gt;
&lt;br /&gt;
Only IDE devices (HDD's, optical drives, zip drives) require special treatment - batteries, floppies and other devices can just be pulled from the bay, provided they are not mounted or in use at the time. However, you should still power them down first using the [[thinkpad-acpi]] eject function.&lt;br /&gt;
&lt;br /&gt;
The [[thinkpad-acpi]] kernel module has an eject function ({{cmdroot|echo eject &amp;gt; /proc/acpi/ibm/bay}}). This only manages the ACPI calls to power down the device and the bay. It does not actually unregister the device from the IDE driver. {{cmdroot|cat /proc/acpi/ibm/bay}} shows &amp;quot;unoccupied&amp;quot; unless an IDE device is present, but the eject function still works and should still be used.&lt;br /&gt;
&lt;br /&gt;
To unregister the device, you can either use the [http://packages.debian.org/unstable/admin/hotswap Debian hotswap] package, or [[lt_hotswap]]. Note that lt_hotswap doesn't seem to even build on recent (at 2.6.22 or newer, although it probably broke before 2.6.22) and on newer kernels, you should not build/load the old IDE PIIX (CONFIG_BLK_DEV_PIIX) and use the natively hotswapping ata_piix (CONFIG_ATA_PIIX) as explained on the top of this page.&lt;br /&gt;
&lt;br /&gt;
[http://packages.debian.org/unstable/admin/hotswap Debian hotswap] also allows the drive to be swapped as a normal user by default, which is useful. You should use &amp;lt;tt&amp;gt;hotswap&amp;lt;/tt&amp;gt; to unregister the device and then {{cmdroot|echo eject &amp;gt; /proc/acpi/ibm/bay}}. However, if you use this method on a 2.6 kernel, you will lose DMA support for the reinserted drive. This is due to kernel issues. This method was reported to work on a ThinkPad {{T23}} (kernels 2.6.8.1, 2.6.14.2 and 2.6.15-arch) and {{T42}} (kernel 2.6.13), but fails on a ThinkPad {{T43}} (kernel 2.6.14.3).&lt;br /&gt;
&lt;br /&gt;
[[lt_hotswap]] is now the recommended method to un- and reregister the IDE device. It installs as a kernel module and has support for automatically unregistering (if loaded with the auto_eject=1 option) the device when the eject event is generated by [[thinkpad-acpi]]. It will leave DMA support intact. It has supported to work on a ThinkPad {{T22}} and {{T40}} and should work with many other models (but not recent models which require the &amp;lt;tt&amp;gt;ata_piix&amp;lt;/tt&amp;gt; driver for disk DMA support). With the [[lt_hotswap]] kernel module loaded, run: {{cmdroot|modprobe -r ide_cd &amp;amp;&amp;amp; modprobe -r cdrom &amp;amp;&amp;amp; echo &amp;quot;MSTR eject&amp;quot; &amp;gt; /proc/acpi/lths}}&lt;br /&gt;
&lt;br /&gt;
===HAL support===&lt;br /&gt;
&lt;br /&gt;
HAL support also can also be configured To do so, create the file {{path|/etc/hal/fdi/information/10-ultrabay.fdi}} as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt; &amp;lt;!-- -*- SGML -*- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;deviceinfo version=&amp;quot;0.2&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;device&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;!-- UltraBay Devices --&amp;gt;&lt;br /&gt;
    &amp;lt;match key=&amp;quot;storage.bus&amp;quot; string=&amp;quot;ide&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;match key=&amp;quot;storage.physical_device&amp;quot; string=&amp;quot;/org/freedesktop/Hal/devices/pci_8086_24ca_ide_1_0&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;merge key=&amp;quot;storage.hotpluggable&amp;quot; type=&amp;quot;bool&amp;quot;&amp;gt;true&amp;lt;/merge&amp;gt;&lt;br /&gt;
      &amp;lt;/match&amp;gt;&lt;br /&gt;
    &amp;lt;/match&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;/device&amp;gt;&lt;br /&gt;
&amp;lt;/deviceinfo&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
For more details see HAL section for ata driver.&lt;br /&gt;
&lt;br /&gt;
==Password protected HDD==&lt;br /&gt;
&lt;br /&gt;
If you are hot-swapping a hard disk on a Ultrabay HDD tray, and the HDD has a password set, you will have to enter the password before it can be used. In theory you should be able to do so with hdparm as follows for a Master password:&lt;br /&gt;
 hdparm --security-unlock PASSWD /dev/sdb&lt;br /&gt;
Or if it is a user password&lt;br /&gt;
 hdparm --security-unlock PASSWD --user-master u /dev/sdb&lt;br /&gt;
&lt;br /&gt;
However on my system with Fedora 11 the above returns &amp;quot;SECURITY_UNLOCK: Input/output error&amp;quot;&lt;br /&gt;
&lt;br /&gt;
As such the only available option is to reboot and let the BIOS unlock the HDD.&lt;br /&gt;
&lt;br /&gt;
[[Category:Scripts]]&lt;br /&gt;
[[Category:HOWTOs]]&lt;/div&gt;</summary>
		<author><name>Roo</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Talk:How_to_hotswap_Ultrabay_devices&amp;diff=45340</id>
		<title>Talk:How to hotswap Ultrabay devices</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Talk:How_to_hotswap_Ultrabay_devices&amp;diff=45340"/>
		<updated>2010-01-08T16:47:36Z</updated>

		<summary type="html">&lt;p&gt;Roo: /* get notify-send working */  replaced w with lastlog as w has an username length limit&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Recent Ubuntu versions=&lt;br /&gt;
I think, it must be mentioned that hotswapping Ultrabay devices using recent distros&lt;br /&gt;
is by far not that hard as before. I'm using Ubuntu 9.04 on Z61m and in my case hotswapping&lt;br /&gt;
Ultrabay DVD-RW works out-of-the-box without any scripts or whatsoever. The article&lt;br /&gt;
however suggests that one always needs some ejecting scripts which might confuse certain&lt;br /&gt;
users. So it would be nice to add something like: &amp;quot;If you are using Ubuntu *.** everything should&lt;br /&gt;
work out-of-the-box&amp;quot;&lt;br /&gt;
&lt;br /&gt;
--[[User:Bombenbach|Bombenbach]] 12:01, 9 August 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
Really? Did you try to swap out a Ultrabay device with mounted filesystem? Good luck!&lt;br /&gt;
The udev handler and eject script are there for a reason. By default no action is taken when you pull out a device, which can cause real problems if not handled properly.&lt;br /&gt;
&lt;br /&gt;
--[[User:Tonko|Tonko]] 09:31, 10 August 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
Well, actually I couldn't imagine that someone would like to pull out an Ultrabay device with mounted file system.&lt;br /&gt;
As far a usb flash drives are concerned, you won't do that either, right? My point was, that if the file system is '''properly unmounted''', I can simply pull my Ultrabay DVD-RW out without any freezes or crashes. And when I put it back again, the drive is automatically recognized by Ubuntu so that I can use it. I don't have an Ultrabay HDD, but I assume that if it works with DVD-RW it also should work with HDD. Correct me if I'm wrong. If the sole purpose of eject script is hotswapping Ultrabay devices '''with mounted filesystem''' then I still think that it would be nice to point it out in the article. &lt;br /&gt;
&lt;br /&gt;
--[[User:Bombenbach|Bombenbach]] 07:52, 11 August 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
By default on most modern distributions based on a recent kernel with libata, the libata driver gets to cleanup the mess after the fact, if you pull out an ultrabay device without first&lt;br /&gt;
* unmounting the filesystem&lt;br /&gt;
* powering down the device&lt;br /&gt;
You may be lucky, or you might end up with a hung system, corrupted filesystem, etc. Your choice.&lt;br /&gt;
&lt;br /&gt;
There is work going on upstream to resolve this with DeviceKit-disks, but that depends on a patch to the Linux kernel, which has not made it in yet, since right now there is no correlation between the udev event and the actual Bay device, and since you can have multiple Bay devices (in fact your ThinkPad likely has 3) this correlation is needed, otherwise DeviceKit-disks would need to know about every single Laptop out there and the mapping between the Bay numbering and the actual devices (something the kernel can easily just provide instead).&lt;br /&gt;
&lt;br /&gt;
Here is a Feature request against DeviceKit-disks that provides some status information&lt;br /&gt;
http://bugs.freedesktop.org/show_bug.cgi?id=23110&lt;br /&gt;
&lt;br /&gt;
--[[User:Tonko|Tonko]] 09:07, 11 August 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
=HAL script=&lt;br /&gt;
&lt;br /&gt;
If the script works, your lshal output should contain something similar to this. In this case the Ultrabay device was a second HDD (/dev/sdb).&lt;br /&gt;
&lt;br /&gt;
Note that in the example, storage.hotpluggable = true while before it was false, so the script worked.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
udi = '/org/freedesktop/Hal/devices/storage_serial_SATA_HTS726060M9AT00_MRH453M4H11ARB'&lt;br /&gt;
  block.device = '/dev/sdb'  (string)&lt;br /&gt;
  block.is_volume = false  (bool)&lt;br /&gt;
  block.major = 8  (0x8)  (int)&lt;br /&gt;
  block.minor = 16  (0x10)  (int)&lt;br /&gt;
  block.storage_device = '/org/freedesktop/Hal/devices/storage_serial_SATA_HTS726060M9AT00_MRH453M4H11ARB'  (string)&lt;br /&gt;
  info.capabilities = {'storage', 'block'} (string list)&lt;br /&gt;
  info.category = 'storage'  (string)&lt;br /&gt;
  info.parent = '/org/freedesktop/Hal/devices/pci_8086_24ca_scsi_host_0_scsi_device_lun0'  (string)&lt;br /&gt;
  info.product = 'HTS726060M9AT00'  (string)&lt;br /&gt;
  info.udi = '/org/freedesktop/Hal/devices/storage_serial_SATA_HTS726060M9AT00_MRH453M4H11ARB'  (string)&lt;br /&gt;
  info.vendor = 'ATA'  (string)&lt;br /&gt;
  linux.hotplug_type = 3  (0x3)  (int)&lt;br /&gt;
  linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:1f.1/host1/target1:0:0/1:0:0:0/block/sdb'  (string)&lt;br /&gt;
  storage.automount_enabled_hint = true  (bool)&lt;br /&gt;
  storage.bus = 'pci'  (string)&lt;br /&gt;
  storage.drive_type = 'disk'  (string)&lt;br /&gt;
  storage.firmware_version = 'MH4O'  (string)&lt;br /&gt;
  storage.hotpluggable = true  (bool)&lt;br /&gt;
  storage.lun = 0  (0x0)  (int)&lt;br /&gt;
  storage.media_check_enabled = false  (bool)&lt;br /&gt;
  storage.model = 'HTS726060M9AT00'  (string)&lt;br /&gt;
  storage.no_partitions_hint = false  (bool)&lt;br /&gt;
  storage.originating_device = '/org/freedesktop/Hal/devices/computer'  (string)&lt;br /&gt;
  storage.partitioning_scheme = 'mbr'  (string)&lt;br /&gt;
  storage.removable = false  (bool)&lt;br /&gt;
  storage.removable.media_available = true  (bool)&lt;br /&gt;
  storage.removable.media_size = 60011642880  (0xdf8f90000)  (uint64)&lt;br /&gt;
  storage.requires_eject = false  (bool)&lt;br /&gt;
  storage.serial = 'SATA_HTS726060M9AT00_MRH453M4H11ARB'  (string)&lt;br /&gt;
  storage.size = 60011642880  (0xdf8f90000)  (uint64)&lt;br /&gt;
  storage.vendor = 'ATA'  (string)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
|+ Known South Bridge PCI IDs&lt;br /&gt;
! ID !! ThinkPad model !! South Bridge chip (for Ultrabay) !! parent device (host_0, lun0 = 2nd ATA controller, master device)&lt;br /&gt;
|-&lt;br /&gt;
| 8086_7111 || A20m, A20p, A21e, A21m, A21p, A22e, A22m, A22p, T20, T21, T22, X20, X21 || Intel 82371AB/EB/MB PIIX4 IDE || /org/freedesktop/Hal/devices/pci_8086_7111_scsi_host_0_scsi_device_lun0&lt;br /&gt;
|-&lt;br /&gt;
| 8086_248a || T23, T30, X22, X23, X24, X30|| Intel 82801CAM IDE U100 (rev 2) || /org/freedesktop/Hal/devices/pci_8086_248a_scsi_host_0_scsi_device_lun0&lt;br /&gt;
|-&lt;br /&gt;
| 8086_248a || A30, A30p, A31, A31p|| Intel 82801CAM IDE U100 (rev 2) || /org/freedesktop/Hal/devices/pci_8086_248a_scsi_host_scsi_device_lun0_0&amp;lt;br&amp;gt;/org/freedesktop/Hal/devices/pci_8086_248a_scsi_host_0_scsi_device_lun0&lt;br /&gt;
|-&lt;br /&gt;
| 8086_24ca || R50, R51, T40, T40p, T41, T41p, T42, T42p, X31, X32, X40 || Intel 82801DBM (ICH4-M) || /org/freedesktop/Hal/devices/pci_8086_24ca_scsi_host_0_scsi_device_lun0&lt;br /&gt;
|-&lt;br /&gt;
| 8086_2653 || R52, T43, T43p, X41, Z60m, Z60t  || Intel 82801FBM (ICH6-M) || /org/freedesktop/Hal/devices/pci_8086_2653_scsi_host_scsi_device_lun0&lt;br /&gt;
|-&lt;br /&gt;
| 8086_27c4 || R60, X60 || Intel 82801GBM (ICH7 Family) || /org/freedesktop/Hal/devices/pci_8086_27c4_scsi_host_scsi_device_lun0&lt;br /&gt;
|-&lt;br /&gt;
| 8086_27df || T60, T60p, Z61m, Z61t, Z61p || Intel 82801GBM/GHM (ICH7 Family) || /org/freedesktop/Hal/devices/pci_8086_27df_scsi_host_scsi_device_lun0&lt;br /&gt;
|-&lt;br /&gt;
| 8086_2850 || R61, T61, T61p, X300 || Intel 82801H (ICH8 Family) || /org/freedesktop/Hal/devices/pci_8086_2850_scsi_host_scsi_device_lun0&lt;br /&gt;
|-&lt;br /&gt;
| 8086_2929 || R400, R500, T400, T500, W500, W700, X200, X301 || Intel 82801I ICH9 Family || /org/freedesktop/Hal/devices/pci_8086_2929_scsi_host_0_scsi_device_lun0&lt;br /&gt;
|}&lt;br /&gt;
==lshal output==&lt;br /&gt;
Please place your lshal output here if you had problems&lt;br /&gt;
&lt;br /&gt;
lshal of my A31: [http://nopaste.org/p/a4p6x9tSob http://nopaste.org/p/a4p6x9tSob]&lt;br /&gt;
&lt;br /&gt;
Thanks! If I understand the output correctly you have one Toshiba Combo DVD-ROM/CD-RW R2002 in one ultrabay connected as slave to the primary IDE controller, and one Toshiba DVD-ROM C2512 in the second ultrabay connected as master to the secondary IDE controller. Can you confirm? I have added it to the table.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I have a Thinkpad T43 and I found out from my lshal output that I had to use parent device:&lt;br /&gt;
pci_8086_2653_scsi_host_0_scsi_device_lun0 instead of &lt;br /&gt;
pci_8086_2653_scsi_host_scsi_device_lun0 (notice the added 0).&lt;br /&gt;
This is the ultrabay, however, the internal disk still use the &amp;quot;original&amp;quot; parent device (the one without the 0).&lt;br /&gt;
I think this information should be added to the table.&lt;br /&gt;
Specs:&lt;br /&gt;
Thinkpad T43 (machine type 2668),&lt;br /&gt;
Mandriva One 2009.1,&lt;br /&gt;
haldaemon 0.5.12&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Thanks, it is possible that you have AHCI mode disabled in the BIOS for your HDD?&lt;br /&gt;
--[[User:Tonko|Tonko]] 11:00, 31 July 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
= bash script for hotswapping UltraBay =&lt;br /&gt;
&lt;br /&gt;
Here is my script for hotswapping ultrabay, is more complex, supports swap partition on drive in ultrabay, check holders (useful, when you are using luks) and more :)&lt;br /&gt;
&lt;br /&gt;
{{HELP|Please test on difrent models}}&lt;br /&gt;
&lt;br /&gt;
ultrabay.sh&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
SCSI_DEVICE=&amp;quot;&amp;quot;&lt;br /&gt;
FORCE_SLEEP=&amp;quot;1&amp;quot;&lt;br /&gt;
QUIET=&amp;quot;0&amp;quot;&lt;br /&gt;
SYSLOG=&amp;quot;0&amp;quot;&lt;br /&gt;
BEEP=&amp;quot;0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Message()&lt;br /&gt;
{&lt;br /&gt;
    MESSAGE=&amp;quot;${0/*\//}: $*&amp;quot;&lt;br /&gt;
    if [ &amp;quot;$QUIET&amp;quot; = &amp;quot;0&amp;quot; ]; then&lt;br /&gt;
        echo &amp;quot;$MESSAGE&amp;quot;&lt;br /&gt;
    fi&lt;br /&gt;
    if [ &amp;quot;$SYSLOG&amp;quot; != &amp;quot;0&amp;quot; ]; then&lt;br /&gt;
        /usr/bin/logger &amp;quot;$MESSAGE&amp;quot;&lt;br /&gt;
    fi&lt;br /&gt;
    true&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Exit()&lt;br /&gt;
{&lt;br /&gt;
    case &amp;quot;$1&amp;quot; in&lt;br /&gt;
        &amp;quot;fail&amp;quot;)&lt;br /&gt;
            [ $BEEP != &amp;quot;0&amp;quot; ] &amp;amp;&amp;amp; echo 2 &amp;gt; /proc/acpi/ibm/beep&lt;br /&gt;
            exit 1&lt;br /&gt;
        ;;&lt;br /&gt;
        &amp;quot;success&amp;quot;)&lt;br /&gt;
            [ $BEEP != &amp;quot;0&amp;quot; ] &amp;amp;&amp;amp; echo 12 &amp;gt; /proc/acpi/ibm/beep&lt;br /&gt;
            exit 0&lt;br /&gt;
        ;;&lt;br /&gt;
    esac&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Usage()&lt;br /&gt;
{&lt;br /&gt;
    echo &amp;quot;usage: ${0/*\/} [options]&amp;quot;&lt;br /&gt;
    echo &amp;quot;options:&amp;quot;&lt;br /&gt;
    echo &amp;quot;    -d &amp;lt;path&amp;gt;  SCSI device (required)&amp;quot;&lt;br /&gt;
    echo &amp;quot;    -s         Ignore fail when putting drive to sleep&amp;quot;&lt;br /&gt;
    echo &amp;quot;    -q         No messages&amp;quot;&lt;br /&gt;
    echo &amp;quot;    -l         Use syslog for messages (-q has no effect)&amp;quot;&lt;br /&gt;
    echo &amp;quot;    -b         Use beep for notification (-q has no effect)&amp;quot;&lt;br /&gt;
    exit 1&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Block2Device()&lt;br /&gt;
{&lt;br /&gt;
    /bin/readlink -e &amp;quot;/dev/block/$1&amp;quot;    &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
IsSwap()&lt;br /&gt;
{&lt;br /&gt;
    /sbin/swapon -s | grep -q -e &amp;quot;^$1\b&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
IsMounted()&lt;br /&gt;
{&lt;br /&gt;
    mount | grep -q -e &amp;quot;^$1\b&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
HasHolders()&lt;br /&gt;
{&lt;br /&gt;
    [ &amp;quot;$(ls &amp;quot;$1/holders&amp;quot;)&amp;quot; ]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
IsBusy()&lt;br /&gt;
{&lt;br /&gt;
    DEVICE=$(Block2Device $(cat &amp;quot;$1/dev&amp;quot;)) &lt;br /&gt;
    if IsSwap &amp;quot;$DEVICE&amp;quot; || IsMounted &amp;quot;$DEVICE&amp;quot; || HasHolders &amp;quot;$1&amp;quot;; then&lt;br /&gt;
	Message &amp;quot;device '$DEVICE' is busy&amp;quot;&lt;br /&gt;
	false&lt;br /&gt;
    else&lt;br /&gt;
	true&lt;br /&gt;
    fi&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
SleepDrive()&lt;br /&gt;
{&lt;br /&gt;
    BLOCK=$(cat $SCSI_DEVICE/block/*/dev 2&amp;gt; /dev/null)&lt;br /&gt;
    DEVICE=$(Block2Device &amp;quot;$BLOCK&amp;quot;)&lt;br /&gt;
    if ! /sbin/hdparm -Y &amp;quot;$DEVICE&amp;quot; &amp;amp;&amp;gt; /dev/null; then&lt;br /&gt;
        Message &amp;quot;cannot put drive to sleep&amp;quot;&lt;br /&gt;
        if [ $FORCE_SLEEP = &amp;quot;0&amp;quot; ]; then&lt;br /&gt;
            true&lt;br /&gt;
        else&lt;br /&gt;
            false&lt;br /&gt;
        fi&lt;br /&gt;
    fi&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
DeleteScsiDevice()&lt;br /&gt;
{&lt;br /&gt;
    if ! { echo 1 &amp;gt; $SCSI_DEVICE/delete; } &amp;amp;&amp;gt; /dev/null; then&lt;br /&gt;
        Message &amp;quot;cannot delete device&amp;quot;&lt;br /&gt;
        false&lt;br /&gt;
    fi&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
GetDock()&lt;br /&gt;
{&lt;br /&gt;
    grep &amp;quot;$1&amp;quot; /sys/devices/platform/dock.*/type | sed -e s%/type:.*%%&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
IsDocked()&lt;br /&gt;
{&lt;br /&gt;
    [ $(cat $(GetDock &amp;quot;$1&amp;quot;)/docked) -ne 0 ]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Undock()&lt;br /&gt;
{&lt;br /&gt;
    { echo 0 &amp;gt; $(GetDock &amp;quot;$1&amp;quot;)/undock; } &amp;amp;&amp;gt; /dev/null&lt;br /&gt;
    if IsDocked &amp;quot;$1&amp;quot;; then&lt;br /&gt;
        Message &amp;quot;cannot undock UltraBay&amp;quot;&lt;br /&gt;
        false&lt;br /&gt;
    else&lt;br /&gt;
        Message &amp;quot;UltraBay undocked&amp;quot;&lt;br /&gt;
        true&lt;br /&gt;
    fi&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
while getopts &amp;quot;d:qlsb&amp;quot; OPTION; do&lt;br /&gt;
    case $OPTION in&lt;br /&gt;
        d)&lt;br /&gt;
            SCSI_DEVICE=&amp;quot;$OPTARG&amp;quot;&lt;br /&gt;
        ;;&lt;br /&gt;
        s)&lt;br /&gt;
            FORCE_SLEEP=&amp;quot;0&amp;quot;&lt;br /&gt;
        ;;&lt;br /&gt;
        q)&lt;br /&gt;
            QUIET=&amp;quot;1&amp;quot;&lt;br /&gt;
        ;;&lt;br /&gt;
        l)&lt;br /&gt;
            SYSLOG=&amp;quot;1&amp;quot;&lt;br /&gt;
        ;;&lt;br /&gt;
        b)&lt;br /&gt;
            BEEP=&amp;quot;1&amp;quot;&lt;br /&gt;
        ;;&lt;br /&gt;
        ?)&lt;br /&gt;
            Usage&lt;br /&gt;
        ;;&lt;br /&gt;
      esac&lt;br /&gt;
done&lt;br /&gt;
 &lt;br /&gt;
if [ -d &amp;quot;$SCSI_DEVICE&amp;quot; ] &amp;amp;&amp;amp; IsDocked &amp;quot;ata_bay&amp;quot;; then&lt;br /&gt;
    sync&lt;br /&gt;
    for DEV_DIR in $(ls $SCSI_DEVICE/block/*/*/dev $SCSI_DEVICE/block/*/dev | sed -e s/dev$//  2&amp;gt; /dev/null); do&lt;br /&gt;
	IsBusy &amp;quot;$DEV_DIR&amp;quot; || Exit &amp;quot;fail&amp;quot;&lt;br /&gt;
    done&lt;br /&gt;
    sync&lt;br /&gt;
    SleepDrive || Exit &amp;quot;fail&amp;quot;&lt;br /&gt;
    DeleteScsiDevice || Exit &amp;quot;fail&amp;quot;&lt;br /&gt;
    sleep 4&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
if [ ! -d $SCSI_DEVICE ] &amp;amp;&amp;amp; $(IsDocked &amp;quot;ata_bay&amp;quot;); then&lt;br /&gt;
    if Undock &amp;quot;ata_bay&amp;quot;; then&lt;br /&gt;
        Exit &amp;quot;success&amp;quot;&lt;br /&gt;
    else&lt;br /&gt;
        Exit &amp;quot;fail&amp;quot;&lt;br /&gt;
    fi&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
Message &amp;quot;UltraBay is already undocked&amp;quot;&lt;br /&gt;
Exit &amp;quot;success&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Supported models: {{R400}} - linux-2.6.29&lt;br /&gt;
==comments==&lt;br /&gt;
Interesting, especially the support for swap partitions. but I have two comments, first your calling your script hotswap.sh and then having udev call ultrabay.sh?&lt;br /&gt;
&lt;br /&gt;
Then your hard coding the location of the Ultrabay device. This is not guaranteed to be correct, although it will be in most cases. In particular the A and W-series machines. A-series had support for more then one Ultrabay device, while W-series has support for more then one internal HDD in addition to the Ultrabay device, so the Ultrabay location will shift. That is why the Ultrabay Eject script on the main page gets the eject device information from udev.&lt;br /&gt;
&lt;br /&gt;
==comments==&lt;br /&gt;
Hi, thanks, I fix name of script :)&lt;br /&gt;
Udev calling ultrabay.sh with option -d, so it remove correct device, if you want remove device manualy, is default device useful. But option may be required...&lt;br /&gt;
&lt;br /&gt;
==more comments ;)==&lt;br /&gt;
You might also have a look at the script on the main page, it has a few extra abilities, such as logging to syslog, beeping and putting up popups on the desktop.&lt;br /&gt;
&lt;br /&gt;
Logging to syslog is simple, just call 'logger' with what you want to log. quite should have no effect on this.&lt;br /&gt;
&lt;br /&gt;
For beeps, similar to what windows does you can echo different values to /proc/acpi/ibm/beep, but it only works if sound is not muted. Unfortunately doing so does seem to generate some annoying messages in syslog.&lt;br /&gt;
&lt;br /&gt;
Lastly you can use notify-send to put up messages on the desktop, but before you can do so you have to do an export DISPLADISPLAY=0:0 /usr/bin/knotify4 --passive-popup : Adresář nebo soubor neexistujeY=:0.0&lt;br /&gt;
&lt;br /&gt;
==Syslog and beep==&lt;br /&gt;
OK, scrip now support syslog and beeping :).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Still missing notify-send ;)&lt;br /&gt;
&lt;br /&gt;
I am also thinking that it would be useful in the case of a busy filesystem to tell the user to run something like fuser -mv /dev/sr0&amp;lt;br&amp;gt;&lt;br /&gt;
Or perhaps we should run it ourselves automatically and just tell the user what is the cause of the busy filesystem.&amp;lt;br&amp;gt;&lt;br /&gt;
--[[User:Tonko|Tonko]] 21:21, 8 June 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
== get notify-send working ==&lt;br /&gt;
&lt;br /&gt;
Hi there,&lt;br /&gt;
&lt;br /&gt;
I've modified your ultrabay_eject script so that the notify-send is working for the user which is logged onto screen :0&lt;br /&gt;
for an unified diff see below, here is the whole modified script&lt;br /&gt;
&lt;br /&gt;
* whole script&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Change the following DEVPATH= to match your system, if you want to run this directly instead of having it called by the udev eject script&lt;br /&gt;
# To find the right value, insert the UltraBay optical drive and run:&lt;br /&gt;
# udevadm info --query=path --name=/dev/sr0 | perl -pe 's!/block/...$!!'&lt;br /&gt;
if [ &amp;quot;$DEVPATH&amp;quot; = &amp;quot;&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
   DEVPATH=&amp;quot;/devices/pci0000:00/0000:00:1f.2/host1/target1:0:0/1:0:0:0&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
shopt -s nullglob&lt;br /&gt;
export DISPLAY=:0.0 # required for notify-send&lt;br /&gt;
&lt;br /&gt;
DISP0_USER=`lastlog | grep &amp;quot; :0&amp;quot; | awk '{ print $1 }'` # the space before the :0 is needed to exclude ipv6 adresses&lt;br /&gt;
DISP0_USER_HOME=`getent passwd ${DISP0_USER} | cut -d':' -f6`&lt;br /&gt;
export XAUTHORITY=${DISP0_USER_HOME}/.Xauthority # also required for notify-send&lt;br /&gt;
&lt;br /&gt;
ULTRABAY_SYSDIR=/sys$DEVPATH&lt;br /&gt;
&lt;br /&gt;
# Find generic dock interface for UltraBay&lt;br /&gt;
dock=$( /bin/grep -l ata_bay /sys/devices/platform/dock.?/type )&lt;br /&gt;
dock=${dock%%/type}&lt;br /&gt;
if [ -n &amp;quot;$dock&amp;quot; -a -d &amp;quot;$dock&amp;quot; ]; then&lt;br /&gt;
        logger ultrabay_eject starting eject of $dock&lt;br /&gt;
else&lt;br /&gt;
        logger ultrabay_eject cannot locate bay dock device&lt;br /&gt;
        notify-send -u critical -t 100000 &amp;quot;ThinkPad Ultrabay eject failed&amp;quot; &amp;quot;Cannot locate bay dock device&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
# Umount the filesystem(s) backed by the given major:minor device(s)&lt;br /&gt;
unmount_rdev() { perl - &amp;quot;$@&amp;quot; &amp;lt;&amp;lt;'EOPERL'  # let's do it in Perl&lt;br /&gt;
        for $major_minor (@ARGV) {&lt;br /&gt;
                $major_minor =~ m/^(\d+):(\d+)$/ or die;&lt;br /&gt;
                push(@tgt_rdevs, ($1&amp;lt;&amp;lt;8)|$2);&lt;br /&gt;
        }&lt;br /&gt;
        # Sort by reverse length of mount point, to unmount sub-directories first&lt;br /&gt;
        open MOUNTS,&amp;quot;&amp;lt;/proc/mounts&amp;quot; or die &amp;quot;$!&amp;quot;;&lt;br /&gt;
        @mounts=sort { length($b-&amp;gt;[1]) &amp;lt;=&amp;gt; length($a-&amp;gt;[1]) } map { [ split ] } &amp;lt;MOUNTS&amp;gt;;&lt;br /&gt;
        close MOUNTS;&lt;br /&gt;
        foreach $m (@mounts) {&lt;br /&gt;
                ($dev,$dir)=@$m;&lt;br /&gt;
                next unless -b $dev;  $rdev=(stat($dev))[6];&lt;br /&gt;
                next unless grep($_==$rdev, @tgt_rdevs);&lt;br /&gt;
                system(&amp;quot;umount&amp;quot;,&amp;quot;-v&amp;quot;,&amp;quot;$dir&amp;quot;)==0  or  $bad=1;&lt;br /&gt;
                if ($bad == 1) {&lt;br /&gt;
                        system(&amp;quot;logger&amp;quot;,&amp;quot;ultrabay_eject&amp;quot;,&amp;quot;ERROR unmounting&amp;quot;,$dev,$dir);&lt;br /&gt;
                        system(&amp;quot;notify-send -u critical -t 100000 \&amp;quot;Error unmounting $dir\&amp;quot; \&amp;quot;Unmounting of $dir on $dev failed!\&amp;quot;&amp;quot;);&lt;br /&gt;
                } else {&lt;br /&gt;
                        system(&amp;quot;logger&amp;quot;,&amp;quot;ultrabay_eject&amp;quot;,&amp;quot;unmounted&amp;quot;,$dev,$dir);&lt;br /&gt;
                        system(&amp;quot;notify-send -u normal -t 5000 \&amp;quot;Unmounted $dir\&amp;quot;&amp;quot;);&lt;br /&gt;
                };&lt;br /&gt;
        }&lt;br /&gt;
        exit 1 if $bad;&lt;br /&gt;
EOPERL&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# Get the UltraBay's /dev/foo block device node&lt;br /&gt;
ultrabay_dev_node() {&lt;br /&gt;
        UDEV_PATH=&amp;quot;`readlink -e &amp;quot;$ULTRABAY_SYSDIR/block/&amp;quot;*`&amp;quot; || return 1&lt;br /&gt;
        UDEV_NAME=&amp;quot;`udevadm info --query=name --path=$UDEV_PATH`&amp;quot; || return 1&lt;br /&gt;
        echo /dev/$UDEV_NAME&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
if [ $( cat $dock/docked ) == 0 ]; then&lt;br /&gt;
        logger ultrabay_eject dock reports empty&lt;br /&gt;
else &lt;br /&gt;
	if [ -d $ULTRABAY_SYSDIR ]; then&lt;br /&gt;
		logger ultrabay_eject dock occupied, shutting down storage device $DEVPATH&lt;br /&gt;
		sync&lt;br /&gt;
		# Unmount filesystems backed by this device&lt;br /&gt;
		## This seems to be very inelegant and prone to failure&lt;br /&gt;
		unmount_rdev `cat $ULTRABAY_SYSDIR/block/*/dev     \&lt;br /&gt;
				  $ULTRABAY_SYSDIR/block/*/*/dev`  \&lt;br /&gt;
		|| {&lt;br /&gt;
			logger ultrabay_eject umounting failed&lt;br /&gt;
			echo 2 &amp;gt; /proc/acpi/ibm/beep  # triple error tone&lt;br /&gt;
			notify-send -u critical -t 100000 &amp;quot;ThinkPad Ultrabay eject failed&amp;quot; &amp;quot;Please do not pull the device, doing so could cause file corruption and possibly hang the system. Unmounting of the filesystem on the ThinkPad Ultrabay device failed. Please put the eject leaver back in place, and try to unmount the filesystem manually. If this succeeds you can try the eject again&amp;quot;&lt;br /&gt;
			exit 1;&lt;br /&gt;
		}&lt;br /&gt;
		sync&lt;br /&gt;
		# Nicely power off the device&lt;br /&gt;
		DEVNODE=`ultrabay_dev_node` &amp;amp;&amp;amp; hdparm -Y $DEVNODE&lt;br /&gt;
		# Let HAL+KDE notice the unmount and let the disk spin down&lt;br /&gt;
		sleep 0.5&lt;br /&gt;
		# Unregister this SCSI device:&lt;br /&gt;
		sync&lt;br /&gt;
		echo 1 &amp;gt; $ULTRABAY_SYSDIR/delete&lt;br /&gt;
	else&lt;br /&gt;
		logger ultrabay_eject bay occupied but incorrect device path $DEVPATH&lt;br /&gt;
		notify-send -u critical -t 100000 &amp;quot;ThinkPad Ultrabay eject failed&amp;quot; &amp;quot;Bay occupied but incorrect device path&amp;quot;&lt;br /&gt;
		echo 2 &amp;gt; /proc/acpi/ibm/beep  # triple error tone&lt;br /&gt;
		exit 1&lt;br /&gt;
	fi&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
# We need sleep here so someone can disconnect the bay and the drive&lt;br /&gt;
sleep 1&lt;br /&gt;
&lt;br /&gt;
# Turn off power to the UltraBay&lt;br /&gt;
logger ultrabay_eject undocking $dock&lt;br /&gt;
echo 1 &amp;gt; $dock/undock&lt;br /&gt;
&lt;br /&gt;
# Tell the user we're OK&lt;br /&gt;
logger ultrabay_eject done&lt;br /&gt;
echo 12 &amp;gt; /proc/acpi/ibm/beep&lt;br /&gt;
notify-send -u normal -t 10000 &amp;quot;Safe to remove device&amp;quot; &amp;quot;The ThinkPad Ultrabay device can now safely be removed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*unified diff&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--- ultrabay_eject.orig	2010-01-07 22:51:40.000000000 +0100&lt;br /&gt;
+++ ultrabay_eject	2010-01-07 22:54:55.000000000 +0100&lt;br /&gt;
@@ -10,6 +10,11 @@&lt;br /&gt;
 &lt;br /&gt;
 shopt -s nullglob&lt;br /&gt;
 export DISPLAY=:0.0 # required for notify-send&lt;br /&gt;
+&lt;br /&gt;
+DISP0_USER=`lastlog | grep &amp;quot; :0&amp;quot; | awk '{ print $1 }'` # the space before the :0 is needed to exclude ipv6 adresses&lt;br /&gt;
+DISP0_USER_HOME=`getent passwd ${DISP0_USER} | cut -d':' -f6`&lt;br /&gt;
+export XAUTHORITY=${DISP0_USER_HOME}/.Xauthority # also required for notify-send&lt;br /&gt;
+&lt;br /&gt;
 ULTRABAY_SYSDIR=/sys$DEVPATH&lt;br /&gt;
 &lt;br /&gt;
 # Find generic dock interface for UltraBay&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
i hope this is useful to other users as well --[[User:Roo|Roo]] 22:19, 7 January 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Roo</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Talk:How_to_hotswap_Ultrabay_devices&amp;diff=45337</id>
		<title>Talk:How to hotswap Ultrabay devices</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Talk:How_to_hotswap_Ultrabay_devices&amp;diff=45337"/>
		<updated>2010-01-07T22:19:52Z</updated>

		<summary type="html">&lt;p&gt;Roo: /* get notify-send working */ new section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Recent Ubuntu versions=&lt;br /&gt;
I think, it must be mentioned that hotswapping Ultrabay devices using recent distros&lt;br /&gt;
is by far not that hard as before. I'm using Ubuntu 9.04 on Z61m and in my case hotswapping&lt;br /&gt;
Ultrabay DVD-RW works out-of-the-box without any scripts or whatsoever. The article&lt;br /&gt;
however suggests that one always needs some ejecting scripts which might confuse certain&lt;br /&gt;
users. So it would be nice to add something like: &amp;quot;If you are using Ubuntu *.** everything should&lt;br /&gt;
work out-of-the-box&amp;quot;&lt;br /&gt;
&lt;br /&gt;
--[[User:Bombenbach|Bombenbach]] 12:01, 9 August 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
Really? Did you try to swap out a Ultrabay device with mounted filesystem? Good luck!&lt;br /&gt;
The udev handler and eject script are there for a reason. By default no action is taken when you pull out a device, which can cause real problems if not handled properly.&lt;br /&gt;
&lt;br /&gt;
--[[User:Tonko|Tonko]] 09:31, 10 August 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
Well, actually I couldn't imagine that someone would like to pull out an Ultrabay device with mounted file system.&lt;br /&gt;
As far a usb flash drives are concerned, you won't do that either, right? My point was, that if the file system is '''properly unmounted''', I can simply pull my Ultrabay DVD-RW out without any freezes or crashes. And when I put it back again, the drive is automatically recognized by Ubuntu so that I can use it. I don't have an Ultrabay HDD, but I assume that if it works with DVD-RW it also should work with HDD. Correct me if I'm wrong. If the sole purpose of eject script is hotswapping Ultrabay devices '''with mounted filesystem''' then I still think that it would be nice to point it out in the article. &lt;br /&gt;
&lt;br /&gt;
--[[User:Bombenbach|Bombenbach]] 07:52, 11 August 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
By default on most modern distributions based on a recent kernel with libata, the libata driver gets to cleanup the mess after the fact, if you pull out an ultrabay device without first&lt;br /&gt;
* unmounting the filesystem&lt;br /&gt;
* powering down the device&lt;br /&gt;
You may be lucky, or you might end up with a hung system, corrupted filesystem, etc. Your choice.&lt;br /&gt;
&lt;br /&gt;
There is work going on upstream to resolve this with DeviceKit-disks, but that depends on a patch to the Linux kernel, which has not made it in yet, since right now there is no correlation between the udev event and the actual Bay device, and since you can have multiple Bay devices (in fact your ThinkPad likely has 3) this correlation is needed, otherwise DeviceKit-disks would need to know about every single Laptop out there and the mapping between the Bay numbering and the actual devices (something the kernel can easily just provide instead).&lt;br /&gt;
&lt;br /&gt;
Here is a Feature request against DeviceKit-disks that provides some status information&lt;br /&gt;
http://bugs.freedesktop.org/show_bug.cgi?id=23110&lt;br /&gt;
&lt;br /&gt;
--[[User:Tonko|Tonko]] 09:07, 11 August 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
=HAL script=&lt;br /&gt;
&lt;br /&gt;
If the script works, your lshal output should contain something similar to this. In this case the Ultrabay device was a second HDD (/dev/sdb).&lt;br /&gt;
&lt;br /&gt;
Note that in the example, storage.hotpluggable = true while before it was false, so the script worked.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
udi = '/org/freedesktop/Hal/devices/storage_serial_SATA_HTS726060M9AT00_MRH453M4H11ARB'&lt;br /&gt;
  block.device = '/dev/sdb'  (string)&lt;br /&gt;
  block.is_volume = false  (bool)&lt;br /&gt;
  block.major = 8  (0x8)  (int)&lt;br /&gt;
  block.minor = 16  (0x10)  (int)&lt;br /&gt;
  block.storage_device = '/org/freedesktop/Hal/devices/storage_serial_SATA_HTS726060M9AT00_MRH453M4H11ARB'  (string)&lt;br /&gt;
  info.capabilities = {'storage', 'block'} (string list)&lt;br /&gt;
  info.category = 'storage'  (string)&lt;br /&gt;
  info.parent = '/org/freedesktop/Hal/devices/pci_8086_24ca_scsi_host_0_scsi_device_lun0'  (string)&lt;br /&gt;
  info.product = 'HTS726060M9AT00'  (string)&lt;br /&gt;
  info.udi = '/org/freedesktop/Hal/devices/storage_serial_SATA_HTS726060M9AT00_MRH453M4H11ARB'  (string)&lt;br /&gt;
  info.vendor = 'ATA'  (string)&lt;br /&gt;
  linux.hotplug_type = 3  (0x3)  (int)&lt;br /&gt;
  linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:1f.1/host1/target1:0:0/1:0:0:0/block/sdb'  (string)&lt;br /&gt;
  storage.automount_enabled_hint = true  (bool)&lt;br /&gt;
  storage.bus = 'pci'  (string)&lt;br /&gt;
  storage.drive_type = 'disk'  (string)&lt;br /&gt;
  storage.firmware_version = 'MH4O'  (string)&lt;br /&gt;
  storage.hotpluggable = true  (bool)&lt;br /&gt;
  storage.lun = 0  (0x0)  (int)&lt;br /&gt;
  storage.media_check_enabled = false  (bool)&lt;br /&gt;
  storage.model = 'HTS726060M9AT00'  (string)&lt;br /&gt;
  storage.no_partitions_hint = false  (bool)&lt;br /&gt;
  storage.originating_device = '/org/freedesktop/Hal/devices/computer'  (string)&lt;br /&gt;
  storage.partitioning_scheme = 'mbr'  (string)&lt;br /&gt;
  storage.removable = false  (bool)&lt;br /&gt;
  storage.removable.media_available = true  (bool)&lt;br /&gt;
  storage.removable.media_size = 60011642880  (0xdf8f90000)  (uint64)&lt;br /&gt;
  storage.requires_eject = false  (bool)&lt;br /&gt;
  storage.serial = 'SATA_HTS726060M9AT00_MRH453M4H11ARB'  (string)&lt;br /&gt;
  storage.size = 60011642880  (0xdf8f90000)  (uint64)&lt;br /&gt;
  storage.vendor = 'ATA'  (string)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
|+ Known South Bridge PCI IDs&lt;br /&gt;
! ID !! ThinkPad model !! South Bridge chip (for Ultrabay) !! parent device (host_0, lun0 = 2nd ATA controller, master device)&lt;br /&gt;
|-&lt;br /&gt;
| 8086_7111 || A20m, A20p, A21e, A21m, A21p, A22e, A22m, A22p, T20, T21, T22, X20, X21 || Intel 82371AB/EB/MB PIIX4 IDE || /org/freedesktop/Hal/devices/pci_8086_7111_scsi_host_0_scsi_device_lun0&lt;br /&gt;
|-&lt;br /&gt;
| 8086_248a || T23, T30, X22, X23, X24, X30|| Intel 82801CAM IDE U100 (rev 2) || /org/freedesktop/Hal/devices/pci_8086_248a_scsi_host_0_scsi_device_lun0&lt;br /&gt;
|-&lt;br /&gt;
| 8086_248a || A30, A30p, A31, A31p|| Intel 82801CAM IDE U100 (rev 2) || /org/freedesktop/Hal/devices/pci_8086_248a_scsi_host_scsi_device_lun0_0&amp;lt;br&amp;gt;/org/freedesktop/Hal/devices/pci_8086_248a_scsi_host_0_scsi_device_lun0&lt;br /&gt;
|-&lt;br /&gt;
| 8086_24ca || R50, R51, T40, T40p, T41, T41p, T42, T42p, X31, X32, X40 || Intel 82801DBM (ICH4-M) || /org/freedesktop/Hal/devices/pci_8086_24ca_scsi_host_0_scsi_device_lun0&lt;br /&gt;
|-&lt;br /&gt;
| 8086_2653 || R52, T43, T43p, X41, Z60m, Z60t  || Intel 82801FBM (ICH6-M) || /org/freedesktop/Hal/devices/pci_8086_2653_scsi_host_scsi_device_lun0&lt;br /&gt;
|-&lt;br /&gt;
| 8086_27c4 || R60, X60 || Intel 82801GBM (ICH7 Family) || /org/freedesktop/Hal/devices/pci_8086_27c4_scsi_host_scsi_device_lun0&lt;br /&gt;
|-&lt;br /&gt;
| 8086_27df || T60, T60p, Z61m, Z61t, Z61p || Intel 82801GBM/GHM (ICH7 Family) || /org/freedesktop/Hal/devices/pci_8086_27df_scsi_host_scsi_device_lun0&lt;br /&gt;
|-&lt;br /&gt;
| 8086_2850 || R61, T61, T61p, X300 || Intel 82801H (ICH8 Family) || /org/freedesktop/Hal/devices/pci_8086_2850_scsi_host_scsi_device_lun0&lt;br /&gt;
|-&lt;br /&gt;
| 8086_2929 || R400, R500, T400, T500, W500, W700, X200, X301 || Intel 82801I ICH9 Family || /org/freedesktop/Hal/devices/pci_8086_2929_scsi_host_0_scsi_device_lun0&lt;br /&gt;
|}&lt;br /&gt;
==lshal output==&lt;br /&gt;
Please place your lshal output here if you had problems&lt;br /&gt;
&lt;br /&gt;
lshal of my A31: [http://nopaste.org/p/a4p6x9tSob http://nopaste.org/p/a4p6x9tSob]&lt;br /&gt;
&lt;br /&gt;
Thanks! If I understand the output correctly you have one Toshiba Combo DVD-ROM/CD-RW R2002 in one ultrabay connected as slave to the primary IDE controller, and one Toshiba DVD-ROM C2512 in the second ultrabay connected as master to the secondary IDE controller. Can you confirm? I have added it to the table.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I have a Thinkpad T43 and I found out from my lshal output that I had to use parent device:&lt;br /&gt;
pci_8086_2653_scsi_host_0_scsi_device_lun0 instead of &lt;br /&gt;
pci_8086_2653_scsi_host_scsi_device_lun0 (notice the added 0).&lt;br /&gt;
This is the ultrabay, however, the internal disk still use the &amp;quot;original&amp;quot; parent device (the one without the 0).&lt;br /&gt;
I think this information should be added to the table.&lt;br /&gt;
Specs:&lt;br /&gt;
Thinkpad T43 (machine type 2668),&lt;br /&gt;
Mandriva One 2009.1,&lt;br /&gt;
haldaemon 0.5.12&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Thanks, it is possible that you have AHCI mode disabled in the BIOS for your HDD?&lt;br /&gt;
--[[User:Tonko|Tonko]] 11:00, 31 July 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
= bash script for hotswapping UltraBay =&lt;br /&gt;
&lt;br /&gt;
Here is my script for hotswapping ultrabay, is more complex, supports swap partition on drive in ultrabay, check holders (useful, when you are using luks) and more :)&lt;br /&gt;
&lt;br /&gt;
{{HELP|Please test on difrent models}}&lt;br /&gt;
&lt;br /&gt;
ultrabay.sh&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
SCSI_DEVICE=&amp;quot;&amp;quot;&lt;br /&gt;
FORCE_SLEEP=&amp;quot;1&amp;quot;&lt;br /&gt;
QUIET=&amp;quot;0&amp;quot;&lt;br /&gt;
SYSLOG=&amp;quot;0&amp;quot;&lt;br /&gt;
BEEP=&amp;quot;0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Message()&lt;br /&gt;
{&lt;br /&gt;
    MESSAGE=&amp;quot;${0/*\//}: $*&amp;quot;&lt;br /&gt;
    if [ &amp;quot;$QUIET&amp;quot; = &amp;quot;0&amp;quot; ]; then&lt;br /&gt;
        echo &amp;quot;$MESSAGE&amp;quot;&lt;br /&gt;
    fi&lt;br /&gt;
    if [ &amp;quot;$SYSLOG&amp;quot; != &amp;quot;0&amp;quot; ]; then&lt;br /&gt;
        /usr/bin/logger &amp;quot;$MESSAGE&amp;quot;&lt;br /&gt;
    fi&lt;br /&gt;
    true&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Exit()&lt;br /&gt;
{&lt;br /&gt;
    case &amp;quot;$1&amp;quot; in&lt;br /&gt;
        &amp;quot;fail&amp;quot;)&lt;br /&gt;
            [ $BEEP != &amp;quot;0&amp;quot; ] &amp;amp;&amp;amp; echo 2 &amp;gt; /proc/acpi/ibm/beep&lt;br /&gt;
            exit 1&lt;br /&gt;
        ;;&lt;br /&gt;
        &amp;quot;success&amp;quot;)&lt;br /&gt;
            [ $BEEP != &amp;quot;0&amp;quot; ] &amp;amp;&amp;amp; echo 12 &amp;gt; /proc/acpi/ibm/beep&lt;br /&gt;
            exit 0&lt;br /&gt;
        ;;&lt;br /&gt;
    esac&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Usage()&lt;br /&gt;
{&lt;br /&gt;
    echo &amp;quot;usage: ${0/*\/} [options]&amp;quot;&lt;br /&gt;
    echo &amp;quot;options:&amp;quot;&lt;br /&gt;
    echo &amp;quot;    -d &amp;lt;path&amp;gt;  SCSI device (required)&amp;quot;&lt;br /&gt;
    echo &amp;quot;    -s         Ignore fail when putting drive to sleep&amp;quot;&lt;br /&gt;
    echo &amp;quot;    -q         No messages&amp;quot;&lt;br /&gt;
    echo &amp;quot;    -l         Use syslog for messages (-q has no effect)&amp;quot;&lt;br /&gt;
    echo &amp;quot;    -b         Use beep for notification (-q has no effect)&amp;quot;&lt;br /&gt;
    exit 1&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Block2Device()&lt;br /&gt;
{&lt;br /&gt;
    /bin/readlink -e &amp;quot;/dev/block/$1&amp;quot;    &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
IsSwap()&lt;br /&gt;
{&lt;br /&gt;
    /sbin/swapon -s | grep -q -e &amp;quot;^$1\b&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
IsMounted()&lt;br /&gt;
{&lt;br /&gt;
    mount | grep -q -e &amp;quot;^$1\b&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
HasHolders()&lt;br /&gt;
{&lt;br /&gt;
    [ &amp;quot;$(ls &amp;quot;$1/holders&amp;quot;)&amp;quot; ]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
IsBusy()&lt;br /&gt;
{&lt;br /&gt;
    DEVICE=$(Block2Device $(cat &amp;quot;$1/dev&amp;quot;)) &lt;br /&gt;
    if IsSwap &amp;quot;$DEVICE&amp;quot; || IsMounted &amp;quot;$DEVICE&amp;quot; || HasHolders &amp;quot;$1&amp;quot;; then&lt;br /&gt;
	Message &amp;quot;device '$DEVICE' is busy&amp;quot;&lt;br /&gt;
	false&lt;br /&gt;
    else&lt;br /&gt;
	true&lt;br /&gt;
    fi&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
SleepDrive()&lt;br /&gt;
{&lt;br /&gt;
    BLOCK=$(cat $SCSI_DEVICE/block/*/dev 2&amp;gt; /dev/null)&lt;br /&gt;
    DEVICE=$(Block2Device &amp;quot;$BLOCK&amp;quot;)&lt;br /&gt;
    if ! /sbin/hdparm -Y &amp;quot;$DEVICE&amp;quot; &amp;amp;&amp;gt; /dev/null; then&lt;br /&gt;
        Message &amp;quot;cannot put drive to sleep&amp;quot;&lt;br /&gt;
        if [ $FORCE_SLEEP = &amp;quot;0&amp;quot; ]; then&lt;br /&gt;
            true&lt;br /&gt;
        else&lt;br /&gt;
            false&lt;br /&gt;
        fi&lt;br /&gt;
    fi&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
DeleteScsiDevice()&lt;br /&gt;
{&lt;br /&gt;
    if ! { echo 1 &amp;gt; $SCSI_DEVICE/delete; } &amp;amp;&amp;gt; /dev/null; then&lt;br /&gt;
        Message &amp;quot;cannot delete device&amp;quot;&lt;br /&gt;
        false&lt;br /&gt;
    fi&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
GetDock()&lt;br /&gt;
{&lt;br /&gt;
    grep &amp;quot;$1&amp;quot; /sys/devices/platform/dock.*/type | sed -e s%/type:.*%%&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
IsDocked()&lt;br /&gt;
{&lt;br /&gt;
    [ $(cat $(GetDock &amp;quot;$1&amp;quot;)/docked) -ne 0 ]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Undock()&lt;br /&gt;
{&lt;br /&gt;
    { echo 0 &amp;gt; $(GetDock &amp;quot;$1&amp;quot;)/undock; } &amp;amp;&amp;gt; /dev/null&lt;br /&gt;
    if IsDocked &amp;quot;$1&amp;quot;; then&lt;br /&gt;
        Message &amp;quot;cannot undock UltraBay&amp;quot;&lt;br /&gt;
        false&lt;br /&gt;
    else&lt;br /&gt;
        Message &amp;quot;UltraBay undocked&amp;quot;&lt;br /&gt;
        true&lt;br /&gt;
    fi&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
while getopts &amp;quot;d:qlsb&amp;quot; OPTION; do&lt;br /&gt;
    case $OPTION in&lt;br /&gt;
        d)&lt;br /&gt;
            SCSI_DEVICE=&amp;quot;$OPTARG&amp;quot;&lt;br /&gt;
        ;;&lt;br /&gt;
        s)&lt;br /&gt;
            FORCE_SLEEP=&amp;quot;0&amp;quot;&lt;br /&gt;
        ;;&lt;br /&gt;
        q)&lt;br /&gt;
            QUIET=&amp;quot;1&amp;quot;&lt;br /&gt;
        ;;&lt;br /&gt;
        l)&lt;br /&gt;
            SYSLOG=&amp;quot;1&amp;quot;&lt;br /&gt;
        ;;&lt;br /&gt;
        b)&lt;br /&gt;
            BEEP=&amp;quot;1&amp;quot;&lt;br /&gt;
        ;;&lt;br /&gt;
        ?)&lt;br /&gt;
            Usage&lt;br /&gt;
        ;;&lt;br /&gt;
      esac&lt;br /&gt;
done&lt;br /&gt;
 &lt;br /&gt;
if [ -d &amp;quot;$SCSI_DEVICE&amp;quot; ] &amp;amp;&amp;amp; IsDocked &amp;quot;ata_bay&amp;quot;; then&lt;br /&gt;
    sync&lt;br /&gt;
    for DEV_DIR in $(ls $SCSI_DEVICE/block/*/*/dev $SCSI_DEVICE/block/*/dev | sed -e s/dev$//  2&amp;gt; /dev/null); do&lt;br /&gt;
	IsBusy &amp;quot;$DEV_DIR&amp;quot; || Exit &amp;quot;fail&amp;quot;&lt;br /&gt;
    done&lt;br /&gt;
    sync&lt;br /&gt;
    SleepDrive || Exit &amp;quot;fail&amp;quot;&lt;br /&gt;
    DeleteScsiDevice || Exit &amp;quot;fail&amp;quot;&lt;br /&gt;
    sleep 4&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
if [ ! -d $SCSI_DEVICE ] &amp;amp;&amp;amp; $(IsDocked &amp;quot;ata_bay&amp;quot;); then&lt;br /&gt;
    if Undock &amp;quot;ata_bay&amp;quot;; then&lt;br /&gt;
        Exit &amp;quot;success&amp;quot;&lt;br /&gt;
    else&lt;br /&gt;
        Exit &amp;quot;fail&amp;quot;&lt;br /&gt;
    fi&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
Message &amp;quot;UltraBay is already undocked&amp;quot;&lt;br /&gt;
Exit &amp;quot;success&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Supported models: {{R400}} - linux-2.6.29&lt;br /&gt;
==comments==&lt;br /&gt;
Interesting, especially the support for swap partitions. but I have two comments, first your calling your script hotswap.sh and then having udev call ultrabay.sh?&lt;br /&gt;
&lt;br /&gt;
Then your hard coding the location of the Ultrabay device. This is not guaranteed to be correct, although it will be in most cases. In particular the A and W-series machines. A-series had support for more then one Ultrabay device, while W-series has support for more then one internal HDD in addition to the Ultrabay device, so the Ultrabay location will shift. That is why the Ultrabay Eject script on the main page gets the eject device information from udev.&lt;br /&gt;
&lt;br /&gt;
==comments==&lt;br /&gt;
Hi, thanks, I fix name of script :)&lt;br /&gt;
Udev calling ultrabay.sh with option -d, so it remove correct device, if you want remove device manualy, is default device useful. But option may be required...&lt;br /&gt;
&lt;br /&gt;
==more comments ;)==&lt;br /&gt;
You might also have a look at the script on the main page, it has a few extra abilities, such as logging to syslog, beeping and putting up popups on the desktop.&lt;br /&gt;
&lt;br /&gt;
Logging to syslog is simple, just call 'logger' with what you want to log. quite should have no effect on this.&lt;br /&gt;
&lt;br /&gt;
For beeps, similar to what windows does you can echo different values to /proc/acpi/ibm/beep, but it only works if sound is not muted. Unfortunately doing so does seem to generate some annoying messages in syslog.&lt;br /&gt;
&lt;br /&gt;
Lastly you can use notify-send to put up messages on the desktop, but before you can do so you have to do an export DISPLADISPLAY=0:0 /usr/bin/knotify4 --passive-popup : Adresář nebo soubor neexistujeY=:0.0&lt;br /&gt;
&lt;br /&gt;
==Syslog and beep==&lt;br /&gt;
OK, scrip now support syslog and beeping :).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Still missing notify-send ;)&lt;br /&gt;
&lt;br /&gt;
I am also thinking that it would be useful in the case of a busy filesystem to tell the user to run something like fuser -mv /dev/sr0&amp;lt;br&amp;gt;&lt;br /&gt;
Or perhaps we should run it ourselves automatically and just tell the user what is the cause of the busy filesystem.&amp;lt;br&amp;gt;&lt;br /&gt;
--[[User:Tonko|Tonko]] 21:21, 8 June 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
== get notify-send working ==&lt;br /&gt;
&lt;br /&gt;
Hi there,&lt;br /&gt;
&lt;br /&gt;
I've modified your ultrabay_eject script so that the notify-send is working for the user which is logged onto screen :0&lt;br /&gt;
for an unified diff see below, here is the whole modified script&lt;br /&gt;
&lt;br /&gt;
* whole script&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Change the following DEVPATH= to match your system, if you want to run this directly instead of having it called by the udev eject script&lt;br /&gt;
# To find the right value, insert the UltraBay optical drive and run:&lt;br /&gt;
# udevadm info --query=path --name=/dev/sr0 | perl -pe 's!/block/...$!!'&lt;br /&gt;
if [ &amp;quot;$DEVPATH&amp;quot; = &amp;quot;&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
   DEVPATH=&amp;quot;/devices/pci0000:00/0000:00:1f.2/host1/target1:0:0/1:0:0:0&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
shopt -s nullglob&lt;br /&gt;
export DISPLAY=:0.0 # required for notify-send&lt;br /&gt;
&lt;br /&gt;
DISP0_USER=`w | grep &amp;quot;:0 &amp;quot; | awk '{ print $1 }'`&lt;br /&gt;
DISP0_USER_HOME=`getent passwd ${DISP0_USER} | cut -d':' -f6`&lt;br /&gt;
export XAUTHORITY=${DISP0_USER_HOME}/.Xauthority # also required for notify-send&lt;br /&gt;
&lt;br /&gt;
ULTRABAY_SYSDIR=/sys$DEVPATH&lt;br /&gt;
&lt;br /&gt;
# Find generic dock interface for UltraBay&lt;br /&gt;
dock=$( /bin/grep -l ata_bay /sys/devices/platform/dock.?/type )&lt;br /&gt;
dock=${dock%%/type}&lt;br /&gt;
if [ -n &amp;quot;$dock&amp;quot; -a -d &amp;quot;$dock&amp;quot; ]; then&lt;br /&gt;
        logger ultrabay_eject starting eject of $dock&lt;br /&gt;
else&lt;br /&gt;
        logger ultrabay_eject cannot locate bay dock device&lt;br /&gt;
        notify-send -u critical -t 100000 &amp;quot;ThinkPad Ultrabay eject failed&amp;quot; &amp;quot;Cannot locate bay dock device&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
# Umount the filesystem(s) backed by the given major:minor device(s)&lt;br /&gt;
unmount_rdev() { perl - &amp;quot;$@&amp;quot; &amp;lt;&amp;lt;'EOPERL'  # let's do it in Perl&lt;br /&gt;
        for $major_minor (@ARGV) {&lt;br /&gt;
                $major_minor =~ m/^(\d+):(\d+)$/ or die;&lt;br /&gt;
                push(@tgt_rdevs, ($1&amp;lt;&amp;lt;8)|$2);&lt;br /&gt;
        }&lt;br /&gt;
        # Sort by reverse length of mount point, to unmount sub-directories first&lt;br /&gt;
        open MOUNTS,&amp;quot;&amp;lt;/proc/mounts&amp;quot; or die &amp;quot;$!&amp;quot;;&lt;br /&gt;
        @mounts=sort { length($b-&amp;gt;[1]) &amp;lt;=&amp;gt; length($a-&amp;gt;[1]) } map { [ split ] } &amp;lt;MOUNTS&amp;gt;;&lt;br /&gt;
        close MOUNTS;&lt;br /&gt;
        foreach $m (@mounts) {&lt;br /&gt;
                ($dev,$dir)=@$m;&lt;br /&gt;
                next unless -b $dev;  $rdev=(stat($dev))[6];&lt;br /&gt;
                next unless grep($_==$rdev, @tgt_rdevs);&lt;br /&gt;
                system(&amp;quot;umount&amp;quot;,&amp;quot;-v&amp;quot;,&amp;quot;$dir&amp;quot;)==0  or  $bad=1;&lt;br /&gt;
                if ($bad == 1) {&lt;br /&gt;
                        system(&amp;quot;logger&amp;quot;,&amp;quot;ultrabay_eject&amp;quot;,&amp;quot;ERROR unmounting&amp;quot;,$dev,$dir);&lt;br /&gt;
                        system(&amp;quot;notify-send -u critical -t 100000 \&amp;quot;Error unmounting $dir\&amp;quot; \&amp;quot;Unmounting of $dir on $dev failed!\&amp;quot;&amp;quot;);&lt;br /&gt;
                } else {&lt;br /&gt;
                        system(&amp;quot;logger&amp;quot;,&amp;quot;ultrabay_eject&amp;quot;,&amp;quot;unmounted&amp;quot;,$dev,$dir);&lt;br /&gt;
                        system(&amp;quot;notify-send -u normal -t 5000 \&amp;quot;Unmounted $dir\&amp;quot;&amp;quot;);&lt;br /&gt;
                };&lt;br /&gt;
        }&lt;br /&gt;
        exit 1 if $bad;&lt;br /&gt;
EOPERL&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# Get the UltraBay's /dev/foo block device node&lt;br /&gt;
ultrabay_dev_node() {&lt;br /&gt;
        UDEV_PATH=&amp;quot;`readlink -e &amp;quot;$ULTRABAY_SYSDIR/block/&amp;quot;*`&amp;quot; || return 1&lt;br /&gt;
        UDEV_NAME=&amp;quot;`udevadm info --query=name --path=$UDEV_PATH`&amp;quot; || return 1&lt;br /&gt;
        echo /dev/$UDEV_NAME&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
if [ $( cat $dock/docked ) == 0 ]; then&lt;br /&gt;
        logger ultrabay_eject dock reports empty&lt;br /&gt;
else &lt;br /&gt;
	if [ -d $ULTRABAY_SYSDIR ]; then&lt;br /&gt;
		logger ultrabay_eject dock occupied, shutting down storage device $DEVPATH&lt;br /&gt;
		sync&lt;br /&gt;
		# Unmount filesystems backed by this device&lt;br /&gt;
		## This seems to be very inelegant and prone to failure&lt;br /&gt;
		unmount_rdev `cat $ULTRABAY_SYSDIR/block/*/dev     \&lt;br /&gt;
				  $ULTRABAY_SYSDIR/block/*/*/dev`  \&lt;br /&gt;
		|| {&lt;br /&gt;
			logger ultrabay_eject umounting failed&lt;br /&gt;
			echo 2 &amp;gt; /proc/acpi/ibm/beep  # triple error tone&lt;br /&gt;
			notify-send -u critical -t 100000 &amp;quot;ThinkPad Ultrabay eject failed&amp;quot; &amp;quot;Please do not pull the device, doing so could cause file corruption and possibly hang the system. Unmounting of the filesystem on the ThinkPad Ultrabay device failed. Please put the eject leaver back in place, and try to unmount the filesystem manually. If this succeeds you can try the eject again&amp;quot;&lt;br /&gt;
			exit 1;&lt;br /&gt;
		}&lt;br /&gt;
		sync&lt;br /&gt;
		# Nicely power off the device&lt;br /&gt;
		DEVNODE=`ultrabay_dev_node` &amp;amp;&amp;amp; hdparm -Y $DEVNODE&lt;br /&gt;
		# Let HAL+KDE notice the unmount and let the disk spin down&lt;br /&gt;
		sleep 0.5&lt;br /&gt;
		# Unregister this SCSI device:&lt;br /&gt;
		sync&lt;br /&gt;
		echo 1 &amp;gt; $ULTRABAY_SYSDIR/delete&lt;br /&gt;
	else&lt;br /&gt;
		logger ultrabay_eject bay occupied but incorrect device path $DEVPATH&lt;br /&gt;
		notify-send -u critical -t 100000 &amp;quot;ThinkPad Ultrabay eject failed&amp;quot; &amp;quot;Bay occupied but incorrect device path&amp;quot;&lt;br /&gt;
		echo 2 &amp;gt; /proc/acpi/ibm/beep  # triple error tone&lt;br /&gt;
		exit 1&lt;br /&gt;
	fi&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
# We need sleep here so someone can disconnect the bay and the drive&lt;br /&gt;
sleep 1&lt;br /&gt;
&lt;br /&gt;
# Turn off power to the UltraBay&lt;br /&gt;
logger ultrabay_eject undocking $dock&lt;br /&gt;
echo 1 &amp;gt; $dock/undock&lt;br /&gt;
&lt;br /&gt;
# Tell the user we're OK&lt;br /&gt;
logger ultrabay_eject done&lt;br /&gt;
echo 12 &amp;gt; /proc/acpi/ibm/beep&lt;br /&gt;
notify-send -u normal -t 10000 &amp;quot;Safe to remove device&amp;quot; &amp;quot;The ThinkPad Ultrabay device can now safely be removed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*unified diff&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--- ultrabay_eject.orig	2010-01-07 22:51:40.000000000 +0100&lt;br /&gt;
+++ ultrabay_eject	2010-01-07 22:54:55.000000000 +0100&lt;br /&gt;
@@ -10,6 +10,11 @@&lt;br /&gt;
 &lt;br /&gt;
 shopt -s nullglob&lt;br /&gt;
 export DISPLAY=:0.0 # required for notify-send&lt;br /&gt;
+&lt;br /&gt;
+DISP0_USER=`w | grep &amp;quot;:0 &amp;quot; | awk '{ print $1 }'`&lt;br /&gt;
+DISP0_USER_HOME=`getent passwd ${DISP0_USER} | cut -d':' -f6`&lt;br /&gt;
+export XAUTHORITY=${DISP0_USER_HOME}/.Xauthority # also required for notify-send&lt;br /&gt;
+&lt;br /&gt;
 ULTRABAY_SYSDIR=/sys$DEVPATH&lt;br /&gt;
 &lt;br /&gt;
 # Find generic dock interface for UltraBay&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
i hope this is useful to other users as well --[[User:Roo|Roo]] 22:19, 7 January 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Roo</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=User:Roo&amp;diff=45336</id>
		<title>User:Roo</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=User:Roo&amp;diff=45336"/>
		<updated>2010-01-07T22:19:39Z</updated>

		<summary type="html">&lt;p&gt;Roo: â†Created page with 'Email roo -At- eserver.homelinux.org&amp;lt;br /&amp;gt; xmpp  root -At- eserver.homelinux.org  == Machine ==  Thinkpad T61p'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Email roo -At- eserver.homelinux.org&amp;lt;br /&amp;gt;&lt;br /&gt;
xmpp  root -At- eserver.homelinux.org&lt;br /&gt;
&lt;br /&gt;
== Machine ==&lt;br /&gt;
&lt;br /&gt;
[[:Category:T61p|Thinkpad T61p]]&lt;/div&gt;</summary>
		<author><name>Roo</name></author>
		
	</entry>
</feed>