#!/usr/bin/perl # # Guillaume Cottenceau (gc@mandrakesoft.com) # # Copyright 2000 MandrakeSoft # # This software may be freely redistributed under the terms of the GNU # public license. # # 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., 675 Mass Ave, Cambridge, MA 02139, USA. # local $_ = join '', @ARGV; "@ARGV" =~ /-h/ and die "usage: drivers_install [drivertype1 drivertype2..]\n"; sub pci_probe { my @l; foreach (`/usr/bin/lspcidrake -v`) { push @l, do { if (/^(\S+)\s*: (.+) \[([^\]]+)/) { { driver => $1, description => $2, type => $3 }; } elsif (/^(\S+)\s*: (.+)/) { { driver => $1, description => $2, type => 'NOT_DEFINED' }; } else { next; } }; } @l; } sub install_module($$) { my ($driver, $descr) = @_; print "Installing driver $driver (for \"$descr\")\n"; system("/sbin/modprobe", $driver) and print "\tfailed\n"; my $already_usb if 0; if (!$already_usb && $driver =~ /usb/) { $already_usb = 1; print "Installing driver usbkdb\n"; system('/sbin/modprobe', 'usbkbd') and print "\tfailed\n"; print "Installing driver keybdev\n"; system('/sbin/modprobe', 'keybdev') and print "\tfailed\n"; } } #- start foreach $card (pci_probe()) { $card->{type} eq "DISPLAY_VGA" and next; $card->{driver} eq "unknown" and next; $card->{driver} =~ "Card:" and next; if (!@ARGV || grep { $card->{type} =~ /$_/i } @ARGV) { install_module($card->{driver}, $card->{description}); } } #------------------------------------------------- #- $Log$ #- Revision 1.6 2002/09/10 10:07:23 gc #- drvinst <param> is broken when we don't -v #- #- Revision 1.5 2001/09/27 16:00:05 gc #- don't install usb keyboard drivers more than once #- #- Revision 1.4 2001/09/27 15:57:55 gc #- try to fix usb keyboards #- #- Revision 1.3 2001/03/29 11:33:28 gc #- test for "Card:" and not install, some videoboards are not reported as DISPLAY_VGA :-( #- #- Revision 1.2 2001/02/12 18:42:17 uid553 #- pixelization #- #- Revision 1.1 2001/02/12 14:31:10 uid535 #- - add lspci, lspcidrake, vim-minimal #- - better /etc/issue #- - better PS1 #- - write embryonic tool (installation of detected drivers according to pci cards) #- option value='topic/MDK92-branch'>topic/MDK92-branch</option> <option value='topic/MDKC_1_0'>topic/MDKC_1_0</option> <option value='topic/PCMCIA_CS_DISTRO'>topic/PCMCIA_CS_DISTRO</option> <option value='topic/R9_0-64bit-branch'>topic/R9_0-64bit-branch</option> <option value='topic/R9_1_HP-branch'>topic/R9_1_HP-branch</option> <option value='topic/a'>topic/a</option> <option value='topic/before_matchbox_wm'>topic/before_matchbox_wm</option> <option value='topic/bug-13680'>topic/bug-13680</option> <option value='topic/dietlibc'>topic/dietlibc</option> <option value='topic/efi'>topic/efi</option> <option value='topic/extlinux'>topic/extlinux</option> <option value='topic/firewall'>topic/firewall</option> <option value='topic/gdk-pixbuf-0-branch'>topic/gdk-pixbuf-0-branch</option> <option value='topic/gi-ppc'>topic/gi-ppc</option> <option value='topic/ia64-8_1'>topic/ia64-8_1</option> <option value='topic/mandrakesoft'>topic/mandrakesoft</option> <option value='topic/mlcd4'>topic/mlcd4</option> <option value='topic/ppp'>topic/ppp</option> <option value='topic/rp-pppoe'>topic/rp-pppoe</option> <option value='topic/switching_to_dnf'>topic/switching_to_dnf</option> <option value='topic/switching_to_urpmi'>topic/switching_to_urpmi</option> <option value='topic/unlabeled-1.1.1'>topic/unlabeled-1.1.1</option> <option value='topic/v_webmin_0_87'>topic/v_webmin_0_87</option> <option value='topic/x86_64-branch'>topic/x86_64-branch</option> <option value='user/animtim/designWork'>user/animtim/designWork</option> <option value='user/colin/rescue-systemd'>user/colin/rescue-systemd</option> <option value='user/ennael/mga6'>user/ennael/mga6</option> <option value='user/erwan/bug-13680'>user/erwan/bug-13680</option> <option value='user/jibz/aarch64'>user/jibz/aarch64</option> <option value='user/martinw/mga6'>user/martinw/mga6</option> <option value='user/pterjan/arm64'>user/pterjan/arm64</option> </select> <input type='submit' value='switch'/></form></td></tr> <tr><td class='sub'>Mageia Installer and base platform for many utilities</td><td class='sub right'>Thierry Vignaud [tv]</td></tr></table> <table class='tabs'><tr><td> <a href='/software/drakx/?h=16.79'>summary</a><a href='/software/drakx/refs/?h=16.79&id=83f911b151adc8f31db9a4fa51f31174452f8e78'>refs</a><a href='/software/drakx/log/docs/README.pxe?h=16.79'>log</a><a class='active' href='/software/drakx/tree/docs/README.pxe?h=16.79&id=83f911b151adc8f31db9a4fa51f31174452f8e78'>tree</a><a href='/software/drakx/commit/docs/README.pxe?h=16.79&id=83f911b151adc8f31db9a4fa51f31174452f8e78'>commit</a><a href='/software/drakx/diff/docs/README.pxe?h=16.79&id=83f911b151adc8f31db9a4fa51f31174452f8e78'>diff</a><a href='/software/drakx/stats/docs/README.pxe?h=16.79'>stats</a></td><td class='form'><form class='right' method='get' action='/software/drakx/log/docs/README.pxe'> <input type='hidden' name='h' value='16.79'/><input type='hidden' name='id' value='83f911b151adc8f31db9a4fa51f31174452f8e78'/><select name='qt'> <option value='grep'>log msg</option> <option value='author'>author</option> <option value='committer'>committer</option> <option value='range'>range</option> </select> <input class='txt' type='search' size='10' name='q' value=''/> <input type='submit' value='search'/> </form> </td></tr></table> <div class='path'>path: <a href='/software/drakx/tree/?h=16.79&id=83f911b151adc8f31db9a4fa51f31174452f8e78'>root</a>/<a href='/software/drakx/tree/docs?h=16.79&id=83f911b151adc8f31db9a4fa51f31174452f8e78'>docs</a>/<a href='/software/drakx/tree/docs/README.pxe?h=16.79&id=83f911b151adc8f31db9a4fa51f31174452f8e78'>README.pxe</a></div><div class='content'>blob: e60aa9ecf9d1523f2f588883c016e10db856f9d6 (<a href='/software/drakx/plain/docs/README.pxe?h=16.79&id=83f911b151adc8f31db9a4fa51f31174452f8e78'>plain</a>) <table summary='blob content' class='blob'> <tr><td class='linenumbers'><pre><a id='n1' href='#n1'>1</a> <a id='n2' href='#n2'>2</a> <a id='n3' href='#n3'>3</a> <a id='n4' href='#n4'>4</a> <a id='n5' href='#n5'>5</a> <a id='n6' href='#n6'>6</a> <a id='n7' href='#n7'>7</a> <a id='n8' href='#n8'>8</a> <a id='n9' href='#n9'>9</a> <a id='n10' href='#n10'>10</a> <a id='n11' href='#n11'>11</a> <a id='n12' href='#n12'>12</a> <a id='n13' href='#n13'>13</a> <a id='n14' href='#n14'>14</a> <a id='n15' href='#n15'>15</a> <a id='n16' href='#n16'>16</a> <a id='n17' href='#n17'>17</a> <a id='n18' href='#n18'>18</a> <a id='n19' href='#n19'>19</a> <a id='n20' href='#n20'>20</a> <a id='n21' href='#n21'>21</a> <a id='n22' href='#n22'>22</a> <a id='n23' href='#n23'>23</a> <a id='n24' href='#n24'>24</a> <a id='n25' href='#n25'>25</a> <a id='n26' href='#n26'>26</a> <a id='n27' href='#n27'>27</a> <a id='n28' href='#n28'>28</a> <a id='n29' href='#n29'>29</a> <a id='n30' href='#n30'>30</a> <a id='n31' href='#n31'>31</a> <a id='n32' href='#n32'>32</a> <a id='n33' href='#n33'>33</a> <a id='n34' href='#n34'>34</a> <a id='n35' href='#n35'>35</a> <a id='n36' href='#n36'>36</a> <a id='n37' href='#n37'>37</a> <a id='n38' href='#n38'>38</a> <a id='n39' href='#n39'>39</a> <a id='n40' href='#n40'>40</a> <a id='n41' href='#n41'>41</a> <a id='n42' href='#n42'>42</a> <a id='n43' href='#n43'>43</a> <a id='n44' href='#n44'>44</a> <a id='n45' href='#n45'>45</a> <a id='n46' href='#n46'>46</a> <a id='n47' href='#n47'>47</a> <a id='n48' href='#n48'>48</a> <a id='n49' href='#n49'>49</a> <a id='n50' href='#n50'>50</a> <a id='n51' href='#n51'>51</a> <a id='n52' href='#n52'>52</a> <a id='n53' href='#n53'>53</a> <a id='n54' href='#n54'>54</a> <a id='n55' href='#n55'>55</a> <a id='n56' href='#n56'>56</a> <a id='n57' href='#n57'>57</a> <a id='n58' href='#n58'>58</a> <a id='n59' href='#n59'>59</a> <a id='n60' href='#n60'>60</a> <a id='n61' href='#n61'>61</a> <a id='n62' href='#n62'>62</a> <a id='n63' href='#n63'>63</a> <a id='n64' href='#n64'>64</a> <a id='n65' href='#n65'>65</a> <a id='n66' href='#n66'>66</a> <a id='n67' href='#n67'>67</a> <a id='n68' href='#n68'>68</a> <a id='n69' href='#n69'>69</a> <a id='n70' href='#n70'>70</a> <a id='n71' href='#n71'>71</a> <a id='n72' href='#n72'>72</a> <a id='n73' href='#n73'>73</a> <a id='n74' href='#n74'>74</a> <a id='n75' href='#n75'>75</a> <a id='n76' href='#n76'>76</a> <a id='n77' href='#n77'>77</a> <a id='n78' href='#n78'>78</a> <a id='n79' href='#n79'>79</a> <a id='n80' href='#n80'>80</a> <a id='n81' href='#n81'>81</a> <a id='n82' href='#n82'>82</a> <a id='n83' href='#n83'>83</a> <a id='n84' href='#n84'>84</a> <a id='n85' href='#n85'>85</a> <a id='n86' href='#n86'>86</a> <a id='n87' href='#n87'>87</a> <a id='n88' href='#n88'>88</a> <a id='n89' href='#n89'>89</a> <a id='n90' href='#n90'>90</a> <a id='n91' href='#n91'>91</a> <a id='n92' href='#n92'>92</a> <a id='n93' href='#n93'>93</a> <a id='n94' href='#n94'>94</a> <a id='n95' href='#n95'>95</a> <a id='n96' href='#n96'>96</a> <a id='n97' href='#n97'>97</a> <a id='n98' href='#n98'>98</a> <a id='n99' href='#n99'>99</a> <a id='n100' href='#n100'>100</a> <a id='n101' href='#n101'>101</a> <a id='n102' href='#n102'>102</a> <a id='n103' href='#n103'>103</a> <a id='n104' href='#n104'>104</a> <a id='n105' href='#n105'>105</a> <a id='n106' href='#n106'>106</a> <a id='n107' href='#n107'>107</a> <a id='n108' href='#n108'>108</a> <a id='n109' href='#n109'>109</a> <a id='n110' href='#n110'>110</a> <a id='n111' href='#n111'>111</a> <a id='n112' href='#n112'>112</a> <a id='n113' href='#n113'>113</a> <a id='n114' href='#n114'>114</a> <a id='n115' href='#n115'>115</a> <a id='n116' href='#n116'>116</a> <a id='n117' href='#n117'>117</a> <a id='n118' href='#n118'>118</a> <a id='n119' href='#n119'>119</a> <a id='n120' href='#n120'>120</a> <a id='n121' href='#n121'>121</a> <a id='n122' href='#n122'>122</a> <a id='n123' href='#n123'>123</a> <a id='n124' href='#n124'>124</a> <a id='n125' href='#n125'>125</a> <a id='n126' href='#n126'>126</a> <a id='n127' href='#n127'>127</a> <a id='n128' href='#n128'>128</a> <a id='n129' href='#n129'>129</a> <a id='n130' href='#n130'>130</a> <a id='n131' href='#n131'>131</a> <a id='n132' href='#n132'>132</a> <a id='n133' href='#n133'>133</a> </pre></td> <td class='lines'><pre><code>Here is a short description to configure a PXE server using dhcpd and tftpd. This allows a network boot for your ethernet card conforming to the Interl PXE specification. ******************************************************************************** ********** General overview ************ ******************************************************************************** You need a dhcp server and a tftp server on one or two machines to allow the network boot. We are not using a PXE server to achieve this as it is not mandatory. You can install tftp-server and dhcp-server package from the Mandrake distribution for example. On the server machine at 192.168.2.1, you will find a "/etc/dhcpd.conf" sample file written by Florin Grad <florin>, where "mydomain.com" is assumed to be your domain name, and 192.168.1.1 a name server. All install are done on subnet 192.168.2.0. All the files that will be downloaded by the tftp daemon are located under "/tftpboot" : "/tftpboot/pxelinux.0" is a program that is loaded directly by the machine where a network boot will be done, this program comes from the SYSLINUX package by H. Peter Anvin. (look at http://syslinux.zytor.com/pxe.php for more information) "/tftpboot/pxelinux.cfg/" is a directory where all configuration file for pxelinux.0 will be found, pxelinux.0 will download these file by itself. It searches first for a file named accordind to the machine IP address in hexadecimal, for example for 192.168.2.20, it looks for "C0A80214" first, then "C0A8021" and so on down to "C0", "C" and "default". "/tftpboot/network.rdz" is the standard network initrd for Mandrake installation. "/tftpboot/vmlinuz" is the boot kernel for installation. "/tftpboot/help.msg" is the message displayed by pxelinux.0, note that currently graphical message (as for install using SYSLINUX 1.48 with graphic patch by Mandrake) is not supported. All file "network.rdz", "vmlinuz", "help.msg" can be found by mounting "network.img", or the network floppy disk used for install, "pxelinux.cfg" is just an adaptation of the file found on the "network.img" called "syslinux.cfg" but without the reference to boot.msg (as it is not currently supported). Update network configuration for your needs and start dhcp server on the machine and tftp server and this should work. ******************************************************************************** * /etc/dhcpd.conf ************************************************************** ******************************************************************************** ddns-update-style ad-hoc; authoritative; option space PXE; option PXE.mtftp-ip code 1 = ip-address; option PXE.mtftp-cport code 2 = unsigned integer 16; option PXE.mtftp-sport code 3 = unsigned integer 16; option PXE.mtftp-tmout code 4 = unsigned integer 8; option PXE.mtftp-delay code 5 = unsigned integer 8; option PXE.discovery-control code 6 = unsigned integer 8; option PXE.discovery-mcast-addr code 7 = ip-address; default-lease-time 28800; max-lease-time 86400; option domain-name "mydomain.com"; option domain-name-servers 192.168.1.1; class "PXE" { match if substring(option vendor-class-identifier, 0, 9) = "PXEClient"; option vendor-class-identifier "PXEClient"; vendor-option-space PXE; option PXE.mtftp-ip 0.0.0.0; next-server 192.168.2.1; #tftp server location filename "pxelinux.0"; # standard TFTP } shared-network "mynetwork" { subnet 192.168.2.0 netmask 255.255.255.0 { option subnet-mask 255.255.255.0; option routers 192.168.2.1; ddns-domainname = "mydomain.com"; pool { range 192.168.2.10 192.168.2.20; allow members of "PXE"; } } } ******************************************************************************** * /tftpboot/pxelinux.cfg/default *********************************************** ******************************************************************************** default linux prompt 1 timeout 72 display help.msg label linux kernel vmlinuz append ramdisk_size=32000 initrd=network.rdz root=/dev/ram3 vga=788 label vgalo kernel vmlinuz append ramdisk_size=32000 initrd=network.rdz root=/dev/ram3 vga=785 label vgahi kernel vmlinuz append ramdisk_size=32000 initrd=network.rdz root=/dev/ram3 vga=791 label vga16 kernel vmlinuz append ramdisk_size=32000 initrd=network.rdz root=/dev/ram3 vga16 label text kernel vmlinuz append ramdisk_size=32000 initrd=network.rdz root=/dev/ram3 text label patch kernel vmlinuz append ramdisk_size=32000 initrd=network.rdz root=/dev/ram3 patch vga=788 label expert kernel vmlinuz append ramdisk_size=32000 initrd=network.rdz root=/dev/ram3 expert vga=788 label rescue kernel vmlinuz append ramdisk_size=32000 initrd=network.rdz root=/dev/ram3 rescue rw label oem kernel vmlinuz append ramdisk_size=32000 initrd=network.rdz automatic=method:cdrom root=/dev/ram3 rescue oem rw ******************************************************************************** * Usefull linkst *************************************************************** ******************************************************************************** http://syslinux.zytor.com/pxe.php http://www.kano.org.uk/projects/pxe/ </code></pre></td></tr></table> </div> <!-- class=content --> <div class='footer'>generated by <a href='https://git.zx2c4.com/cgit/about/'>cgit v1.2.1</a> (<a href='https://git-scm.com/'>git 2.21.0</a>) at 2025-03-27 20:21:08 +0000</div> </div> <!-- id=cgit --> </body> </html>