PageRenderTime 83ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 1ms

/linkedfs/usr/share/doc/helpdocs.htm

https://bitbucket.org/harakiri/trk
HTML | 3436 lines | 3329 code | 52 blank | 55 comment | 0 complexity | 4c2861db8a40a8cae313c8b03843871c MD5 | raw file
Possible License(s): GPL-2.0, MIT, LGPL-3.0
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  2. <html><head>
  3. <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  4. <title>Trinity Rescue Kit | CPR for your computer | Trinityhome | </title>
  5. <style type="text/css">
  6. /* ========================================================*/
  7. /* Vision.To CMS / www.vision.to */
  8. /* SPECIAL CSS PRINT STYLE BY www.vision.to */
  9. /* ========================================================*/
  10. body {
  11. text-align: left; /* IE Only */
  12. margin: 0;padding: 0;
  13. color: #000;
  14. font-family: Georgia, "Times New Roman", Times, serif;
  15. font-size: 12pt;
  16. }
  17. /*---------------------------------------------------------------*/
  18. #print-wrapper {
  19. margin-top:0;
  20. padding: 2px;
  21. margin-left: 0;
  22. margin-right: auto;
  23. width: 600px;
  24. min-width:598px;
  25. border: 1px none #ddd;
  26. text-align: left;
  27. background:#fff;
  28. color:#000;
  29. }
  30. }
  31. /*---------------------------------------------------------------*/
  32. #print-header {
  33. /*clear: both;*/
  34. border-bottom: 1px solid #ddd;
  35. padding: 0.5em;
  36. margin-bottom: 2px;
  37. }
  38. /*---------------------------------------------------------------*/
  39. #print-content {
  40. /*float: left;*/
  41. width: 100%;
  42. position: relative;
  43. /*
  44. margin-left: auto;
  45. margin-right: auto;
  46. */
  47. text-align: left;
  48. color:#000;
  49. padding: 0.5em;
  50. min-height:650px;
  51. height:expression(this.scrollHeight > 650 ? "auto":"650px");
  52. }
  53. /*---------------------------------------------------------------*/
  54. #print-footer {
  55. text-align: center;
  56. color: #000;
  57. margin-top: 2px;
  58. padding: 0.5em;
  59. /* line-height: 1.2em; */
  60. clear: both;
  61. border-top: 1px solid #ddd;
  62. }
  63. .brclear {
  64. /* Use a break with this class to clear float containers- Thank You Big John :-) positioniseverything.net */
  65. clear:both;
  66. height:0;
  67. margin:0;
  68. font-size: 1px;
  69. line-height: 0;
  70. }
  71. </style>
  72. <meta content="text/html; charset=UTF-8" http-equiv="CONTENT-TYPE"><title></title><meta content="OpenOffice.org 3.1 (Unix)" name="GENERATOR"><meta http-equiv="CONTENT-TYPE" content="text/html; charset=UTF-8"><title></title><meta name="GENERATOR" content="OpenOffice.org 3.1 (Unix)"><meta http-equiv="CONTENT-TYPE" content="text/html; charset=UTF-8"><title></title><meta name="GENERATOR" content="OpenOffice.org 3.1 (Unix)"><meta content="text/html; charset=UTF-8" http-equiv="CONTENT-TYPE"><title></title><meta content="OpenOffice.org 3.1 (Unix)" name="GENERATOR"><meta http-equiv="CONTENT-TYPE" content="text/html; charset=UTF-8"><title></title><meta name="GENERATOR" content="OpenOffice.org 3.1 (Unix)"><meta http-equiv="CONTENT-TYPE" content="text/html; charset=UTF-8"><meta name="GENERATOR" content="OpenOffice.org 3.1 (Unix)"><meta http-equiv="CONTENT-TYPE" content="text/html; charset=UTF-8"><meta name="GENERATOR" content="OpenOffice.org 3.1 (Unix)"><meta http-equiv="CONTENT-TYPE" content="text/html; charset=UTF-8"><meta name="GENERATOR" content="OpenOffice.org 3.1 (Unix)"><meta http-equiv="CONTENT-TYPE" content="text/html; charset=UTF-8"><title></title><meta name="GENERATOR" content="OpenOffice.org 3.1 (Unix)"><meta http-equiv="CONTENT-TYPE" content="text/html; charset=UTF-8"><title></title><meta name="GENERATOR" content="OpenOffice.org 3.1 (Unix)"><meta content="text/html; charset=UTF-8" http-equiv="CONTENT-TYPE"><title></title><meta content="OpenOffice.org 3.1 (Unix)" name="GENERATOR"><meta http-equiv="CONTENT-TYPE" content="text/html; charset=UTF-8"><title></title><meta name="GENERATOR" content="OpenOffice.org 3.1 (Unix)"><meta http-equiv="CONTENT-TYPE" content="text/html; charset=UTF-8"><title></title><meta name="GENERATOR" content="OpenOffice.org 3.1 (Unix)"><meta http-equiv="CONTENT-TYPE" content="text/html; charset=UTF-8"><title></title><meta name="GENERATOR" content="OpenOffice.org 3.1 (Unix)"><meta http-equiv="CONTENT-TYPE" content="text/html; charset=UTF-8"><title></title><meta name="GENERATOR" content="OpenOffice.org 3.1 (Unix)"><meta content="text/html; charset=UTF-8" http-equiv="CONTENT-TYPE"><title></title><meta content="OpenOffice.org 3.1 (Unix)" name="GENERATOR"><meta content="text/html; charset=UTF-8" http-equiv="CONTENT-TYPE"><title></title><meta content="OpenOffice.org 3.1 (Unix)" name="GENERATOR"><meta content="text/html; charset=UTF-8" http-equiv="CONTENT-TYPE"><title></title><meta content="OpenOffice.org 3.1 (Unix)" name="GENERATOR"><meta http-equiv="CONTENT-TYPE" content="text/html; charset=UTF-8"><title></title><meta name="GENERATOR" content="OpenOffice.org 3.1 (Unix)"><meta content="text/html; charset=UTF-8" http-equiv="CONTENT-TYPE"><title></title><meta content="OpenOffice.org 3.1 (Unix)" name="GENERATOR"><meta content="text/html; charset=UTF-8" http-equiv="CONTENT-TYPE"><title></title><meta content="OpenOffice.org 3.1 (Unix)" name="GENERATOR"><meta content="text/html; charset=UTF-8" http-equiv="CONTENT-TYPE"><title></title><meta content="OpenOffice.org 3.1 (Unix)" name="GENERATOR"><meta content="text/html; charset=UTF-8" http-equiv="CONTENT-TYPE"><title></title><meta content="OpenOffice.org 3.1 (Unix)" name="GENERATOR"><meta http-equiv="CONTENT-TYPE" content="text/html; charset=UTF-8"><title></title><meta name="GENERATOR" content="OpenOffice.org 3.1 (Unix)"><meta http-equiv="CONTENT-TYPE" content="text/html; charset=UTF-8"><title></title><meta name="GENERATOR" content="OpenOffice.org 3.1 (Unix)"><meta content="text/html; charset=UTF-8" http-equiv="CONTENT-TYPE"><title></title><meta content="OpenOffice.org 3.1 (Unix)" name="GENERATOR"><meta content="text/html; charset=UTF-8" http-equiv="CONTENT-TYPE"><title></title><meta content="OpenOffice.org 3.1 (Unix)" name="GENERATOR"><meta content="text/html; charset=UTF-8" http-equiv="CONTENT-TYPE"><title></title><meta content="OpenOffice.org 3.1 (Unix)" name="GENERATOR"><meta http-equiv="CONTENT-TYPE" content="text/html; charset=UTF-8"><title></title><meta name="GENERATOR" content="OpenOffice.org 3.1 (Unix)"><meta content="text/html; charset=UTF-8" http-equiv="CONTENT-TYPE"><title></title><meta content="OpenOffice.org 3.1 (Unix)" name="GENERATOR"><meta content="text/html; charset=UTF-8" http-equiv="CONTENT-TYPE"><title></title><meta content="OpenOffice.org 3.1 (Unix)" name="GENERATOR"></head><body>
  73. <div id="print-wrapper">
  74. <div id="print-header">
  75. <h1><img src="helpdocs_files/200610190000370.gif" alt="image" class="BartsCmsImage" height="135" width="140"> Trinityhome</h1>
  76. </div>
  77. <div id="print-content">
  78. <div id="page-container" class="page-container"><!-- open page-container -->
  79. <h1 class="page-title">Trinity Rescue Kit | CPR for your computer</h1>
  80. <div class="page-content">
  81. <a href="#K94N78PT0VFVLYYDHBV9JJ0N7EUA3RSDQMRNK66BSCW41">Getting started with TRK</a><br><a href="#E3JEBK6FCRUYGL65MT9YXJBJ20Z7EK5IEFNFQKKS25G8H">0. Quick and dirty guide to using TRK</a><br><a href="#841YA21RBZPBCRPIQGT0BYCFWYCIELPDGF1G8SY9GCAJU">0.1 The easiest way to get it onto a CD: a self burning TRK</a><br><a href="#YUU68L1SK1TXA04XDZX4MPPJJXTUJZP8J95IKX0WNJIN9">0.2 Burning TRK with Magiciso</a><br><a href="#NDQL3ZBZYMUVVWYN4348DUF9650TV0083FKX5LMUY6EJS">0.3 Booting from TRK</a><br><a href="#BL8Q8FN81J34KW4EMG9IHTQJZ2L5J22LD02C6FAXQ4S0Q">0.4 Resetting passwords</a><br><a href="#48H6PKLBPTE32K9P95Q4T4MADLMZA6W5431IEDKTWQLN0">1. TRK for Linux newbies</a><br><a href="#2FK5NB4F87EHQWYKAJWGIQZLFA53HWY9185EAZJ9XPGCA">1.1 What is TRK? What 's a live distribution?</a><br><a href="#BVJ9IR04WMV4XH1MSM34S6T8MGH4JW8KHHKQYBKKN6FBD">1.2 What is different between accessing your PC from Windows and accessing from TRK?</a><br><a href="#WQKZJKT0E8QJQM9HJZ4WTYKI5DK0ZDBLUMB3YUU2S9B7M">1.3 Getting around with common linux commands (cd, cp, mv, rm, more, grep, mount)</a><br><a href="#M69SKN1KBY3NSX3XG2DPJ306MHH6EL0SIZ9UD05EPYT7K">1.4 Reading information about your PC (dmesg, /proc/partitions)</a><br><a href="#QBRDPTSD001QIT0CN3AHZ75WRJKLINJYQ024JJ8A9ZQIH">2. TRK own commands and utils</a><br><a href="#XFPUBF4W6TFSCHXH5RXKMFAR0BVLGLR3S6NTBHF71KQ3T">2.1 Virusscan</a><br><a href="#HW79FF1ZME1FBEY6DVXDG60JAJVNKK6T64SB9I0MMSSPW">2.2 Winpass and regedit</a><br><a href="#SI14T7V9WN984HEA7MUC0E8RMGDSNVN63F0LCLKYZKWTS">2.3 Mass Clone: a multicast disk cloning tool</a><br><a href="#VZX1W3W6015LZRZ127YCKFJS9LX59AAU0YKLR6IHYETNW">2.4 Winclean</a><br><a href="#TTVJRRE5QQRJBVB2F61R719J0CHFRFVAZGJFXPBD4SM6D">2.5 Mountallfs</a><br><a href="#HH1WPPJEI4DHJTAHXPSYR3637JMCUVX22NNH2YLBSPI18">2.6 Updatetrk</a><br><a href="#DNEHBFA6ISQPQUF15A9HX1XVYX82E8LIMQQNVRJ480INJ">2.7 Trk2usb</a><br><a href="#WM8PAWXULFITSRN0X6I1YVCLB9IA41FQDD5E0TYBZ7VGP">2.8 Trk2iso</a><br><a href="#EGNT0M1F9DJ7XUB34LIEU8DXZVGDWEW0K9IAMAFLDQJ09">2.9 Fileserver</a><br><a href="#20T4DLR6P2JZL5SVUKVM5FB7MQPKJQUCFC6INMF3FQSSK">2.10 Bridge</a><br><a href="#PSTEW6D05PZF2FK7VHGLCYWQZWP8T538NMCAJF0FVPLMV">2.11 Setip</a><br><a href="#WU8QP3M0YGLR9XQ8V4MW69X4SZF6ZM1L701LTECHLNZLB">2.12 Setproxy</a><br><a href="#C3E9S86L5Q2DV4J2X7FRSW3NCGQ426N40T3HR0UMGLR1F">2.19 Ntfsundeleteall</a><br><a href="#MFRIGTQ75RPR5IIC4TXNKUF95JATHDEUIV3PEIMA01RV9">2.13 Getswap</a><br><a href="#U49HULJB0RZJRSQX054MZS1LH8P05M7QG7X0I628MRH48">2.14 Trinisup</a><br><a href="#FKJT61FZ5GVCPWKXWTXSLUF6CQM3YVP36YM2QSRKZCNEY">2.15 Pi - automated backup wrapper script originally for Partition Image</a><br><a href="#3HU5ZWWY8SYP7AEGNHT9CEDCSWG7RQEJXZELK1AJJYYGZ">2.20 Clonexp (obsoleted by mclone)</a><br><a href="#4WP777Y6KKDSK5E2140SK6QED0J74GSY26W03JWEV0X5V">3. Procedures</a><br><a href="#LIAT4IG4QYXT3EP1K2EVX276MK95G33SC3B7CH1S6NBZT">3.1 Rescueing files of dying harddiscs (mounting network =&gt; cp, ddrescue)</a><br><a href="#QVQWIA3HK45X8M47KB6N7V5KDDAWB7HSSYD1Y78814V0G">3.2 Recovering deleted files or files from formatted drives (ntfsundeleteall, photorec)</a><br><a href="#7PFVZK0Q4R5TZMDJ351RJA8VHEBE66K4KQP91EPVWKEKX">3.3 Recovering lost partitions (testdisk, gpart, fdisk)</a><br><a href="#L5ICUK4HDV6QAJA1ISR37W4DEYAHUY95TI8CT3KXNHCPR">3.4 Bootsector repair</a><br><a href="#UHPDX3JS857PC91QX5QDU7JHMFX9NFZ8NECA7MT6HQKJQ">3.5 Manually cloning a Windows installation</a><br><a href="#JVI22F4QK5AFSUR3MHQC9ZW33AWHWA05W9XNES3PN4V5N">3.6 Hardware testing</a><br><a href="#4PL88HNFBZGXK7BHVL44UCJIPXXUD8I7MU5L2JR38YRJW">3.7 Virus scanning</a><br><a href="#AKDLI8WEFV4L96NMKIKSXE2ZQWDFRHLSTQ42PQ6UB16AX">3.8 Manual PC cleaning</a><br><a href="#ZTZJTNZS1Z028YDFIX59T2IQNHU57JDW236KHV38JU1IH">4. Boot time options and triggers</a><br><a href="#Z034WGIXRNSS0HJZYHKU5ED0RRGXKGQA7I4TQDF6RYPH6">4.1 Boot menu options</a><br><a href="#EUGBVSAKSIDQ4SSW21D1CDTZC5RKS0DXKJY51ZFJ7J022">4.2 Triggers</a><br><a href="#9PAH415576DS0RB2Z5DH8AQ1XFD42G21V39QU4LS1P9S6">4.2.1 The TRK options server: make your lan TRK aware</a><br><a href="#CA4YM8MPTJ078B4RZR3V7NZDL7WUM33Q4XDGWQVE0KCZM">4.2.2 Scripts on the computer's local harddisks</a><br><a href="#B8MI3TRVGJ2SY2XHN562I89WYSUF20I4ZWCSETDL364RY">4.2.3 Script on the TRK medium</a><br><a href="#SMFWK0I2J980KIYM9IK3CSPF1J06UQ3C29YDZ75874YID">5. Upgrade, update and change of bootmedia procedures</a><br><a href="#VCMNDG08JQ9JED3YXFLITGXVHLRRQIXBL9PPFEMQUMZZR">5.1 TRK on CD</a><br><a href="#FIRS44G0F6QRJDGPU467B1R5DHKC3QV9ZCRU6XJBUZS43">5.2 How to install/upgrade your USB media to run the latest version of TRK</a><br><a href="#DJQBVW3TV8F9F6T9P2QZJ9WFCCVH0HU3SA5CWYWHX2G2Z">5.3 Setting up your PXE boot environment</a><br><a name="K94N78PT0VFVLYYDHBV9JJ0N7EUA3RSDQMRNK66BSCW41" &nbsp;="" id="K94N78PT0VFVLYYDHBV9JJ0N7EUA3RSDQMRNK66BSCW41"></a><h1>Getting started with TRK</h1><h2><span style="font-size: 10pt; font-family: Arial;"><o:p></o:p></span>Foreword and conventions of this documentation:</h2>
  82. <h3>Consulting help</h3>
  83. <p>-Trinity Rescue Kit 3.4 has manpages for almost every utility, even
  84. the ones specific to TRK (new since 3.4). So if you need help on a
  85. certain command, like f.i. Winpass, just type 'man winpass' at the
  86. commandline. All manpages themselves are always online available at
  87. http://trinityhome.org/manpages</p>
  88. <p>-This helppage is also available as a single document locally on the TRK medium. <strong>You can call on this documentation as one big page from TRK by typing 'trkhelp'</strong>
  89. at the command prompt (or chosen from the startup menu). This will
  90. start the builtin Links browser in graphical mode opening all of the
  91. documentation at once. To be able to switch between this help and your
  92. commandprompt, you must be in text mode</p>
  93. <p>Most commands also have a built-in help. Most of the time 'command -h' or 'command –help' will help you a lot further.</p>
  94. <p><br>
  95. Use the key "q" to quit links and type 'trkhelp -t' to run in text
  96. mode. Once in textmode, use alt+F2 to go the second console of TRK. In
  97. total there are 6 consoles, each switchable with their respective alt+
  98. function key.<br>
  99. If you are not online, you can consult the local documentation which is on the TRK medium by entering 'trkhelp -l'. <br>
  100. You can combine these two parameters: 'trkhelp -l -t' gets you the local helpfiles in textmode.</p>
  101. <p>-All TRK&nbsp;manpages are also available online in html format.&nbsp;Browse them here: <a href="http://trinityhome.org/manpages/">http://trinityhome.org/manpages/</a></p>
  102. <h3>&nbsp;<br>
  103. Conventions</h3>
  104. <p>-literal commands that you can execute in TRK or Linux are put
  105. between 'single quotes'. Omit the quotes when using the real
  106. commandline. Exceptions on these quotes will be mentionned (when single
  107. quotes really appear in the command).<br>
  108. <br>
  109. -"double quotes" are used to emphasise words, unless they are used inside commands.<br>
  110. <br>
  111. -&lt;trkmedium&gt; stands for the rootfolder of the medium on which TRK
  112. runs. TRK can be run from CD, usb stick/disk, fixed harddisk or from
  113. network over PXE. These specific bootmethods will be explained later in
  114. this document.<br>
  115. <br>
  116. -this documentation is intended for people who at least have some
  117. experience with computer troubleshooting or know how to install their
  118. own Windows. If you have absolutely no idea of this, I recommend you
  119. call someone who knows more.</p>
  120. <p>&nbsp;</p><br><a name="E3JEBK6FCRUYGL65MT9YXJBJ20Z7EK5IEFNFQKKS25G8H" &nbsp;="" id="E3JEBK6FCRUYGL65MT9YXJBJ20Z7EK5IEFNFQKKS25G8H"></a><h1>0. Quick and dirty guide to using TRK</h1><p>This
  121. page is intended for the really impatient who are passing by here and
  122. probably just want to reset a password in Windows. The procedures
  123. assume you are using MS&nbsp;Windows.</p>
  124. <p>I'll make sure I don't type too much text for you to read.</p>
  125. <h2>In short...</h2>
  126. <p>TRK&nbsp;is not a software you install on your computer in Windows
  127. but rather a completely independent operating system based on Linux and
  128. which runs from CD (or USB stick or network).</p>
  129. <p>To get the latest version of TRK, go to the download page or download the latest copy here.</p>
  130. <p>The quickest way to get you running TRK is to download and run the self-burning TRK&nbsp;version.</p>
  131. <p>If you want to see how the self burning of TRK&nbsp;is done, see the page on <a href="https://trinityhome.org/Home/index.php?content=0.1_THE_EASIEST_WAY_TO_GET_IT_ONTO_A_CD_A_SELF_BURNING_TRK&amp;front_id=19&amp;lang=en&amp;locale=en">0.1&nbsp;Self burning TRK</a></p>
  132. <p>Should you want to burn the iso with a 3rd party software called magiciso, see <a href="https://trinityhome.org/Home/index.php?content=0.2_BURNING_TRK_WITH_MAGICISO&amp;front_id=19&amp;lang=en&amp;locale=en">0.2&nbsp;Burning TRK&nbsp;with Magiciso</a></p>
  133. <p>For booting from TRK, see <a href="https://trinityhome.org/Home/index.php?content=0.3_BOOTING_FROM_TRK&amp;front_id=19&amp;lang=en&amp;locale=en">0.3&nbsp;Booting from TRK</a></p>
  134. <p>For password resetting, see <a href="https://trinityhome.org/Home/index.php?content=0.4_RESETTING_PASSWORDS&amp;front_id=19&amp;lang=en&amp;locale=en">0.4 Resetting passwords</a></p>
  135. <p>If you know how to burn an isofile, skip section 0.1 and 0.2.</p>
  136. <p>If you know how to boot from CD, skip section 0.3</p>
  137. <p>For password resets, you can equally skip section 0.4 because
  138. TRK&nbsp;3.4 now has a simple menu from which you can select whatever
  139. you need to do.</p>
  140. <p>&nbsp;</p><br><a name="841YA21RBZPBCRPIQGT0BYCFWYCIELPDGF1G8SY9GCAJU" &nbsp;="" id="841YA21RBZPBCRPIQGT0BYCFWYCIELPDGF1G8SY9GCAJU"></a><h1>0.1 The easiest way to get it onto a CD: a self burning TRK</h1><p>-Download and save the latest copy of the self-burning TRK, e.g. "trinity-rescue-kit.3.4-build-366.exe"</p>
  141. <p>-Doubleclick on "trinity-rescue-kit.3.4-build-366.exe"</p>
  142. <p>Now see the screenshots</p>
  143. <p>&nbsp;Ok, you've put your blank CD&nbsp;in the tray, now answer yes
  144. and see all of the next screens pass by.&nbsp;There 's no more work for
  145. you on the burning part!</p>
  146. <p><img src="helpdocs_files/10-selfburn-trk.jpg" alt="" height="138" hspace="5" vspace="5" width="587"></p>
  147. <p><img src="helpdocs_files/11-selfburn-trk.jpg" alt="" hspace="5" vspace="5"></p>
  148. <p>&nbsp;</p>
  149. <p><img src="helpdocs_files/12-selfburn-trk.jpg" alt="" hspace="5" vspace="5"></p>
  150. <p>&nbsp;</p>
  151. <p><img src="helpdocs_files/13-selfburn-trk.jpg" alt="" hspace="5" vspace="5"></p>
  152. <p>&nbsp;</p>
  153. <p><img src="helpdocs_files/14-selfburn-trk.jpg" alt="" hspace="5" vspace="5"></p>
  154. <p>&nbsp;...and that 's it, now boot from it.</p><br><a name="YUU68L1SK1TXA04XDZX4MPPJJXTUJZP8J95IKX0WNJIN9" &nbsp;="" id="YUU68L1SK1TXA04XDZX4MPPJJXTUJZP8J95IKX0WNJIN9"></a><h1>0.2 Burning TRK with Magiciso</h1><p>There
  155. are many other programs that can burn ISO files to a CD. Magiciso is
  156. just used as an example because it's one of the most easy to
  157. use.&nbsp;An alternative might be the very lightweight <a href="http://www.terabyteunlimited.com/downloads-free-software.htm">BurnCDCC</a> or another free and full blown CD writer is <a href="http://cdburnerxp.se/">CD&nbsp;Burner XP</a>.<br>
  158. Users from Windows 7 can just burn an ISO&nbsp;to disk without installing any additional software.</p>
  159. <p>Remember that to install programs or run the self burning TRK, you have to be an administrator of your local computer.</p>
  160. <p>The screenshots speak for themselves</p>
  161. <p>1<br>
  162. <img alt="" src="helpdocs_files/01-wwwmagicisocom.jpg" hspace="2" vspace="2"></p>
  163. <p>2<br>
  164. <img alt="" src="helpdocs_files/02-wwwmagicisocom.jpg" hspace="2" vspace="2"></p>
  165. <p>3<br>
  166. <img alt="" src="helpdocs_files/03-mi-disclaimer.jpg" hspace="2" vspace="2"></p>
  167. <p>4<br>
  168. <img alt="" src="helpdocs_files/04-burn1.jpg" hspace="2" vspace="2"></p>
  169. <p>5<br>
  170. <img alt="" src="helpdocs_files/05-open-file.jpg" hspace="2" vspace="2"></p>
  171. <p>6<br>
  172. <img alt="" src="helpdocs_files/06-burn2.jpg" hspace="2" vspace="2"></p>
  173. <p>7<br>
  174. <img alt="" src="helpdocs_files/07-burn3.jpg" hspace="2" vspace="2"></p>
  175. <p>8<br>
  176. <img alt="" src="helpdocs_files/07-burn4.jpg" hspace="2" vspace="2"></p><br><a name="NDQL3ZBZYMUVVWYN4348DUF9650TV0083FKX5LMUY6EJS" &nbsp;="" id="NDQL3ZBZYMUVVWYN4348DUF9650TV0083FKX5LMUY6EJS"></a><h1>0.3 Booting from TRK</h1><p>To
  177. be able to boot from TRK, I&nbsp;can give you a few tips, but there is
  178. never 1 uniform way on how to do it because every computer is different
  179. and every brand has different shortcut keys.</p>
  180. <p>In many cases, the fact that the CD with TRK&nbsp;is in your CD tray
  181. when you boot your computer might be enough to get it booting from it.</p>
  182. <p>In other cases, you get the option to select the bootdevice at
  183. startup. Depending on the brand, this might be with any different
  184. function key or even "esc" and "enter".&nbsp;Most of the time, the
  185. power on screen tells you what key to press.</p>
  186. <p>Ultimately you must set the bootsequence in the bios of the
  187. computer.&nbsp;The bios is basic configuration of a computer before
  188. even any operating system or software has been started.</p>
  189. <p>Here 's a few screenshots I've taken from VMWare, which basically behaves like any other physical computer.</p>
  190. <p>Here 's the initial bootsplash which lasts only a few seconds. <br>
  191. <img src="helpdocs_files/bootsplash-vmware.png" alt="" height="480" hspace="5" vspace="5" width="640"><br>
  192. The text speaks for itself. </p>
  193. <p>Hitting "esc" is enough to select a temporary bootdevice. <br>
  194. <img src="helpdocs_files/bootselection-vmware.png" alt="" height="418" hspace="5" vspace="5" width="546"></p>
  195. <p>Alternatively if you hit F2, you can go into the bios and set the
  196. bootsequence permanently.&nbsp;Remember that in that case when you have
  197. a bootable CD in your tray, your PC&nbsp;will always boot from
  198. that.&nbsp;It will also make startup slower because it will first look
  199. for a cd and its bootability.<br>
  200. <img src="helpdocs_files/bios-boot-vmware.png" alt="" height="480" hspace="5" vspace="5" width="640"></p>
  201. <p>Now this is only an example for VMWare.&nbsp;Any other computer is
  202. different in the fact that it can be any of the other function keys you
  203. need to press to enter the bios or choose a bootdevice.&nbsp;Read the
  204. text from the splash screen.</p>
  205. <p>To get a better explanation on setting the bootsequence, take a look at the documentation done for Hiren's Bootcd:</p>
  206. <p>
  207. <style type="text/css">
  208. <!--
  209. @page { margin: 0.79in }
  210. P { margin-bottom: 0.08in }
  211. A:link { so-language: zxx }
  212. -->
  213. </style>
  214. </p>
  215. <p><a href="http://www.hiren.info/pages/bios-boot-cdrom">http://www.hiren.info/pages/bios-boot-cdrom</a></p>
  216. <p>&nbsp;</p><br><a name="BL8Q8FN81J34KW4EMG9IHTQJZ2L5J22LD02C6FAXQ4S0Q" &nbsp;="" id="BL8Q8FN81J34KW4EMG9IHTQJZ2L5J22LD02C6FAXQ4S0Q"></a><h1>0.4 Resetting passwords</h1><p>Once
  217. you 've managed to burn TRK&nbsp;to CD and set the right bootsequence,
  218. you can start doing stuff with it, like resetting the password (that's
  219. what you came here for didn't you?).</p>
  220. <p>See this little <a href="https://trinityhome.org/Files/trk-screenshots/video/trk-winpass-howto-01.avi">movie</a> which runs you through it from A to Z and do some further reading on the <a href="https://trinityhome.org/Home/index.php?content=3922.2_WINPASS_AND_REGEDIT&amp;front_id=19&amp;lang=en&amp;locale=en">usage of winpass.</a></p>
  221. <p>You will notice that once you started TRK, the simple menu that you get is self explanatory.</p>
  222. <p>&nbsp;</p><br><a name="48H6PKLBPTE32K9P95Q4T4MADLMZA6W5431IEDKTWQLN0" &nbsp;="" id="48H6PKLBPTE32K9P95Q4T4MADLMZA6W5431IEDKTWQLN0"></a><h1>1. TRK for Linux newbies</h1><p>This
  223. section gives a quick introduction about the concepts of Linux, a live
  224. distribution and how you should see and control your computer from the
  225. viewpoint of TRK</p><br><a name="2FK5NB4F87EHQWYKAJWGIQZLFA53HWY9185EAZJ9XPGCA" &nbsp;="" id="2FK5NB4F87EHQWYKAJWGIQZLFA53HWY9185EAZJ9XPGCA"></a><h1>1.1 What is TRK? What 's a live distribution?</h1><p>
  226. <style type="text/css">
  227. <!--
  228. @page { margin: 0.79in }
  229. P { margin-bottom: 0.08in }
  230. H1 { margin-bottom: 0.08in }
  231. H1.western { font-family: "Times New Roman", serif }
  232. H1.cjk { font-family: "Bitstream Vera Sans" }
  233. H1.ctl { font-family: "Bitstream Vera Sans" }
  234. -->
  235. </style>
  236. </p>
  237. <p>This is a definition for people that have absolutely no idea of what
  238. an operating system means. If you don 't understand what I just said,
  239. you need to read the following text. The people who do know what it all
  240. means, might take the following definition as incorrect, but that 's
  241. just so I can explain in simple language what I mean.<br>
  242. <br>
  243. Trinity Rescue Kit" or <strong>TRK is a collection of programs that can start a computer in an alternate way if it failed to start normally.<br>
  244. </strong><br>
  245. TRK is a so called "live distribution" of Linux. Linux is in fact the
  246. "brain" and "the senses" that drives your computer, all the programs
  247. are the limbs that allow you to control it. All this put together make
  248. up a so called operating system. Because of confusion in terminology
  249. and because of the so many flavors, we talk about Linux being the
  250. operating system and what makes it complete with programs is called the
  251. distribution. And as for distributions, a lot of flavors exist
  252. (hundreds, maybe even thousands). One of these flavors is Trinity
  253. Rescue Kit. TRK is a "live" distribution because it can boot from
  254. removable media, perform hardware detection on-the-fly and automate as
  255. many configuration tasks as possible.<br>
  256. <br>
  257. TRK operates completely from RAM (= compare this with the short term
  258. memory of your brain) and read-only media. This means also it doesn t
  259. touch nor change anything stored on your computer until you tell it to
  260. do so. Another implication this will have is that by starting your
  261. computer with Trinity Rescue Kit you have the guarantee that no viruses
  262. that might be on your local computer can become active. In the case of
  263. your computer running Microsoft Windows in normal circumstances, it
  264. just is impossibe by design that a windows virus can run on TRK because
  265. TRK is Linux.<br>
  266. <br>
  267. You have the possibility of using 5 different antivirus scanners with
  268. TRK (current version of this writing: 3.4). One of them, the free open
  269. source Clamav is integrated in the distribution, the other 4, F-prot,
  270. Bitdefender Vexira and Avast get downloaded from the Internet when
  271. launched. For Avast you need a free license key handy, for which you
  272. need to<a href="http://www.avast.com/registration-free-antivirus.php"> register on their site</a>.<br>
  273. <br>
  274. More on what TRK is can be read on the frontpage</p>
  275. <h1 class="western"><br>
  276. &nbsp;</h1>
  277. <p>&nbsp;</p><br><a name="BVJ9IR04WMV4XH1MSM34S6T8MGH4JW8KHHKQYBKKN6FBD" &nbsp;="" id="BVJ9IR04WMV4XH1MSM34S6T8MGH4JW8KHHKQYBKKN6FBD"></a><h1>1.2 What is different between accessing your PC from Windows and accessing from TRK?</h1><p>
  278. <style type="text/css">
  279. <!--
  280. @page { margin: 0.79in }
  281. P { margin-bottom: 0.08in }
  282. -->
  283. </style>Instead
  284. of running programs on your computer using Windows, you are now
  285. starting your computer with something completely different. Trinity
  286. Rescue Kit is not designed to give you the same environment you get
  287. normally, but to provide you the means and the utilities to perform
  288. rescue and repair operations that might not be (anymore) possible on
  289. your computer in normal Windows operation mode.<br>
  290. <br>
  291. Because this is Linux, you will not see your drives in the same way you
  292. do under Windows (or DOS), but they will appear as logically assigned
  293. devices. So instead of the C:-drive, you will get /dev/hda1 in which
  294. hda is your first available harddisk ('h' in hda is for ide drives,
  295. 's' is for scsi, sata and removable drives), hda1 is the first
  296. (primary) partition on which a filesystem may reside. The filesystem
  297. used in general for Windows is NTFS. This stands for New Technology
  298. FileSystem, but in the mean time the "New" in technology is already
  299. more than 12 years old. Nevertheless, it has gotten some improvements
  300. over the years and it is, I must admit, a good filesystem. The other
  301. filesystem natively supported by Windows is FAT, which come in the
  302. flavors FAT12 (for floppies), FAT16 (for small disks up to 2Gb) and
  303. FAT32 (for bigger disks).<br>
  304. <br>
  305. What 's also different from Windows is that these filesystems are not
  306. accessible by default in Linux, you have to so called "mount" them.
  307. Where in Windows you will get a drive C: with your files on, in Linux
  308. you have to call the command 'mount' and mount the filesystem against a
  309. subdirectory. An example of this: let 's say your drive C: is /dev/hda1
  310. (/dev contains the collection of device references on your system). You
  311. have a directory /mnt0. In this case you type 'mount /dev/hda1 /mnt0'.
  312. When you invoke the command 'mount' afterwards without any parameters,
  313. you will see that /dev/hda1 is mounted on /mnt0. If you cd to that
  314. directory and type 'ls' (=equivalant of 'dir' in Windows), you will get
  315. a directory listing of what 's available on that C: drive.<br>
  316. <br>
  317. Now with this all explained, you should see the picture: TRK runs on
  318. your computer but treats it as a doctor inspecting a dead body:
  319. everything is there, but the person is not. You can now perform surgery
  320. on the body and try to revive it.
  321. </p>
  322. <p>&nbsp;</p><br><a name="WQKZJKT0E8QJQM9HJZ4WTYKI5DK0ZDBLUMB3YUU2S9B7M" &nbsp;="" id="WQKZJKT0E8QJQM9HJZ4WTYKI5DK0ZDBLUMB3YUU2S9B7M"></a><h1>1.3 Getting around with common linux commands (cd, cp, mv, rm, more, grep, mount)</h1><p>
  323. <style type="text/css">
  324. <!--
  325. @page { margin: 0.79in }
  326. P { margin-bottom: 0.08in }
  327. -->
  328. </style>
  329. </p>
  330. <p>This is a small tour on commands you will find useful when working
  331. with TRK (and Linux in general). Let 's take as a convention that
  332. commands you have to type are put between 'single quotes'. At the
  333. commandline you omit these quotes (unless I say not to).<br>
  334. <br>
  335. What I 'm going to teach here is basically how you work with files, like copying, moving, editing, etc...<br>
  336. <br>
  337. First, let's start with changing directories.<br>
  338. <br>
  339. People that have worked with the commandline in Windows or Dos will
  340. recognize many things. The big difference with this is that directories
  341. in Linux are separated by forward slashes instead of backslashes in
  342. Windows. Another big difference is that Linux folders and files are
  343. case sensitive: capitals have to be typed as capitals, otherwise the
  344. file or folder will not be found.<br>
  345. <br>
  346. -<strong>cd</strong><br>
  347. <br>
  348. The command to change a directory (or folder how it 's called in Windows) is 'cd'<br>
  349. f. i. you want to change to the directory /tmp you type 'cd /tmp'. If
  350. the folder contains spaces, there are two ways you can get into them:
  351. or you put the foldername between double quotes or you use so called
  352. escape characters to represent the spaces.<br>
  353. <br>
  354. Let 's say we want to cd to the folder 'Documents and Settings' you can
  355. type 'cd "Documents and Settings"' or 'cd Documents\ and\ Settings'
  356. where the backslash (\) in Linux is used to 'escape' characters, i.e.
  357. you treat the characters litterally instead of as a control character.
  358. Enough of that.<br>
  359. <br>
  360. Another way of easily changing directories is by typing the first
  361. letters of it and then pressing the tab-key. F.i. type 'cd Doc' and
  362. press tab. The command will complete as 'cd Documents\ and\ Settings'.
  363. If more files or folders match, the tab command will show you the
  364. possible options left. Very nice feature, saves you lots of time and
  365. painful fingers.<br>
  366. <br>
  367. -<strong>cp</strong><br>
  368. <br>
  369. File copying, the second thing you 'll probably need.<br>
  370. Once you 're in the right directory, you need to be able to copy files to other locations.<br>
  371. Here 's how to do it, together with the most important switches.<br>
  372. Take a file called file1, located in /tmp/ and you want to copy it to
  373. /home: simple command 'cp /tmp/file1 /home' or when you first cd-ed to
  374. /tmp: 'cp file1 /home/'. Source-target.<br>
  375. Suppose you want to copy multiple files, you can use a wildcard with
  376. '*'. If /tmp contains file1 and file2 and copy them both at the same
  377. time: 'cp /tmp/file* /home/'<br>
  378. If you want to copy files and folders recursively, together with all the attributes, use the switch '-a'<br>
  379. To see what gets copied while it 's busy, add the '-v' parameter too (verbose).<br>
  380. Say /tmp contains 'file1', 'file2', a subfolder called 'testfolder'
  381. which also contains 'file3', then perform 'cp -av /tmp/* /home' This
  382. will copy the complete contents of /tmp, including subfolders to /home.<br>
  383. If cp asks you to overwrite already existing files, you can force that by adding '-f' (force) to your command:<br>
  384. 'cp -avf /tmp/* /home'<br>
  385. <br>
  386. -<strong>mv</strong><br>
  387. <br>
  388. Moving files. This is the same principle as copying files but easier, e.g.<br>
  389. 'mv /tmp/* /home' moves all the contents, including subdirs to /home<br>
  390. Adding the parameters -v and f moves them verbosely without prompting to overwrite existing files.<br>
  391. <br>
  392. -<strong>rm</strong><br>
  393. <br>
  394. Remove files.<br>
  395. Remove 1 file, example: 'rm /tmp/file1'<br>
  396. Remove files recursively, without prompting: 'rm -rf /tmp/*'<br>
  397. <br>
  398. -<strong>more</strong><br>
  399. <br>
  400. Viewing files and output of commands. This is a util you can use any
  401. time there 's too much output coming to your screen or you need to look
  402. into a file.<br>
  403. E.g.: 'more /tmp/file1' shows you the contents of file1, but gives it a
  404. page at a time. To go to the next page, press space. The arrows and
  405. enter key scroll down line by line.<br>
  406. You can use this command also in combination with other commands to halt their output so you can read what it says.<br>
  407. Example: 'dmesg | more' : 'dmesg' gives you the output of your kernel
  408. startup procedure and recent system messages, but it 's maybe about 300
  409. lines of output. So in this case we so called "pipe" the output of
  410. 'dmesg' to 'more' using the "|" sign. In this way I have also explained
  411. you with an example the use of "command piping"<br>
  412. <br>
  413. -<strong>command piping</strong><br>
  414. <br>
  415. Continueing on this subject, let 's see what other uses command piping can do for us.<br>
  416. It can be used to filter out a certain line with a specific keyword.<br>
  417. Let 's say you want to know whether there 's a file called
  418. Document.doc' somewhere in a subdirectory, but you don 't know which.
  419. Then use this command from within the base directory you want to search
  420. in: 'find ./ | grep -i document.doc' (the -i parameter upper- or
  421. lowercase characters)<br>
  422. You can also pipe the output of a command to a file instead of the
  423. screen. F.i. to put the complete filelisting of a directory tree to a
  424. file, do like this 'find ./ &gt; /tmp/filelist.txt'<br>
  425. <br>
  426. -<strong>editing files</strong><br>
  427. <br>
  428. Here 's quickly how to use vi, the most common text editor on Linux.
  429. Beware: this does not edit Word documents or any other document format
  430. that is in binary format.<br>
  431. Open a file or create a new file: 'vi /tmp/file1'<br>
  432. Move your cursor around with your arrows to the line you want to edit.<br>
  433. To insert text, type 'i', this will put you in insert mode. To remove
  434. text, use 'x', (go out of insert mode first with escape). To remove or
  435. cut a complete line, use 'dd'. You can paste this line elsewhere with
  436. 'p'.<br>
  437. This is basically editing in vi. To save a document, go out of insert
  438. mode and type ':wq' (colon write quit). To exit without saving: ':q!'
  439. (colon quit exclamation mark).<br>
  440. If you don 't like vi, you can use pico which is a bit simpler to use, but less common on the different Linux systems.<br>
  441. <br>
  442. -<strong>mounting filesystems</strong><br>
  443. <br>
  444. When working with Linux and more specifically here with Trinity Rescue
  445. Kit, it is imperative that you understand the way you "talk" to
  446. filesystems.<br>
  447. Whereas Windows just assigns a driveletter to any local filesystem it
  448. knows and finds (which is only NTFS and FAT), Linux does it all by
  449. invoking "mount" of a filesystem against a directory where you mount it.<br>
  450. Trinity Rescue Kit has a utility called "mountallfs" that searches for
  451. every filesystem on the local computer's disk drives and mounts it in a
  452. directory that has the same basename as the device where the filesystem
  453. resides. More on that later in this documentation. In other, normal
  454. Linux distributions, local filesystems are detected or created on
  455. install.<br>
  456. <br>
  457. Let 's talk now how to perform manual mounting.<br>
  458. Mounting can be performed with any filesystem, regardless of it being local or on the network. <br>
  459. <br>
  460. *<u> Mounting a local filesystem can be done like this:</u><br>
  461. <br>
  462. To know what device contains te filesystem you want to mount, you can
  463. look at a file called "/proc/partitions" This will tell you the
  464. partition lay-out of your disks, which will most likely contain
  465. filesystems. A common "/proc/partitions" file may look like this:<br>
  466. <br>
  467. /dev/hda<br>
  468. /dev/hda1<br>
  469. /dev/hda2<br>
  470. <br>
  471. /dev/hda claims in fact the whole disk. Under Windows it is impossible
  472. to create a filesystem in there, under Linux it is possible but
  473. improbable and not recommended.<br>
  474. Most likely you will find a filesystem on /dev/hda1 and /dev/hda2, which will be you C: and D:-drive under Windows in general.<br>
  475. Mounting this is quite easy, in general you don 't have to give any paramters with it, Linux will detect the type of filesystem.<br>
  476. 'mount /dev/hda1 /mnt0'<br>
  477. <br>
  478. Trinity Rescue Kit by default has two directories for manual mounting
  479. of filesystems. You can create as many as you like, in as many subdirs
  480. as you like. That 's all I 'm going to explain about local filesystem
  481. mounting. I recommand you use "mountallfs". More on that later.<br>
  482. <br>
  483. * <u>Mounting network filesystems.</u><br>
  484. <br>
  485. This is a very interesting bit, because with Trinity Rescue Kit you
  486. will want to evacuate your files to another computer. In TRK (and most
  487. other Linux distributions) it is possible to talk to Windows
  488. filesharing technology. For those who want to know the name of this
  489. technology, it 's called SMB (=Server Message Block). TRK can act as a
  490. client as well as a server. In this case we 're talking about TRK as a
  491. client.<br>
  492. <br>
  493. Let 's say you have a running windows machine and you 've configured it
  494. to share "myshare". If you have not configured a share, you can connect
  495. to the c$ hidden share, but then you need to deactivate "Use simple
  496. simple filesharing" in the folder options of your Windows explorer. But
  497. let us take the "myshare" share.<br>
  498. <br>
  499. For the ease of use, it 's a good thing to create a user on your
  500. Windows machine called "root", give him a password and make it an
  501. administrator. But that 's not really necessary, you can also use the
  502. local "administrator" account, this will just require you to add a
  503. parameter to the mount command.<br>
  504. <br>
  505. Let 's take the case of the "myshare" share, your Windows pc has
  506. 10.0.0.5 as ip-address (always faster to just point to the ip-address
  507. instead of the name) and you 've created a local user called root. Then
  508. here 's the command: 'mount //10.0.0.5/myshare /mnt0'<br>
  509. <br>
  510. You will get prompted for a password in if no output is given, your
  511. share should appear under /mnt0. Make sure "myshare" has enough
  512. permissions for the user "root"<br>
  513. <br>
  514. If you don't want to create a user, you don 't want to create a share
  515. and you did disable simple filesharing (or your windows machine is
  516. member of a domain), you can go ahead like this:<br>
  517. 'mount -o username=administrator //10.0.0.5/c$ /mnt0' , which will
  518. prompt for the password an give you the credentials of "administrator".
  519. You can already pass the password (e.g. blahblah) in the commandline if
  520. nobody is looking over your shoulder: 'mount -o
  521. username=administrator,password=blahblah //10.0.0.5/c$ /mnt0'<br>
  522. <br>
  523. Below is a screenshot of a Windows PC that has opened the disk of a remote TRK booted machine.</p>
  524. <p><br>
  525. <img alt="" src="helpdocs_files/fileserver-explorer.png" height="600" hspace="5" width="800"></p>
  526. <p>&nbsp;</p>
  527. <p>&nbsp;</p><br><a name="M69SKN1KBY3NSX3XG2DPJ306MHH6EL0SIZ9UD05EPYT7K" &nbsp;="" id="M69SKN1KBY3NSX3XG2DPJ306MHH6EL0SIZ9UD05EPYT7K"></a><h1>1.4 Reading information about your PC (dmesg, /proc/partitions)</h1><p>
  528. <style type="text/css">
  529. <!--
  530. @page { margin: 0.79in }
  531. P { margin-bottom: 0.08in }
  532. -->
  533. </style>Let 's summarize a little what 's already been said and look at reading info on your computer.<br>
  534. <br>
  535. -<strong>/proc</strong><br>
  536. <br>
  537. Standard Linux always has a filesystem called "proc", which is a
  538. virtual filesystem in which files reside that have to do with your
  539. hardware and running processes. It 's a wonderful invention. We already
  540. talked about /proc/partitions, which is a file containing all local
  541. disk partitions.<br>
  542. <br>
  543. Another interesting file is /proc/cpuinfo, which gives you information about your CPUs<br>
  544. <br>
  545. /proc/meminfo gives you information about the memory usage. Don 't let
  546. yourself get misled by the Memfree line, which will always look very
  547. low. Actually, Linux always reserves most part of the memory so it can
  548. make use of it in a fast way. What you need to look at is the Active
  549. and Inactive. The maximum amount of memory you will see will never be
  550. more than 4Gb, since the TRK kernel needs to keep maximum compatibility<br>
  551. <br>
  552. Another useful file to read info on your cdrom drive is /proc/sys/dev/cdrom/info.<br>
  553. <br>
  554. Those are about the important files in /proc you need to know about now.<br>
  555. <br>
  556. -<strong>dmesg</strong><br>
  557. <br>
  558. The command "dmesg" gives you your kernel messages. Any hardware
  559. detected will give you a message somewhere in the output of this
  560. command. If you want to know the type of network card that has been
  561. detected, perform 'dmesg|more' and look for any mentions of eth0,
  562. eth1,...<br>
  563. <br>
  564. What type of harddisk controller you have: dmesg. Just use it when you
  565. find yourself stuck on hardware questions. Also disk failures will be
  566. visible with this command. Network errors, link down, etc, one command.<br>
  567. <br>
  568. Another way of looking at this information is through /var/log/messages
  569. (more /var/log/messages), which on normal Linux distributions contain
  570. output logs of previous boots too.<br>
  571. <br>
  572. To know what device your newly inserted USB stick has, plug it in, let
  573. it settle for a few seconds and then run dmesg again. Or just run
  574. 'dmesg|tail' to see only the last added lines.<br>
  575. Here 's an excerpt of what you might read from dmesg. It tells you something about your network card:<br>
  576. <font face="Courier New"><font size="2">eepro100.c:v1.09j-t 9/29/99 Donald Becker http://www.scyld.com/network/eepro100.html<br>
  577. eepro100.c: $Revision: 1.36 $ 2000/11/17 Modified by Andrey V. Savochkin &lt;saw@saw.sw.com.sg&gt; and others<br>
  578. ACPI: PCI Interrupt 0000:05:08.0[A] -&gt; GSI 20 (level, low) -&gt; IRQ 16<br>
  579. eth0: OEM i82557/i82558 10/100 Ethernet, 00:08:02:C6:4E:9D, IRQ 16.<br>
  580. Board assembly 262285-001, Physical connectors present: RJ45<br>
  581. Primary interface chip i82555 PHY #1.<br>
  582. General self-test: passed.<br>
  583. Serial sub-system self-test: passed.<br>
  584. Internal registers self-test: passed.<br>
  585. ROM checksum self-test: passed (0x04f4518b).</font></font><br>
  586. <br>
  587. -<strong>lspci and lsusb</strong><br>
  588. <br>
  589. This gives you any information on what 's on your PCI and respectively
  590. USB bus. This doesn 't only mean what 's in your PCI slots, but
  591. everything on the bus, so also onboard ethernet and usb controllers.
  592. </p>
  593. <p>
  594. <strong>-lshw</strong>
  595. </p>
  596. <p>Now here 's a great utility that can give you a complete listing of
  597. all your hardware, recognised and not recognised. When you run it, it
  598. will give you a LOT&nbsp;of output, so best here is to run it 'lshw |
  599. more', or if you only need specific info about f.i. disk drives, you
  600. can run 'lshw -C&nbsp;DISK'. Getting the info off your TRK can be done
  601. directly to the interweb (provided your network card got detected) by
  602. running 'lshw | wgetpaste', which will publish the output on
  603. http://pastebin.ca and return you a short url to where it can be found.</p>
  604. <p>
  605. <br>
  606. -<strong>smartctl</strong><br>
  607. <br>
  608. The smartmontools are part of Trinity Rescue Kit and not so common on
  609. normal Linux systems, yet they are a valuable addition to any system.
  610. What it does is read the s.m.a.r.t. information of disk drives so you
  611. can know when errors start to occur.<br>
  612. <br>
  613. Just use it like this: 'smartctl -a /dev/sda' where sda is your first
  614. scsi or sata drive. Make sure smart is enabled in the computer's bios.<br>
  615. <br>
  616. -<strong>acpi and acpitool</strong><br>
  617. <br>
  618. Two tools to read the battery and thermal information of your computer. Type acpi --help to get more info on possible options.<br>
  619. <br>
  620. acpitool can give you much more information like fan speeds and cpu.
  621. Also certain laptop types are supported for their special features like
  622. brigthness on Asus laptops etc...<br>
  623. <br>
  624. -<strong>df and du</strong><br>
  625. <br>
  626. Two standard utils provided in Linux. df shows you the usage of your
  627. mounted filesystems, du shows you the usage of a specific folder. Use
  628. it like 'df -h' and 'du -h' where "-h" stands for "human readable",
  629. making the output rounded to mega- and gigabytes.<br>
  630. This is in short how you can get to know your computer a little and how to jumpstart using Linux and Trinity Rescue Kit.<br>
  631. <br>
  632. <strong>-lshw</strong><br>
  633. <br>
  634. Recently recommended and added, but looks very promising, lshw gives
  635. you a complete list of all your hardware in your computer. Best to pipe
  636. this to a file, because the list can get long.
  637. </p>
  638. <p>&nbsp;</p><br><a name="QBRDPTSD001QIT0CN3AHZ75WRJKLINJYQ024JJ8A9ZQIH" &nbsp;="" id="QBRDPTSD001QIT0CN3AHZ75WRJKLINJYQ024JJ8A9ZQIH"></a><h1>2. TRK own commands and utils</h1><p>Let 's look at the added value of Trinity Rescue Kit, with its own specific commands and utils.</p><br><a name="XFPUBF4W6TFSCHXH5RXKMFAR0BVLGLR3S6NTBHF71KQ3T" &nbsp;="" id="XFPUBF4W6TFSCHXH5RXKMFAR0BVLGLR3S6NTBHF71KQ3T"></a><h1>2.1 Virusscan</h1><p>
  639. <style type="text/css">
  640. <!--
  641. @page { margin: 0.79in }
  642. P { margin-bottom: 0.08in }
  643. H1 { margin-bottom: 0.08in }
  644. H1.western { font-family: "Times New Roman", serif }
  645. H1.cjk { font-family: "Bitstream Vera Sans" }
  646. H1.ctl { font-family: "Bitstream Vera Sans" }
  647. H2 { margin-bottom: 0.08in }
  648. A:link { so-language: zxx }
  649. -->
  650. </style>
  651. </p>
  652. <p>Virusscan is a script that actually wraps 5 different virusscanners into one. <br>
  653. Only one of them is actually included on the TRK cd (Clamav), the others are downloaded from their website upon usage.</p>
  654. <p>When running virusscan, it is highly recommended that your computer
  655. has a decent internet connection so you can get the latest virus
  656. signatures.</p>
  657. <h2>Scan engines</h2>
  658. <p style="margin-bottom: 0in;">Currently, 5 AV engines and md5 file checksumming are implemented.</p>
  659. <h3>-ClamAV</h3>
  660. <p>This is the basic engine provided and is already preinstalled on
  661. TRK. It is very effective on mailservers but is quite slow and tends to
  662. crash when used as a commandline scanner. It also focuses more on
  663. mailworms and, from experience, has less effectiveness for local viri.
  664. Clamav is the only GPL licensed AV engine implemented. All others have
  665. some sort of free-for-non-commercial-use license and are closed source.
  666. The pros of Clamav are: <br>
  667. * very quick on new virus outbreaks <br>
  668. * included in TRK <br>
  669. * GPL licensed, so free for everyone <br>
  670. The cons: <br>
  671. * slow and very CPU and memory intensive <br>
  672. * detects the least viri of the 5 scanners in virusscan. <br>
  673. <br>
  674. Because it's in fact a mailserver scanner, it will focus more on worms
  675. than on filth that comes from malicious websites and such. <br>
  676. * cannot disinfect inside files on its own. What is done in this case
  677. is quarantine the infected files into a tar.gz archive in
  678. &lt;scandestination&gt;/TRK-INFECTED/. Should a file be accidentally
  679. deleted, you can recover it afterwards and rescan it with another
  680. antivirustool</p>
  681. <h3>-F-Prot</h3>
  682. <p>This antivirus tool and all the others are not included in TRK but
  683. get downloaded from the Internet as soon as you call upon them. They
  684. disappear after a reboot of TRK. If you want them to be available after
  685. a reboot, you have to run updatetrk. This will be explained later in
  686. this documentation. The pros of F-prot: <br>
  687. * lightweight, not a big download <br>
  688. * pretty fast, low cpu usage <br>
  689. * good disinfection method <br>
  690. The cons: <br>
  691. * does not detect everything <br>
  692. * their website sometimes fails and download of f-prot is aborted</p>
  693. <h3>-BitDefender Scanner</h3>
  694. <p>It has a good average between filesize, cpu/memory load and
  695. virusdetection. It can detect many different types of malware. From
  696. what has been experienced so far, it may detect other viri and malware
  697. than the other 4. It's recommended to sweep with this after another one
  698. has already run. <br>
  699. Pros of BitDefender Scanner: <br>
  700. * detects quite some viri <br>
  701. * pretty fast <br>
  702. * detects alternate malware <br>
  703. Cons: <br>
  704. * sometimes doesn't detect very common viri <br>
  705. * slow update process</p>
  706. <h3>-Vexira</h3>
  707. <p>This AV engine hasn't been tested so much, but it looks like a good average AV engine.</p>
  708. <h3>-Avast</h3>
  709. <p>Avast is the latest addition to virusscan (and replaces Grisoft AVG
  710. because AVG lacks cleaning support in its new version). Avast is a
  711. great AV on Windows, very lightweight, but has not been tested in depth
  712. yet on Linux/TRK. <br>
  713. For this particular AV engine you need a registered, free license key which is sent to you by mail. <br>
  714. Get it at <a href="http://www.avast.com/registration-free-antivirus.php">http://www.avast.com/registration-free-antivirus.php</a> <br>
  715. If you want to avoid entering the license key each time, it's recommened to run updatetrk</p>
  716. <h3>-MD5</h3>
  717. <p>This is not an antivirus engine but just reads all of your files and
  718. makes md5sums of it. It writes the result to a logfile in the same way
  719. like it does for an AV engine. The logfile format is: modification
  720. seconds since 1-1-1970 &lt;space&gt; md5sum &lt;space&gt; filepath.</p>
  721. <p>&nbsp;</p>
  722. <p>To get complete and up to date info, please check out the online version of the manpage for virusscan: <a href="http://trinityhome.org/manpages/man8/virusscan.8.html">http://trinityhome.org/manpages/man8/virusscan.8.html</a></p>
  723. <p><br>
  724. &nbsp;</p>
  725. <p>&nbsp;</p><br><a name="HW79FF1ZME1FBEY6DVXDG60JAJVNKK6T64SB9I0MMSSPW" &nbsp;="" id="HW79FF1ZME1FBEY6DVXDG60JAJVNKK6T64SB9I0MMSSPW"></a><h1>2.2 Winpass and regedit</h1><p>
  726. <style type="text/css">
  727. <!--
  728. @page { margin: 0.79in }
  729. P { margin-bottom: 0.08in }
  730. H2 { margin-bottom: 0.08in }
  731. A:link { so-language: zxx }
  732. -->
  733. </style>
  734. </p>
  735. <p style="margin-bottom: 0in;">Winpass is a bash wrapper script for <strong>chntpw </strong>supplied with Trinity Rescue Kit that resets MS Windows NT based local passwords.</p>
  736. <p>By default winpass without any arguments will reset the builtin
  737. administrator account of a locally installed Windows, but you can
  738. specify other accounts as well at the commandline. In fact, you can add
  739. any parameter from chntpw which will be parsed to the commandline. So
  740. winpass -l will list all usernames found in the SAM (=Windows user and
  741. password database). Should you have troubles that metacharacters are
  742. present in the username (such as the Ø or something), you can still
  743. use the HEX reference to the username listed next to it. Be sure to
  744. prepend that with a '0x'. More info on that can be found in the chntpw
  745. manual.</p>
  746. <p>Winpass does not reset any Active Directory passwords</p>
  747. <dl>
  748. <dt>-l</dt>
  749. <dd> list usernames contained in the SAM of the local computer and exit </dd>
  750. <dt> -i</dt>
  751. <dd> interactively run chntpw. This option lists the local usernames and gives you the option to choose from them </dd>
  752. <dt> -e, regedit</dt>
  753. <dd> run as registry editor. To get a list of commands in the editor, type "?" </dd>
  754. <dt> -u "username"</dt>
  755. <dd>
  756. optional username if the user you wish to reset is not "Administrator".
  757. Be sure to add quotes for the username if it contains whitespaces </dd>
  758. <dt> --restore</dt>
  759. <dd style="margin-bottom: 0.2in;">
  760. restore the original SAM file, thus restoring the original
  761. password/user situation from before the first time winpass was ever
  762. run. Should you somehow have messed up the user accounts, you can go
  763. back to the original situation with this option. Since build 338 the
  764. option to overwrite the backup when winpass is run multiple times has
  765. been disabled to prevent yes-men users answering yes to every question
  766. being asked. Removing the backup must now be done manually. You can
  767. find it in general under /sda1/WINDOWS/system32/config/SAM </dd>
  768. </dl>
  769. <p>&nbsp;</p>
  770. <h2>Example:</h2>
  771. <p>Here's an example of resetting the password for user "John Doe". Note the double quotes around the username.</p>
  772. <p>[root@trk]:(~)# <b>winpass -u "John Doe"</b> <br>
  773. Searching and mounting all filesystems on local machine <br>
  774. Remounting NTFS partitions with ntfs-3g <br>
  775. Result of mounting: <br>
  776. /dev/hda1 on /hda1 type fuseblk (rw,allow_other,blksize=4096) <br>
  777. Windows NT/2K/XP installation(s) found in: <br>
  778. 1: /hda1/WINDOWS <br>
  779. Make your choice or 'q' to quit [1]: <b>1</b> <br>
  780. Ok, continue <br>
  781. chntpw version 0.99.6 080526 (sixtyfour), (c) Petter N Hagen <br>
  782. Hive &lt;SAM&gt; name (from header): &lt;\SystemRoot\System32\Config\SAM&gt; <br>
  783. ROOT KEY at offset: 0x001020 * Subkey indexing type is: 666c <br>
  784. Page at 0x8000 is not 'hbin', assuming file contains garbage at end <br>
  785. File size 262144 [40000] bytes, containing 7 pages (+ 1 headerpage) <br>
  786. Used for data: 317/24808 blocks/bytes, unused: 6/3640 blocks/bytes.</p>
  787. <p><br>
  788. Hive &lt;SECURITY&gt; name (from header): &lt;\SystemRoot\System32\Config\SECURITY&gt; <br>
  789. ROOT KEY at offset: 0x001020 * Subkey indexing type is: 666c <br>
  790. Page at 0x10000 is not 'hbin', assuming file contains garbage at end <br>
  791. File size 262144 [40000] bytes, containing 15 pages (+ 1 headerpage) <br>
  792. Used for data: 1108/53920 blocks/bytes, unused: 11/7040 blocks/bytes.</p>
  793. <p><br>
  794. &nbsp;</p>
  795. <p><br>
  796. * SAM policy limits: <br>
  797. Failed logins before lockout is: 3 <br>
  798. Minimum password length : 7 <br>
  799. Password history count : 7 <br>
  800. | RID -|---------- Username ------------| Admin? |- Lock? --| <br>
  801. | 01f4 | Administrator | ADMIN | | <br>
  802. | 03eb | ASPNET | ADMIN | | <br>
  803. | 01f5 | Guest | ADMIN | dis/lock | <br>
  804. | 03e8 | HelpAssistant | | dis/lock | <br>
  805. | 03f0 | John Doe | ADMIN | | <br>
  806. | 03ea | SUPPORT_388945a0 | | dis/lock |</p>
  807. <p><br>
  808. ---------------------&gt; SYSKEY CHECK &lt;----------------------- <br>
  809. SYSTEM SecureBoot : -1 -&gt; Not Set (not installed, good!) <br>
  810. SAM Account\F : 1 -&gt; key-in-registry <br>
  811. SECURITY PolSecretEncryptionKey: 1 -&gt; key-in-registry <br>
  812. Syskey not installed!</p>
  813. <p><br>
  814. RID : 1008 [03f0] <br>
  815. Username: John Doe <br>
  816. fullname: John Doe <br>
  817. comment : <br>
  818. homedir :</p>
  819. <p><br>
  820. User is member of 2 groups: <br>
  821. 00000221 = Users (which has 4 members) <br>
  822. 00000220 = Administrators (which has 7 members)</p>
  823. <p><br>
  824. Account bits: 0x0010 = <br>
  825. [ ] Disabled | [ ] Homedir req. | [ ] Passwd not req. | <br>
  826. [ ] Temp. duplicate | [X] Normal account | [ ] NMS account | <br>
  827. [ ] Domain trust ac | [ ] Wks trust act. | [ ] Srv trust act | <br>
  828. [ ] Pwd don't expir | [ ] Auto lockout | [ ] (unknown 0x08) | <br>
  829. [ ] (unknown 0x10) | [ ] (unknown 0x20) | [ ] (unknown 0x40) |</p>
  830. <p><br>
  831. Failed login count: 0, while max tries is: 3 <br>
  832. Total login count: 0</p>
  833. <p><br>
  834. - - - - User Edit Menu: <br>
  835. <br>
  836. 1-Clear(blank)userpassword <br>
  837. <br>
  838. 2-Edit(setnew)userpassword(carefulwiththisonXPorVista) <br>
  839. <br>
  840. 3-Promoteuser(makeuseranadministrator) <br>
  841. (4 - Unlock and enable user account) [seems unlocked already] <br>
  842. <br>
  843. q-Quiteditinguser,backtouserselect <br>
  844. Select: [q] &gt; <b>1</b> <br>
  845. Password cleared!</p>
  846. <p><br>
  847. Hives that have changed: <br>
  848. <br>
  849. #Name <br>
  850. <br>
  851. 0&lt;SAM&gt;-OK</p>
  852. <p><br>
  853. Backup file already exists. Not touching this file. Please be aware
  854. that 'winpass --restore' would restore the very original file from
  855. before winpass was ever run <br>
  856. Writing /hda1/WINDOWS/system32/config/SAM <br>
  857. [root@trk]:(~)#</p>
  858. <p style="margin-bottom: 0in;">&nbsp;</p>
  859. <p>For the full documentation, refer to the online manpage:</p>
  860. <p><a href="http://trinityhome.org/manpages/man8/winpass.8.html">http://trinityhome.org/manpages/man8/winpass.8.html</a></p>
  861. <h2><font size="6">regedit</font></h2>
  862. <p>This is actually the same script as winpass, but called in this way
  863. it copies all registry hives and opens them (sam, security, system and
  864. software). Only drawback is that it cannot know which user registry to
  865. open, since they are located in different directories. Because chntpw
  866. is not scriptable, I cannot read registry hives from a shell script to
  867. determine the location of userhives.<br>
  868. <br>
  869. Once running, refer to the <a href="http://home.eunet.no/pnordahl/ntpasswd/faq.html">documentation of chntpw/regedit</a> on how to use it.<br>
  870. <br>
  871. <br>
  872. &nbsp;</p>
  873. <p>&nbsp;</p><br><a name="SI14T7V9WN984HEA7MUC0E8RMGDSNVN63F0LCLKYZKWTS" &nbsp;="" id="SI14T7V9WN984HEA7MUC0E8RMGDSNVN63F0LCLKYZKWTS"></a><h1>2.3 Mass Clone: a multicast disk cloning tool</h1><p>
  874. <style type="text/css">
  875. <!--{12802443353150}-->
  876. </style>
  877. </p>
  878. <p style="margin-bottom: 0in;">Mclone or Mass Clone is a utility that creates and distributes harddisk images over the network via multicast. <br>
  879. It is very fast since it uses only one network packet for an infinite
  880. number of receivers. On a 100mbit switch it will average at about
  881. 93mbit. The only limitation here is the speed of the network, disk or
  882. cpu. <br>
  883. Main features: <br>
  884. -make exact copies of any operating system <br>
  885. -optimized for Windows XP/Vista/Seven imaging using ntfsclone. Other filesystems are copied with dd <br>
  886. -fast and scalable <br>
  887. -save to image and restore from image (to multicast) with optional 3 compression algorythms (gzip, bzip2 and 7-zip) <br>
  888. -restore original bootsector/ntfs c/h/s values. An old bug in many
  889. BIOSes sometimes gave wrong values for Cylinders/Heads/Sectors count.
  890. Although CHS is an old method for assigning disk geometry (LBA should
  891. be used), Windows XP and family still use it to assign addressing of
  892. their bootcode. Recent Linux kernels discard wrong C/H/S values and set
  893. it to the LBA values. This resulted sometimes in unbootable cloned
  894. Windows machines (the blinking cursor nightmare). Recently a patched
  895. version of relocntfs appeared (now called ntfsreloc) which is able to
  896. "force" original C/H/S values into your NTFS. Mclone does it
  897. automatically for you. Major feature over other cloning tools. <br>
  898. -run up to 50 different sessions separately over your LAN <br>
  899. -optional speed limitation. Just so your LAN doesn't get saturated. <br>
  900. -option to specify disks/partitions instead of just everything automatically <br>
  901. -option to skip bootsector <br>
  902. -option to skip C/H/S check</p>
  903. <p>Since TRK is network bootable from another TRK without any
  904. modifications to your LAN's config, you could just boot one TRK from
  905. CD/usb stick, boot all your other computers over the network and run
  906. mclone on all of them.</p>
  907. <p>An average image of about 4Gb on a 100mbit network is cloned in about 7 minutes</p>
  908. <h2>USAGE</h2>
  909. <p>In short: the computer to be cloned (the sender) runs 'mclone -s', all others run 'mclone' (the receivers). <br>
  910. Once all computers are ready and waiting, just press enter on one of them and cloning begins.</p>
  911. <p>You can also save to an image file. The computer that will save the image as a set of files runs mclone with the option -o. <br>
  912. For example:</p>
  913. <p>mclone -o standard-xp-install</p>
  914. <p>will save an uncompressed image to "standard-xp-install", creating
  915. it as a directory in the current directory if it does not exist. <br>
  916. The command:</p>
  917. <p>mclone -C 7-zip -o standard-xp-install</p>
  918. <p>will add 7-zip compression to the image. But beware of compression.
  919. I've noticed that gzip is the only compressor that doesn't eat too much
  920. of your CPU so not to lose transfer speed. If size is more important to
  921. you, use bzip2 or 7-zip <br>
  922. In all of these cases you run 'mclone -s' on the computer from which you wish to create an image. (The Sender.) <br>
  923. Restoring from this recently created image is done with:</p>
  924. <p>mclone -i standard-xp-install</p>
  925. <p>No need to specify the compression anymore, mclone will use the correct decompressor. <br>
  926. So remember: <br>
  927. -o mode and 'mclone' without arguments is a receiving mode, so the
  928. other side must run mclone -s (sender mode) -i and -s mode are sender
  929. mode, the other side runs 'mclone' as a receiver</p>
  930. <p>Here are all the options that you can specify.</p>
  931. <p>The command: mclone without any arguments runs in client mode, meaning it will RECEIVE an image from a sender</p>
  932. <dl>
  933. <dt>-s</dt>
  934. <dd> SENDER mode. This mode will send the contents of the local harddisks to listening clients <br>
  935. e.g.: The sender runs 'mclone -s', the clients run 'mclone'. The sender will clone a one to many copy of itself </dd>
  936. <dt> -o &lt;path-to-image&gt; </dt>
  937. <dd>
  938. This mode is a RECEIVER mode that stores an image from a sender to
  939. image files in the path specified by the argument 'path-to-image' <br>
  940. e.g.: 'mclone -o /data/xp-image'. Note: the dir does not need to exist,
  941. but please erase it if an image is already in there. </dd>
  942. <dt> -i &lt;path-to-image&gt;</dt>
  943. <dd style="margin-bottom: 0.2in;"> This is a SENDER mode that sends an image to clients. You first need to have an image created with mclone -o of course. </dd>
  944. <dd style="margin-bottom: 0.2in;"> e.g.: 'mclone -i /data/xp-image' </dd>
  945. <dt> -n &lt;session number&gt;</dt>
  946. <dd style="margin-bottom: 0.2in;"> Specify as many as 50 sessions when performing multiple cloning. Client and sender need to specify the same number </dd>
  947. <dd style="margin-bottom: 0.2in;"> e.g.: 'mclone -n 5' for client, 'mclone -s -n 5' for sender </dd>
  948. <dt> -h</dt>
  949. <dd style="margin-bottom: 0.2in;"> short help screen </dd>
  950. <dt style="margin-bottom: 0.2in;"> Optional arguments <b>ONLY FROM SENDER MODE</b>:</dt>
  951. <dt> -d &lt;disks&gt;</dt>
  952. <dd> Skip disk detection and specify your own (comma separated if more than one). Only valid for SENDER mode (-s). <br>
  953. e.g.: 'mclone -s -d /dev/sda,/dev/sdc' </dd>
  954. <dt> -p &lt;partitions&gt;</dt>
  955. <dd> Skip partition detection and specify your own (comma separated if more than one.) Only valid for SENDER mode (-s). <br>
  956. e.g.: 'mclone -s -p /dev/sda1,/dev/sda2' </dd>
  957. <dt> -c</dt>
  958. <dd>
  959. Skip C/H/S check. This should not be necessary, but if you run into
  960. troubles with booting, it might help, although the opposite is more
  961. likely to be true </dd>
  962. <dt> -b</dt>
  963. <dd> Skip save bootsector. Should you not want to overwrite your bootsector, add this parameter. </dd>
  964. <dt> -t &lt;timeout&gt;</dt>
  965. <dd>
  966. set the timeout between the first client to connect and the last one to
  967. ride the train. This option is only used during actual image creation.
  968. Default is 10 seconds. </dd>
  969. <dt> -r &lt;bitrate&gt;</dt>
  970. <dd style="margin-bottom: 0.2in;">
  971. Set the maximum bitrate. Set it in kilobit (k) or megabit (m). This is
  972. recommended when you are on a shared lan, because mclone will eat all
  973. the available bandwidth. <br>
  974. e.g.: 'mclone -s -r 80m' sets a maximum of 80 megabit or 10 megabytes per second (which is ok on a 100mbit switch) </dd>
  975. <dt> Optional arguments for <b>IMAGE SAVE MODE</b></dt>
  976. <dt> -w</dt>
  977. <dd>
  978. Use network compression. This option uses more CPU but saves bandwidth
  979. on your network. Use only on powerful machines. This option is
  980. permanent when you store to an image file, i.e. when enabled at image
  981. creation it will always be used during restore. </dd>
  982. <dt> -C &lt;compressor&gt;</dt>
  983. <dd style="margin-bottom: 0.2in;">
  984. Save your image with compression. 3 compression methods are available
  985. (specified as written here): gzip, bzip2 and 7-zip e.g.: 'mclone -o
  986. /data/xp-image -C gzip' </dd>
  987. </dl>
  988. <p>&nbsp;
  989. <style type="text/css">
  990. <!--{12802443353151}-->
  991. </style>
  992. </p>
  993. <p>For the full documentation, refer to the online manpage:</p>
  994. <p><a href="http://trinityhome.org/manpages/man8/mclone.8.html">http://trinityhome.org/manpages/man8/mclone.8.html</a></p><br><a name="VZX1W3W6015LZRZ127YCKFJS9LX59AAU0YKLR6IHYETNW" &nbsp;="" id="VZX1W3W6015LZRZ127YCKFJS9LX59AAU0YKLR6IHYETNW"></a><h1>2.4 Winclean</h1><p>
  995. <style type="text/css">
  996. <!--
  997. @page { margin: 0.79in }
  998. P { margin-bottom: 0.08in }
  999. H2 { margin-bottom: 0.08in }
  1000. -->
  1001. </style>
  1002. </p>
  1003. <p>With winclean you can easily clean out unnecessary files, such as
  1004. tempfiles or the contents of recycle bins, from a Windows based
  1005. computer. <br>
  1006. This utility will call upon mountallfs to search for all local filesystems. <br>
  1007. It can clean several types of (practically) useless files. <br>
  1008. The file location types are: <br>
  1009. -Tempfiles from every user, located in %TEMP% (e.g.
  1010. C:\Documents&nbsp;and&nbsp;Settings\Username\Local&nbsp;Settings\Temp)
  1011. and Temporary Internet Files from Internet Explorer. The contents of
  1012. the folder C:\Windows\Temp is also cleaned out. <br>
  1013. -Recycle Bins (of all users) can be emptied as well <br>
  1014. -Uninstall files from cumulative patches and service packs. <br>
  1015. This is only valid for Windows XP (and 2000), not Vista or Seven (there
  1016. it's interweaved in WinSXS and is too dangerous to touch). The removal
  1017. of these redundant files can provide a significant performance increase
  1018. since a lot of directory enumeration is done in the Windows system
  1019. folder and the more files and folders there are, the slower it becomes.
  1020. These folders are hidden by default in Windows explorer and are named
  1021. similar to $Uninstall-KB123456$ for example. <br>
  1022. -Dllcache: C:\Windows\system32\dllcache can contain more than 1000 files and take up several hundreds of megabytes. <br>
  1023. This folder has little use if your machine is running as it should. <br>
  1024. -Hanging printerjobs: sometimes spoolfiles are corrupt, or a printer
  1025. has been physically removed for a long time or a spooljob is hundreds
  1026. if not thousands of megabytes in size because someone tried to print a
  1027. 10 megapixel picture of 1200dpi. <br>
  1028. Winclean can remove all pending jobs. <br>
  1029. -Java cache: The cache files of java applications can take up hundreds
  1030. of megabytes, sometimes even more. These can be safely deleted. <br>
  1031. This option is currently only for Sun Java. &nbsp;</p>
  1032. <h2>USAGE</h2>
  1033. <p>winclean -d &lt;destination mount point&gt; -s &lt;value&gt; -v -R -f -a -t -r -u -c -p -j <br>
  1034. where: <br>
  1035. -d &lt;destination mount point&gt;: if not specified, mountallfs will be called <br>
  1036. -s &lt;value&gt;: safe deletion of only tempfiles older than &lt;value&gt; days. <br>
  1037. -v: verbose deletion of files <br>
  1038. -R: report first which files could be deleted <br>
  1039. -f: force continue without prompting <br>
  1040. -a: clean all categories or... <br>
  1041. -t: tempfiles <br>
  1042. -r: recycle bins <br>
  1043. -u: remove uninstall patches information <br>
  1044. -c: Windows dllcache <br>
  1045. -p: hanging printerjobs <br>
  1046. -j: java cache</p>
  1047. <p>
  1048. <style type="text/css">
  1049. <!--
  1050. @page { margin: 0.79in }
  1051. P { margin-bottom: 0.08in }
  1052. -->
  1053. </style>
  1054. </p>
  1055. <p>For the full documentation, refer to the online manpage:&nbsp;</p>
  1056. <p><a href="http://trinityhome.org/manpages/man8/winclean.8.html">http://trinityhome.org/manpages/man8/winclean.8.html</a></p><br><a name="TTVJRRE5QQRJBVB2F61R719J0CHFRFVAZGJFXPBD4SM6D" &nbsp;="" id="TTVJRRE5QQRJBVB2F61R719J0CHFRFVAZGJFXPBD4SM6D"></a><h1>2.5 Mountallfs</h1><p>
  1057. <style type="text/css">
  1058. <!--
  1059. @page { margin: 0.79in }
  1060. P { margin-bottom: 0.08in }
  1061. H2 { margin-bottom: 0.08in }
  1062. -->
  1063. </style>
  1064. </p>
  1065. <p>This script is about the most handy addon to TRK. It 's a script
  1066. that scans all local storage devices and mounts their filesystems to a
  1067. standard mountpoint, nl. the name of its device name.<br>
  1068. <br>
  1069. mountallfs is a script that searches all local partitions on all local
  1070. drives for any filesystem and tries to mount it. It supports all kernel
  1071. based filesystems as well as fuse-ntfs and ntfs-3g. Furthermore it has
  1072. support for LVM volumes. Currently it also supports pseudo-hardware
  1073. raid volumes found on many desktop sata controllers. umountallfs is its
  1074. counterpart and unmounts all filesystems mounted by mountallfs. Always
  1075. run umountallfs before resetting your computer if you don't intend to
  1076. do a clean shutdown.</p>
  1077. <dl>
  1078. <dt>-g</dt>
  1079. <dd> Mount your ntfs filesystems with the <b>ntfs-3g</b>
  1080. driver. This is the default behavior since build 338 because it allows
  1081. full read/write support on ntfs drives. Performancewise it has much
  1082. more cpu overhead than the kernel based ntfs driver. Most modern PCs
  1083. shouldn't have too many problems with it however. Please note that the
  1084. mount result will mark the ntfs filesystems mounted as 'fuseblk', since
  1085. this is a userland driver which interfaces with the kernel fuse module.
  1086. </dd>
  1087. <dt> -f</dt>
  1088. <dd> Mount your ntfs filesystems with the <b>ntfsmount fuse</b>
  1089. driver. This is somewhat the predecessor to ntfs-3g (hence ntfs-3g is
  1090. the third generation ntfs driver). This fuse option has more limited
  1091. write support than ntfs-3g and is deprecated over ntfs-3g. The mount
  1092. result also shows as being mounted as 'fuseblk'. </dd>
  1093. <dt> -k</dt>
  1094. <dd> Mount your ntfs filesystems with the <b>kernel ntfs</b>
  1095. driver. This is a read-only driver but uses less CPU resources and so
  1096. has better performance. This was the default behavior before build 338
  1097. and is now a new option. </dd>
  1098. <dt> -l</dt>
  1099. <dd> Activate
  1100. Logical Volume Management. This option is for computers with LVM
  1101. volumes and pseudo-hardware raid controllers. If you have such a
  1102. pseudo-hardware raid controller and you configured your disks in mirror
  1103. mode, ALWAYS use this option before doing any operation on your disk
  1104. because otherwise each mirror member might get mounted separately and
  1105. you <b>WILL</b> corrupt your filesystem on it. Default behavior for this option is also to mount ntfs volumes with ntfs-3g. </dd>
  1106. <dt> -q | --quiet</dt>
  1107. <dd style="margin-bottom: 0.2in;"> Do not display any output from the mount result. </dd>
  1108. </dl>
  1109. <p>
  1110. <style type="text/css">
  1111. <!--
  1112. @page { margin: 0.79in }
  1113. P { margin-bottom: 0.08in }
  1114. -->
  1115. </style>
  1116. </p><p>For the full documentation, refer to the online manpage:</p>
  1117. <a href="http://trinityhome.org/manpages/man8/mountallfs.8.html">http://trinityhome.org/manpages/man8/mountallfs.8.html&nbsp; </a><p></p>
  1118. <h2>REMARKS</h2>
  1119. <p>-If your filesystems were not found it might either mean they were
  1120. too corrupted to mount or your disk controller was not detected by TRK.
  1121. You might try more (scsi) drivers by typing 'tryscsi'. This is more the
  1122. case on servers with more advanced disk controllers. However, 'tryscsi'
  1123. might freeze your machine. Be warned! <br>
  1124. -Mountallfs might also warn you that your ntfs volumes have been
  1125. dismounted improperly. This is most likely the case when a Windows
  1126. session was shutdown improperly. Mountallfs will prompt you to
  1127. forcemount the ntfs volume, which invokes an ntfsfix and triggers a
  1128. chkdsk at next reboot into Windows. Please, let this chkdsk run. It
  1129. will solve about half of the possible problems that might occur on your
  1130. ntfs volumes. <br>
  1131. -Another thing you might encounter is that the volume (Windows) is
  1132. hibernated and a hiberfil.sys is present. In that case you will be
  1133. prompted to either remove the hiberfil.sys and forcemount the drive or
  1134. leave it alone. Mounting the drive and leaving the hiberfil.sys could
  1135. corrupt your Windows and make it crash when you resume from
  1136. hibernation. <br>
  1137. -/etc/mountallfstab is the separate config file mountallfs keeps after
  1138. mounting. It uses it for umountallfs to unmount all the volumes
  1139. previously mounted by mountallfs. Umountallfs also does a test that
  1140. there are no more open processes on the volumes (most of the times your
  1141. working directory of your shell). However, it does not take into
  1142. account any mountpoints under your mountallfs mounted volumes. So you
  1143. need to take care of those manually.</p>
  1144. <h2>EXAMPLES</h2>
  1145. <p>Command:'mountallfs -l' searches for LVM volumes and mounts the filesystems inside them.</p>
  1146. <dl>
  1147. <dt style="margin-bottom: 0.2in;">Command:'mountallfs' without any option mounts all filesystems and remounts ntfs filesystems with ntfs-3g</dt>
  1148. </dl>
  1149. <p>&nbsp;</p><br><a name="HH1WPPJEI4DHJTAHXPSYR3637JMCUVX22NNH2YLBSPI18" &nbsp;="" id="HH1WPPJEI4DHJTAHXPSYR3637JMCUVX22NNH2YLBSPI18"></a><h1>2.6 Updatetrk</h1><p>
  1150. <style type="text/css">
  1151. <!--
  1152. @page { margin: 0.79in }
  1153. P { margin-bottom: 0.08in }
  1154. H2 { margin-bottom: 0.08in }
  1155. -->
  1156. </style>
  1157. </p><p>Trinity Rescue Kit is able to <strong>update itself or better said, add features </strong>through
  1158. the script 'updatetrk'. This requires decent Internet connectivity,
  1159. direct, over a router or via a proxy server (in that case, run '.
  1160. setproxy' first)<br>
  1161. <br>
  1162. The script is very simple to handle:<br>
  1163. Suppose you 've booted from a PC with a Windows XP (2K or NT is also good), you can run updatetrk without any option.<br>
  1164. Since TRK 3.4, updatetrk uses a script called 'getswap' which looks for
  1165. extra virtual memory on local swap partitions and Windows pagefile.sys<br>
  1166. <br>
  1167. Updatetrk fetches external third party, non GPL software (fetches and
  1168. updates all AV engines for virusscan) and creates a new TRK isofile or
  1169. updates your TRK USB stick. It also saves any changes you made to your
  1170. running copy of TRK. It allows you to install tarballs and even rpms
  1171. and have it saved for the next time you run TRK. An example of such
  1172. software is IBM Tivoli Storage Manager client. Adding this software to
  1173. TRK allows you to do offline backup/restores from a TSM server. <br>
  1174. Updatetrk can create a new isofile which you can burn or directly
  1175. update your USB bootmedium. Given that you run TRK on a computer that
  1176. normally runs Windows, it will use the pagefile.sys as extra swapspace
  1177. on which to create its new image. &nbsp;</p>
  1178. <h2>USAGE</h2>
  1179. <p>updatetrk -b [BUILDTARGET] -i [TARGETISOFILE] (or) -u [TARGETUSBDEVICE] -s -a avs,bde,clam,fprot,va -f</p>
  1180. <dl>
  1181. <dt>-b [BUILDTARGET]</dt>
  1182. <dd> Build location where
  1183. intermediate files can be stored. Should be at least 1100mb. Make sure
  1184. no other files reside in that location, as they will be included as
  1185. well. If no build target is given, a script called 'getswap' will be
  1186. invoked which will search for swap partitions and Windows pagefile.sys
  1187. files. This pagefile will be added as swapspace and extend youir
  1188. working memory. This has no consequences for your Windows system
  1189. afterwards. It will just be reused. </dd>
  1190. <dt> -i [TARGETISOFILE]</dt>
  1191. <dd>
  1192. Target dir on which to create the isofile. There should be at least
  1193. 350Mb free on the target. The filename will be automatically given. If
  1194. this option is omitted, the file will be created in the same location
  1195. as the buildtarget. If the buildtarget is omitted, it will be created
  1196. in the temp dir of the drive containing the pagefile. In general this
  1197. will be&nbsp;&nbsp;c:\temp&nbsp;&nbsp;under Windows. </dd>
  1198. <dt> -u [TARGETUSBDEVICE]</dt>
  1199. <dd style="margin-bottom: 0.2in;">
  1200. Target USB filesystem to update. This performs a simple copy to the
  1201. location you specified. In general this is the partition from which you
  1202. booted TRK. </dd>
  1203. <dd style="margin-bottom: 0.2in;"> Example 1:
  1204. 'updatetrk -b /hda1/temp/trkbuilding/ -i /hda1/Docs/' This will use
  1205. /hda1/temp/trkbuilding/&nbsp;&nbsp;as construction site and create
  1206. /hda1/Docs/trinity-rescue-kit-3.4-363u.iso </dd>
  1207. <dd style="margin-bottom: 0.2in;">
  1208. Example 2: 'updatetrk -u /dev/sda4' will search for a local pagefile as
  1209. construction site and copy back the files to your USB device (or fixed
  1210. harddisc) <br> If you specify no options at all, TRK will always be
  1211. created on a local pagefile as an ISO in c:\temp. If no pagefile is
  1212. found, the script will exit. If you specified a specific buildtarget,
  1213. the files will remain there afterwards at your convenience. Remark:
  1214. option '-i' and '-u' are not useable together. </dd>
  1215. <dt> -s avs,bde,clam,fprot,va</dt>
  1216. <dd style="margin-bottom: 0.2in;"> Skip the inclusion of specific AV engines+updates. The syntax speaks for itself. <br>
  1217. If you skip all AVs, updatetrk will only apply what is currently
  1218. already modified on your running copy. -f Force updatetrk to build,
  1219. even if not enough tempspace is available. It is possible to assign
  1220. more of the swapspace to /dev/shm (the default volatile temporary
  1221. storage location of Linux). Running 'getswap -s 80' f.i. will assign
  1222. 80% of the total memory (ram+swap) available to /dev/shm. With 'df -h'
  1223. /dev/shm you can verify if you arrive at 1.1Gb free space on this
  1224. location. </dd>
  1225. <dd style="margin-left: 0.38in; text-indent: -0.36in; margin-bottom: 0.2in;"> -a<br>
  1226. Copy contents of / (root) completely and as is instead of cleaning up
  1227. and omitting certain directories. This will include logs and
  1228. bash_history as well.</dd>
  1229. </dl>
  1230. <p><a name="lbAF"></a>&nbsp;</p>
  1231. <h2>EXAMPLES</h2>
  1232. <p>Example 1: 'updatetrk -b /hda1/temp/trkbuilding/ -i /hda1/Docs/'</p>
  1233. <p>This will use /hda1/temp/trkbuilding/ as construction site and create /hda1/Docs/trinity-rescue-kit-3.4-363u.iso</p>
  1234. <p>Example 2: 'updatetrk -u /dev/sda4'</p>
  1235. <p>This will search for a local pagefile as construction site and copy back the files to your USB device (or fixed harddisc)</p>
  1236. <p><a name="lbAG"></a>If you specify no options at all, TRK will always
  1237. be created on a local pagefile as an ISO in c:\temp. If no pagefile is
  1238. found, the script will exit. <br>
  1239. If you specified a specific buildtarget, the files will remain there afterwards at your convenience. &nbsp;</p>
  1240. <h2>REMARKS</h2>
  1241. <p>-Option '-i' and '-u' are not useable together.</p>
  1242. <p>-If you're behind a proxy server, run '. setproxy' first</p>
  1243. <p>-If you're updating your running USB stick, hard <b>RESET</b> your
  1244. computer as soon as updatetrk has finished, since the underlying
  1245. filesystems will have changed without having been remounted.</p>
  1246. <p>-TRK has an empty rpm database (except for 1 package that does some
  1247. basic provides), meaning that almost any RPM you install will protest
  1248. about missing dependencies. <br>
  1249. In many cases, the binaries would work anyway. <br>
  1250. The easiest way to test this is by installing the rpm in this way:</p>
  1251. <p>Type the command: 'rpm -ivh --nodeps &lt;package.rpm&gt;'</p>
  1252. <p>Then test it by executing the binaries. If it fails because certain
  1253. libraries are missing, run ldd /usr/bin/mybinary and check what library
  1254. is missing. Go and look for that library on rpmfind.net and install it.</p>
  1255. <p>Many commercial rpms are compiled in such a way that they are
  1256. compatible with most Linux distros. Most of them require glibc 2.2 or
  1257. higher. TRK is glibc 2.3.4.</p>
  1258. <p><a name="lbAH"></a>-If your CD/RW drive is currently available (booted from RAM or usb stick), you can directly record the isofile. <br>
  1259. For a blank cd, run f.i. 'cdrecord trinity-rescue-kit.3.4-build-363u.iso' <br>
  1260. If you still need to erase your rewritable CD, first run 'cdrecord -blank=fast'</p>
  1261. <p><br>
  1262. &nbsp;</p>
  1263. <p><br>
  1264. &nbsp;</p>
  1265. <h2>What will 'updatetrk' do?</h2>
  1266. <p><br>
  1267. &nbsp;</p>
  1268. <p>-First ask for license agreements to install commercial software</p>
  1269. <p>-Then, it downloads the latest engine + virus signatures for ClamAV<br>
  1270. <br>
  1271. -Next, it downloads F-Prot + updates<br>
  1272. <br>
  1273. -As third antivirus, it fetches Avast Antivirus + updates. You will need a valid license key handy (free registration on site)<br>
  1274. <br>
  1275. -4<sup>th</sup> antivirusscanner is BitDefender and starts the
  1276. installation procedure. This is BitDefender 's own install procedure,
  1277. just follow instructions on the screen, type "accept" for the license
  1278. agreement and leave everything to the default propositions.</p>
  1279. <p>-The last virusscanner it fetches is Vexira. No intervention is needed here.<br>
  1280. <br>
  1281. -Finally, it copies the complete contents of /bin, /sbin /etc and /lib
  1282. to your new TRK. This means that anything you modified or added in
  1283. these directories will be included in your new TRK. This gives you an
  1284. easy way to make small modifications/additions to TRK.</p>
  1285. <p>After that, updatetrk recreates its /usr filesystem squashfs image.
  1286. Since this image is orignally mounted with a pseudo read/write aufs
  1287. over it, volatile changes will be submitted in the new squashfs image.</p>
  1288. <p>Also the initrd is recreated and everything from /bin /sbin /etc
  1289. /lib and /var/lib is copied to it. Logfiles and session-based changes
  1290. are discarded, except if the option -a was added to the commandline.
  1291. Then everything will be copied back as is, including bash history f.i.<br>
  1292. <br>
  1293. This script can be run time after time to keep your antivirus signatures up-to-date.<br>
  1294. <br>
  1295. When no destination parameter was given to TRK and you 're running TRK
  1296. from CD, it will move the newly created isofile to the drive where it
  1297. found your pagefile.sys in directory 'temp'. Most likely this will be
  1298. C:\temp.</p>
  1299. <p>
  1300. <style type="text/css">
  1301. <!--
  1302. @page { margin: 0.79in }
  1303. P { margin-bottom: 0.08in }
  1304. -->
  1305. </style>
  1306. </p><p>To get complete and up to date info, please check out the online version of the manpage:</p>
  1307. <p></p>
  1308. <p><a href="http://trinityhome.org/manpages/man8/updatetrk.8.html">http://trinityhome.org/manpages/man8/updatetrk.8.html</a></p>
  1309. <p></p><br><a name="DNEHBFA6ISQPQUF15A9HX1XVYX82E8LIMQQNVRJ480INJ" &nbsp;="" id="DNEHBFA6ISQPQUF15A9HX1XVYX82E8LIMQQNVRJ480INJ"></a><h1>2.7 Trk2usb</h1><p>
  1310. <style type="text/css">
  1311. <!--
  1312. @page { margin: 0.79in }
  1313. P { margin-bottom: 0.08in }
  1314. H2 { margin-bottom: 0.08in }
  1315. -->
  1316. </style>
  1317. </p>
  1318. <p>This utility puts your <strong>Trinity Rescue Kit to a USB stick/disk</strong>
  1319. or even to a fixed harddisk. This is one of the two methods you can use
  1320. to get TRK running from USB. This is also the recommended and easiest
  1321. method of doing it. Only downside here is that you first have to burn
  1322. the iso version of TRK to CD, boot from it and run it from there.<br>
  1323. <br>
  1324. When given without the noformat option, it will destroy all data on the
  1325. destination device, create a fat filesystem in the 4th partition id of
  1326. the disk. This gives the best compatibility with most BIOSes. <br>
  1327. It is also possible to do a non-destructive transfer to your medium given the -n option. <br>
  1328. The destination medium has to be at least the size of the TRK isofile. Recommended is 256Mb minimum.</p>
  1329. <h2>USAGE</h2>
  1330. <p>trk2usb -d [DEVICE] -s [SIZE] -n</p>
  1331. <p>
  1332. </p><dl>
  1333. <dt>-d [DEVICE]</dt>
  1334. <dd style="margin-bottom: 0.2in;">
  1335. Specify the destination device. In case you use it without the noformat
  1336. option, you need to give the complete disk as argument, not a
  1337. partition. Your disk will be erased, zeroed out and formatted with one
  1338. partition as FAT16 of maximum 1Gb as the 4th primary partition. This is
  1339. for maximum compatibility. </dd>
  1340. <dd style="margin-bottom: 0.2in;"> Example: trk2usb -d /dev/sdc </dd>
  1341. <dt> -n</dt>
  1342. <dd style="margin-bottom: 0.2in;">
  1343. Noformat. Use this option if your device is already correctly formatted
  1344. and you don't want to lose your data on it. This requires you to
  1345. specify the destination as a partition. </dd>
  1346. <dd style="margin-bottom: 0.2in;"> Example: trk2usb -n -d /dev/sdc1 </dd>
  1347. <dt> -s</dt>
  1348. <dd style="margin-bottom: 0.2in;">
  1349. Optionally, you can specify the size of the destination partition in
  1350. Mb. This allows you to add more partitions later. This option is not
  1351. combinable with -n </dd>
  1352. </dl>
  1353. <p></p>
  1354. <p>Read the full and updated manpage online here:</p>
  1355. <p><a href="http://trinityhome.org/manpages/man8/trk2usb.8.html">http://trinityhome.org/manpages/man8/trk2usb.8.html</a></p>
  1356. <p>&nbsp;</p><br><a name="WM8PAWXULFITSRN0X6I1YVCLB9IA41FQDD5E0TYBZ7VGP" &nbsp;="" id="WM8PAWXULFITSRN0X6I1YVCLB9IA41FQDD5E0TYBZ7VGP"></a><h1>2.8 Trk2iso</h1><p>On
  1357. special demand, I 've created this small utility that creates an ISO
  1358. file of your currently running TRK. It doesn 't update trk, it just
  1359. creates an isofile in the current directory from where the command was
  1360. launched. Here 's how to use it best:<br>
  1361. 'mountallfs -g' =&gt; suppose /dev/hda1 is your ntfs c:-drive<br>
  1362. 'mkdir /hda1/temp'<br>
  1363. 'cd /hda1/temp'<br>
  1364. 'trk2iso'<br>
  1365. &nbsp;<br>
  1366. Once the isofile created, you can reburn TRK to CD.</p><br><a name="EGNT0M1F9DJ7XUB34LIEU8DXZVGDWEW0K9IAMAFLDQJ09" &nbsp;="" id="EGNT0M1F9DJ7XUB34LIEU8DXZVGDWEW0K9IAMAFLDQJ09"></a><h1>2.9 Fileserver</h1><p>
  1367. <style type="text/css">
  1368. <!--
  1369. @page { margin: 0.79in }
  1370. P { margin-bottom: 0.08in }
  1371. H2 { margin-bottom: 0.08in }
  1372. -->
  1373. </style>
  1374. </p>
  1375. <p>In short: <strong>share your drives like a windows fileserver</strong><br>
  1376. Fileserver is a bash script that calls mountallfs and creates Windows
  1377. fileshares from your mountallfs mounted volumes. It can run in
  1378. guest-mode or user secured mode. It can optionally also run read-only. <br>
  1379. The default netbios name will be "TRKSRV" and the workgroup will be
  1380. "WORKGROUP". The server will not register in any WINS or DNS servers,
  1381. so for it to appear in your network neighbourhood might take some time
  1382. because it will use broadcast. <br>
  1383. For quick access to it from an external PC running Windows, it's
  1384. recommended to go to start =&gt; run (or "Start Search" in Vista or
  1385. Seven) and type \\1.2.3.4 where 1.2.3.4 is the ip-address of your TRK.
  1386. Fileserver mentions the ip-address in green when it starts. Fileserver
  1387. calls mountallfs to search and mount all local filesystems.</p>
  1388. <p>Fileserver can be called in two modes: in <strong>secured</strong> or in <strong>guest </strong>mode (+ optionally read-only mode)<br>
  1389. <br>
  1390. -<strong>Secured mode</strong> is invoked with the command 'fileserver -s'<br>
  1391. This will prompt your for adding a user and a password that will have
  1392. access to your files remotely. Just follow instructions. Here 's how
  1393. the output would be if you ran it<br>
  1394. <br>
  1395. <font face="Courier New">Starting a username/password secured Samba fileserver and sharing all local filesystems<br>
  1396. Enter a username which will be created to have access to your local files:<br>
  1397. New SMB password:<br>
  1398. Retype new SMB password:<br>
  1399. Added user testuser.<br>
  1400. Mounting all your local filesystems using mountallfs -g<br>
  1401. These are the IP-addresses your fileserver will listen to:<br>
  1402. 192.168.81.5<br>
  1403. Starting SMB services: [ OK ]<br>
  1404. Starting NMB services: [ OK ]</font><br>
  1405. <br>
  1406. -<strong>Guest mode </strong>is invoked with the command 'fileserver -g'<br>
  1407. Use with caution, it allows everyone with network access to the
  1408. computer to go on the local harddiscs. Use only in a trusted
  1409. environment with a firewall or not connected to the Internet.</p>
  1410. <h2>USAGE</h2>
  1411. <dl>
  1412. <dt>-s</dt>
  1413. <dd> Start a secured samba server, i.e. one
  1414. that does not allow guest access. 'fileserver' will prompt you for a
  1415. username and a password. This is the default if no arguments are given.
  1416. </dd>
  1417. <dt> -g</dt>
  1418. <dd> Run a guest enabled samba server. This
  1419. will give anyone full access to the disks of your TRK running computer.
  1420. Use only in an environment you can trust! </dd>
  1421. <dt> -r</dt>
  1422. <dd> Shares are read-only. </dd>
  1423. <dt> stop</dt>
  1424. <dd style="margin-bottom: 0.2in;"> Stops the samba server and unmounts the local filesystems. </dd>
  1425. </dl>
  1426. <p><br>
  1427. &nbsp;</p>
  1428. <h2>EXAMPLE 1</h2>
  1429. <p>TRK to TRK use of fileserver. <br>
  1430. Suppose that we have two PCs both running TRK on the same network. <br>
  1431. We run fileserver on one PC which tells us that its ip-address is, for example, 1.2.3.4 in green characters. <br>
  1432. Then, from the other PC, we give the command: mount //1.2.3.4/hda1 /mnt1 ( fileserver started as guest )</p>
  1433. <dl>
  1434. <dt>or<br>
  1435. </dt>
  1436. <dt><br>
  1437. </dt>
  1438. <dt>mount //1.2.3.4/hda1 /mnt1 -o user=your_user_name ( secured ) A password will be requested. <br>
  1439. </dt>
  1440. <dt>In guest mode, just hit the Enter key <br>
  1441. </dt>
  1442. <dt>In secured mode, enter the applicable password and hit Enter. <br>
  1443. </dt>
  1444. <dt>The selected partition (in this case hda1) of the remote PC (the fileserver) can now be accessed locally as /mnt1.</dt>
  1445. </dl>
  1446. <h2>EXAMPLE 2</h2>
  1447. <dl>
  1448. <dt>TRK as seen from a Windows machine<br>
  1449. </dt>
  1450. <dt>Run the fileserver from the TRK&nbsp;3.4&nbsp;simple menu<br>
  1451. </dt>
  1452. <dt><br>
  1453. </dt>
  1454. <dt><img alt="" src="helpdocs_files/trk34_start_fileserver.png" width="[object Object]" align="middle"><br>
  1455. </dt>
  1456. <dt><br>
  1457. </dt>
  1458. <dt>On your windows machine, click Start =&gt;&nbsp;Run (Vista and 7 "Start" =&gt; "Search" or winkey +r)<br>
  1459. </dt>
  1460. <dt><br>
  1461. </dt>
  1462. <dt><img alt="" src="helpdocs_files/run-fileserver-unc.png" height="177" width="346" align="middle"><br>
  1463. </dt>
  1464. <dt><br>
  1465. </dt>
  1466. <dt>Browse the TRK&nbsp;fileserver, read and write access.<br>
  1467. </dt>
  1468. <dt><br>
  1469. </dt>
  1470. <dt><img alt="" src="helpdocs_files/fileserver-explorer.png" height="600" width="800" align="middle"><br>
  1471. </dt>
  1472. <dt><br>
  1473. </dt>
  1474. </dl>
  1475. <p>&nbsp;</p><br><a name="20T4DLR6P2JZL5SVUKVM5FB7MQPKJQUCFC6INMF3FQSSK" &nbsp;="" id="20T4DLR6P2JZL5SVUKVM5FB7MQPKJQUCFC6INMF3FQSSK"></a><h1>2.10 Bridge</h1><p>
  1476. <style type="text/css">
  1477. <!--
  1478. @page { margin: 0.79in }
  1479. P { margin-bottom: 0.08in }
  1480. H1 { margin-bottom: 0.08in }
  1481. H1.western { font-family: "Times New Roman", serif }
  1482. H1.cjk { font-family: "Bitstream Vera Sans" }
  1483. H1.ctl { font-family: "Bitstream Vera Sans" }
  1484. H2 { margin-bottom: 0.08in }
  1485. -->
  1486. </style>
  1487. </p><p>Suppose you have a PC of which of which you like to know what
  1488. traffic it generates. Or suppose you have a router on which you like to
  1489. know what traffic passes by. Well, "bridge" will create you a <strong>transparent connection between ethernet cards</strong>
  1490. that passes all traffic and on which you can start sniffing what passes
  1491. by. You could use an old fashion hub that replicates all traffic to all
  1492. of its ports, but nowadays that is almost inexistent, almost any cheap
  1493. hub is in fact a switch that only replicates traffic to the port it is
  1494. needed. In that case, put a computer with TRK in between your
  1495. connection.<br>
  1496. <br>
  1497. <strong>What you need</strong><br>
  1498. <br>
  1499. is a computer with at least 2 network cards and the latest TRK to boot from.<br>
  1500. <br>
  1501. -Once the network cards are connected on both sides (on on the PC, one on the network), <strong>run 'bridge up'</strong>.
  1502. This will setup a bridge and traffic will transparently pass from one
  1503. side to the other. One note here which is quite important: make sure
  1504. only 1 network card has its own ip-address, let the other one without
  1505. (if they both have one, do an 'ifconfig eth1 down' f.i.). I will
  1506. explain this later.<br>
  1507. <br>
  1508. -Now, start sniffing with tcpdump. Run it like this: 'tcpdump -i eth0'
  1509. In this way, you see ALL traffic headers that pass by. If you need to
  1510. filter something specific, use "grep" to get it out. F.i. you need to
  1511. see all http traffic going to 10.0.1.20, run this: 'tcpdump -i eth0 |
  1512. grep 10.0.1.20 | grep http'<br>
  1513. <br>
  1514. About the single ip-address: I have noticed that if you connect two
  1515. network cards to the same network and let them both get an ip-address
  1516. through dhcp (which will subsequently be addresses in the same network
  1517. range) and afterwards connect one to a pc to start sniffing, tcpdump
  1518. will go berzerk and no output will be shown but your TRK will give the
  1519. impression of hanging and will not respond to a ctrl+c signal very
  1520. quickly. After about 10 seconds, it will stop. But you will have
  1521. noticed that sniffing doesn 't work. Well, if one card doesn 't have an
  1522. address, this problem doesn 't occur. So leave at least one nic down.
  1523. You can even leave both down, you don 't need an ip-address to sniff
  1524. the network, "bridge" will bring up both cards in promiscuous mode and
  1525. make a bridge interface "br0".<br>
  1526. <br>
  1527. To bring the bridge down, just type 'bridge down'</p>
  1528. <p>Also read the online manpage on this:</p>
  1529. <p><a href="http://trinityhome.org/manpages/man8/bridge.8.html">http://trinityhome.org/manpages/man8/bridge.8.html</a></p>
  1530. <p></p><br><a name="PSTEW6D05PZF2FK7VHGLCYWQZWP8T538NMCAJF0FVPLMV" &nbsp;="" id="PSTEW6D05PZF2FK7VHGLCYWQZWP8T538NMCAJF0FVPLMV"></a><h1>2.11 Setip</h1><p>Use this whenever you want to enter a fixed ip address for your network cards</p>
  1531. <h2>Usage</h2>
  1532. <p>setip &lt;interface&gt; | -h<br>
  1533. This command sets the ip information of your network card(s)<br>
  1534. Without an argument, it assumes your network card is eth0<br>
  1535. 'setip -h' shows the help output<br>
  1536. Here 's what&nbsp; the command does:<br>
  1537. <br>
  1538. '<font face="Courier New">setip eth1<br>
  1539. Enter the IP-address for eth1: 10.0.0.1<br>
  1540. Enter the subnet mask for eth1: 255.255.255.0<br>
  1541. Enter the default gateway, &lt;enter&gt; for none: 10.0.0.254<br>
  1542. Enter the IP-address of the DNS server you 'd like to use, &lt;enter&gt; for none: 10.0.0.3<br>
  1543. <br>
  1544. Setting ipaddress 10.0.0.1/255.255.255.0 on eth1<br>
  1545. Setting default gateway to 10.0.0.254<br>
  1546. Setting nameserver 10.0.0.3 in /etc/resolv.conf'</font></p>
  1547. <p>Also read the online manpage on this:</p>
  1548. <p><a href="http://trinityhome.org/manpages/man8/setip.8.html">http://trinityhome.org/manpages/man8/setip.8.html</a></p><br><a name="WU8QP3M0YGLR9XQ8V4MW69X4SZF6ZM1L701LTECHLNZLB" &nbsp;="" id="WU8QP3M0YGLR9XQ8V4MW69X4SZF6ZM1L701LTECHLNZLB"></a><h1>2.12 Setproxy</h1><p>
  1549. <style type="text/css">
  1550. <!--
  1551. @page { margin: 0.79in }
  1552. P { margin-bottom: 0.08in }
  1553. -->
  1554. </style>
  1555. </p><p>This script prompts you for proxy server settings, should you be
  1556. unable to go directly onto the Internet. Use it without any arguments,
  1557. it will prompt you for proxy ip-address or hostname, proxyport (usually
  1558. 8080) and optionally username and password (invisible). If no
  1559. username/password is required, just leave it blank and hit enter.<br>
  1560. <br>
  1561. This script can also be called upon startup in the bootmenu.<br>
  1562. <br>
  1563. Usage: 'setproxy'<br>
  1564. <br>
  1565. <br>
  1566. If you want your proxyserver to always be included, I recommend you set
  1567. up your LAN to be "TRK-aware", explained later in this documentation.<br>
  1568. <br>
  1569. Setproxy sets the proxy settings for these applications:<br>
  1570. <br>
  1571. -wget<br>
  1572. -links<br>
  1573. -ClamAv<br>
  1574. -F-prot<br>
  1575. -BitDefender<br>
  1576. -general http_proxy environment variable</p>
  1577. <p>Also available for reading is the online manpage:</p>
  1578. <p><a href="http://trinityhome.org/manpages/man8/setproxy.8.html">http://trinityhome.org/manpages/man8/setproxy.8.html</a></p>
  1579. <p><br>
  1580. &nbsp;</p>
  1581. <p></p><br><a name="C3E9S86L5Q2DV4J2X7FRSW3NCGQ426N40T3HR0UMGLR1F" &nbsp;="" id="C3E9S86L5Q2DV4J2X7FRSW3NCGQ426N40T3HR0UMGLR1F"></a><h1>2.19 Ntfsundeleteall</h1><p>This script is a simple wrapper for the utility 'ntfsundelete'<br>
  1582. <br>
  1583. What it does is <strong>find all deleted files on an ntfs volume and tries to recover them</strong>.
  1584. It does this by looking for traces in the ntfs Master File Table and
  1585. sees whether the file is still available on the disk (or partially
  1586. overwritten). It 's a good utility that recovers your files with the
  1587. original filename but without the relevant path in front. So to avoid
  1588. double recovered filenames, I 've written the script so that it
  1589. prepends the original inode (=internal number for the file on the
  1590. filesystem) before the filename, so you always have a unique filename.
  1591. It 's up to you to rename the files afterwards, but at least you have
  1592. the original name in the recovered filename.<br>
  1593. <br>
  1594. <strong>Here 's how the script works</strong><br>
  1595. <br>
  1596. Suppose you have the volume /dev/hda1 in ntfs from which you wish to recover files.<br>
  1597. Make sure this volume is NOT mounted<br>
  1598. Prepare a place to which you can store your recovered files. Recovered
  1599. files will never be written to the original partition from which you
  1600. recover them because the risk exists you will overwrite other files
  1601. that still need recovery. Let 's say you have space on a network volume
  1602. that you 've mounted on /mnt0 (for this procedure, see the section
  1603. "Getting around with commands"), with a subdir called "recovered"<br>
  1604. Here 's the syntax of ntfsundeleteall: <br>
  1605. ntfsundeleteall Device Savedir [minimum percentage] --force<br>
  1606. <br>
  1607. Now here 's how we do it in our example:<br>
  1608. 'ntfsundeleteall /dev/hda1 /mnt0/recovered'<br>
  1609. <br>
  1610. This is very simple, this will recover any file it finds, even if only
  1611. 1% of the file is recoverable. You 're probably not interested in that,
  1612. because these files are most likely to be corrupt and unusable, so you
  1613. add a parameter on the percentage you wish the file is recoverable. If
  1614. we only want 100% recoverability, make the command like this:<br>
  1615. <br>
  1616. 'ntfsundeleteall /dev/hda1 /mnt0/recovered 100'<br>
  1617. <br>
  1618. You will see the directory /mnt0/recovered filling up with recovered files, hopefully your file is in there.<br>
  1619. <br>
  1620. You might have noticed the parameter "--force". This will only skip the
  1621. check that your filesystem is ntfs, you can use this if you think your
  1622. filesystem is so badly damaged that it won 't even be recognized
  1623. anymore, but I doubt you will be even capable of recovering any files
  1624. then.<br>
  1625. <br>
  1626. Another recommendation I can give you is Photorec. Photorec is a third
  1627. party utility that is able to recover files in a unique way: it is
  1628. independent of the filesystem, it just does raw read of the disk (tries
  1629. to use as much info as it can from whatever filesystem there was on it)
  1630. and tries to recognize known document formats to recover whatever it
  1631. can find. Although the name implies it might only serve to recover
  1632. pictures, it can in fact recover any kind of important document,
  1633. including word and excel, but also file archives such as zip and tar.gz.<br>
  1634. <br>
  1635. The only thing you won 't get from this utility is the original
  1636. filename, so you 'll have to sort out your recovered documents one by
  1637. one.</p><br><a name="MFRIGTQ75RPR5IIC4TXNKUF95JATHDEUIV3PEIMA01RV9" &nbsp;="" id="MFRIGTQ75RPR5IIC4TXNKUF95JATHDEUIV3PEIMA01RV9"></a><h1>2.13 Getswap</h1><p>Find
  1638. swapspace in Windows pagefiles and swap partitions and use it as
  1639. tempspace. This script is called upon by virusscan and updatetrk to
  1640. find more working memory. In normal circumstances your available ram
  1641. should suffise. </p>
  1642. <p>Getswap will remount /dev/shm and make more shared memory available
  1643. (in e.g. /tmp/) Sometimes you have too little RAM, so a swapdisk is a
  1644. reasonable alternative to gain memory. </p>
  1645. <h2>USAGE </h2>
  1646. <p>
  1647. <style type="text/css">
  1648. <!--
  1649. @page { margin: 0.79in }
  1650. P { margin-bottom: 0.08in }
  1651. -->
  1652. </style>
  1653. </p><p>getswap -s &lt;SIZE in % of total memory&gt; -d -f</p>
  1654. <p></p>
  1655. <p><size memory="" total="" of="" in="">-s SIZE: this parameter allows you to tweak how much of the ram will be made available for /dev/shm (=/tmp in TRK). <br>
  1656. Sometimes you need a huge amount of tempspace. With this parameter you
  1657. can specify the size in percentage of the total amount of memory
  1658. (RAM+swap). Default figure is 50%. </size></p>
  1659. <p><size memory="" total="" of="" in="">-d: disable swap usage and return to original memory situation if possible </size></p>
  1660. <p><size memory="" total="" of="" in="">-f: force disabling even if too much tempspace is used. Will not work if the tempspace is more than 100% of the amount of RAM. <br>
  1661. Will fail at even less. </size></p><br><a name="U49HULJB0RZJRSQX054MZS1LH8P05M7QG7X0I628MRH48" &nbsp;="" id="U49HULJB0RZJRSQX054MZS1LH8P05M7QG7X0I628MRH48"></a><h1>2.14 Trinisup</h1><p>
  1662. <style type="text/css">
  1663. <!--
  1664. @page { margin: 0.79in }
  1665. P { margin-bottom: 0.08in }
  1666. H2 { margin-bottom: 0.08in }
  1667. -->
  1668. </style>
  1669. </p>
  1670. <p>Trinisup is a tiny utility that connects to a remote server and sets
  1671. up a tunnel to your local TRK. It allows the TRK support team to
  1672. connect to your TRK and share a local console, allowing full access to
  1673. your computer. Trinisup uses ssh with a private key to connect as a
  1674. user to the remote trinityhome.org support server. This user is not
  1675. active until the support team has activated it. So in order to get
  1676. help, you will first have to contact the TRK guys, who can then
  1677. activate this user and provide assistance.</p>
  1678. <h2>USAGE</h2>
  1679. <p>Usage is very simple. Just run 'trinisup'. By default it maps port
  1680. 30000 to your local port 22 (which runs an ssh server). If port 30000
  1681. is already occupied, you can specify an alternate port as an argument
  1682. to trinisup. <br>
  1683. For example: 'trinisup 30001' <br>
  1684. Once the connection is established, you will get a non-interactive message displaying that you are connected. <br>
  1685. Hitting &lt;enter&gt; will disconnect this session as long as no one is
  1686. connected to your computer. If a session is still in progress, this
  1687. connection will only exit as soon as the session is terminated or you
  1688. press ctrl+c <br>
  1689. You need tcp port 443 to be open to the outside world. All other connections happen inside the tunnel.</p>
  1690. <p>A shared local console can be accessed by tapping alt+F6</p>
  1691. <p>&nbsp;</p><br><a name="FKJT61FZ5GVCPWKXWTXSLUF6CQM3YVP36YM2QSRKZCNEY" &nbsp;="" id="FKJT61FZ5GVCPWKXWTXSLUF6CQM3YVP36YM2QSRKZCNEY"></a><h1>2.15 Pi - automated backup wrapper script originally for Partition Image</h1><p>Pi
  1692. is a third party tool contributed by a few great guys (also responsible
  1693. for the TRK&nbsp;menu) who wish to remain anonymous.&nbsp;Below is the
  1694. (elaborate) manpage.</p>
  1695. <h2>NAME</h2>
  1696. <p>pi - automated backup wrapper script originally for Partition Image</p>
  1697. <h2>SYNOPSIS</h2>
  1698. <p>pi -c -i [CONFIG FILE] -a -k [NUMBER OF COPIES] -d&nbsp;</p>
  1699. <h2>DESCRIPTION</h2>
  1700. <p>The pi script was designed for:</p>
  1701. <p>make possible a fully automated backup system. <br>
  1702. facilitate the use of partimage.&nbsp;</p>
  1703. <h2>OPTIONS</h2>
  1704. <p>Type pi then &lt;RETURN&gt; to launch interactive mode.</p>
  1705. <dl compact="compact">
  1706. <dt><b>-c :</b></dt>
  1707. <dd> <b>search a
  1708. pi.cfg configuration file and loads it if found. If this file contains
  1709. the parameter AUTO=1, the backup will run automatically. </b></dd>
  1710. <dt><b>-a :</b></dt>
  1711. <dd> <b>Starts the backup automatically (same as AUTO=1 in pi.cfg) </b></dd>
  1712. <dt><b>-k # :</b></dt>
  1713. <dd> <b>This option (keep) sets the number of copies of the image to be kept. See details in Section </b><i>Old backups</i> below </dd>
  1714. <dt><b>-d :</b></dt>
  1715. <dd> <b>debug
  1716. mode. The backup will not be actually launched and the command that
  1717. would have launched partimage is only displayed on the screen </b></dd>
  1718. <dt><b>Trick :</b></dt>
  1719. <dd> <b>If you execute pi with -c -d, you will see which partition(s) and destination are selected from the found pi.cfg file.<br>
  1720. </b> </dd>
  1721. </dl>
  1722. <h2>FILES</h2>
  1723. <dl compact="compact">
  1724. <dt><b>pi.cfg :</b></dt>
  1725. <dd> <b>pi can use a configuration file. This file is not needed in interactive mode. This file has two purposes : </b>
  1726. <dl compact="compact">
  1727. <dt><br>
  1728. </dt>
  1729. <dd>
  1730. <dl compact="compact">
  1731. <dt><b>Add menu entries
  1732. <dd> pi automatically creates the list of your local drives. If you want to backup to a network drive, you must add it in pi.cfg </dd>
  1733. </b></dt>
  1734. <dt><b>Automatic mode
  1735. <dd>
  1736. All selections can be set in pi.cfg and then pi can run without any
  1737. user intervention A pi.cfg file corresponding to your backup is created
  1738. in the destination directory each time a backup is successful. </dd>
  1739. </b></dt>
  1740. </dl>
  1741. </dd>
  1742. </dl>
  1743. </dd>
  1744. <dt><b>partition_info.txt :</b></dt>
  1745. <dd> <b>Each time you make a backup, a file named </b><i>partition_info.txt</i>
  1746. is created in the destination directory. This file contains information
  1747. on your partitions (all partitions of all local drives, even USB disks
  1748. or USB keys). This may be useful in case you have to repartition your
  1749. disk after a crash. <br>
  1750. <b>WARNING :</b> partimage is unable to
  1751. restore an image on a partition smaller than the original partition.
  1752. See the documentation of partimage for details. Therefore it is very
  1753. important to know the size of the partition that an image contains.
  1754. unpi, the complementary script of pi, will give this information but
  1755. you can also find it in partition_info.txt. </dd>
  1756. &nbsp;</dl>
  1757. <h2>MOUNT POINT</h2>
  1758. <p>pi mounts the backup unit you have chosen on /sysbackup&nbsp;</p>
  1759. <h2>RELATED SCRIPTS</h2>
  1760. <p>Well, you have make an image not only for the fun, you may want to restore it one day. You can use partimage or <b>unpi</b> the little brother of pi which will help you for restore in the same way that pi helps you for backup.&nbsp;</p>
  1761. <h2>INTERACTIVE MODE</h2>
  1762. <p>If the pi script is run with the <b>-c</b>
  1763. option, and there is a pi.cfg file in the root directory of any disk in
  1764. the machine, or in /trk/trk3/pi or in /etc/pi and all options necessary
  1765. are set, then pi is launched automatically, using the pi.cfg
  1766. parameters. If pi.cfg is not found or uncomplete, pi exits immediatly.</p>
  1767. <dl compact="compact">
  1768. <dt>*</dt>
  1769. <dd> If the pi script is run without the <b>-c</b> option then pi is launched interactively and three successive menus ask the user to select: </dd>
  1770. <dt>*</dt>
  1771. <dd> The unit or units to save. </dd>
  1772. <dt>*</dt>
  1773. <dd> The destination disk that store the backup (local drive or network) </dd>
  1774. <dt>*</dt>
  1775. <dd> The destination disk list may be customized using MENU_UNIT[], MENU_LOGIN[] and MENU_PASS[] in pi.cfg file. </dd>
  1776. <dt>*</dt>
  1777. <dd> The destination directory </dd>
  1778. <br>
  1779. </dl>
  1780. <dl compact="compact">
  1781. <dt>a) The partitions to save</dt>
  1782. <dd>Here
  1783. you can select a partition in the list of partitions found by the
  1784. system, or select "information on partitions" for more information on
  1785. your partitions, or select "select several partitions”. In this case
  1786. you must type the names of the partitions to save as they appear in the
  1787. list, separated by spaces. For example: <br>
  1788. hda1 sda1 </dd>
  1789. <dt>b) The destination drive (the one on which the backup will be saved).</dt>
  1790. <dd>A
  1791. list presents successively the units defined in pi.cfg and the units
  1792. that the system finds on local disks. After selecting the unit, the
  1793. script will attempt to mount the disk. If it fails, an error message is
  1794. sent and the script stops. Possible causes include, among others: <dl compact="compact">
  1795. <dt><br>
  1796. </dt>
  1797. <dd>
  1798. <dl compact="compact">
  1799. <dt> <br>
  1800. </dt>
  1801. <dd>1.
  1802. You have chosen an NTFS partition and Windows has been put in hibernate
  1803. state on the disk. In this case, NTFS partitions are not closed and
  1804. they cannot be mounted rread/write, you can only read. It is possible
  1805. to make a backup of such partition, but you cannot use it as the
  1806. destination unit. To avoid this error, completely shut down Windows
  1807. before starting TRK Autobackup. Since TRK revision 3.4 : hibernated
  1808. partition cannot be written, but the state of other not closed
  1809. partitions is normally solved by ntfs-3g which is able to successfully
  1810. mount them for writing. However it is always better to properly shut
  1811. down Windows before making a backup. </dd>
  1812. <dt> <br>
  1813. </dt>
  1814. <dd>2.
  1815. The system also put in the list extended partitions, which can disturb.
  1816. An extended partition is a mere container and cannot receive files. For
  1817. information on how your partitions are made, use the "information about
  1818. partitions" option of the main menu. </dd>
  1819. <dt> <br>
  1820. </dt>
  1821. <dd>3.
  1822. You have selected a network drive and the network connection is not
  1823. good, or your LOGIN and PASSWORD parameters are incorrect. </dd>
  1824. </dl>
  1825. <p>&nbsp;</p>
  1826. </dd>
  1827. </dl>
  1828. </dd>
  1829. <dt>c) The destination directory</dt>
  1830. <dd>In
  1831. the destination device previously defined, the script can either use
  1832. the existing directories that are presented here, or a new directory:
  1833. in this case select the last option and type a directory name <b>without spaces in its name.</b> We are in Linux which does not accept spaces in the names of directories and files. <br>
  1834. Then the script will present you a summary of your choices that you can confirm or reject by <b>y</b>(es). or <b>n</b>(o).
  1835. In the last case the script closes. Finally before running the backup a
  1836. last message information is presented. You can again interrupt the
  1837. process by pressing any key other than SPACE or ENTER, or type on ENTER
  1838. to immediately start the backup, or let the script look after himself.
  1839. After 15 seconds, if you do nothing, it will launch the backup. </dd>
  1840. </dl>
  1841. <h2>AUTOMATIC MODE</h2>
  1842. <p>To
  1843. enable automatic operation, you must file a pi.cfg in the root
  1844. directory of a partition of the machine (all mountable partitions are
  1845. scanned) or in /trk/trk3/pi (for TRK users) or in /etc/pi and the
  1846. script must be launched with option <b>-c</b>. The first file found will be used. <br>
  1847. If the file is found, the parameters are loaded and the backup is
  1848. started. This backup will be excuted without any user intervention if
  1849. all necessary parameters are set in the file and if AUTO has been set
  1850. to 1. but there are two confirmation messages which are displayed for
  1851. 10 or 15 seconds, and during this time you may stop the process before
  1852. the backup starts. If AUTO=0, then a confirmation is requested from the
  1853. user. If you add the command pi <b>-c</b>
  1854. to your trklocscript file in the trk3 directory, then you can have a CD
  1855. or USB key which will backup the partitions you have defined without
  1856. any intervention of the operator : just boot on the CD or the USB key,
  1857. and you are done. This is handy if you want users who don't know
  1858. anything about computers to be able to save their system disk from time
  1859. to time.</p>
  1860. <p>&nbsp;</p>
  1861. <p>To setup automatic mode, the recommended steps are :</p>
  1862. <p>&nbsp;</p>
  1863. <dl compact="compact">
  1864. <dt>*</dt>
  1865. <dd> Use pi in normal interactive mode to make your first backup. </dd>
  1866. <dt>*</dt>
  1867. <dd>
  1868. Once you are satisfied and anything works as you want, locate the the
  1869. pi.cfg file which has been created in your successful backup directory </dd>
  1870. <dt>*</dt>
  1871. <dd>
  1872. Copy this file in the root of your first drive (any other drive can be
  1873. chosen, but it is more easy to use the first one, generally sda1 or c:)
  1874. </dd>
  1875. <dt>*</dt>
  1876. <dd>You can edit this file in Linux or
  1877. Windows if you want to change something, Windows end of lines are
  1878. supported. Complete description of this file format is explained below
  1879. in the section <i>CONFIGURATION FILE</i>. </dd>
  1880. <dt>*</dt>
  1881. <dd> At this point, if you run <b>pi -c</b> your backup will start automatically. You will have two occasions offered to you to stop it.
  1882. <p>If
  1883. you add the command pi -c in the trklocscript file in the trk3
  1884. directory of your TRK disk, then it is possible to start a backup by
  1885. just booting on this disk, without any further intervention.
  1886. Complementary details are found in the FAQ. $$$</p>
  1887. </dd>
  1888. </dl>
  1889. <h2>FILES CREATED</h2>
  1890. <p>Pi creates three files (or file set) in the destination directory :</p>
  1891. <dl compact="compact">
  1892. <dt>*</dt>
  1893. <dd> The partimage files with extension .000, .001 .002 etc. </dd>
  1894. <dt>*</dt>
  1895. <dd> a pi.cfg file with the configuration you have just used and which can be used for automatic process. </dd>
  1896. <dt>*</dt>
  1897. <dd>a
  1898. partition-info.txt file, which contains the details of your hard disks
  1899. configuration. It may be very useful in case you must reformat your
  1900. disk <p>&nbsp;</p>
  1901. </dd>
  1902. </dl>
  1903. <h2>BACKUP SCREEN</h2>
  1904. <p>During
  1905. the backup, partimage shows a screen that displays the progress of the
  1906. operation. Despite the message that is displayed at the bottom of the
  1907. screen, it is unfortunately not possible to interrupt a backup because
  1908. the * option does not work. This is a bug in partimage. If you want to
  1909. stop anyway, you can do a ctrl+alt+del. You will just need to think
  1910. about delete the created files.<br>
  1911. &nbsp;</p>
  1912. <h2>OLD BACKUPS</h2>
  1913. <p>The
  1914. script handles the number of copies of your partitions you want to
  1915. keep. The default is 2 (the copy you just made, and one older). This
  1916. value can be changed with the option -k. 4 will mean : the image just
  1917. made + 3 older copies (total : 4 copies). Examples :</p>
  1918. <dl compact="compact">
  1919. <dt><br>
  1920. </dt>
  1921. <dd> -k1 : One image : all older images are deleted <br>
  1922. -k2 : The last image + 1 older image (default) <br>
  1923. -k3 : The last image + 2 older images <br>
  1924. <br>
  1925. -kn : The last image + (n-1) older images <br>
  1926. <br>
  1927. -k0 : Special mode (see below : IN CASE OF LOW SPACE IN THE
  1928. DESTINATION) The digit does not mean the number of older copies but the
  1929. total number : -k2 will not keep two older copies but one. </dd>
  1930. </dl>
  1931. <p>The behaviour is the following :</p>
  1932. <dl compact="compact">
  1933. <dt><br>
  1934. </dt>
  1935. <dd>
  1936. <dl compact="compact">
  1937. <dt> <br>
  1938. </dt>
  1939. <dd>a) the current backup is performed into temporary files. </dd>
  1940. <dt> <br>
  1941. </dt>
  1942. <dd>b) these temporary backup files are renamed with their final backup filenames, like 20YY-MM-DD-X-hda1.000 </dd>
  1943. <dt> <br>
  1944. </dt>
  1945. <dd>c)
  1946. a sub-directory is created with the following name:
  1947. 20YY-MM-DD-saved_partition, for example: 2010-06-22-hda2 and the
  1948. current backup files of this partition are transferred under this
  1949. sub-directory. </dd>
  1950. <dt> <br>
  1951. </dt>
  1952. <dd>d)
  1953. depending of the number specified with the k option, old backups are
  1954. deleted: for example, if user has specified pi -c -k 4 and there are
  1955. already 3 existing 20YY-MM-DD-saved_partition sub-directories, the
  1956. oldest one will be automatically removed once the current backup will
  1957. have successfully completed. </dd>
  1958. &nbsp;</dl>
  1959. </dd>
  1960. </dl>
  1961. <p>&nbsp;</p>
  1962. <h2>CONFIGURATION FILE (pi.cfg)</h2>
  1963. <p>&nbsp;</p>
  1964. <p>CAUTION: The name of the configuration file is pi.cfg or PI.CFG or Pi.cfg. ALL OTHER SPELLINGS WILL BE IGNORED.</p>
  1965. <p>Spaces are not allowed in file names or directory (replace them by _ or -)</p>
  1966. <p>When
  1967. you have completed a backup, the destination directory contains a
  1968. pi.cfg file corresponding to the options you had choosed. Here is a
  1969. possible example :</p>
  1970. <p>&nbsp;</p>
  1971. <p>___________________________________________________________________</p>
  1972. <p># No space before and after the = sign <br>
  1973. # The names are case-sensitive <br>
  1974. # No backslashs: \, only slashs/</p>
  1975. <p>&nbsp;</p>
  1976. <p># MENU_UNIT[x]=//192.168.1.4/sysbackup specify a network disc to be displayed in the interactive choice of BACKUPDRIVE <br>
  1977. # MENU_LOGIN[x]=//192.168.1.4/sysbackup specify login of the network
  1978. disc[x] displayed in the interactive choice of BACKUPDRIVE <br>
  1979. # MENU_PASS[x]=//192.168.1.4/sysbackup specify password of a network
  1980. disc[x] displayed in the interactive choice of BACKUPDRIVE <br>
  1981. # x index start at number 1. Several network discs may be specified using different indexes. <br>
  1982. # Destination automatic backup unit. It may be a network drive, for example: <br>
  1983. # BACKUPDRIVE =//192.168.1.4/sysbackup <br>
  1984. # In this case the parameters LOGIN and PASSWORD are required <br>
  1985. # Or a local unit such as BACKUPDRIVE=/sdb1 <br>
  1986. BACKUPDRIVE=//192.168.1.4/sysbackup <br>
  1987. LOGIN=mylogin <br>
  1988. PASSWORD=mypass</p>
  1989. <p># Backup directory in automatic mode <br>
  1990. DEST=Lawrence</p>
  1991. <p># Beginning of backup files' names; <br>
  1992. # pi will generate 20YY-MM-DD-X- prefix in the filename of the unit to backup <br>
  1993. # (X=A for automatic and I for Interactive) and partimage will add the extension 000, 001 and so on. <br>
  1994. # Example : in Automatic mode, the resulting file should be : <br>
  1995. # âœ<b>20YY-MM-DD-A-hda1.000</b>❠<br>
  1996. # Example : in Intercative mode, the resulting file should be : <br>
  1997. # âœ<b>20YY-MM-DD-I-hda1.000</b>â</p>
  1998. <p># Partitions to backup in automatic mode <br>
  1999. # If there are multiple partitions, separate them by spaces, <br>
  2000. # and put it between quotation marks <br>
  2001. # Example PARTITION="sda1 sda5" <br>
  2002. PARTITION="sda1"</p>
  2003. <p># If AUTO=1 and a pi.cfg configuration file was found, <br>
  2004. # the backup is done without any user intervention <br>
  2005. AUTO=1 <br>
  2006. KEEP=2</p>
  2007. <p>___________________________________________________________________</p>
  2008. <p>&nbsp; </p>
  2009. <p><b>Remarks: </b></p>
  2010. <p>Always
  2011. use the forward slash and not the backslash: we are in Linux and not in
  2012. Windows. Long before Microsoft existed, the backslash was an escape
  2013. character on Unix. Only Microsoft's commitment to be "like no other"
  2014. has led to ignore this meaning and use the backslash in directories'
  2015. path. Linux meets Unix standards. There are never spaces before or
  2016. after the equal sign under penalty of non-functioning of the script.
  2017. The parameters' names are always written in uppercase.</p>
  2018. <p><b>BACKUPDRIVE:</b></p>
  2019. <p>You
  2020. may indicate a network drive, and in this case it will be also
  2021. mandatory to specify LOGIN and PASSWORD. The format will be:
  2022. //xxx.xxx.xxx.xxx/shared_directory_name. This can also be a local drive
  2023. and in this case the format will be, for instance: /dev/sda1. It is
  2024. prudent to use the complete device names returned by info on
  2025. partitions. /sda1 should work too, but /dev/sda1 is safer.</p>
  2026. <p><b>DEST:</b></p>
  2027. <p>This
  2028. is the destination directory to be used (and possibly created) in the
  2029. unit selected by BACKUPDRIVE. It is possible to select a subdirectory,
  2030. but in this case it is mandatory that the directory already exists.
  2031. Example:</p>
  2032. <p>&lt;FILE&gt; - &lt;partition&gt; .000 DEST=backup/system/unite_c</p>
  2033. <p>If the saved partitions are hda1 and hda5, the following files are created (X=A or I):</p>
  2034. <p>20YY-MM-DD-X-hda1.000 20YY-MM-DD-X-hda5.000</p>
  2035. <p><b>PARTITION:</b></p>
  2036. <p>This parameter contains the names of the partitions to backup. If there is one partition, you can simply specify it as follows: <br>
  2037. &nbsp; PARTITION=hda1 <br>
  2038. &nbsp; If there are multiple partitions, they must be separated by spaces and put between quotation marks: <br>
  2039. &nbsp; PARTITION="hda1 hda5" <br>
  2040. &nbsp; It is allowed to have spaces between quotation marks but it is
  2041. prohibited outside. PARTITION= "hda1 hda5" will not work because you
  2042. should never have a space before and after the = sign <br>
  2043. &nbsp; Note the different syntax from BACKUPDRIVE. There's no slash or /dev/.</p>
  2044. <p>&nbsp;</p>
  2045. <p><b>AUTO:</b></p>
  2046. <p>AUTO=1
  2047. enables automatic backup and a delay is placed on the confirmation
  2048. messages. It is possible to interrupt the process by pressing any key
  2049. other than SPACE or ENTER during the period. After the delay and
  2050. without user intervention, backup is started.</p>
  2051. <p>&nbsp;</p>
  2052. <p>&nbsp;</p>
  2053. <p><b>KEEP:</b></p>
  2054. <p>This parameter has the same meaning as the parameter -k (see the section "Old backups" above). The default value is 2.</p>
  2055. <p>&nbsp;</p>
  2056. <h2>IN CASE OF LOW SPACE ON THE DESTINATION</h2>
  2057. <p>using -k0 option</p>
  2058. <p>In
  2059. the normal process described above, there is a moment where you have
  2060. two images of your partition : one that is currently on temporary files
  2061. and one which is in the normal directory. If you do not have enough
  2062. space on your disk for this, you can use the <b>-k</b> option with a value of 1 or 0</p>
  2063. <p>&nbsp;</p>
  2064. <dl compact="compact">
  2065. <dt><b>-k1 </b></dt>
  2066. <dd> <b>If
  2067. you have enough disc space for two copies of the image but want to keep
  2068. only the last, this parameter will cause the following behaviour: </b>
  2069. <dl compact="compact">
  2070. <dt><br>
  2071. </dt>
  2072. <dd>
  2073. <p><b>a) creation of the new image in temporary files <br>
  2074. b) if the image was successful, the old image is erased <br>
  2075. c) the new image files are renamed. <br>
  2076. If the image had failed, temporary files remain on the disk. They will
  2077. be overwritten by the new image when you will try again to make one.
  2078. You can also delete them yourself. </b></p>
  2079. </dd>
  2080. </dl>
  2081. </dd>
  2082. <dt><b>-k0</b></dt>
  2083. <dd> <b>If you have just the place for an image, this parameter will give the following behavior: </b>
  2084. <dl compact="compact">
  2085. <dt><br>
  2086. </dt>
  2087. <dd> <b>a) erase the existing image <br>
  2088. b) creation of the new image <br>
  2089. Warning: this mode is not secure because if the creation of the new
  2090. image fails, the old image has already been erased. </b></dd>
  2091. </dl>
  2092. </dd>
  2093. </dl>
  2094. <p>&nbsp;</p>
  2095. <h2>FAQ</h2>
  2096. <dl compact="compact">
  2097. <dt> <br>
  2098. </dt>
  2099. <dd>Q: How can I make a fully automatic image system for my hard disk ? </dd>
  2100. <dt> <br>
  2101. </dt>
  2102. <dd>A:
  2103. The first step is to setup a pi.cfg file which will do what you want :
  2104. save your system partition or all your partitions to a given
  2105. destination. <br> Once this is done and you can run pi -c and get the
  2106. result you want, the hardest part is done. See above for all
  2107. informations on this step. <br>
  2108. Now you have to run this automatically when TRK starts. This is easy :
  2109. <dl compact="compact">
  2110. <dt><br>
  2111. </dt>
  2112. <dd>
  2113. <dl compact="compact">
  2114. <dt>*</dt>
  2115. <dd> Add a file with the name "trklocscript" in the trk3 directory of your TRK USB key or your TRK CD. </dd>
  2116. <dt>*</dt>
  2117. <dd> In this file add this line : <br>
  2118. pi -c <br>
  2119. You are done. </dd>
  2120. </dl>
  2121. </dd>
  2122. </dl>
  2123. </dd>
  2124. <dt> <br>
  2125. </dt>
  2126. <dd>Q: My computer does not boot on an USB device and I must boot on CD. I cannot copy a file to a CD. </dd>
  2127. <dt> <br>
  2128. </dt>
  2129. <dd>A:
  2130. When you burn your TRK CD, be careful to let the session open. This can
  2131. be configured if you are using CdBurnerXP on windows. Some versions of
  2132. Nero automatically close the session and don't let you add anything. <br>
  2133. - Open your CD in a CD burner program <br>
  2134. - Choose the option to continue the CD <br>
  2135. - add trklocscript as described above in the trk3 directory <br>
  2136. - burn your cd <br>
  2137. - Run it. You are done. </dd>
  2138. <dt> <br>
  2139. </dt>
  2140. <dd>Q: And what will happen with this CD/USB key ? </dd>
  2141. <dt> <br>
  2142. </dt>
  2143. <dd>A:
  2144. Just boot a computer which has a valid pi.cfg file in the root
  2145. directory of one of its disks, and the backup defined in that pi.cfg
  2146. file will be performed. If you had set AUTO=1, just sit back and relax
  2147. the job will be done automatically. If you are suspicious and want to
  2148. know what happens before it is performed, then set AUTO=0 and you will
  2149. have a confirmation screen. </dd>
  2150. <dt> <br>
  2151. </dt>
  2152. <dd>Q: I am lazy and I want a simpler solution </dd>
  2153. <dt> <br>
  2154. </dt>
  2155. <dd>A: OK. You must first create a TRK USB key with trk2usb. <br>
  2156. Add trklocsript to the trk3 directory of this key <br>
  2157. Ask a friend who has a computer which starts on USB key to start his
  2158. computer on your TRK USB key and to run the command : <br>
  2159. trk2iso <br>
  2160. N.B. He must first change to a directory with at least 150 Mo of free space <br>
  2161. Then ask him to give you the iso file created. <br>
  2162. Burn it and you are done. </dd>
  2163. <dt> <br>
  2164. </dt>
  2165. <dd>Q: This is not so simple </dd>
  2166. <dt> <br>
  2167. </dt>
  2168. <dd>A:
  2169. At first, yes. But once you have your USB key it is very easy to modify
  2170. it, and then ask your friend to create the new iso. If he is patient
  2171. enough, it is a good solution. <br>
  2172. </dd>
  2173. <dt> <br>
  2174. </dt>
  2175. <dd>Q: I don't want to run always pi on startup. Is it possible to have this feature enabled on a computer and not on another ? </dd>
  2176. <dt> <br>
  2177. </dt>
  2178. <dd>A:
  2179. Yes, it is easy : with the pi -c command in the trklocscript file, if a
  2180. computer has a pi.cfg file, pi will run when TRK starts. If a computer
  2181. does not have this file, then pi will appear for 3 seconds, then
  2182. disappear and the TRK menu will be shown. <dl compact="compact">
  2183. <dt><br>
  2184. </dt>
  2185. </dl>
  2186. </dd>
  2187. </dl>
  2188. <h2>LICENSE</h2>
  2189. <p>Public domain</p>
  2190. <h2>AUTHORS</h2>
  2191. <p>Frank Michel (for the menus), Gaston and Averell</p><br><a name="3HU5ZWWY8SYP7AEGNHT9CEDCSWG7RQEJXZELK1AJJYYGZ" &nbsp;="" id="3HU5ZWWY8SYP7AEGNHT9CEDCSWG7RQEJXZELK1AJJYYGZ"></a><h1>2.20 Clonexp (obsoleted by mclone)</h1><p>
  2192. <style type="text/css">
  2193. <!--
  2194. @page { margin: 0.79in }
  2195. P { margin-bottom: 0.08in }
  2196. -->
  2197. </style>
  2198. </p>
  2199. <p>Clonexp clones an ntfs partition to another computer over the
  2200. network. Both PCs must be running the same version of TRK.. The one who
  2201. is receiving the data must run with sshd enabled (triggerable from the
  2202. simple TRK menu)<br>
  2203. <br>
  2204. Basically what it does is run ntfsclone in save mode to stdout at one
  2205. computer and restore mode from stdin on the other, piping over ssh
  2206. between eachother.<br>
  2207. <br>
  2208. When running clonexp, make sure your source partition is smaller or
  2209. equal to what can fit on the destination. Ntfsclone (and subsequently
  2210. clonexp) cannot dynamically resize a partition, so it 's a good thing
  2211. to make the destination partition equal or bigger in size than the
  2212. source. Do this easily with parted, supplied on TRK. If your maximum
  2213. possible destination size is smaller than your source, try making your
  2214. source smaller with parted. At least, if the data on it is less than
  2215. the destination and the volume is not too fragmented.<br>
  2216. <br>
  2217. Also make sure neither of the local nor remote filesystems are mounted, or the script will exit.<br>
  2218. <br>
  2219. Clonexp can run in two modes: without any arguments, it runs in
  2220. interactive mode and prompts you for source device, destination host
  2221. and destination device. It will each time test whether these things
  2222. exist.<br>
  2223. <br>
  2224. You can also run it in a single commandline, in this way (drop the &lt;&gt;):<br>
  2225. clonexp &lt;sourcedevice&gt; &lt;destinationhost&gt;:&lt;destinationdevice&gt;<br>
  2226. e.g. 'clonexp /dev/hda1 192.168.0.7:/dev/hda1'<br>
  2227. <br>
  2228. It will prompt you once for the password you have entered on the remote
  2229. TRK machine and then start copying the data. There is also the option
  2230. '--bkupbr', which will first backup your partition bootrecord and later
  2231. save that as a file on your newly created partition. Although it may
  2232. never really serve, I give this opportunity should you ever be unable
  2233. to boot from the partition and you want to play around a bit with your
  2234. old bootrecord. This might as well completely obliterate your
  2235. partition, so use with caution (backups 'n stuff ready...)<br>
  2236. I was once able to make a cloned unbootable partition bootable this way
  2237. by afterwards running from the Windows XP recovery console and do a
  2238. chkdsk.<br>
  2239. It 's recommended you use clonexp only between computers which have the
  2240. same disk layout, or even better, are exactly the same hardware.<br>
  2241. Clonexp is obsoleted by mclone, which is more efficient, more bugfree and multiclient capable</p>
  2242. <p>&nbsp;</p><br><a name="4WP777Y6KKDSK5E2140SK6QED0J74GSY26W03JWEV0X5V" &nbsp;="" id="4WP777Y6KKDSK5E2140SK6QED0J74GSY26W03JWEV0X5V"></a><h1>3. Procedures</h1><p>Let
  2243. 's talk a little on what actions you should take in time of need, how
  2244. to best use TRK to perform troubleshooting, or how you even might work
  2245. with tools other than TRK.</p><br><a name="LIAT4IG4QYXT3EP1K2EVX276MK95G33SC3B7CH1S6NBZT" &nbsp;="" id="LIAT4IG4QYXT3EP1K2EVX276MK95G33SC3B7CH1S6NBZT"></a><h1>3.1 Rescueing files of dying harddiscs (mounting network =&gt; cp, ddrescue)</h1><p>
  2246. <style type="text/css">
  2247. <!--
  2248. @page { margin: 0.79in }
  2249. P { margin-bottom: 0.08in }
  2250. H2 { margin-bottom: 0.08in }
  2251. -->
  2252. </style>
  2253. </p><h2 lang="en-GB">Cool it!</h2>
  2254. <p style="margin-bottom: 0.17in;" lang="en-GB">When you have a
  2255. harddrive that is starting to die on you (bad clusters, physical
  2256. damage), it is imperative that you "upset" the disk as little as
  2257. possible. In most cases the cause of your dieing disk is heat: hard
  2258. drives can get very hot, especially when heavily used and poorly
  2259. cooled. A good consideration is to make sure that your disks are placed
  2260. freely floating so heat can get away easily. Also make sure that all of
  2261. your fans in your computer blow in the same direction. A standard here
  2262. is that fans in the front "inhale" air, while fans in the back of your
  2263. computer "exhale". If you are considering placing a fan inside your
  2264. computer directly on your disk, it is best practice to let it blow away
  2265. from the disk. This way you create a vacuum and no air anywhere, not
  2266. even in the smallest holes, can sustain in a vacuum.<br>
  2267. <br>
  2268. Another good practice is to attach your disks firmly to the computer,
  2269. so the iron from the chassis can guide away heat from the disk. Note:
  2270. Do this only by attaching the sides of the harddisks to the chassis.<br>
  2271. <br>
  2272. Now, in case it is already too late and your disk is dieing, it may be
  2273. that it works fine initially and then starts to make funny noises
  2274. afterwards: probably the bearings have worn out or the platters are
  2275. starting to distort and the heads are grating on the surface of the
  2276. disk.</p>
  2277. <h2 lang="en-GB">The most important thing here is to hurry up and get those files off that disk.</h2>
  2278. <p style="margin-bottom: 0in;"><span lang="en-GB">One suggestion I might give here might sound weird, but it worked for me already in many cases:<br>
  2279. </span><strong><span lang="en-GB">put the disk in the fridge</span></strong><span lang="en-GB">
  2280. for a while and then boot it up! Really, I'm not kidding. However,
  2281. don't freeze it, that will only make it worse. Put it in a normal
  2282. refrigerator and let it cool down in there. Also put a towel around it
  2283. to avoid condensation.<br>
  2284. Another possibility here is to connect your disk externally through a
  2285. disk-to-USB cable that you can buy for 20$ or less at your local
  2286. computer shop. (or connect the disk to an IDE cable that hangs out of
  2287. your PC like guts)<br>
  2288. Now, should you have that, go and look for that wine cooler pack you
  2289. got for your birthday, you know, those plastic things you put around a
  2290. bottle to keep it cool (or go and buy it at your local grocery store).
  2291. A gelpack to ease the muscles can also do the trick, but don't get it
  2292. out of the freezer where it's minus 18° Celsius, that is far too cold
  2293. and might damage your disk even more. Always wrap a towel around your
  2294. disk first.<br>
  2295. <br>
  2296. Now, once this is in place, you will have a better time window to start recovering files.</span></p>
  2297. <h2 lang="en-GB">What you can try, from good to bad to worst case scenario.</h2>
  2298. <p style="margin-bottom: 0in;" lang="en-GB">In the best case you will be still able to mount the filesystem on the disk. Use mountallfs to search for all local filesystems.<br>
  2299. <br>
  2300. Make sure you have a location to which you can copy your recovered
  2301. files. This can be another local disk or a remote network filesystem
  2302. such as a Windows share. How you should reach this safe haven is
  2303. explained earlier in this document (Getting around with commands).<br>
  2304. <br>
  2305. So let's assume a few things:<br>
  2306. <br>
  2307. -mountallfs manages to mount your filesystems on your dieing disk<br>
  2308. -you mount a remote network share:</p>
  2309. <p style="margin-bottom: 0in;" lang="en-GB">'mount -o username=administrator,password=mypassword //10.0.0.5/c$ /mnt0'<br>
  2310. -'cd /hda1' where hda1 is your dieing disk<br>
  2311. -do an 'ls' to see that you can still see files there.<br>
  2312. -go to the directory from which you would like to recover documents.
  2313. Don't start to try and copy all files, your time here is limited and it
  2314. is very likely that your disk is damaged in places where it has read
  2315. and written many times. In the case of a Windows system, this is the
  2316. WINDOWS system directory. Stay out of it, there are normally no
  2317. documents there.<br>
  2318. <br>
  2319. More likely you will do something like this:</p>
  2320. <p style="margin-bottom: 0in;" lang="en-GB">'cd /hda1/Documents\ and\ Settings/John\ Doe/My\ Documents'<br>
  2321. <br>
  2322. -If you don't know how many documents you are going to save, do an 'ls
  2323. -l'. If you see there are many subfolders, do an 'ls -lR' or 'du -h'.
  2324. 'ls -lR' is the equivalent of a dos 'dir /s', but it is better to do
  2325. 'du -h'. This will tell you how much data there is in this folder,
  2326. whether there are big files, small files, many files, etc...<br>
  2327. -Once you know this, estimate what you have to rescue. Listen to what
  2328. the disk has to say, if it starts making funny noises already, try to
  2329. save important data first.<br>
  2330. -Let's say all is well, start a copy (first make a remote dir to save your files to):<br>
  2331. 'mkdir /mnt0/recovered'<br>
  2332. 'cp -rvf * /mnt0/recovered' <br>
  2333. This command starts a copy of all files (*) to /mnt0/recovered, all
  2334. subdirs (r), shows the progress file by file (v) and forces overwriting
  2335. files on the remote location (f).<br>
  2336. <br>
  2337. If this works out: good for you.</p>
  2338. <h2 lang="en-GB">Otherwise...</h2>
  2339. <p style="margin-bottom: 0in;" lang="en-GB">If your disk starts to make funny noises and you see error messages such as</p>
  2340. <p style="margin-bottom: 0in;" lang="en-GB">"Disk Seek Complete Error",
  2341. this means we are running into bad clusters and your copy operation
  2342. will probably slow down dramatically.<br>
  2343. In this case, try to start copying files or folders more separately.
  2344. Skip the files first on which it runs into errors. There are other
  2345. means to (maybe) recover them later.<br>
  2346. If that works out, but you still need the other files, let's try something else.</p>
  2347. <p style="margin-bottom: 0in;" lang="en-GB">I recommend you let the
  2348. disk rest for a while by turning it off for about 20 minutes and put it
  2349. in the fridge wrapped in a towel.<br>
  2350. Once you've started it up again, you might have another go at copying
  2351. the bad files again, but cancel it as soon as you run into the same
  2352. problems again.<br>
  2353. <br>
  2354. In this case go over to using ddrescue.<br>
  2355. <br>
  2356. ddrescue takes an input file and copies it to an output file, just as a
  2357. normal dd would do. In this case, however, there are a few differences:
  2358. it tries to copy raw data from a file, but it will not try for too long
  2359. when it runs into bad, completely unreadable clusters; it will fill up
  2360. the unreadable spaces with zeroes.<br>
  2361. Example: 'ddrescue /hda1/Documents\ and\ Settings/John\ Doe/My\ Documents\outlook.pst /mnt0/recovered/outlook.pst'<br>
  2362. You can see here that the rescue is file by file. Here is a quick oneliner to rescue a complete directory.<br>
  2363. 'cd /hda1/Documents\ and\ Settings/John\ Doe/My\ Documents\; for i in *; do ddrescue "$i" "/mnt0/recovered/$i; done"'<br>
  2364. <br>
  2365. Another way of trying to rescue your data is to go and copy complete
  2366. disks or partitions. Just so you can be able to use Windows' chkdsk
  2367. later on the rescued filesystem, ddrescue the contents to another
  2368. partition on another disk. It is also possible to rescue the filesystem
  2369. to a file and try to mount the file as a loopback device from
  2370. Linux/TRK, but you won't be able to let Windows access it.<br>
  2371. So here goes an example (make sure nothing is mounted, neither source nor destination): 'ddrescue /dev/hda1 /dev/hdb1'<br>
  2372. In this case you will raw copy the complete contents of your partition
  2373. /dev/hda1 to /dev/hdb1. Make sure /dev/hdb1 is equal or bigger than
  2374. /dev/hda1<br>
  2375. Boot into Windows and let it run a chkdsk on it (or use the Windows install CD in recovery mode).<br>
  2376. If your filesystem is native Linux, such as an ext2 filesystem, you can
  2377. rescue it to a normal file somewhere and run e2fsck on it like that. <br>
  2378. Example: 'ddrescue /dev/hda1 /mnt0/rootfilesystem.img logfile-hda1'<br>
  2379. <br>
  2380. If ddrescue was unable to rescue all of your hda1 because it had to
  2381. skip certain sectors, try going into raw mode, which will bypass your
  2382. kernel disk i/o layer and read sector per sector. In raw mode it is
  2383. much slower, but ddrescue keeps its already completed work in a logfile
  2384. and only does the sectors that were skipped. <br>
  2385. Use it then like this: <br>
  2386. 'modprobe raw' <br>
  2387. 'raw /dev/raw/raw1 /dev/hda1' <br>
  2388. 'ddrescue -r3 /dev/raw/raw1 /mnt0/recovered-hda1.img logfile-hda1' <br>
  2389. Once you have this, restore the image to another disk that boots into a
  2390. normal PC into Windows and try running chkdsk against it.<br>
  2391. <br>
  2392. If it was a Linux filesystem (ext2 for example), there is no need to restore it:<br>
  2393. <br>
  2394. 'e2fsck -v -f /mnt0/ rootfilesystem.img'<br>
  2395. 'mount -o loop /mnt0/rootfilesystem.img /mnt1'<br>
  2396. &lt;= check your files...<br>
  2397. <br>
  2398. NOTE: it is not recommended to try and perform a filesystem check that
  2399. starts having physical I/O errors. It will probably make things even
  2400. more unrecoverable.</p>
  2401. <p></p><br><a name="QVQWIA3HK45X8M47KB6N7V5KDDAWB7HSSYD1Y78814V0G" &nbsp;="" id="QVQWIA3HK45X8M47KB6N7V5KDDAWB7HSSYD1Y78814V0G"></a><h1>3.2 Recovering deleted files or files from formatted drives (ntfsundeleteall, photorec)</h1><p>
  2402. <style type="text/css">
  2403. <!--
  2404. @page { margin: 0.79in }
  2405. P { margin-bottom: 0.08in }
  2406. H2 { margin-bottom: 0.08in }
  2407. A:link { so-language: zxx }
  2408. -->
  2409. </style>
  2410. </p><p style="margin-bottom: 0in;" lang="en-GB">In TRK, there are
  2411. several ways you can use to undelete files. What you should use depends
  2412. on the state of your harddisk/filesystem and the success of recovery
  2413. can vary between various methods.</p>
  2414. <h2 lang="en-GB">Ntfsundeleteall</h2>
  2415. <p style="margin-bottom: 0in;"><span lang="en-GB">The first method already explained earlier is </span><a href="http://trinityhome.org/Home/index.php?wpid=53&amp;front_id=12"><font color="#0000ff"><span lang="en-GB"><u>ntfsundeleteall (section 2.8)</u></span></font></a><span lang="en-GB">,
  2416. so I'm not going to re-explain this. What I should mention about this
  2417. method is that it has a high recoverability ratio on recently deleted
  2418. files (deleted in a normal way, not because of a crash or filesystem
  2419. corruption). It does however a poor job on drives that have already had
  2420. more write I/O over them. It is completely unusable on formatted drives.</span></p>
  2421. <h2 lang="en-GB">Photorec</h2>
  2422. <p style="margin-bottom: 0in;" lang="en-GB">In all other cases, you can
  2423. try the photorec utility, which tries to recover any important kind of
  2424. document from any filesystem. Be sure to run it by first changing to a
  2425. place where you can write your stuff, because it saves its recovered
  2426. output to a subfolder relative from where it was launched. Example:<br>
  2427. 'mount //10.0.0.1/share /mnt0'<br>
  2428. 'cd /mnt0'<br>
  2429. 'photorec' <br>
  2430. <br>
  2431. If you suspect that your filesystem is corrupt, I would first try to
  2432. run a chkdsk on it and see what it recovers. Then afterwards, see what
  2433. shows up and, depending on what has become visible, use the ntfs
  2434. capabilities of TRK or use photorec... But do not run a chkdsk if your
  2435. disk is physically dieing!!! Try to do as little I/O possible on that
  2436. disk. Running a chkdsk will probably render it even more unusable in
  2437. that case.</p>
  2438. <h2 lang="en-GB">Maybe ddrescue first</h2>
  2439. <p style="margin-bottom: 0in;" lang="en-GB">If photorec is unable to recover because of too many corrupt sectors, you can try ddrescue.<br>
  2440. This util tries to recover files and filesystems that are on locations
  2441. with bad sectors. If it is really unable to read the bad sectors, it
  2442. will pad them with zeroes. Your files will possibly be corrupted, but
  2443. at least you will have saved whatever there is to save. If you ddrescue
  2444. a complete filesystem (e.g. 'ddrescue if=/dev/hda1
  2445. of=/mnt0/rescued-image.img), you can afterwards mount that image as a
  2446. loopback filesystem ('mount -o loop /mnt0/rescued-image.img /mnt1') and
  2447. rescue/undelete files like that.</p>
  2448. <p></p><br><a name="7PFVZK0Q4R5TZMDJ351RJA8VHEBE66K4KQP91EPVWKEKX" &nbsp;="" id="7PFVZK0Q4R5TZMDJ351RJA8VHEBE66K4KQP91EPVWKEKX"></a><h1>3.3 Recovering lost partitions (testdisk, gpart, fdisk)</h1><p>
  2449. <style type="text/css">
  2450. <!--
  2451. @page { margin: 0.79in }
  2452. P { margin-bottom: 0.08in }
  2453. H2 { margin-bottom: 0.08in }
  2454. A:link { so-language: zxx }
  2455. -->
  2456. </style>
  2457. </p><p style="margin-bottom: 0in;" lang="en-GB">It can happen that you
  2458. did something stupid or something inexplicable happened and your
  2459. partition table has gone or is corrupted.<br>
  2460. <br>
  2461. To recover your partition tables, there are a few methods.</p>
  2462. <h2 lang="en-GB">Fdisk</h2>
  2463. <p style="margin-bottom: 0in;" lang="en-GB">I'm not referring to the Microsoft dos version of fdisk, but to the fdisk on Linux.<br>
  2464. Actually what you do with this is to manually redesign your partition
  2465. table. Of course, the risk here is that you have absolutely no idea how
  2466. your partition table looked before or even if you had more than one
  2467. partition. So this is a good strategy in the case of a disk having only
  2468. a single partition.<br>
  2469. Let us say, in this case, that the partition contains an NTFS filesystem on /dev/hda1<br>
  2470. Make sure nothing is mounted (run umountallfs)<br>
  2471. Run fdisk:<br>
  2472. -'fdisk /dev/hda'<br>
  2473. -In fdisk: press 'p' to print your actual partition table<br>
  2474. If your actual partition table is a bad one, erase by removing each
  2475. partition with 'd' and answer with the right partition number (in case
  2476. of logical drives, first remove everything equal and above 5).<br>
  2477. -'n' for new partition<br>
  2478. Choose primary partition, press enter for start and end sector. Fdisk automatically assigns it as a Linux native partition.<br>
  2479. -'t' to toggle the partition type. Ntfs is '7'<br>
  2480. -'a' to make it active (choose '1'), since it's probably the bootpartition<br>
  2481. -'w' to write your changes<br>
  2482. <br>
  2483. If this was your previous partition layout, you should now already be
  2484. able to mount the ntfs partition. If not, you probably won't be able to
  2485. boot from it either. But it should be, since this is the way to do it
  2486. when the problem was simply a lost partition table.</p>
  2487. <h2 lang="en-GB">Testdisk</h2>
  2488. <p style="margin-bottom: 0in;"><span lang="en-GB">This is the more
  2489. advanced method of recovering partitions. Run 'testdisk' at the command
  2490. line, the rest speaks for itself (Intel partition table =&gt; Analyze
  2491. =&gt; etc.). Read the testdisk documentation at</span><a href="http://www.cgsecurity.org/"><font color="#0000ff"><span lang="en-GB"><u>www.cgsecurity.org</u></span></font></a><span lang="en-GB"> <br>
  2492. Testdisk is also very nice to repair bootsectors. Just play with it a
  2493. little on a test machine to see what it all does. I have played around
  2494. with it myself, and although there is no guarantee that you will be
  2495. able to repair the bootsector every time, it still did a pretty good
  2496. job where others failed. <br>
  2497. Another thing I can recommend to you about testdisk: if it does not
  2498. find all of your partitions in the first minute, there is probably not
  2499. much left but some free disk space without a valid filesystem. It is
  2500. safe to cancel already if you think it found all you need.</span></p>
  2501. <h2 lang="en-GB">Cfdisk</h2>
  2502. <p style="margin-bottom: 0in;" lang="en-GB">A menu based fdisk replacement, easier to use than the standard fdisk</p>
  2503. <h2 lang="en-GB">Gpart</h2>
  2504. <p style="margin-bottom: 0in;" lang="en-GB">Guess partitions: a utility
  2505. that might recover your partitions too. However, it has not been
  2506. maintained for a few years and I have not yet tested it myself.</p>
  2507. <p></p><br><a name="L5ICUK4HDV6QAJA1ISR37W4DEYAHUY95TI8CT3KXNHCPR" &nbsp;="" id="L5ICUK4HDV6QAJA1ISR37W4DEYAHUY95TI8CT3KXNHCPR"></a><h1>3.4 Bootsector repair</h1><p>
  2508. <style type="text/css">
  2509. <!--
  2510. @page { margin: 0.79in }
  2511. P { margin-bottom: 0.08in }
  2512. H2 { margin-bottom: 0.08in }
  2513. -->
  2514. </style>
  2515. </p>
  2516. <h2 lang="en-GB">About bootrecords</h2>
  2517. <p style="margin-bottom: 0in;" lang="en-GB">Several utilities can be applied to repair a bootsector and there is a lot that can be said about it.<br>
  2518. I will only describe a few procedures for Windows and Linux bootsectors.<br>
  2519. <br>
  2520. In a PC style (x86) environment there are 2 ways a machine can boot
  2521. from a harddisk: Either from the MBR (Master Boot Record) OR from the
  2522. bootsector on the active partition. Historically, Windows has always
  2523. booted from the active partition bootsector, but it also writes some
  2524. stuff to the MBR of the disk. I don't know all the internals of the
  2525. different bootprocesses, so please correct me if this documentation has
  2526. it wrong.<br>
  2527. Continuing: Linux can boot in the two different ways: Either it writes
  2528. its code to the MBR (e.g. /dev/hda), OR it writes it to the active
  2529. partition (e.g. /dev/hda1).</p>
  2530. <h2 lang="en-GB">Check partitioning</h2>
  2531. <p style="margin-bottom: 0in;" lang="en-GB">Sometimes the failure to
  2532. boot can simply be a partitioning problem. In that case, refer to the
  2533. previous section. If you rebuild your partitioning as it was before, it
  2534. most likely will boot again.</p>
  2535. <p style="margin-bottom: 0in;"><strong><span lang="en-GB">Never forget to set the correct active partition!</span></strong></p>
  2536. <h2 lang="en-GB">Windows boot</h2>
  2537. <p style="margin-bottom: 0in;"><span lang="en-GB">Let's take a quick look at procedures on how to repair Windows bootrecords.<br>
  2538. As I already said, Windows booting depends on both the MBR and the partition bootrecord code.<br>
  2539. <br>
  2540. -</span><strong><span lang="en-GB">ms-sys</span></strong><span lang="en-GB"><b><br>
  2541. </b></span><span lang="en-GB">This utility can write new MBR code to
  2542. your disk. Type 'ms-sys -h' to obtain some help on the different
  2543. parameters, but in most cases you run it first to analyse your disk.
  2544. 'ms-sys /dev/hda', will tell you about your MBR.<br>
  2545. 'ms-sys -m /dev/hda' will write an XP style MBR to your disk.<br>
  2546. Remember that this utility deals only with the MBR. </span></p>
  2547. <p style="margin-bottom: 0in;"><span lang="en-GB">For the windows bootsectors you must refer to other utils.<br>
  2548. <br>
  2549. -</span><strong><span lang="en-GB">testdisk</span></strong><span lang="en-GB"><br>
  2550. I've tried testdisk to write new MBR code and it worked like a charm
  2551. for me. What is also nice about it is that, when you go into advanced
  2552. mode, you can also analyse the bootsector of the partitions and repair
  2553. them if needed.<br>
  2554. <br>
  2555. -</span><strong><span lang="en-GB">the Windows bootcd way</span></strong><span lang="en-GB"><br>
  2556. It might happen that none of these methods get you back into booting
  2557. Windows, then there is one last method that you can try, which actually
  2558. has nothing to do with TRK. Boot from the Windows XP cd and go to the
  2559. recovery console. Make sure you know the password of the Windows system
  2560. on the local disk. Otherwise, reset it first with 'winpass' on TRK.<br>
  2561. -Now, once booted into the recovery console, it is a good thing to run checkdisk first: <br>
  2562. 'chkdsk c: /p'<br>
  2563. -Next run 'fixboot'<br>
  2564. -And finally run 'fixmbr'<br>
  2565. -'exit' to reboot<br>
  2566. <br>
  2567. -</span><strong><span lang="en-GB">if really nothing worked: FAT32</span></strong><span lang="en-GB"><br>
  2568. Finally, if nothing did the trick, it means something is wrong in some
  2569. way, I don't know, your disk geometry was laid out, filesystem were
  2570. created, etc, etc. Sometimes it is even a mystery to me why a Windows
  2571. will not boot when everything else says that it should. However, it
  2572. often happens after I have cloned a PC with clonexp or Partition Image.
  2573. Sometimes it works, sometimes it does not. </span></p>
  2574. <p style="margin-bottom: 0in;"><span lang="en-GB">In that case there is one last resort: </span><strong><span lang="en-GB">recreate your Windows on a fat32 partition</span></strong><span lang="en-GB">.<br>
  2575. For documentation on that, see the section:</span><strong><span lang="en-GB">3.5 Manually cloning a Windows installation. </span></strong><span lang="en-GB"><br>
  2576. <br>
  2577. </span><strong><span lang="en-GB">-ntfsreloc</span></strong></p>
  2578. <p style="margin-bottom: 0in;"><span lang="en-GB">Very handy tool if
  2579. your bootsector geometry does not correspond to what the bios claims it
  2580. to be (the bios is actually wrong). Yet Windows bootsector&nbsp; finds
  2581. it important it corresponds to the bios specifications. <br>
  2582. This utility is invoked by mclone after cloning to make sure the
  2583. bootsectors are exactly the same as they were (Linux adjusts them to
  2584. LBA).<br>
  2585. </span></p>
  2586. <p style="margin-bottom: 0in;"><span lang="en-GB">Here 's the help output of ntfsreloc 0.7:<br>
  2587. adjust filesystem geometry for a NTFS partition<br>
  2588. Usage: ntfsreloc [-h # -t #] [-s start [-b]] [-w] [-f] [-p] device<br>
  2589. where device points to an NTFS partition<br>
  2590. <br>
  2591. Options:<br>
  2592. -w:&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Write new start sector to the partition.<br>
  2593. -h # -t #:&nbsp;&nbsp;&nbsp; Specify number of heads and number of sectors per track<br>
  2594. &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; If omitted, determined via ioctl.<br>
  2595. -s start:&nbsp;&nbsp;&nbsp; New start sector to write.<br>
  2596. &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; If omitted, determined via ioctl.<br>
  2597. -b:&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Proceed even if the specified device is not a<br>
  2598. &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; partition (e.g. a regular file)<br>
  2599. -f:&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Force the operation to occur even if device does not look<br>
  2600. &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; like a valid NTFS partition or values are equal.<br>
  2601. -p:&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Print debug information (values read, values requested etc.)<br>
  2602. <br>
  2603. This utility displays the current starting sector as defined by the<br>
  2604. the filesystem.&nbsp; No change will actually be made without the -w<br>
  2605. option.<br>
  2606. <br>
  2607. Exit status is 2 if an error occured, 1 if a change was made or is needed<br>
  2608. or 0 if the filesystem already has the correct values.<br>
  2609. </span></p>
  2610. <p>&nbsp;</p><br><a name="UHPDX3JS857PC91QX5QDU7JHMFX9NFZ8NECA7MT6HQKJQ" &nbsp;="" id="UHPDX3JS857PC91QX5QDU7JHMFX9NFZ8NECA7MT6HQKJQ"></a><h1>3.5 Manually cloning a Windows installation</h1><p>
  2611. <style type="text/css">
  2612. <!--
  2613. @page { margin: 0.79in }
  2614. P { margin-bottom: 0.08in }
  2615. H2 { margin-bottom: 0.08in }
  2616. A:link { so-language: zxx }
  2617. -->
  2618. </style>
  2619. </p><p style="margin-bottom: 0in;" lang="en-GB">This method describes
  2620. how you can migrate a Windows installation to another computer and be
  2621. sure it will boot as long as the Windows installation itself is not
  2622. corrupt. Additionally, I will also describe how you could make your
  2623. system bootable again with only a single computer/disk available.<br>
  2624. <br>
  2625. The way we approach this type of "cloning" is very simple: we create a
  2626. fat32 partition, copy all data from the NTFS partition to it, let the
  2627. Windows bootcd repair the MBR and bootsectors and Windows boots.
  2628. Afterwards you can convert the filesystem back to ntfs from Windows.</p>
  2629. <h2 lang="en-GB">The procedure</h2>
  2630. <p style="margin-bottom: 0in;" lang="en-GB">Let's assume a few things
  2631. first: you have two harddisks attached to 1 PC one of which might be
  2632. dieing or chkdsk does not repair it and you can not use any cloning
  2633. tool because it finds errors and exits (happens with Ghost and PQ Drive
  2634. Image). In the case of a laptop computer, you do not have the
  2635. possibility to attach a second disk unless via an external USB
  2636. enclosure, which is not recognized under dos based utils. <br>
  2637. In TRK you can either mount a remote disk with two PCs running TRK of
  2638. which one is running in fileserver or secure shell server mode (see
  2639. other sections on how to do that). The possibilities are myriad. <br>
  2640. But our example here works with two local disks, the source disk being
  2641. an NTFS partition, the destination disk empty or erasable. <br>
  2642. Disks are respectively /dev/hda and /dev/hdb, the NTFS partition is /dev/hda1<br>
  2643. -Make a large enough vfat filesystem on /dev/hdb. Use qtparted to do it graphically or use</p>
  2644. <p style="margin-bottom: 0in;"><span lang="en-GB">'fdisk /dev/hdb', <br>
  2645. -'n' to create a new primary partition<br>
  2646. -'1'<br>
  2647. -'t' to toggle, code 'c'<br>
  2648. -'a' set active '1'<br>
  2649. -'p' to print all that is about to be done to the screen<br>
  2650. -'w' to write and quit the partition table<br>
  2651. -'mkdosfs -F 32 /dev/hdb1'<br>
  2652. -mountallfs<br>
  2653. -cp -a /hda1/* /hdb1<br>
  2654. -Shutdown the PC, change the harddisks so your new disk becomes the primary (/dev/hda)<br>
  2655. -Now, reboot with the Windows CD so we can make the disk bootable (I have found it to be the best way).<br>
  2656. Follow the procedure described in </span><a href="http://trinityhome.org/Home/index.php?wpid=62&amp;front_id=12"><font color="#0000ff"><span lang="en-GB"><u>3.4 Bootsector repair</u></span></font></a><span lang="en-GB"> .i.e. fixboot and fixmbr.<br>
  2657. <br>
  2658. Your Windows should now start. Once booted into windows, go to a command line and run 'convert c: /fs:ntfs'<br>
  2659. Reboot and let your disk convert to ntfs <br>
  2660. <br>
  2661. I have noticed that the Linux 'cp' makes the windows systemdir (in most
  2662. cases named WINDOWS) into lowercase. It is good practice to make it
  2663. uppercase afterwards. Although Windows is supposed to be case
  2664. independent (but still case aware), I've noticed that some services
  2665. would not start until I uppercased it<br>
  2666. -'cd /hdb1'<br>
  2667. -'mv windows/ WINDOWS/'<br>
  2668. <br>
  2669. </span><strong><span lang="en-GB">One note here</span></strong><span lang="en-GB">:</span><strong><span lang="en-GB"> Windows XP will not boot from FAT 32 partitions larger than 32Gb</span></strong><span lang="en-GB">.
  2670. So do not create them bigger than this. If you have more data to copy,
  2671. I suggest you move your big files somewhere into a directory that you
  2672. then omit copying.</span></p>
  2673. <p></p><br><a name="JVI22F4QK5AFSUR3MHQC9ZW33AWHWA05W9XNES3PN4V5N" &nbsp;="" id="JVI22F4QK5AFSUR3MHQC9ZW33AWHWA05W9XNES3PN4V5N"></a><h1>3.6 Hardware testing</h1><p>
  2674. <style type="text/css">
  2675. <!--
  2676. @page { margin: 0.79in }
  2677. P { margin-bottom: 0.08in }
  2678. H2 { margin-bottom: 0.08in }
  2679. A:link { so-language: zxx }
  2680. -->
  2681. </style>
  2682. </p><p style="margin-bottom: 0in;"><span lang="en-GB">Although TRK does
  2683. not claim to be the best hardware test method there can be, there are
  2684. still a few utilities and procedures you can use to test the health of
  2685. your computer.<br>
  2686. <br>
  2687. A lot of information about hardware and resulting errors can already be
  2688. obtained by reading out the boot procedure and system information,
  2689. described in section </span><a href="http://trinityhome.org/Home/index.php?wpid=57&amp;front_id=12"><font color="#0000ff"><span lang="en-GB"><u>1.4 Reading information about your PC (dmesg, /proc/partitions)</u></span></font></a><span lang="en-GB">. Be sure to read that first. <br>
  2690. <br>
  2691. Here we are going to put ourselves a little more into stress testing.</span></p>
  2692. <h2 lang="en-GB">Harddisk testing: Bonnie</h2>
  2693. <p style="margin-bottom: 0in;" lang="en-GB">Bonnie is a utility that
  2694. stress tests the I/O of your harddisks. If you want to measure
  2695. performance or you just want your disk to run very hot, merely
  2696. mountallfs your filesystems (for ntfs volumes run 'mountallfs -g') cd
  2697. to a dir on the filesystem (e.g. 'cd /hda1') and execute 'bonnie'<br>
  2698. Here is what it could show you:<br>
  2699. <font face="Courier New, monospace">[root@trk]:(/hda1)# bonnie<br>
  2700. File './Bonnie.3078', size: 104857600<br>
  2701. Writing with putc()...done<br>
  2702. Rewriting...done<br>
  2703. Writing intelligently...done<br>
  2704. Reading with getc()...done<br>
  2705. Reading intelligently... done<br>
  2706. Seeker 1...Seeker 2...Seeker 3...start 'em...done...done...done...<br>
  2707. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-------Sequential
  2708. Output-------- ---Sequential Input-- --Random--<br>
  2709. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-Per
  2710. Char- --Block--- -Rewrite-- -Per Char- --Block--- --Seeks---<br>
  2711. Machine&nbsp;&nbsp;MB K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU/sec %CPU<br>
  2712. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1004500 16.368208.359559.59151 11.699855.1 132.01.5<br>
  2713. [root@trk]:(/hda1)#<br>
  2714. </font><br>
  2715. Bonnie tests a number of write operations on your disk.<br>
  2716. If you want it to run infinitely, just type 'run-bonnie'</p>
  2717. <h2 lang="en-GB">CPU testing: burnP6</h2>
  2718. <p style="margin-bottom: 0in;" lang="en-GB">This is a tool for
  2719. overclockers and anyone who likes to know that their computer does not
  2720. crash under heavy CPU load. It uses 100% cpu and makes bad cpus go mad
  2721. (probably).</p>
  2722. <h2 lang="en-GB">Network testing</h2>
  2723. <p style="margin-bottom: 0in;" lang="en-GB">Actually, a real network
  2724. testing utility is not included, but you can put a lot of stress on
  2725. your network card just by transferring large files.</p>
  2726. <h2 lang="en-GB">Memory testing</h2>
  2727. <p style="margin-bottom: 0in;" lang="en-GB">The latest version of
  2728. memtest+ is included. Just select it from the start menu of TRK (scroll
  2729. down all the way to the bottom). It tells you information about your
  2730. memory speed performance and tests to find any possible errors.</p>
  2731. <p></p><br><a name="4PL88HNFBZGXK7BHVL44UCJIPXXUD8I7MU5L2JR38YRJW" &nbsp;="" id="4PL88HNFBZGXK7BHVL44UCJIPXXUD8I7MU5L2JR38YRJW"></a><h1>3.7 Virus scanning</h1><p>See section <a href="http://trinityhome.org/Home/index.php?wpid=40&amp;front_id=12">2.1 Virusscan</a> for all the information you need on virusscanning your PC with TRK.</p><br><a name="AKDLI8WEFV4L96NMKIKSXE2ZQWDFRHLSTQ42PQ6UB16AX" &nbsp;="" id="AKDLI8WEFV4L96NMKIKSXE2ZQWDFRHLSTQ42PQ6UB16AX"></a><h1>3.8 Manual PC cleaning</h1><p>Use winclean, described in section 2.4&nbsp;Winclean</p><br><a name="ZTZJTNZS1Z028YDFIX59T2IQNHU57JDW236KHV38JU1IH" &nbsp;="" id="ZTZJTNZS1Z028YDFIX59T2IQNHU57JDW236KHV38JU1IH"></a><h1>4. Boot time options and triggers</h1><p>This
  2732. section gives you more info on the internals of TRK, how and why to use
  2733. the differen boot menu options and the triggers TRK has builtin for
  2734. customisation. <br>
  2735. For advanced users who want to automate more or need alternate ways of booting.</p><br><a name="Z034WGIXRNSS0HJZYHKU5ED0RRGXKGQA7I4TQDF6RYPH6" &nbsp;="" id="Z034WGIXRNSS0HJZYHKU5ED0RRGXKGQA7I4TQDF6RYPH6"></a><h1>4.1 Boot menu options</h1><p>The
  2736. boot options of the latest TRK 3.4 contain a lot of&nbsp; different
  2737. things, but most of the time the default startup will do.<br>
  2738. <br>
  2739. Nevertheless, here are the options explained<br>
  2740. &nbsp; <img alt="" src="helpdocs_files/trk34-b365-bootmenu.png" hspace="2" vspace="2"> <br>
  2741. <br>
  2742. <strong> -Default startup:</strong><br>
  2743. This will run TRK 3.4 with all the default options enabled. This means
  2744. it will run partly from CD/usb/network, keeping your CD/usb stick
  2745. unavailable for other things in the meantime, but will boot faster.
  2746. Keyboard will be default qwerty and fontsize about 3/4 of a normal font
  2747. in a screensize of 800x600 in VESA compatible framebuffermode. Some
  2748. videocards are not so VESA compliant and can therefore not benefit from
  2749. the graphical possibilities of TRK (like the Intel 815 chipset). They
  2750. will have to run in textmode, preventing them from using qtparted and
  2751. links (and my nice background logo).&nbsp;When booting from network,
  2752. you cannot unplug the network cable in this mode.<br>
  2753. <br>
  2754. &nbsp;<strong><br>
  2755. 1) TRK 3.4 in failsafe mode (No menu, VGA, noacpi, noapic)</strong><br>
  2756. In this mode, TRK&nbsp;will run with a few failsafe options by not
  2757. employing the APIC chip nor the ACPI. Also framebuffer mode will be
  2758. disabled, resulting in lower graphics and lack of background graphics
  2759. that "soothen your jengled nerves". Use only in case of normal startup
  2760. failure.</p>
  2761. <p><br>
  2762. <strong> 2) TRK 3.4 running from RAM (best &gt;= 512mb, 256mb min)</strong><br>
  2763. This option will run Trinity Rescue Kit completely from RAM, which
  2764. means it copies all of its files into memory so your CD or usb stick
  2765. becomes available for disconnection. In the case of PXE booted TRKs,
  2766. you could disconnect the network at that moment. This requires at least
  2767. 256Mb RAM, but recommended is 512Mb and more. Especially updated TRK
  2768. versions require about 250Mb more because of the included
  2769. antivirusccanners..<br>
  2770. <strong><br>
  2771. 3)&nbsp; TRK 3.4 - Run 'mclone' in client mode (!)</strong><br>
  2772. On startup, TRK&nbsp;will mclone in client (i.e. RECEIVER) mode.&nbsp;<strong>Use with caution!</strong>
  2773. This allows you complete local disk to be overwritten by a standard
  2774. mclone in SENDER mode. This option is for people wanting to perform
  2775. massive PC&nbsp;replication</p>
  2776. <p>&nbsp;<strong><br>
  2777. 4) TRK 3.4 in simple VGA mode (debugging of kernel output)</strong><br>
  2778. If you know your machine won 't boot in framebuffer mode. As I said
  2779. before: no links and no qtparted. This option is also useful in case
  2780. your TRK doesn 't initiate any output on the screen and you suspect it
  2781. to hang on kernel initialisation. Many times it means there 's a
  2782. problem with the ACPI interface of the machine. I 've noticed this
  2783. quite regularly on HP/Compaq machines.<br>
  2784. <strong><br>
  2785. 5) TRK 3.4 with Belgian keyboard (use menu for other)</strong><br>
  2786. Since me, Harakiri, is a Belgian, I&nbsp;include my own keyboard as a
  2787. menu option. Other keyboards can be selected from the startup
  2788. menu.&nbsp;Internationalisation is set to UTF-8, which should now
  2789. really be fixed since TRK&nbsp;3.4<br>
  2790. <strong><br>
  2791. 6) TRK 3.4 - Virusscan all drives (Clamav, non interactive)</strong><br>
  2792. Runs virusscan on all your drives. Stupid option actually, but this is
  2793. about the only thing you can do that is set-and-forget without the need
  2794. for any interaction. This runs virusscan without any arguments, so with
  2795. ClamAV. You will get no login as long as this is running. Nice option
  2796. for sysadmins who want to set and forget it. But you can equllay wait
  2797. for startup and select a few other virusscan arguments from the
  2798. TRK&nbsp;menu.<br>
  2799. <br>
  2800. <strong> 7) TRK 3.4 - Try more pcmcia and usb nics (when not detected)</strong><br>
  2801. I found that kudzu is not really good with PCMCIA cards and USB stuff
  2802. and I found out that the easiest way fix this was to just have support
  2803. for pcmcia bridges compiled in my kernel, start cardmgr and try every
  2804. module I find until success. Same with USB nics. This will only try
  2805. this for PCMCIA and USB ethernet cards/adapters.<br>
  2806. <br>
  2807. <strong> 8) TRK 3.4 - Try more SCSI drivers (when disks not detected)</strong></p>
  2808. <p>Same argument as with the latter: if your local disks are not found,
  2809. try this option to try and load every other more exotic driver
  2810. module.&nbsp;Be warned: this might lock up your computer.</p>
  2811. <p><strong> 9) TRK 3.4 with a secure shell server enabled</strong><br>
  2812. Run a ssh server, a very nice feature, giving you the ability to
  2813. remotely work on a machine that your nexter has started up for you.<br>
  2814. For security reasons, you will first get prompted to create/change the
  2815. password, after which in green will be displayed the IP-addresses your
  2816. TRK will listen to. However, if you're running an updated TRK&nbsp;on
  2817. which you have changed the root password (which by default is 'trk'),
  2818. you will not be prompted anymore for a password change and your
  2819. TRK&nbsp;will be immediately accessible over ssh.&nbsp;Your user will
  2820. just have to inform you the ip-address.<br>
  2821. <br>
  2822. <strong> 10)&nbsp; TRK 3.4 - Execute local scripts on harddrive of PC</strong><br>
  2823. Run local scripts from ./trk/trk3local.conf found on any local
  2824. filesystem. In this way you can make computer specific scripts and put
  2825. them on the harddisk. More info, see section "Triggers"<br>
  2826. <strong><br>
  2827. 11)&nbsp; TRK 3.4 as bootserver to boot other TRK clients<br>
  2828. </strong>This option is magic: it makes your local copy of TRK run as a
  2829. server to have itself booted over the network.&nbsp;Read more on
  2830. trkbootnet ins the section Network booting</p>
  2831. <p><strong> 12)&nbsp; TRK 3.4 - Fileshare all drives as guest, no security</strong><br>
  2832. This is the same as the previous option, but this will share all your
  2833. drives without any security boundary or username. Be careful with this,
  2834. use only in a trusted environment.<br>
  2835. <br>
  2836. <strong> 13) TRK 3.4 - Single user mode (no menu)</strong><br>
  2837. Starts TRK in very basic mode, sometimes useful when your PC hangs or crashes on hardware detection or some other error.<br>
  2838. <br>
  2839. <strong> </strong><strong>14) TRK 3.4 - Acpi=off, noapic&nbsp; PCI=^bios (Alternate boot 1)</strong><br>
  2840. Some problematic machines with lousy ACPI controls might boot with this
  2841. option. Happens regularly on some older Compaq machines. This will
  2842. disable acpi and apic and will use the bios' PCI routing table. Try
  2843. this when TRK hangs on early startup.<br>
  2844. <strong><br>
  2845. 15) TRK 3.4 - Acpi=off, noapic PCI=any (Alternate boot 2)</strong><br>
  2846. This is almost the same option as the previous one, but I let the
  2847. kernel decide what PCI mode should be used. I needed this mode on the
  2848. brand new HP DC7700 machines with Intel Duo Core because it hung on
  2849. kernel initialisation in the PCI part.<br>
  2850. <br>
  2851. <strong>16) TRK 3.4 - PCI=conf2 (Alternate boot 3)</strong><br>
  2852. Another option you can try on PC's with strange PCI&nbsp;bridgings.</p>
  2853. <p><br>
  2854. <strong> 17) <strong>TRK 3.4 - </strong><strong>Verbose startup for debugging</strong> (no menu)</strong><br>
  2855. I use this to see what scripts are doing or sometimes your PC might
  2856. hang on something but you don 't know what: try this, but don 't get
  2857. frightened by all the output.<br>
  2858. <strong><br>
  2859. 18) TRK 3.4 - SSH, boot- and guest fileserver, run from RAM</strong><br>
  2860. This is a combination of a few options This is a quite common
  2861. combination you would need when cloning PCs from 1 TRK to another and
  2862. you only have one TRK cd handy.</p>
  2863. <p><strong>19) TRK 3.4 - Run from RAM, run mclone as client</strong><br>
  2864. Another combination that explains itself</p>
  2865. <p><strong>20) TRK 3.4 with proxyserver support enabled</strong><br>
  2866. Start TRK with default options and prompts you for a proxyserver. In
  2867. fact, it just calls for "setproxy", which prompts you for the proxy
  2868. server address (hostname or ip), portnumber and optionally username and
  2869. password (leave blank for none)</p>
  2870. <p><strong>21) TRK 3.4 - All devices set to read-only</strong><br>
  2871. This is an option for forensic researchers who don't want to touch
  2872. anything on the local computer but don't have a hardware write blocking
  2873. device. This sets all of your disks to read-only on a kernel level.</p>
  2874. <p><strong> 22) Memory tester memtest+ v1.65</strong><br>
  2875. Almost every distribution comes with this on startup, but this way it
  2876. 's included in this one too. Nice to test your memory banks with, but
  2877. real life tests are still much more certain. Still, it might do the
  2878. trick for you and find you a bad module.</p><br><a name="EUGBVSAKSIDQ4SSW21D1CDTZC5RKS0DXKJY51ZFJ7J022" &nbsp;="" id="EUGBVSAKSIDQ4SSW21D1CDTZC5RKS0DXKJY51ZFJ7J022"></a><h1>4.2 Triggers</h1><p>TRK contains a number of so called "triggers", things it checks for and reacts upon when existing.<br>
  2879. Very handy for regular TRK users who want to customise it a little.</p><br><a name="9PAH415576DS0RB2Z5DH8AQ1XFD42G21V39QU4LS1P9S6" &nbsp;="" id="9PAH415576DS0RB2Z5DH8AQ1XFD42G21V39QU4LS1P9S6"></a><h1>4.2.1 The TRK options server: make your lan TRK aware</h1><p>TRK
  2880. has quite a few ways you can customise it or have custom scripts be
  2881. run. These scripts can run automatically because I 've built in
  2882. numerous placeholders for them which I call "triggers"<br>
  2883. <br>
  2884. If you are a regular user of Trinity Rescue Kit, you might find it
  2885. useful to have some default parameters set according to your
  2886. environment i.e. lan<br>
  2887. Ever since TRK 3.1, there 's a feature that makes your lan "TRK-aware"
  2888. since a system administrator can configure his lan in a way any TRK3
  2889. can take advantage of it in terms of proxy configurations and user
  2890. optional script executing, a much wanted feature from the past, but
  2891. hard to implement since you 're working with read-only media.<br>
  2892. Finally, the solution is kind of revolutionary: by activating an
  2893. otherwise unused parameter in you DHCP server, you can have a TRK point
  2894. to a server where it can find its config and scripts.<br>
  2895. This option is from an obsolete RFC from 1983 called 'Resource location
  2896. server', which was a UDP protocol that could tell you where to find
  2897. things like routes and smtp servers. I 'm using it now to provide TRK
  2898. with an IP-address where it can find a simple webserver on which
  2899. resides /trk/trk3options.conf<br>
  2900. If you 're running ISC dhcpd, add this line to /etc/dhcpd.conf:<br>
  2901. option resource-location-servers your-trk-webserver-ip-address;<br>
  2902. On a Windows server, go to Administrative tools=&gt;DHCP =&gt; go to
  2903. your scope =&gt; scope options =&gt; option 11 Resource Location
  2904. Servers.<br>
  2905. I wouldn 't worry too much about enabling this option to break
  2906. something in your network. I 've been running this for some time now at
  2907. my office where there are about 100 Windows PCs on dhcp. Nobody hasn 't
  2908. complained so far.<br>
  2909. <br>
  2910. Anyway, when a TRK 3.2 boots and finds a '<strong>resource location server</strong>' from DHCP, it will indeed look for resources from this configuration file.<br>
  2911. Below is an example of such config file, it more or less speaks for itself.<br>
  2912. The file is /var/www/html/trk/trk3options.conf on my local webserver<br>
  2913. <br>
  2914. <font face="Courier New"> TRKSECTION WGET BEGIN<br>
  2915. http_proxy=http://10.34.5.201:8080<br>
  2916. proxy_user=johndoe<br>
  2917. proxy_passwd=doesinc<br>
  2918. timeout = 10<br>
  2919. tries = 2<br>
  2920. TRKSECTION WGET END<br>
  2921. <br>
  2922. TRKSECTION LINKS BEGIN<br>
  2923. http_proxy 10.34.5.201:8080<br>
  2924. TRKSECTION LINKS END<br>
  2925. <br>
  2926. TRKSECTION CHECKUPDATESARGS BEGIN<br>
  2927. -proxy-server=http://10.34.5.201:8080<br>
  2928. -proxy-username=johndoe<br>
  2929. -proxy-password=doesinc<br>
  2930. TRKSECTION CHECKUPDATESARGS END<br>
  2931. <br>
  2932. TRKSECTION TRKSCRIPT BEGIN<br>
  2933. #!/bin/bash<br>
  2934. # <br>
  2935. if [ -f /etc/proxy.conf ]; then<br>
  2936. echo "Setting proxy params in freshclam.conf"<br>
  2937. if [ ! -f /etc/freshclam.conf.bak ]; then<br>
  2938. cp -f /etc/freshclam.conf /etc/freshclam.conf.bak<br>
  2939. fi<br>
  2940. <br>
  2941. if ! [ "rjohndoe" = "r" ]; then <br>
  2942. sed "s/# Proxy settings/\nHTTPProxyServer 10.34.5.201\nHTTPProxyPort
  2943. 8080\nHTTPProxyUsername johndoe\nHTTPProxyPassword doesinc/"
  2944. /etc/freshclam.conf &gt; /etc/fresclam.conf~<br>
  2945. else <br>
  2946. sed "s/# Proxy settings/\nHTTPProxyServer 10.34.5.201\nHTTPProxyPort 8080/" /etc/freshclam.conf &gt; /etc/fresclam.conf~<br>
  2947. fi;<br>
  2948. mv -f /etc/fresclam.conf~ /etc/freshclam.conf<br>
  2949. chmod 700 /etc/freshclam.conf<br>
  2950. if [ -f /etc/avg.conf ]; then<br>
  2951. echo "Setting proxy params in avg.conf"<br>
  2952. if [ -f /etc/avg.conf.bak ]; then<br>
  2953. # Take a backup of the original avg.conf if necessary<br>
  2954. cp -f /etc/avg.conf /etc/avg.conf.bak<br>
  2955. fi;<br>
  2956. sed -e s'/proxy = off/proxy = 10.34.5.201:8080/' /etc/avg.conf &gt; /etc/avg.conf~<br>
  2957. mv -f /etc/avg.conf~ /etc/avg.conf<br>
  2958. chmod 700 /etc/avg.conf<br>
  2959. sed -e s'/proxyLogin = off/proxyLogin = johndoe:doesinc/' /etc/avg.conf &gt; /etc/avg.conf~<br>
  2960. mv -f /etc/avg.conf~ /etc/avg.conf<br>
  2961. fi;<br>
  2962. <br>
  2963. if [ -f /opt/BitDefender-scanner/etc/bdscan.conf ]; then<br>
  2964. echo "Setting proxy params in bdscan.conf"<br>
  2965. if [ ! -f /opt/BitDefender-scanner/etc/bdscan.conf.bak ]; then<br>
  2966. cp -f&nbsp; /opt/BitDefender-scanner/etc/bdscan.conf /opt/BitDefender-scanner/etc/bdscan.conf.bak 2&gt;/dev/null<br>
  2967. sed "s/#HttpProxy =/\nHttpProxy = johndoe:doesinc@10.34.5.201:8080/"
  2968. /opt/BitDefender-scanner/etc/bdscan.conf &gt;
  2969. /opt/BitDefender-scanner/etc/bdscan.conf~ <br>
  2970. mv /opt/BitDefender-scanner/etc/bdscan.conf~ /opt/BitDefender-scanner/etc/bdscan.conf<br>
  2971. <br>
  2972. fi;<br>
  2973. fi;<br>
  2974. fi; <br>
  2975. TRKSECTION TRKSCRIPT END</font> <br>
  2976. <br>
  2977. <br>
  2978. -TRKSCRIPT is a section where you can do basically anything you want,
  2979. so be very carefull with what you put in here because it will have an
  2980. effect on any machine you boot with TRK3 . It will basically execute as
  2981. a script in the same environment from the last script run by TRK,
  2982. /etc/init.d/trklocal<br>
  2983. What I put in the example here is to download an adapted version of the
  2984. ClamAV config file 'freshclam.conf'. Refer to the ClamAV manpages for
  2985. help on this file, but in here I 've put my proxy parameters too.<br>
  2986. I don 't need to tell you what other opportunities this opens up.<br>
  2987. <br>
  2988. If you think this file is too complicated for you to create, don 't
  2989. worry: just start a TRK, run 'setproxy' and this will generate the file
  2990. /etc/trk3options.conf<br>
  2991. Copy this file to your webserver and you 're all set.<br>
  2992. <br>
  2993. If you run setproxy afterwards, you will override alls settings given by your trk3optionsserver.</p><br><a name="CA4YM8MPTJ078B4RZR3V7NZDL7WUM33Q4XDGWQVE0KCZM" &nbsp;="" id="CA4YM8MPTJ078B4RZR3V7NZDL7WUM33Q4XDGWQVE0KCZM"></a><h1>4.2.2 Scripts on the computer's local harddisks</h1><p>Another
  2994. trigger is to have a script executed from the computer 's local
  2995. harddisk, allowing you to run commands specifically for the computer.
  2996. It is in the same format as the trk3options.conf: you have TRKSECTION
  2997. TRKSCRIPT (only this section) where you write your parameters. This
  2998. will be generated into a script called /bin/trklocscript-&lt;name of
  2999. the drive&gt; (f.i. /bin/trklocscript-hda1) and executed at the end of
  3000. the TRK startup procedure.<br>
  3001. The location of this script has to be in the folder .trk (dot trk) on
  3002. the root of the local partition. In this folder you put the file called
  3003. trk3local.conf.<br>
  3004. A sample trk3local.conf could look like this:<br>
  3005. <font face="Courier New"><br>
  3006. TRKSECTION TRKSCRIPT BEGIN<br>
  3007. <br>
  3008. #!/bin/bash<br>
  3009. # Script for maintenance and backup on Windows machines<br>
  3010. # Clean up this drive a little and do a virusscan on it<br>
  3011. cd /hda1/Documents\ and\ Settings<br>
  3012. for i in *; do rm -rf "$i"\Local\ Settings\Temp\*; rm -rf "$i"\Local\ Settings\Temporary Internet Files\*;<br>
  3013. done;<br>
  3014. virusscan -a fprot<br>
  3015. # Now back up the userdata of all local profiles to a network drive<br>
  3016. mount -o username=john,password=doe //10.0.0.5/backups /mnt0<br>
  3017. for i in *; do mkdir /mnt0/"$i" 2&gt;/dev/null;&nbsp; echo "Backing up
  3018. documents of $i"; cp -rvf "$i"/My\ Documents /mnt0/"$i"; done<br>
  3019. umountallfs<br>
  3020. <br>
  3021. TRKSECTION TRKSCRIPT END</font></p><br><a name="B8MI3TRVGJ2SY2XHN562I89WYSUF20I4ZWCSETDL364RY" &nbsp;="" id="B8MI3TRVGJ2SY2XHN562I89WYSUF20I4ZWCSETDL364RY"></a><h1>4.2.3 Script on the TRK medium</h1><p>If
  3022. you want some modifications to TRK and don 't want to fiddle directly
  3023. into TRK's own scripts, you can add a script to the CD/usb stick/NFS
  3024. share as&nbsp; /trk3/trklocscript. Unlike the previous trigger, this
  3025. has to be a normal bash script.<br>
  3026. The advantage of having scripts outside the TRK files is that you can
  3027. upgrade your TRK afterwards, without having to redo your work every
  3028. time: in case of a USB stick or NFS share, you just leave the script
  3029. where it is, in case of a CD, you re-add the trklocscript to the
  3030. multisession bootcd.<br>
  3031. From this script you can trigger any other script you like, f. i. adding more software to your TRK.<br>
  3032. Example trklocscript:<br>
  3033. <br>
  3034. <font face="Courier New">#!/bin/bash<br>
  3035. # Go to /tmp, which is on virtual shared memory, about half the size of your RAM<br>
  3036. cd /tmp<br>
  3037. mkdir /tmp/extrabin<br>
  3038. cd extrabin<br>
  3039. # Use the variable $TRKMOUNTDIR so you always copy/execute from the right location<br>
  3040. tar xzf $TRKMOUNTDIR/trk3/extrabinaries.tar.gz<br>
  3041. # This will set the PATH globally<br>
  3042. export PATH=$PATH:/tmp/extrabin</font></p><br><a name="SMFWK0I2J980KIYM9IK3CSPF1J06UQ3C29YDZ75874YID" &nbsp;="" id="SMFWK0I2J980KIYM9IK3CSPF1J06UQ3C29YDZ75874YID"></a><h1>5. Upgrade, update and change of bootmedia procedures</h1><p>TRK 3.4 is able to boot from more than CD alone. You can <strong>boot it from a USB</strong> stick, USB disk, even a fixed harddisk if you like. And the most nifty feature: <strong>boot it from network over PXE!</strong><br>
  3043. This part of the documentation describes how to change over to different bootmethods, upgrade and customise more of TRK.<br>
  3044. Putting TRK to a USb stick shouldn 't take more than 5 minutes.<br>
  3045. Ad hoc booting from network is even simpler: make sure your network has
  3046. a running dhcp server (a standard home router will do), boot TRK on
  3047. 1&nbsp;computer and run trkbootnet.&nbsp;Next boot the other
  3048. computer(s), select the network card as the bootdevice and voilà: a TRK
  3049. booting from another TRK</p>
  3050. <p><br>
  3051. Making TRK run from PXE takes a little longer to set up, but it 's
  3052. worthwhile when you have a big lan to manage. Once set up, upgrading to
  3053. new versions is piece of cake.</p>
  3054. <p>In the next sections you will find instructions on how to set up a
  3055. bootserver under Linux and there 's also a contributed documentation on
  3056. how to do it on a Windows machine.</p><br><a name="VCMNDG08JQ9JED3YXFLITGXVHLRRQIXBL9PPFEMQUMZZR" &nbsp;="" id="VCMNDG08JQ9JED3YXFLITGXVHLRRQIXBL9PPFEMQUMZZR"></a><h1>5.1 TRK on CD</h1><p>TRK
  3057. is in the first place known as a BOOTCD. So even if burning an isofile
  3058. to a CD is about the simplest thing to do, I&nbsp;will nevertheless
  3059. commit a piece on how you can get TRK on a cd properly.</p>
  3060. <p>If you really want a no brainer, try the executable, self burning
  3061. version of TRK from the download section. You don't need any burn
  3062. software to be installed on your computer, but it does require that you
  3063. have administrator rights.<br>
  3064. And how to do it: download, save locally and double click <span class="postbody">trinity-rescue-kit.3.4-build-366.exe
  3065. (or the latest version), answer "Yes" after you made sure you have a
  3066. blank CD-R in your CD writer and just sit back and relax.<br>
  3067. </span></p>
  3068. <p><span class="postbody">If you want to burn TRK&nbsp; from the isofile, there are several options and programs.<br>
  3069. For Windows 7 users it's easy: right click on the file and select the option to burn it to CD.<br>
  3070. All other users have several possibilities.</span><br>
  3071. 1 free and rather easy possibility is to <span class="postbody">use MagicIso, which is free for isos up to 300mb.&nbsp;At the end of this document you will find it explained in screenshots.<br>
  3072. Another free alternative is CD&nbsp;Burner XP&nbsp;Pro, which is a very
  3073. good and full fledged CD&nbsp;burning software as a whole by the way.<br>
  3074. </span></p><br><a name="FIRS44G0F6QRJDGPU467B1R5DHKC3QV9ZCRU6XJBUZS43" &nbsp;="" id="FIRS44G0F6QRJDGPU467B1R5DHKC3QV9ZCRU6XJBUZS43"></a><h1>5.2 How to install/upgrade your USB media to run the latest version of TRK</h1><h2>Installing from Windows</h2>
  3075. <p>This procedure is also valid for new TRK installations on any bootable media that has:<br>
  3076. -been formatted as FAT16 or FAT32 (Syslinux documentation recommends FAT16, but FAT32 is tested and works as well)<br>
  3077. -smaller or equal than 1Gb (=max 16k clusters). Bigger (and fat32) is
  3078. allowed but is subject to less compatibility. Please report me on any
  3079. PC that refused to boot in that way.<br>
  3080. -this partition made active <br>
  3081. -<strong>TRK_3-4</strong>
  3082. as a volume label (exactly like this). Another volume label (e.g.
  3083. RESCUEDISK is possible, but than you would have to add
  3084. "vollabel=RESCUEDISK" after each line that says "append initrd=..." in
  3085. /syslinux.cfg</p>
  3086. <p>But this is not guaranteed to boot from any PC that can boot USB.
  3087. Better is to use trk2usb from TRK itself (when booted from CD of
  3088. course).<br>
  3089. <br>
  3090. The rest of the installation course is like upgrading, so follow the
  3091. guidelins below. If you 're unable to bring it to a success using this
  3092. procedure, I recommend you download the ISO version of TRK, burn and
  3093. start from that, plug in your USB stick and run <a href="http://trinityhome.org/Home/index.php?wpid=50&amp;front_id=12">trk2usb</a></p>
  3094. <h2>Upgrading (and installing continued) from Windows&nbsp;</h2>
  3095. <p>Prerequisites: 7-zip or any archive application that can open iso files.<br>
  3096. -Download trinity-rescue-kit.3.4-build-366.iso (or the latest version)<br>
  3097. -Plug in your USB stick with the old version of TRK <br>
  3098. -Open the file trinity-rescue-kit.3.4-build-366.iso and extract it to
  3099. your USB drive root (we will call it the G: drive in this case)<br>
  3100. -Open a command prompt&nbsp; 'cmd'<br>
  3101. -Go to your USB drive: 'G:'<br>
  3102. -'cd trk3'<br>
  3103. -'syslinux G:' ('syslinux -f G:' if it refuses because windows reports it to be a fixed drive)<br>
  3104. -'exit'<br>
  3105. -eject the device and try booting from it (use the 'safely remove hardware' from the system tray)</p>
  3106. <h2>Installing from Linux</h2>
  3107. <p>I 'm not describing in detail how you should install TRK from Linux,
  3108. since it might require you to install special packages and perform
  3109. complicated operations. Someone who doesn 't fear this will have enough
  3110. with this short procedure<br>
  3111. Here goes:<br>
  3112. -prerequisites: mtools, syslinux 3.31<br>
  3113. -figure out your USB stick device (most of the time /dev/sda)<br>
  3114. -run 'mkdiskimage -4 /dev/sda -s 0 64 32' (from the syslinux package).
  3115. This will completely erase and format your drive to maximum 1Gb. If you
  3116. want to pass this limit, use fdisk and mkvfat -f 32 /dev/sda1, but
  3117. beware this can be less compatible.<br>
  3118. -edit /etc/mtools.conf and add the line: <font face="Courier New">drive c: file="/dev/sda4" </font><br>
  3119. -'mlabel c:TRK_3-4'<br>
  3120. -the next steps are the same as upgrading from Linux, so read below</p>
  3121. <h2>Upgrading from Linux</h2>
  3122. <p>-Download trinity-rescue-kit.3.4-build-366.iso (or the latest version)<br>
  3123. -Plug in your USB stick with the old version of TRK 3.4<br>
  3124. -Check what device id it has been assigned using 'dmesg | tail'<br>
  3125. -Assuming your USB stick is /dev/sda and your TRK partition /dev/sda4
  3126. and we use /mnt/disk1 as mountpoint: 'mount /dev/sda4 /mnt/disk1'<br>
  3127. -'cd /mnt/disk1'<br>
  3128. -assuming trinity-rescue-kit.3.4-build-366.iso is downloaded to /home/user and the mount point /mnt/disk2 exists/:<br>
  3129. -'mount -o loop /home/user/trinity-rescue-kit.3.4-build-366.iso /mnt/disk2'<br>
  3130. -'cd /mnt/disk2'<br>
  3131. -'cp -avf *&nbsp;/mnt/disk1/<br>
  3132. -'cd trk3'<br>
  3133. -'umount /mnt/disk1'<br>
  3134. -'./syslinux&nbsp; /dev/sda4'</p><br><a name="DJQBVW3TV8F9F6T9P2QZJ9WFCCVH0HU3SA5CWYWHX2G2Z" &nbsp;="" id="DJQBVW3TV8F9F6T9P2QZJ9WFCCVH0HU3SA5CWYWHX2G2Z"></a><h1>5.3 Setting up your PXE boot environment</h1><p>Ever
  3135. wondered what you could do with that PXE stuff from your network card
  3136. at boot time? Well you could run a TRK on your network.</p>
  3137. <h2>1. Prerequisites</h2>
  3138. <p>Here 's what you need:<br>
  3139. -the latest TRK<br>
  3140. -A (wired) local area network<br>
  3141. -Computers with PXE compliant hardware<br>
  3142. -A decent configurable dhcp server<br>
  3143. -A Linux machine or any OS that can run an NFS server (not Windows, or else a third party soft)<br>
  3144. -A TFTP server (these last 3 things can all run on the same server)<br>
  3145. <br>
  3146. <br>
  3147. Time to install and configure everything: 15 minutes (if you understand everything directly)</p>
  3148. <h2>2. Put the TRK files somewhere</h2>
  3149. <p>Download the latest tar.gz distributed TRK version (version 275 and
  3150. up) and unpack it somewhere on your Linux nfs/tftp server. In this case
  3151. we 're going to assume unpacking it to /home/trkfiles. User and group
  3152. ownership is ok for root, just make sure it 's world readable (is
  3153. normally ok, but just in case)<br>
  3154. commands:<br>
  3155. 'cd /home/trkfiles'<br>
  3156. 'tar xzf /tmp/trinity-rescue-kit-3.2-build-275.tar.gz'<br>
  3157. <br>
  3158. You can also copy your files from your TRK CD, usb stick or mount the
  3159. iso file with a loopback device and copy everything from there.<br>
  3160. <br>
  3161. <strong>Keep in mind:</strong> This is the location where all of your
  3162. TRK files will reside. The folder you are about to use will be the same
  3163. for your TFTP server as for your NFS share. Make sure they are the
  3164. same, not a subfolder of the other!<br>
  3165. <br>
  3166. There 's another thing you should do, that 's generating a default
  3167. pxelinux config file&nbsp; (/home/trkfiles/pxelinux.cfg/default). I 've
  3168. created a small script that does it for you, based on the normal
  3169. isolinux/syslinux config files. This is something you need to do
  3170. everytime you upgrade TRK<br>
  3171. -Go to /home/trkfiles/trk3 'cd /home/trkfiles/trk3'<br>
  3172. -'./mkpxelinux'<br>
  3173. The script will prompt you for an nfs path to specify. This is the
  3174. ip-address of your server combined with the path where TRK resides.
  3175. This is necessary for the secondary startup phase of TRK. If you omit
  3176. this, you will get weird results when booting.<br>
  3177. An example you could fill in is '192.168.81.5:/home/trkfiles'</p>
  3178. <h2>3. Setting up DHCP</h2>
  3179. <p>I 'm going to discuss 2 DHCP servers.<br>
  3180. <br>
  3181. <strong>First the ISC dhcp server</strong>, which is about the standard in most Linux distributions.<br>
  3182. Here 's what the dhcp.conf should more or less look like, depending on your site configuration.<br>
  3183. It 's what 's in bold that 's important.<br>
  3184. Note that in this situation ALL of your machines will be able to boot from PXE.<br>
  3185. If you omit the PXE parameters ('next-server' which is your TFTP server
  3186. and 'filename') from the general dhcp parameters and put them in the
  3187. section 'group' (what' s commented out with #), you can specify PXE
  3188. booting per host based on the host's mac address.<br>
  3189. <br>
  3190. <font face="Courier New"> allow booting;<br>
  3191. allow bootp;<br>
  3192. ddns-update-style none;<br>
  3193. subnet 192.168.81.0 netmask 255.255.255.0 {<br>
  3194. &nbsp;&nbsp;&nbsp; # default gateway<br>
  3195. &nbsp;&nbsp;&nbsp; option routers 192.168.81.2;<br>
  3196. &nbsp;&nbsp;&nbsp; option subnet-mask 255.255.255.0;<br>
  3197. <br>
  3198. &nbsp;&nbsp;&nbsp; option domain-name "trinityhome.local";<br>
  3199. &nbsp;&nbsp;&nbsp; option broadcast-address 192.168.81.255;<br>
  3200. <br>
  3201. &nbsp;&nbsp;&nbsp; # Seting up an ip address is better here<br>
  3202. &nbsp;&nbsp;&nbsp; option domain-name-servers 192.168.81.2;<br>
  3203. &nbsp;&nbsp;&nbsp; option nis-domain "trinityhome.local";<br>
  3204. <br>
  3205. &nbsp;&nbsp;&nbsp; range dynamic-bootp 192.168.81.128 192.168.81.254;<br>
  3206. &nbsp;&nbsp;&nbsp; default-lease-time 21600;<br>
  3207. &nbsp;&nbsp;&nbsp; max-lease-time 43200;<br>
  3208. &nbsp;&nbsp;&nbsp; # PXE directives<br>
  3209. &nbsp;&nbsp;&nbsp; next-server 192.168.81.5;<br>
  3210. &nbsp;&nbsp;&nbsp; filename "/pxelinux.0";<br>
  3211. <br>
  3212. #&nbsp;&nbsp;&nbsp; group {<br>
  3213. #&nbsp;&nbsp;&nbsp; host testtrk {<br>
  3214. #&nbsp;&nbsp;&nbsp; hardware ethernet 00:0C:29:A1:E9:E5;<br>
  3215. #&nbsp;&nbsp;&nbsp; fixed-address 192.168.81.253;<br>
  3216. #&nbsp;&nbsp;&nbsp; next-server 192.168.81.5;<br>
  3217. #&nbsp;&nbsp;&nbsp; filename "/pxelinux.0";<br>
  3218. #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>
  3219. #&nbsp;&nbsp;&nbsp; }</font> <br>
  3220. &nbsp;<br>
  3221. <strong>Second DHCP server is with a Microsoft DHCP</strong>.<br>
  3222. -Run&nbsp; the DHCP snap-in<br>
  3223. -Go to&nbsp; your active scope =&gt; scope options =&gt; right click in it and select&nbsp; 'Configure options'<br>
  3224. -Activate option '066 Bootserver hostname' and option '067 Bootfile Name'. <br>
  3225. -Put for hostname the IP-address of your TFTP server alltogether. <br>
  3226. -For bootfilename '/pxelinux.0'</p>
  3227. <h2>4. Setting up a TFTP server (primary bootprocess)</h2>
  3228. <p>I 'm using the tftp-hpa-0.43a TFTP server, which is recommended by
  3229. the syslinux developer. Download it from kernel.org:
  3230. http://www.kernel.org/pub/software/network/tftp/<br>
  3231. Download, unpack, configure and make &amp;&amp; make install it.<br>
  3232. It 's also possible it was already in your distribution, so you don 't need to compile it.<br>
  3233. To have the tftp server run from the commandline as a daemon, using
  3234. /home/trkfiles as the dir where your TRK resides, type 'in.ftpd -l -s
  3235. /home/trkfiles'<br>
  3236. In fact, this whole procedure so far is also explained on the syslinux homepage.<strong><br>
  3237. </strong></p>
  3238. <h2>5. Setting up NFS (secondary bootprocess)</h2>
  3239. <p>This is for a very basic NFS setup. TRK only needs read only access
  3240. on NFS, so there 's no big security issue for this simple setup.<br>
  3241. NFS relies on 1 configuration file for its shares: /etc/exports<br>
  3242. Edit /etc/exports and add the next line, again assuming /home/trkfiles
  3243. is where your TRK resides. This is the same folder as your TFTP server
  3244. root!<br>
  3245. '/home/trkfiles&nbsp;&nbsp; *(ro,no_root_squash)'<br>
  3246. Restart your NFS service.<br>
  3247. <br>
  3248. <br>
  3249. That 's it, you 're all set. Take a machine in your lan, power it on,
  3250. press F12 and boot from network with TRK. It should boot even faster
  3251. than from CD or disk.<br>
  3252. When a newer version of TRK appears, all you need to do is download and
  3253. unpack in the same dir where it resided before and regenerate your PXE
  3254. config with mkpxelinux<br>
  3255. <br>
  3256. In the event you gave wrong parameters or your NFS has any problem at
  3257. all to get mounted, TRK will drop to a basic shell allowing you to
  3258. debug what's happened.</p>
  3259. <h2>6. Custom security and triggers</h2>
  3260. <p><strong>Setting it up</strong><br>
  3261. <br>
  3262. In some cases you cannot have the physical console of a machine, but it
  3263. can be remotely booted from network with TRK&nbsp; on PXE.<br>
  3264. You could run a ssh server, but TRK by default will not run one because
  3265. there would be no security (the default password for root is 'trk').<br>
  3266. In this case I 've developed a possibility to have a custom shadow file
  3267. (=holds encrypted versions of passwords on a Linux machine) or even
  3268. better the use of RSA public keys.<br>
  3269. Furthermore, there 's also a check for a custom, per host
  3270. trk3options.conf file, should you not have a trk3optionsserver
  3271. environment (feature since TRK 3.1).<br>
  3272. Also it will look for a custom trklocscript, so you can launch anything else you like.<br>
  3273. Here 's the way to set it up:<br>
  3274. -In the directory where your TRK files reside, create a directory called 'pxeconfig'<br>
  3275. -in the directory pxeconfig, create directories named according the mac-address of your custom hosts.<br>
  3276. If your hosts network card is 00:0C:29:A1:B9:E5, then create that
  3277. directory, but use hyphens instead of colons, just to avoid filesystems
  3278. that don 't accept colons. So in this case create directory
  3279. '00-0C-29-A1-B9-E5'<br>
  3280. <br>
  3281. <strong>Security and other triggers</strong><br>
  3282. <br>
  3283. -Per host shadow file<br>
  3284. In the mac-address based directory you can now put a custom shadow
  3285. file. This will be detected upon startup of TRK on the host with the
  3286. matching network interface and copied locally.<br>
  3287. Once copied, TRK will start a secure shell server allowing remote
  3288. control of the machine with the matching root password from the custom
  3289. shadow file.<br>
  3290. <br>
  3291. -Per host authorized_keys file<br>
  3292. Another way of&nbsp; having custom security for ssh is the use of rsa
  3293. key authentication. This is fairly easy to setup. The method of
  3294. public/private key authentication is standard secure shell and is
  3295. explained anywhere on the internet. I will therefore not explain how
  3296. you should generate a public/private keypair.<br>
  3297. What 's important is that you copy the public key of the root user to a
  3298. file called 'authorized_keys'. In general, one key is enough, so it 's
  3299. ok to copy the file id_rsa.pub or identity.pub to 'authorized_keys'
  3300. into our /&lt;trkpxefiles&gt;/pxeconfig/&lt;mac-addres&gt;/ directory.<br>
  3301. Upon startup, this file will be detected and gets precedence over a
  3302. custom shadow file. Once this file is copied, TRK will disable password
  3303. based authentication, so you can only login with your private key<br>
  3304. <br>
  3305. -Per host or general trk3options.conf and trklocscript file<br>
  3306. Just like with a trkoptionsserver, you can have a custom
  3307. trk3options.conf file in which you can specify custom proxy settings or
  3308. a complete script. Just put the file in
  3309. /&lt;trkpxefiles&gt;/pxeconfig/&lt;mac-addres&gt;/&nbsp; for per host
  3310. trk3options.conf or in /&lt;trkpxefiles&gt;/pxeconfig/ to have this
  3311. file for general use for all local TRK hosts.<br>
  3312. The same principle goes for trklocscript, a script that will get
  3313. executed when found. Place this script in /&lt;trkpxefiles&gt;/trk3/
  3314. and it will get executed on startup.</p><br>
  3315. </div>
  3316. <!-- Author: Tom Kerremans Prints: 0 Created: 5/15/2006 Updated: 8/11/2010 -->
  3317. </div><!-- close page-container -->
  3318. </div>
  3319. <br class="brclear">
  3320. <div id="print-footer">
  3321. <!-- Document Footer -->
  3322. Trinityhome.org
  3323. <script language="JavaScript" type="text/javascript">
  3324. <!--//--><![CDATA[//><!--
  3325. window.print();
  3326. //--><!]]>
  3327. </script><br class="brclear">
  3328. <div class="copyright">Copyright&nbsp;1996-2010&nbsp;Trinityhome&nbsp;All rights reserved.</div><div style="color: rgb(204, 204, 204); font-style: italic; padding-left: 5px;">Powered by <a style="color: rgb(204, 204, 204);" href="http://trinityhome.org/barts_cms/" title="Bart's CMS [Business Edition] Version 4.0.110 [Stable]">Bart's CMS</a></div><div style="padding: 2px;"><a href="http://trinityhome.org/barts_cms/" title="Powered by Bart's CMS [Business Edition] Version: 4.0.110 [Stable]"><img src="helpdocs_files/el_powered.gif" alt="Powered by Bart's CMS [Business Edition] Version 4.0.110 [Stable]" style="border: 0px none ;" height="23" width="103"></a></div>
  3329. <!--<div style="color:#ccc;font-style:italic;padding-left:5px;">Powered by <a style="color:#ccc;" href="http://trinityhome.org/barts_cms/" title="Bart's CMS [Business Edition] Version 4.0.110 [Stable]" >Bart's CMS</a></div> -->
  3330. </div>
  3331. </div>
  3332. </body></html>