RHEL4/HOWTO0000755000000000000000000002776712453213335007434 0ustar ############################################################################### # This page describes how to install RHEL4 U3 onto a hard drive so that the # disk is bootable using an Intel iSCSI Boot-capable adapter. There are two # methods to accomplish this: # Installing directly to a hard drive in an iSCSI storage array (Remote # Install). # Installing to a local disk drive and then transferring this disk drive or OS # image to an iSCSI Target (Local Install). # For more information on SCSI device enumeration, refer to Appendix A at the # end of this document. ############################################################################### This process has two phases. 1) Creating the Driver Update Media (DUM) This involves copying the iSCSI module, its dependencies and the utilities needed for installation onto an update disk. The disk can be an IDE floppy, USB floppy or USB flash drive. 2) Installation to the iSCSI target LU This consists of two parts; pre-install and post-install. NOTE: Some newer network device drivers are not included in RHEL4. To enable these devices, the user will need to get the correct driver and load the driver before discovery is attempted when following the preinstall instructions. ############################################################################### Prerequisites ############################################################################### NOTES: Users who wish to have the easiest experience when installing Linux onto an iSCSI target should use Red Hat 5.1 or greater. Red hat 5.1 provides native support for iSCSI booting and installing. This means that there are no additional steps outside of the installer that are necessary to install to an iSCSI target using an Intel Gigabit PCI-Express Server Adapter. Please refer to the Red Hat 5.1 documentation for instructions on how to install to an iSCSI LU. RHEL5.2 has iBFT support. These instructions explain how to install using source and tools provided on the RHEL4 U3 or U4 CDs. If the user wants to use newer code (kernel src, development packages, initiator source, kernel modules, etc...) it is the user's responsibility to obtain the newer code and alter this process accordingly. A user with the following prerequisites can install and boot RHEL4 U3 or U4 on an iSCSI Target LU. 1) A RHEL4 U3 or U4 build machine To ensure module compatibility the architecture of the build machine should match both the install media and the diskless system with which you intend to connect to the iSCSI Target LU. This means that if you will be doing a diskless boot on an x86_86 system your build machine will need be have an x86_64 architecture. The install CDs will also need to be for the x86_64 architecture. 2) iSCSIBoot.tar.gz Provided by Intel. 3) Install Media A blank 3.5' floppy disk, or a USB flash drive. 4) The iSCSI Target LUN (Boot LUN) This information is important to know in advance so that grub can be configured correctly. ############################################################################### Phase I - Creating the Drivers and Utilities Media (DUM) ############################################################################### 1) Copy and untar iSCSIBoot.tar.gz on the build machine. a) cp iSCSIBoot.tar.gz /home b) cd /home c) tar -zxvf iSCSIBoot.tar.gz 2) Compile iscsiboot/iscsi_boot_util.c statically. a) cd iSCSIBoot b) gcc -static -Wall iscsi_boot_util.c -o iscsi_boot_util 3) Install the following RPM and copy modules to preinstall directory. a) rpm -ivh kernel-2.6.9-34.EL.i686.rpm, from the RHEL4 U3 or U4 CD2 b) cp -f \ /lib/modules/2.6.9-34.EL/kernel/drivers/scsi/ scsi_transport_iscsi.ko \ /lib/modules/2.6.9-34.EL/kernel/drivers/scsi/ iscsi_sfnet/iscsi_sfnet.ko \ /lib/modules/2.6.9-34.EL/kernel/crypto/crc32c.ko \ /lib/modules/2.6.9-34.EL/kernel/crypto/md5.ko \ /lib/modules/2.6.9-34.EL/kernel/lib/libcrc32c.ko \ /home/iSCSIBoot/preinstall/ 4) Copy media onto the DUM a) Attach the DUM and mount it if necessary. b) cp -fr /home/iSCSIBoot/iscsi_boot_util /home/iSCSIBoot/preinstall \ /home/iSCSIBoot/postinstall c) Unmount if necessary and remove the DUM ############################################################################### Phase II - Installation to the iSCSI disk ############################################################################### NOTE: This assumes you have flashed and configured the iSCSI firmware to connect to the target and iSCSI firmware was able to connect to the iSCSI target. NOTE: If you are using USB flash drive/USB floppy as DUM, it must be attached prior to this step. If you're performing a Local Install, make sure the local disk is connected. 1) Begin installation with the option "linux updates". 2) Continue until the "Update Disk Source" screen. a) Press Ctrl+Alt+f2 to switch to command line mode. b) Make a mount point directory and mount the DUM. (The mount point can be anywhere but /mnt). Depending on the DUM media type, these are the instructions: IDE floppy mkdir /mnt/floppy /tmp/iscsi mount /dev/fd0 /mnt/floppy cp -fr /mnt/floppy/* /tmp/iscsi umount /dev/fd0 USB Floppy/USB flash drive To mount a USB device you must understand which /dev node the kernel will use to represent the DUM. To do this run "dmesg" and examine the output. Look for the text which shows your USB device's registration with the system. Determine which sdX device is associated with your device. Next run "cat /proc/partitions", the output should look similar to this, Major Minor #blocks Name 7 0 loop0 8 0 sda Using the /dev node determine the minor number for your USB device. Mount the USB device. mkdir /mnt/usb /tmp/iscsi mknod /dev/sdX b 8 mount /dev/sdX /mnt/usb cp -fr /mnt/usb/* /tmp/iscsi DO NOT unmout/remove USB floppy/USB flash drive at this point. c) Run the iscsipreinstall script from the mount point. /tmp/iscsi/preinstall/iscsipreinstall d) Run "dmesg" again to verify that discovery occurred correctly. It should show that drives were recently discovered. Note the LUNs and discovered SCSI device nodes. This information needed to set grub configuration files. e) Press Ctrl+Alt+F1 and select "Back". f) Continue with the installation. NOTE: When partitioning the iSCSI LUs, ensure that the boot partition is not distributed across physical partitions on different iSCSI LUs. The Intel iSCSI Option ROM will only access one iSCSI LU and if /boot is distributed across multiple LUs, it will not be visible during the boot process. 3) Configure the boot order a) On the "Boot Loader Configuration" screen, select "Configure advanced boot loader options". b) Change the drive order so that the target disk is on the top of the list. c) Continue with the remainder of the installation. d) When the installation is complete DO NOT press "Reboot". 4) Make some final post install changes a) Press Ctrl-Alt-F2 to switch back to the console. b) Alter grub settings Modify the device.map and grub.conf files so that they have the correct device node listed. Refer to Appendix A for more information on SCSI device enumeration. /mnt/sysimage/boot/grub/device.map (hd0) /mnt/sysimage/boot/grub/grub.conf #boot= c) Run the post install script and unmount the DUM. /tmp/iscsi/postinstall/iscsipostinstall 5) Ensure the network is not shutdown during halt a) Edit the /mnt/sysimage/etc/init.d/halt and scroll to the bottom. b) Change the line stating HALTARGS="-i -d" to HALTARGS="-d" 6) Return to the GUI and reboot NOTE: If you are using a bootable USB or Flash drive, remove it, otherwise the system will try to boot off that drive. a) Press Ctrl+Alt+F7 and then select "Reboot" b) Remove the installation media and DUM 7) On your first boot, if Kudzu asks you if you'd like to configure your adapters, please select to "ignore" the device. Appendix A ========== The iSCSI LUs are discovered as SCSI device nodes. The enumeration of SCSI devices is dynamic. The SCSI subsystem creates device nodes in the order that they are discovered, starting with /dev/sda and incrementing alphabetically. In the case of iSCSI LU enumeration, local SCSI devices such as disks or USB devices affect this process. If a device node is created for a USB device before iSCSI discovery occurs the USB device will be represented by /dev/sda and the iSCSI LUs will begin with /dev/sdb. However, if you were to reboot this system without the USB device the iSCSI LUs will begin with /dev/sda. It is important to configure grub correctly to point to the correct device node in order to boot from an iSCSI hard drive. It is often the case when installing to an iSCSI LU that a device driven by the SCSI subsystem is used for the install media. For example, using a USB flash drive for the DUM. As stated above this will affect how grub should be configured when installing. Here is an example of how iSCSI device node mappings might differ between installation and booting. In this example the user is using a USB flash drive as a DUM. Since this device is being used to copy files onto the system it is present before iSCSI discovery occurs. However, when booting from the iSCSI Boot Disk no USB flash drive is necessary and therefore it isn't attached. Remote Installation: USB flash drive or USB floppy /dev/sda LUN 0 /dev/sdb LUN 1 /dev/sdc Booting: LUN 0 /dev/sda LUN 1 /dev/sdb If the USB device is attached after booting, it will be enumerated as such, USB flash drive or USB floppy /dev/sdc It is also possible that there are other USB devices on the system, it is users responsibility to find out if these will interfere with the device node mapping during boot. Appendix B ========== After performing a Local Install on an IDE device the user will need to modify grub so that when booting the root partition is identified as a SCSI device. When installing to a local IDE disk drive the device node used will be of the form /dev/hdX, but when this volume is exposed by the iSCSI target the initator will see the hard drive as a SCSI device and it will be represented as /dev/sdX. This change must be made in the grub configuration file. This type of problem exposes the necessity that the user fully understand the concepts described in this document as specifics may vary greatly. Appendix C ========== In some cases, if booting the system takes an unusually long time, you may try commenting the following line in the file /etc/init.d/iptables: $IPTABLES-restore $OPT $IPTABLES_DATA if [ $? -eq 0 ]; then success; echo else failure; echo; return 1 fi This may be required as the command may be resetting the connection. Appendix D ========== Crash Dump for Linux: Red Hat Enterprise Linux 4: Netdump utility can be used to dump the disk image when the system crashes. Support ======= For general information, go to the Intel support website at: www.intel.com/support/ or the Intel Wired Networking project hosted by Sourceforge at: http://sourceforge.net/projects/e1000 RHEL4/iSCSIBoot.tar.gz0000755000000000000000000004235012453213335011457 0ustar lF<_ǒ+$IH b!`њiI9q{.`;_%Hꩮ[vONvji5|mll M}zF7kZ ##g^ 18%։yF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pD.ϫ\# ;-sd$I#Iz`?aHqr|5RQW|U0EHu8_{׏8:ptkŕ멘Dǀc艓 ex]Ov.n2Q՝Rp:T˿\[k[GkW5Άwؖ=EKl4/|}[D{-K- b7nO돪0ڑVLCQ*PqRuF%=#K@#lNz=ZgNMՖ :[?2k)la\N+0%ۂU] AK9afjƜ%R-\}YVA9|1y )Fhݵu4㸤9}Fs(6B@TM74a"e)-\`k+Dc 0AԖwsi*UDW>еLC Iu"-Z/dV>YK$q mr :. (ʨ"߷*gRuGlYDptUVaQk0sRcđ(H~/H#zH,d1Hu$ԑ-⛩#C:JzR5㚲m "t :8g8rq̪ϒB!䏕|ޓ';{y0jeҚw.r: 4 J>QhICIx5ڹe8r*0  iDgGcbXdL9#'̵0dM!B6fdjHi }8NPQ.CI{]9(1r3 3U|A'wɨC!|fGLF@T8҃@@Bлz#$;k0 :RWJEP}̹T}GE,iz""+P" ԁc, .FJ6qL^xzH$e ,&ojp⺢V&#UǯW`;u#jJ)Q󖪧 z-5St޾͌=Rnt?$9Wx9{[r)o_}i }Ͼ#YRъU\vXuϭ,Wu!UF|ˋ4"i(|euex?U.ײUjv:˗@Jd Zm OV_gvO*7㳿+-9xPƞz}{)ga0QŞQ()gb=H*yz! ;M^L0$<37⠵&"{2 No⌡M3&UGaKO!C=u,w>$U2@εŹߴ6RNъ;hN$?+| k70 %6ȲDXK&Sc_ϟ M*] ^.XS'gӽ^c]q,!dNvS7Tr$w_ z{;qt][۫Tvœ\o;_e3n?ŕJe7w*_G1o ;}Ã#6GbCk= 31wynہ7EҐuCD"*ˢ#9q7?v罰E{!t LZhi#_" GNU General Public License Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: * a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. * b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. * c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: * a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, * b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine- readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, * c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. one line to give the program's name and an idea of what it does. Copyright (C) yyyy name of author This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free software, and you are welcome to redistribute it under certain conditions; type 'show c' for details. The hypothetical commands 'show w' and 'show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than 'show w' and 'show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program 'Gnomovision' (which makes passes at compilers) written by James Hacker. signature of Ty Coon, 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License.