diff options
-rw-r--r-- | chapter_14.xml | 131 | ||||
-rw-r--r-- | chapter_15.xml | 282 | ||||
-rw-r--r-- | chapter_17.xml | 363 | ||||
-rw-r--r-- | chapter_18.xml | 122 | ||||
-rw-r--r-- | chapter_19.xml | 171 |
5 files changed, 707 insertions, 362 deletions
diff --git a/chapter_14.xml b/chapter_14.xml index 23eae86..b9e7e58 100644 --- a/chapter_14.xml +++ b/chapter_14.xml @@ -2,10 +2,10 @@ <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "/usr/share/xml/docbook/xml-dtd-4.5/docbookx.dtd"> -<chapter> +<chapter id="ch_networking"> <title>Networking</title> -<section> +<section id="sect_netconfig"> <title><application>netconfig</application></title> <para> @@ -43,7 +43,7 @@ book. </section> -<section> +<section id="sect_manual-configuration"> <title>Manual Configuration</title> <para> @@ -63,10 +63,10 @@ to use it to display and change the network addresses of some ethernet controllers. </para> -<screen><prompt>darkstar:~# </prompt><userinput>ifconfig</userinput> +<screen><prompt>darkstar:~# </prompt><userinput>ifconfig</userinput> lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 - inet6 addr: ::1/128 Scope:Host + inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:699 errors:0 dropped:0 overruns:0 frame:0 TX packets:699 errors:0 dropped:0 overruns:0 carrier:0 @@ -75,7 +75,7 @@ lo Link encap:Local Loopback wlan0 Link encap:Ethernet HWaddr 00:1c:b3:ba:ad:4c inet addr:192.168.1.198 Bcast:192.168.1.255 Mask:255.255.255.0 - inet6 addr: fe80::21c:b3ff:feba:ad4c/64 Scope:Link + inet6 addr: fe80::21c:b3ff:feba:ad4c/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:1630677 errors:0 dropped:0 overruns:0 frame:0 TX packets:1183224 errors:0 dropped:0 overruns:0 carrier:0 @@ -99,10 +99,10 @@ your system. The above represents a typical wireless connection from my laptop, so don't be afraid if what you see on your system doesn't match. If you don't see any ethX or wlanX interfaces though, the interface may be down. To show all currently present NICs whether they are -"up" or "down", simply pass the <arg>-a</arg> argument. +"up" or "down", simply pass the <arg>-a</arg> argument. </para> -<screen><prompt>darkstar:~# </prompt><userinput>ifconfig -a</userinput> +<screen><prompt>darkstar:~# </prompt><userinput>ifconfig -a</userinput> eth0 Link encap:Ethernet HWaddr 00:19:e3:45:90:44 UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:122780 errors:0 dropped:0 overruns:0 frame:0 @@ -113,7 +113,7 @@ eth0 Link encap:Ethernet HWaddr 00:19:e3:45:90:44 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 - inet6 addr: ::1/128 Scope:Host + inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:699 errors:0 dropped:0 overruns:0 frame:0 TX packets:699 errors:0 dropped:0 overruns:0 carrier:0 @@ -122,7 +122,7 @@ lo Link encap:Local Loopback wlan0 Link encap:Ethernet HWaddr 00:1c:b3:ba:ad:4c inet addr:192.168.1.198 Bcast:192.168.1.255 Mask:255.255.255.0 - inet6 addr: fe80::21c:b3ff:feba:ad4c/64 Scope:Link + inet6 addr: fe80::21c:b3ff:feba:ad4c/4 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:1630677 errors:0 dropped:0 overruns:0 frame:0 TX packets:1183224 errors:0 dropped:0 overruns:0 carrier:0 @@ -144,7 +144,7 @@ and subnet mask, but you can change virtually any parameters. </para> <screen><prompt>darkstar:~# </prompt><userinput>ifconfig eth0 192.168.1.1 netmask 255.255.255.0</userinput> -<prompt>darkstar:~# </prompt><userinput>ifconfig eth0</userinput> +<prompt>darkstar:~# </prompt><userinput>ifconfig eth0</userinput> eth0 Link encap:Ethernet HWaddr 00:19:e3:45:90:44 inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0 UP BROADCAST MULTICAST MTU:1500 Metric:1 @@ -177,7 +177,7 @@ For now, let's take a look at our routing table immediately after setting up eth0. </para> -<screen><prompt>darkstar:~# </prompt><userinput>route</userinput> +<screen><prompt>darkstar:~# </prompt><userinput>route</userinput> Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.1.0 * 255.255.255.0 U 0 0 0 eth0 @@ -198,8 +198,8 @@ itself. In order to reach the rest of the world, we'll need to setup a default gateway. </para> -<screen><prompt>darkstar:~# </prompt><userinput>route add default gw 192.168.1.254</userinput> -<prompt>darkstar:~# </prompt><userinput>route</userinput> +<screen><prompt>darkstar:~# </prompt><userinput>route add default gw 192.168.1.254</userinput> +<prompt>darkstar:~# </prompt><userinput>route</userinput> Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.1.0 * 255.255.255.0 U 0 0 0 eth0 @@ -227,17 +227,17 @@ Don't ask me what happened to the <keycap>e</keycap>. On my computer, </para> <screen> -# /etc/resolv.conf +# /etc/resolv.conf search lizella.net nameserver 192.168.1.254 </screen> <para> -Most users won't need the "search" line. This is used to map hostnames +Most users won't need the <parameter>search</parameter> line. This is used to map hostnames to domain names. Basically, if I attempt to connect to "barnowl", the computer knows to look for "barnowl.lizella.net" thanks to this search -line. We're mainly interested in the "nameserver" line. This tells -Slackware what domain name servers (DNS) to connect to. Generally +line. We're mainly interested in the <parameter>nameserver</parameter> line. This tells +Slackware what domain name servers (DNS) to connect to. Generally speaking, these should always be specified by IP address. If you know what DNS servers you should use, you can just add them one at a time to individual nameserver lines. In fact, I don't know of any practical @@ -268,7 +268,7 @@ your network, and that you have an operating DHCP server on that network, you can configure your NIC in one shot. </para> -<screen><prompt>darkstar:~# </prompt><userinput>dhcpcd eth0</userinput> +<screen><prompt>darkstar:~/ </prompt><userinput>dhcpcd eth0</userinput> </screen> <para> @@ -281,17 +281,17 @@ on your network, and with the Internet at large. If for some reason, <application>dhcpcd</application> and works in basically the same way. </para> -<screen><prompt>darkstar:~# </prompt><userinput>dhclient eth0</userinput> -Listening on LPF/eth0/00:1c:b3:ba:ad:4c -Sending on LPF/eth0/00:1c:b3:ba:ad:4c -Sending on Socket/fallback +<screen><prompt>darkstar:~/ </prompt><userinput>dhclient eth0</userinput> +Listening on LPF/eth0/00:1c:b3:ba:ad:4c +Sending on LPF/eth0/00:1c:b3:ba:ad:4c +Sending on Socket/fallback DHCPREQUEST on eth0 to 255.255.255.255 port 67 DHCPACK from 192.168.1.254 bound to 192.168.1.198 -- renewal in 8547 seconds. </screen> <para> -So why does Slackware include two DHCP clients? Sometimes a particular +Why does Slackware include two DHCP clients? Sometimes a particular DHCP server may be broken and not respond well to either <application>dhcpcd</application> or <application>dhclient</application>. In those cases, you can fall back @@ -305,8 +305,10 @@ clients, so use whichever you prefer. </section> -<section> -<title>Automatic Configuration with rc.inet1.conf</title> +<section id="sect_automatic-configuration"> + <title> + Automatic Configuration with <filename>rc.inet1.conf</filename> + </title> <para> Manually configuring interfaces is an important skill to have, but it @@ -314,7 +316,7 @@ can become tedious. No one wants to manually setup their Internet connection every time the system boots. More importantly, you may not always have physical access to the machine when it boots. Slackware makes it easy to automatically configure ethernet (and wireless) cards -at system startup with <filename>/etc/rc.d/rc.inet1.conf</filename>. +at system startup with <filename>/etc/rc.d/rc.inet1.conf</filename>. For now, we're going to focus on traditional wired ethernet networking; the next chapter will discuss various wireless options. </para> @@ -329,13 +331,13 @@ one of my personal machines. </para> <screen> -# Config information for eth0: -IPADDR[0]="192.168.1.250" -NETMASK[0]="255.255.255.0" -USE_DHCP[0]="" -DHCP_HOSTNAME[0]="" -# Some lines ommitted. -GATEWAY="192.168.1.254" +# Config information for eth0: +IPADDR[0]="192.168.1.250" +NETMASK[=]"255.255.255.0" +USE_DHCP[0]="" +DHCP_HOSTNAME[0]="" +# Some lines ommitted. +GATEWAY="192.168.1.254" </screen> <para> @@ -350,25 +352,29 @@ basics. </para> <para> -As you may have already guessed, IPADDR[n] is the Internet Protocol -Address for the "n" network interface card. Typically, "n" corrosponds -to eth0, eth1, and so on, but this isn't always the case. You can -specify these values to pertain to a different network controller with -the INFAME[n] variable, but we will reserve that for the next chapter -on wireless networking, as it more commonly pertains to wireless -network controllers. Likewise, NETMASK[n] is the subnet mask to use -for the network controller. If these lines are left empty, then static -IP addresses will not be automatically assigned to this network -controller. The USE_DHCP[n] variable tells Slackware to (naturally) -use DHCP to configure the interface. DHCP_HOSTNAME[n] is rarely used, -but some DHCP servers may require it. In that case, it must be set to -a valid hostname. Finally, we come to the GATEWAY variable. It is -actually set lower in the file than it appears in my example, and it -controls the default gateway to use. You may be wondering why there is -no GATEWAY[n] variable. The answer to that lies in how Internet -Protocol works. I won't go into an indepth discussion on that subject, -but suffice it to say that there is only ever one default route that a -computer can use no matter how many interfaces are attached to it. +As you may have already guessed, IPADDR[n] is the Internet +Protocol Address for the <varname>n</varname> network interface card. +Typically, <varname>n</varname> corrosponds to +<parameter>eth0</parameter>, <parameter>eth1</parameter>, and so on, +but this isn't always the case. You can specify these values to +pertain to a different network controller with the INFAME[n] +variable, but we will reserve that for the next chapter on wireless +networking, as it more commonly pertains to wireless network +controllers. Likewise, NETMASK[n] is the subnet mask to use +for the network controller. If these lines are left empty, then +static IP addresses will not be automatically assigned to this network +controller. The <varname>USE_DHCP[n]</varname> variable tells +Slackware (naturally) to use DHCP to configure the interface. +<varname>DHCP_HOSTNAME[n]</varname> is rarely used, but some +DHCP servers may require it. In that case, it must be set to a valid +hostname. Finally, we come to the GATEWAY variable. It is actually +set lower in the file than it appears in my example, and it controls +the default gateway to use. You may be wondering why there is no +<varname>GATEWAY[n]</varname> variable. The answer to that +lies in how Internet Protocol works. I won't go into an in-depth +discussion on that subject, but suffice it to say that there is only +ever one default route that a computer can use no matter how many +interfaces are attached to it. </para> <para> @@ -384,18 +390,19 @@ computer. </para> <screen> -# Config information for eth1: -IPADDR[1]="" -NETMASK[1]="" -USE_DHCP[1]="yes" -DHCP_HOSTNAME[1]="" +# Config information for eth1: +IPADDR[1]="" +NETMASK[1]="" +USE_DHCP[1]="yes" +DHCP_HOSTNAME[1]="" </screen> <para> -Here I am telling Slackware to configure eth1 using DHCP. I do not need -to set the IPADDR[1] or NETMASK[1] variables when using DHCP (in fact, -if they are set, they will be ignored). Slackware will happily contact -a DHCP server as soon as the machine begins to boot. +Here I am telling Slackware to configure eth1 using DHCP. I do not +need to set the <varname>IPADDR[1]</varname> or +<varname>NETMASK[1]</varname> variables when using DHCP (in +fact, if they are set, they will be ignored). Slackware will happily +contact a DHCP server as soon as the machine begins to boot. </para> </section> diff --git a/chapter_15.xml b/chapter_15.xml index c3b6d8a..e7d0cc4 100644 --- a/chapter_15.xml +++ b/chapter_15.xml @@ -2,17 +2,19 @@ <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "/usr/share/xml/docbook/xml-dtd-4.5/docbookx.dtd"> -<chapter> +<chapter id="ch_wireless-networking"> <title>Wireless Networking</title> -<section> -<title><application>iwconfig</application></title> +<section id="sect_iwconfig"> + <title> + <application>iwconfig</application> + </title> <para> Wireless networking is somewhat more complicated than traditional wired networking, and requires additional tools for setup. Slackware includes a diverse collection of wireless networking tools to allow you to -configure your wireless network interface card (WNIC) at the most basic +configure your wireless network interface card (WNIC) at the most basic level. We won't cover everything here, but should give you a solid foundation to get up and running quickly. The first tool we are going to look at is <application>iwconfig</application>(8). When run without @@ -20,8 +22,7 @@ any argument, <application>iwconfig</application> displays the current wireless information on any and all NICs on your computer. </para> - -<screen><prompt>darkstar:~# </prompt><userinput>iwconfig</userinput> +<screen><prompt>darkstar:~# </prompt><userinput>iwconfig</userinput> lo no wireless extensions. eth0 no wireless extensions. @@ -31,11 +32,11 @@ wmaster0 no wireless extensions. wlan0 IEEE 802.11abgn ESSID:"nest" Mode:Managed Frequency:2.432 GHz Access Point: 00:13:10:EA:4E:BD - Bit Rate=54 Mb/s Tx-Power=17 dBm + Bit Rate=54 Mb/s Tx-Power=17 dBm Retry min limit:7 RTS thr:off Fragment thr=2352 B Encryption key:off Power Management:off - Link Quality=100/100 Signal level:-42 dBm + Link Quality=100/100 Signal level:-42 dBm Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0 Tx excessive retries:0 Invalid misc:0 Missed beacon:0 @@ -43,11 +44,11 @@ tun0 no wireless extensions. </screen> <para> -Unlike wired networks, wireless networks are "fuzzy". Their borders are +Unlike wired networks, wireless networks are "fuzzy". Their borders are hard to define, and multiple networks may overlap one another. In order -to avoid confusion, each wireless network has (hopefully) unique +to avoid confusion, each wireless network has "hopefully) unique identifiers. The two most basic identifiers are the Extended Service -Set Identifier (ESSID) and the channel or frequency for radio +Set Identifier (ESSID) and the channel or frequency for radio transmission. The ESSID is simply a name that identifies the wireless network in question; you may have heard it referred to as the network name or something similar. Typical wireless networks operate on 11 @@ -56,13 +57,13 @@ wireless network, you will have to setup these two pieces of information, and possibly others, before setting up things like the WNIC's IP address. Here you can see that my ESSID is set to "nest" and my laptop is transmitting at 2.432 GHz. This is all that is required to -connect to an unencrypted wireless LAN. (For any of you out there +connect to an unencrypted wireless LAN. (For any of you out there expecting to come to my house and use my unencrypted wireless, you should know that you'll have to break a 2048-bit SSL key before the -access point will let you communicate with my LAN.) +access point will let you communicate with my LAN.) </para> -<screen><prompt>darkstar:~# </prompt><userinput>iwconfig wlan0 essid nest \ +<screen><prompt>darkstar:~# </prompt><userinput>iwconfig wlan0 essid nest \ freq 2.432G</userinput></screen> <para> @@ -72,7 +73,7 @@ frequency or channel to use, Slackware can usually figure this out for you. </para> -<screen><prompt>darkstar:~# </prompt><userinput>iwconfig wlan0 essid nest \ +<screen><prompt>darkstar:~# </prompt><userinput>iwconfig wlan0 essid nest \ channel auto</userinput></screen> <para> @@ -82,37 +83,37 @@ the "nest" essid operating at any frequency. </section> -<section> +<section id="sect_wep"> <title>Wired Equivilant Protection (or Lack Thereof)</title> <para> Wireless networking is by its very nature less secure than wired -networking. Having your information travelling on the airwaves makes it -highly susceptible to interception by third paries, so over the years a -number of methods have been devised to make wireless networking more -secure. The first was called Wired Equivilant Protection, or WEP for -short, and well far short of its goal. If you are still using WEP -today, I encourage you to consider using WPA2 or some other form of -stronger encryption. Attacks against WEP are trivial and take only -minutes to perform. Unfortunately there are still access points -configured for WEP, and you may need to connect to one from time to -time. Connecting to WEP encrypted access points is fairly simple, -particularly if you have the key in hexidecimal format. We'll need to -pass the <arg>key</arg> argument along with the password in hexidecimal -or ASCII format. If using an ASCII password, you'll need to prepend it -with "s:"; here's a couple examples. Generally speaking, hexidecimal -format is prefered. +networking. Having your information travelling on the airwaves makes +it highly susceptible to interception by third parties, so over the +years a number of methods have been devised to make wireless +networking more secure. The first was called Wired Equivilant +Protection, or WEP for short, and fell far short of its goal. If you +are still using WEP today, I encourage you to consider using WPA2 or +some other form of stronger encryption. Attacks against WEP are +trivial and take only minutes to perform. Unfortunately there are +still access points configured for WEP, and you may need to connect to +one from time to time. Connecting to WEP encrypted access points is +fairly simple, particularly if you have the key in hexidecimal +format. We'll need to pass the <arg>key</arg> argument along with the +password in hexidecimal or ASCII format. If using an ASCII password, +you'll need to prepend it with "s;" but generally +speaking, hexidecimal format is preferred. </para> -<screen><prompt>darkstar:~# </prompt><userinput>iwconfig wlan0 \ +<screen><prompt>darkstar:~# </prompt><userinput>iwconfig wlan0 \ key cf80baf8bf01a160de540bfb1c</userinput> -<prompt>darkstar:~# </prompt><userinput>iwconfig wlan0 \ +<prompt>darkstar:~# </prompt><userinput>iwconfig wlan0 \ key s:thisisapassword</userinput> </screen> </section> -<section> +<section id="sect_wpa"> <title>Wifi Protected Access</title> <para> @@ -139,39 +140,40 @@ page for <filename>wpa_supplicant.conf</filename>. </para> <screen> -# /etc/wpa_supplicant.conf -# ======================== -# This line enables the use of wpa_cli which is used by rc.wireless -# if possible (to check for successful association) +# /etc/wpa_supplicant.conf +# ======================== +# This line enables the use of wpa_cli which is used by rc.wireless +# if possible (to check for successful association) ctrl_interface=/var/run/wpa_supplicant -# By default, only root (group 0) may use wpa_cli +# By default, only root (group 0) may use wpa_cli ctrl_interface_group=0 eapol_version=1 ap_scan=1 fast_reauth=1 -#country=US +#country=US -# WPA protected network, supply your own ESSID and WPAPSK here: -network={ +# WPA protected network, supply your own ESSID and WPAPSK here: +network={ scan_ssid=1 ssid="nest" key_mgmt=WPA-PSK psk="secret passphrase" -} +} </screen> <para> The block of text we're interested in is the network block enclosed by -curly braces. Here we have set the ssid for the network "nest", as well -as the PSK to use "secret passphrase". At this point, WPA2 is setup. -You can run <application>wpa_supplicant</application> and then obtain -an IP address via DHCP or set a static address. Of course, this is a -lot of work, there must be an easier way to do this. +curly braces. Here we have set the ssid for the network +<varname>"nest"</varname>, and <varname>"secret +passphrase"</varname> as the PSK to be used. At this point, WPA2 is properly +configured. You can run <application>wpa_supplicant</application> and +then obtain an IP address via DHCP or set a static address. Of +course, this is a lot of work; there must be an easier way to do this. </para> -</section> +<!-- not closing this yet /section --> -<section> +<section id="sect_rcinet1conf-revisited"> <title>rc.inet1.conf revisited</title> <para> @@ -190,58 +192,64 @@ networking. </para> <screen> -# rc.inet1.conf (excert) -# ====================== -## Example config information for wlan0. Uncomment the lines you need and fill -## in your info. (You may not need all of these for your wireless network) +# rc.inet1.conf (excert) +# ====================== +## Example config information for wlan0. Uncomment the lines you need and fill +## in your info. (You may not need all of these for your wireless network) IFNAME[4]="wlan0" IPADDR[4]="" NETMASK[4]="" USE_DHCP[4]="yes" -#DHCP_HOSTNAME[4]="icculus-wireless" -#DHCP_KEEPRESOLV[4]="yes" -#DHCP_KEEPNTP[4]="yes" -#DHCP_KEEPGW[4]="yes" -#DHCP_IPADDR[4]="" +#DHCP_HOSTNAME[4]="icculus-wireless" +#DHCP_KEEPRESOLV[4]="yes" +#DHCP_KEEPNTP[4]="yes" +#DHCP_KEEPGW[4]="yes" +#DHCP_IPADDR[4]="" WLAN_ESSID[4]="nest" -#WLAN_MODE[4]=Managed -#WLAN_RATE[4]="54M auto" -#WLAN_CHANNEL[4]="auto" -#WLAN_KEY[4]="D5AD1F04ACF048EC2D0B1C80C7" -#WLAN_IWPRIV[4]="set AuthMode=WPAPSK | \ -# set EncrypType=TKIP | \ -# set WPAPSK=96389dc66eaf7e6efd5b5523ae43c7925ff4df2f8b7099495192d44a774fda16" +#WLAN_MODE[4]=Managed +#WLAN_RATE[4]="54M auto" +#WLAN_CHANNEL[4]="auto" +#WLAN_KEY[4]="D5AD1F04ACF048EC2D0B1C80C7" +#WLAN_IWPRIV[4]="set AuthMode=WPAPSK | \ +# set EncrypType=TKIP | \ +# set WPAPSK=96389dc66eaf7e6efd5b5523ae43c7925ff4df2f8b7099495192d44a774fda16" WLAN_WPA[4]="wpa_supplicant" -#WLAN_WPADRIVER[4]="ndiswrapper" +#WLAN_WPADRIVER[4]="ndiswrapper" </screen> <para> -When we discussed wired ethernet, each "n" in the variable corrosponded -with the "n" in ethn. Here however, that no longer holds true. Notice -that the variable IFNAME[4] has a value of "wlan0". It is common for -wireless cards to have an interface name other than "ethn" and that is -reflected here. When <filename>rc.inet1.conf</filename> is read by the -start-up scripts, Slackware knows to apply all these options to the -"wlan0" wifi NIC instead of the (probably non-existant) eth4 wired NIC. -Many of the other options are the same. IP address information is -added in exactly the same way we discussed for wired network cards in -the previous chapter; however, we have a lot of new variables that need -some explaination. +When we discussed wired ethernet, each <varname>n</varname> in the +variable corresponded with the <varname>n</varname> in +<parameter>eth<emphasis>n</emphasis></parameter>. Here however, that +no longer holds true. Notice that the variable IFNAME[4] has a value +of <varname>wlan0</varname>. It is common for wireless cards to have an interface name +other than <varname>ethn</varname> and that is reflected here. When +<filename>rc.inet1.conf</filename> is read by the start-up scripts, +Slackware knows to apply all these options to the <varname>wlan0</varname> wifi NIC +instead of the (probably non-existant) eth4 wired NIC. Many of the +other options are the same. IP address information is added in +exactly the same way we discussed for wired network cards in <xref +linkend="ch_networking"/>; however, we have a lot of new variables that need +some explanation. </para> <para> -To begin, WLAN_ESSID[n] and WLAN_CHANNEL[n] should be self-explainatory -by now; they refer the the essid and frequency to use. WLAN_MODE[n] is -either "managed" or "ad-hoc". Anyone connecting to an access point -will want to use managed mode. WLAN_KEY[n] is the WEP key to use, if -you're forced to use WEP. WLAN_IWPRIV[n] is a very complicated -variable that sets other variables inside itself. WLAN_IWPRIV[n] is -used for WPA2 networks. Here you tell Slackware what authentication -mode, encryption type, and key to use for WPA2 connections. Please -note that WLAN_KEY[n] and WLAN_IWPRIV[n] are mutually exclusive; you -can't use both on the same interface. If you successfully configure -all this, then Slackware will attempt to connect to your wireless -network as soon as the system boots. +To begin, <varname>WLAN_ESSID[n]</varname> and +<varname>WLAN_CHANNEL[n]</varname> should be self-explainatory by now; +they refer the the essid and frequency to +use. <varname>WLAN_MODE[n]</varname> is either +<parameter>managed</parameter> or <parameter>ad-hoc</parameter>. +Anyone connecting to an access point will want to use managed mode. +<varname>WLAN_KEY[n]</varname> is the WEP key to use, if you're forced +to use WEP. <varname>WLAN_IWPRIV[n]</varname> is a very complicated +variable that sets other variables inside itself. +<varname>WLAN_IWPRIV[n]</varname> is used for WPA2 networks. Here you +tell Slackware what authentication mode, encryption type, and key to +use for WPA2 connections. Please note that +<varname>WLAN_KEY[n]</varname> and <varname>WLAN_IWPRIV[n]</varname> +are mutually exclusive; you can't use both on the same interface. If +you successfully configure all this, then Slackware will attempt to +connect to your wireless network as soon as the system boots. </para> <para> @@ -252,21 +260,23 @@ within range. Doing things this way is simply too much work. You're absolutely correct. </para> -</section> +</section> <!-- closing rc.inet1.conf revisited --> + +</section> <!-- closing WPA discussion --> -<section> -<title>wicd</title> +<section id="sect_wicd"> + <title>wicd</title> <para> Introducing <application>wicd</application>(8), the premier wired and wireless network connection manager for the laptop user on the go. -Pronounced "wicked", <application>wicd</application> is capable of +Pronounced "wicked", <application>wicd</application> is capable of storing information for any number of wireless networks you need and connecting to them with a simple command or the click of a mouse. <application>wicd</application> is not part of the default Slackware installation at this time, as it interferes somewhat with the normal way of configuring network adapters, but you can find it in the -<filename>/extra</filename> directory of your Slackware install disks +<filename>/extra</filename> directory of your Slackware install disks or at your favorite mirror. <application>wicd</application> is both a network connection daemon and a graphical application for configuring networks. The CLI isn't forgotten either, as @@ -277,15 +287,15 @@ any interfaces you have in <filename>rc.inet1.conf</filename> first. </para> <screen> -# rc.inet1.conf -# ============= -# Config information for eth0: -IPADDR[0]="" -NETMASK[0]="" -USE_DHCP[0]="no" -DHCP_HOSTNAME[0]="" -# Default gateway IP address: -GATEWAY="" +# rc.inet1.conf +# ============= +# Config information for eth0: +IPADDR[0]="" +NETMASK[0]="" +USE_DHCP[0]="no" +DHCP_HOSTNAME[0]="" +# Default gateway IP address: +GATEWAY="" </screen> <para> @@ -293,9 +303,9 @@ Now we can install <application>wicd</application>, setup the daemon to run on system boot-up, and begin using a more friendly application. </para> -<screen><prompt>darkstar:~# </prompt><userinput>installpkg /path/to/extra/wicd/wicd-1.6.2.1-1.txz</userinput> -<prompt>darkstar:~# </prompt><userinput>chmod +x /etc/rc.d/rc.wicd</userinput> -<prompt>darkstar:~# </prompt><userinput>/etc/rc.d/rc.wicd start</userinput> +<screen><prompt>darkstar:~# </prompt><userinput>installpkg /path/to/extra/wicd/wicd-1.6.2.1-1.txz</userinput> +<prompt>darkstar:~# </prompt><userinput>chmod +x /etc/rc.d/rc.wicd</userinput> +<prompt>darkstar:~# </prompt><userinput>/etc/rc.d/rc.wicd start</userinput> </screen> <para> @@ -303,33 +313,49 @@ If you're predominately using the console, simply run <application>wicd-curses</application> from your command line. If instead, you are using a graphical desktop provided by <application>X</application>, you can start the graphical front-end -from either the KDE or XFCE menu. Optionally, you could manually run +from either the KDE or XFCE menu. +</para> + + <mediaobject> + <imageobject> + <imagedata + fileref="./img/wicd.png" format="PNG" /> + </imageobject> + <textobject> + <phrase>The wicd interface</phrase> + </textobject> + </mediaobject> + +<para> + Optionally, you could manually run <application>wicd-client</application>(1) from a terminal or run dialogue. </para> <para> -ADD PICTURES OF WICD-CURSES AND WICD-CLIENT!!!! -ADD PICTURES OF WICD-CURSES AND WICD-CLIENT!!!! -ADD PICTURES OF WICD-CURSES AND WICD-CLIENT!!!! -ADD PICTURES OF WICD-CURSES AND WICD-CLIENT!!!! -ADD PICTURES OF WICD-CURSES AND WICD-CLIENT!!!! -ADD PICTURES OF WICD-CURSES AND WICD-CLIENT!!!! -ADD PICTURES OF WICD-CURSES AND WICD-CLIENT!!!! -ADD PICTURES OF WICD-CURSES AND WICD-CLIENT!!!! -ADD PICTURES OF WICD-CURSES AND WICD-CLIENT!!!! -ADD PICTURES OF WICD-CURSES AND WICD-CLIENT!!!! -ADD PICTURES OF WICD-CURSES AND WICD-CLIENT!!!! -ADD PICTURES OF WICD-CURSES AND WICD-CLIENT!!!! -ADD PICTURES OF WICD-CURSES AND WICD-CLIENT!!!! -ADD PICTURES OF WICD-CURSES AND WICD-CLIENT!!!! -ADD PICTURES OF WICD-CURSES AND WICD-CLIENT!!!! -ADD PICTURES OF WICD-CURSES AND WICD-CLIENT!!!! -ADD PICTURES OF WICD-CURSES AND WICD-CLIENT!!!! -ADD PICTURES OF WICD-CURSES AND WICD-CLIENT!!!! -ADD PICTURES OF WICD-CURSES AND WICD-CLIENT!!!! + If you're not running <application>X</application> or simply would + prefer to stay in the terminal, you can launch the command line + version, <application>wicd-curses</application>. </para> -</section> + <mediaobject> + <imageobject> + <imagedata + fileref="./img/wicd-curses.png" format="PNG" /> + </imageobject> + <textobject> + <phrase>The wicd-curses interface</phrase> + </textobject> + </mediaobject> + +<para> + On the graphical front-end, options for different networks are + available via the <guibutton>Preferences</guibutton> button adjacent + to the ESSID listed. In the terminal client, the same options can be + reached by highlighting the network you wish to configure and + pressing <keycap>c</keycap>. +</para> + +</section> <!-- closing wicd section --> </chapter> diff --git a/chapter_17.xml b/chapter_17.xml index eb13319..409349b 100644 --- a/chapter_17.xml +++ b/chapter_17.xml @@ -2,9 +2,13 @@ <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "/usr/share/xml/docbook/xml-dtd-4.5/docbookx.dtd"> -<chapter> +<chapter id="ch_pkg"> <title>Package Management</title> +<indexterm> + <primary>Package Management</primary> +</indexterm> + <para> Package management is an essential part of any Linux distribution. Every piece of software included by Slackware, along with many @@ -17,9 +21,13 @@ worked by running package management tools on a list of packages. Here we'll look at the various tools used for handling Slackware packages. </para> -<section> +<section id="pkg_pktool"> <title><application>pkgtool</application></title> +<indexterm> + <primary>pkgtool</primary> +</indexterm> + <para> The simplest way to perform package maintenance tasks is to invoke <application>pkgtool</application>(8), a menu-driven interface to some of @@ -39,8 +47,21 @@ tools are needed. </section> -<section> -<title>Installing, Removing, and Upgrading Packages</title> +<section id="pkg_install-remove-upgrade"> + <title>Installing, Removing, and Upgrading Packages</title> + +<indexterm> + <primary>installpkg</primary> +</indexterm> +<indexterm> + <primary>removepkg</primary> +</indexterm> +<indexterm> + <primary>upgradepkg</primary> +</indexterm> +<indexterm> + <primary>Installing software</primary> +</indexterm> <para> While <application>pkgtool</application> scores points for convenience, @@ -55,43 +76,63 @@ simplest form, <application>installpkg</application> simply takes a list of packages to install, and does exactly what you would expect. </para> -<screen><prompt>darkstar:~# </prompt><userinput>installpkg blackbox-0.70.1-i486-2.txz</userinput> +<screen><prompt>darkstar:~# </prompt><userinput>installpkg blackbox-0.70.1-i486-2.txz</userinput> Verifying package blackbox-0.70.1-i486-2.txz. Installing package blackbox-0.70.1-i486-2.txz: PACKAGE DESCRIPTION: -# blackbox (Blackbox window manager) -# -# Blackbox is that fast, light window manager you have been looking for -# without all those annoying library dependencies. -# -# Also included in this package is the bbkeys utility for controlling -# keyboard shortcut commands from within Blackbox. -# -# The Blackbox home page is http://blackboxwm.sourceforge.net -# +# blackbox (Blackbox window manager) +# +# Blackbox is that fast, light window manager you have been looking for +# without all those annoying library dependencies. +# +# Also included in this package is the bbkeys utility for controlling +# keyboard shortcut commands from within Blackbox. +# +# The Blackbox home page is http://blackboxwm.sourceforge.net +# Package blackbox-0.70.1-i486-2.txz installed.</screen> <para> You can of course install multiple packages at a time, and in fact use shell wild cards. The following installs all of the "N" series -packages from a mounted CD-ROM. +packages from a mounted CD-ROM: </para> -<screen><prompt>darkstar:~# </prompt><userinput>installpkg /mnt/cdrom/slackware/n/*.txz</userinput></screen> +<screen><prompt>darkstar:~# </prompt><userinput>installpkg /mnt/cdrom/slackware/n/*.txz</userinput></screen> <para> -Removing a package is every bit as easy as installing one. As you might -expect, the command to do this is -<application>removepkg</application>(8). Simply tell it which packages -to remove, and <application>removepkg</application> will check the -contents of the package database and remove all the files and -directories for that package with one caveat. If that file is included -in multiple installed packages, it will be skipped and if a directory -has new files in it, the directory will be left in place. Because of -this, removing packages takes a good while longer than installing them. + At any given time, you can see what packages are installed on your + system by listing the contents of /var/log/packages, + which lists not only every application on your system but also the + version number. Should you want to know what individual files were + installed as a part of that package, <application>cat</application> + the contents of the package: </para> -<screen><prompt>darkstar:~# </prompt><userinput>removepkg blackbox-0.70.1-i486-2.txz</userinput> +<screen> +<prompt>darkstar:~# </prompt> <userinput>cat /var/log/packages/foo-1.0-x86_64.txz</userinput> +</screen> + +<para> + This will return everything from the size of the package, a + description of what it does, and the name and location of every file + installed as a part of the package. +</para> + +<para> + Removing a package is every bit as easy as installing one. As you + might expect, the command to do this is + <application>removepkg</application>(8). Simply tell it which + packages to remove, and <application>removepkg</application> will + check the contents of the package database and remove all the files + and directories for that package with one caveat. If that file is + included in multiple installed packages, it will be skipped and if a + directory has new files in it, the directory will be left in + place. Because of this, removing packages takes a good while longer + than installing them. +</para> + +<screen><prompt>darkstar:~# </prompt><userinput>removepkg blackbox-0.70.1-i486-2.txz</userinput> </screen> <para> @@ -100,31 +141,29 @@ Finally, upgrading is just as easy with (you guessed it), package, then removes whatever files and directories are left-over from the old package. One important thing to remember is that <application>upgradepkg</application> doesn't check to see if the -previously installed package has a higher version number than the "new" +previously installed package has a higher version number than the "new" package, so it can also be used to downgrade to older versions. </para> - - -<screen><prompt>darkstar:~# </prompt><userinput>upgradepkg blackbox-0.70.1-i486-2.txz</userinput> +<screen><prompt>darkstar:~# </prompt><userinput>upgradepkg blackbox-0.70.1-i486-2.txz</userinput> +============================================================================== | Upgrading blackbox-0.65.0-x86_64-4 package using -./blackbox-0.70.1-i486-2.txz +./blackbox-0.70.1-i486-2.txz +============================================================================== Pre-installing package blackbox-0.70.1-i486-2... Removing package -/var/log/packages/blackbox-0.65.0-x86_64-4-upgraded-2010-02-23,16:50:51... - --> Deleting symlink /usr/share/blackbox/nls/POSIX - --> Deleting symlink /usr/share/blackbox/nls/US_ASCII - --> Deleting symlink /usr/share/blackbox/nls/de - --> Deleting symlink /usr/share/blackbox/nls/en - --> Deleting symlink /usr/share/blackbox/nls/en_GB +/var/log/packages/blackbox-0.65.0-x86_64-4-upgraded-2010-02-23,16:50:51... + --> Deleting symlink /usr/share/blackbox/nls/POSIX + --> Deleting symlink /usr/share/blackbox/nls/US_ASCII + --> Deleting symlink /usr/share/blackbox/nls/de + --> Deleting symlink /usr/share/blackbox/nls/en + --> Deleting symlink /usr/share/blackbox/nls/en_GB ... Package blackbox-0.65.0-x86_64-4 upgraded with new package -./blackbox-0.70.1-i486-2.txz.</screen> +./blackbox-0.70.1-i486-2.txz.</screen> <para> All of these tools have useful arguments. For example, the @@ -132,48 +171,248 @@ All of these tools have useful arguments. For example, the packages into an arbitrary directory. The <arg>--dry-run</arg> argument will instruct <application>upgradepkg</application> to simply tell you what it would attempt without actually making any changes to the -system. For complete details, you should (as always) refer to the man +system. For complete details, you should (as always) refer to the man pages. </para> </section> -<section> -<title>Package Compression Formats</title> +<section id="pkg_compression"> + <title>Package Compression Formats</title> <para> -We won't go in depth into the details of package formats, but a few -words should be given here. In the past, all Slackware packages were -compressed with the <application>gzip</application>(1) compression -utility, which was a good compromise between compression speed and -size. Recently, new compression schemes have been added and the -package management tools have been upgraded to handle these. Today, -official Slackware packages are compressed with the -<application>xz</application> utility and end with .txz extensions. -Older packages (and many third party packages) still use the .tgz -extension. + In the past, all Slackware packages were compressed with the + <application>gzip</application>(1) compression utility, which was a + good compromise between compression speed and size. Recently, new + compression schemes have been added and the package management tools + have been upgraded to handle these. Today, official Slackware + packages are compressed with the <application>xz</application> + utility and end with .txz extensions. Older packages (and many + third party packages) still use the .tgz extension. </para> -</section> +<para> + It's worth emphasizing that .tgz and .txz (or, more succinctly, .t?z + files) are very standard, non-unique extensions for compressed .tar + files. This has many advantages; they're easy to build on nearly any + UNIX system (many other package formats require special toolchains), + and they're just as simple to de-construct. +</para> + +<para> + However, it is also important to realize that just because all Slackware + packages <emphasis>are</emphasis> .t?z files, not all .t?z files are + Slackware packages. <application>Installpkg</application> won't + magically install just any .t?z file, only Slackware packages. +</para> -<section> +<section id="pkg_slackpkg"> <title><application>slackpkg</application></title> +<indexterm> + <primary> + slackpkg + </primary> +</indexterm> + +<para> + <application>Slackpkg</application> is an automated tool for + management of Slackware Linux Packages. It originally appeared in + /extra for the release of slackware-12.1, and since the release + of slackware-12.2 it has been included in the ap/ series of a + base installation. +</para> + +<para> + Just as you are able to use <application>installpkg</application> to + install Slackware packages from the /extra directory included on + the install media, you can use <application>slackpkg</application> + to pull packages from the Internet and install them. This is + particularly useful for security updates or significant application + upgrades that are posted to the Slackware servers, some of which you + may want to start using on your own system. +</para> + +<para> + Without <application>slackpkg</application>, the process would be: +</para> + +<orderedlist> + <listitem> + <para> + Notice in the Slackware changelog that an update has been + released. + </para> + </listitem> + + <listitem> + <para> + Look on your local Slackware mirror to find a download link of + the package. + </para> + </listitem> + + <listitem> + <para> + Download the package from a Slackware mirror to your hard drive. + </para> + </listitem> + + <listitem> + Use either <application>installpkg</application> or + <application>pkgtool</application> to install the downloaded + package. + </listitem> +</orderedlist> + +<para> + With <application>slackpkg</application>, this is reduced to: +</para> + +<orderedlist> + <listitem> + <para> + Notice in the Slackware changelog that an update for + <application>foo</application> has been released. + </para> + </listitem> + + <listitem> + <para> + <command>slackpkg</command> <arg>install</arg> foo + </para> + </listitem> +</orderedlist> + +<para> + Clearly, this streamlines a fairly common task. +</para> + +<para> + To use <application>slackpkg</application>, configure your system + with a Slackware mirror by editing + <filename>/etc/slackpkg/mirrors</filename> as root. Find + the mirror that is associated with your Slackware version and + architecture, and uncomment it. This list of mirrors offers ftp and + http access, but you must uncomment <emphasis>only one</emphasis> + mirror. +</para> + <para> - The <application>slackpkg</application> is an automated tool for -management of Slackware Linux Packages. It was in /extra for -the release of slackware-12.1, and since the release of -slackware-12.2 it is included in the ap/ series of a base -installation. + Once a mirror has been selected, update the list of remote files by + issuing the initial command <command>slackpkg update</command>. This + should be done any time you notice that a new package has been + posted (regularly checking in with the Slackware changelog is + recommended; see <xref linkend="ch_updates"/> for more information). </para> + <para> - For more information see the <application>man</application> pages for -slackpkg(8) and slackpkg.conf(5). + To search for a package, use <command>slackpkg search foo</command>, + and to install use <command>slackpkg install foo</command>. </para> + <para> -Homepage: <ulink url="http://www.slackpkg.org/">http://www.slackpkg.org/</ulink> + Once a package has been installed with + <application>slackpkg</application>, it can be removed or upgraded + using <application>pkgtool</application> and the other package + management commands as detailed in <xref + linkend="pkg_install-remove-upgrade"/>. +</para> + +<para> + For more information see the <application>man</application> pages + for slackpkg(8) and slackpkg.conf(5), and see its website at <ulink + url="http://www.slackpkg.org/">http://www.slackpkg.org/</ulink> </para> </section> +<section id="pkg_rpm2tgz"> + <title>rpm2tgz</title> + +<indexterm> + <primary>rpm2tgz</primary> +</indexterm> + +<para> + One of the most ubiquitous package formats for Linux software is + RPM; it's not uncommon to find a developer offering their + application for download as either source code or an RPM file, and + no more. In this case, you would have three options: +</para> + +<orderedlist> + <listitem> + <para> + Build your own Slackware package. + </para> + </listitem> + + <listitem> + <para> + Compile and install directly from source code. + </para> + </listitem> + + <listitem> + <para> + Convert and install from RPM. + </para> + </listitem> +</orderedlist> + +<para> + Building from source code or creating your own Slackware package is + usually not as complex as you might think but installing directly from + source code is generally discouraged because there is no easy way to + track what has been installed on your system after issuing the + <command>make install</command> command. Building your own Slackware + packages is outside the scope of this chapter. So this leaves us with + the helpful tool <application>rpm2tgz</application>. +</para> + +<indexterm> +<primary>rpm</primary> +<secondary>redhat package manager</secondary> +</indexterm> + +<para> + <application>rpm2tgz</application> converts RPM packages into a + Slackware package that can then be installed via + <application>pkgtool</application> or + <application>installpkg</application>. This circumvents the need to + create your own Slackware package but grants you the benefit of + being able to remove, update, and track what you've installed. +</para> + +<warning> + <para> + While a Slackware package is just a shell script and source code, + an RPM package can by comparison be a maze of dependency listings + and special instructions. Therefore, + <application>rpm2tgz</application> will not always work, + especially on very complex applications, and it will never + magically resolve dependencies. + </para> +</warning> + +<para> + To try <application>rpm2tgz</application>, download an RPM file from + a trusted source and convert it: +</para> + +<programlisting> + rpm2tgz foo-x.x.xx.rpm +</programlisting> + +<para> + The result is a .tgz file, so after the conversion is finished, the + original RPM can safely be discarded. Use + <application>installpkg</application> to install the Slackware + package you've just created, provided that you've + installed all dependency code for the application to actually function. +</para> + +</section> +</section> </chapter> diff --git a/chapter_18.xml b/chapter_18.xml index ea3035c..458b28f 100644 --- a/chapter_18.xml +++ b/chapter_18.xml @@ -2,59 +2,69 @@ <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "/usr/share/xml/docbook/xml-dtd-4.5/docbookx.dtd"> -<chapter> +<chapter id="ch_updates"> <title>Keeping Track of Updates</title> -<section> +<indexterm> + <primary>system updates</primary> +</indexterm> + +<section id="updates_stable"> <title>The -stable Branch</title> <para> -Whenever a new version of Slackware is released, the Slackware team will, -as needed, release updated packages to fix serious security vulnerabilities -and particularly nasty bugs. Therefore, it's important to keep up with all -of the patches for your version of Slackware, which is referred to as the -"-stable" branch. There is also a "-current" branch, which is where we do -our development work toward the next stable release (and as such, there are -often intrusive changes there), but unless you're willing to work with a -possibly broken system and are able to fix things on your own, we strongly -recommend that you stick with the "-stable" branch. +After a new version of Slackware is released, the Slackware team will, +as needed, release updated packages to fix serious security +vulnerabilities and particularly nasty bugs. Therefore, it's +important to keep up with all of the patches for your version of +Slackware, which is referred to as the <emphasis>-stable</emphasis> +branch. There is also a <emphasis>-current</emphasis> branch, which +is where we do our development work toward the next stable release +(and as such, there are often intrusive changes there), but unless +you're willing to work with a possibly broken system and are able to +fix things on your own, we strongly recommend that you stick with the +-stable branch. </para> <para> -Since -stable updates aren't distributed on the disks, you'll need to obtain -them from the Internet. Many people and organizations offer mirrors from -which you can download the entire Slackware tree (or only the -<filename>patches/</filename> directory) in any number of ways. While some -mirrors offer web access, the most common ways of obtaining updates are via -ftp and/or rsync servers. The Slackware project maintains a small list -(organized by country) of known mirrors. If you're unsure which mirror you -should use, simply consult -<ulink url="http://www.slackware.com/getslack/">http://www.slackware.com/getslack/</ulink> -for suggestions. If you have a major university near you, there's a good -chance that they offer a mirror of numerous open source projects, and -Slackware may be among them. The only real requirement for a mirror is that -it be complete, but usually it's best to use a mirror near where you live in -order to achieve the fastest transfer times and use the least amount of -Internet resources. +Since -stable updates aren't distributed on the disks, you'll need to +obtain them from the Internet. Many people and organizations offer +mirrors from which you can download the entire Slackware tree (or only +the <filename>patches/</filename> directory) in any number of +ways. While some mirrors offer web access, the most common ways of +obtaining updates are via ftp and/or rsync servers. The Slackware +project maintains a small list (organized by country) of known +mirrors. If you're unsure which mirror to use, simply consult <ulink +url="http://www.slackware.com/getslack/">http://www.slackware.com/getslack/</ulink> +for suggestions. If you have a major university near you, there's a +good chance that they offer a mirror of numerous open source projects, +and Slackware may be among them. The only real requirement for a +mirror is that it be complete; usually it's best to use a mirror near +where you live in order to achieve the fastest transfer times and use +the least amount of Internet resources. </para> +<indexterm> + <primary>changelog</primary> +</indexterm> + <para> So how do you know when there are updates? The best way is to consult the <filename>ChangeLog.txt</filename> on any up-to-date mirror. You can always -find the latest changelogs for the "-current" and most recent "-stable" +find the latest changelogs for the -current and most recent -stable branch on the Slackware Project's web page, but if you're running an older version of Slackware, you'll need to check a mirror. </para> -<screen><prompt>darkstar:~# </prompt><userinput>wget -O - \ -ftp://slackware.osuosl.org/pub/slackware/slackware-13.0/ChangeLog.txt \ +<screen><prompt>darkstar:~# </prompt><userinput>wget -O - \ +ftp://slackware.osuosl.org/pub/slackware/slackware-13.0/ChangeLog.txt \ | less</userinput> Sun Jan 24 20:22:46 UTC 2010 -patches/packages/httpd-2.2.14-i486-1_slack12.1.tgz: Upgraded. +patches/packages/httpd-2.2.14-i486-1_slack12.1.tgz: Upgraded. This fixes a couple of security bugs when using mod_proxy_ftp. For more information, see: - http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-3094 - http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-3095 + http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-3094 + http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-3095 (* Security fix *)</screen> </section> @@ -76,9 +86,16 @@ packages are released, it will mail an advisory to you. </section> -<section> +<section id="updates_upgrading-slackware"> <title>Upgrading Slackware Versions</title> +<indexterm> + <primary>system upgrade</primary> +</indexterm> +<indexterm> + <primary>operating system upgrade</primary> +</indexterm> + <para> Now that we've gone this far, you should feel reasonably competent in your ability to manage your Slackware system. But what do we do with it when @@ -95,20 +112,28 @@ you, Slackware takes a much more hands-on approach to things. The very first thing you should do before attempting an upgrade is the one that many people neglect: decide if it's really necessary to upgrade. If the old system is stable and doing everything you want it to do, there may -be no need to do an operating system upgrade at all. Assuming you decide -to do the upgrade, then the second thing you should do is read the -<filename>CHANGES_AND_HINTS.TXT</filename> file on your upgrade discs or -a mirror. This file is updated during the development period before every -release, and it lists lots of helpful hints and tips to aid you in dealing -with the changes. Finally, read the <filename>UPGRADE.TXT</filename> file -before proceeding. After doing these things, you may decide that it's less -trouble and potential for problems to backup your configuration files and -data and do a fresh installation of the new Slackware release rather than -attempt a possibly tricky upgrade. However, if you still wish to continue, -make backups of your data and configuration files first. At a minimum, -it's good practice to backup the <filename>/etc</filename> and <filename>/home</filename> -directories. This will give you a chance to perform a reinstall if something -goes wrong with the upgrade. +be no need to do an operating system upgrade at all. +</para> + +<para> +Assuming you decide to do the upgrade, then the second thing you +should do is read the <filename>CHANGES_AND_HINTS.TXT</filename> file +on your upgrade discs or a mirror. This file is updated during the +development period before every release, and it lists a lot of helpful +hints and tips to aid you in dealing with the changes. +</para> + +<para> +Finally, read the <filename>UPGRADE.TXT</filename> file before +proceeding. After doing these things, you may decide that it's less +trouble and potential for problems to backup your configuration files +and data and do a fresh installation of the new Slackware release +rather than attempt a possibly tricky upgrade. However, if you still +wish to continue, make backups of your data and configuration files +first. At a minimum, it's good practice to backup the +<filename>/etc</filename> and <filename>/home</filename> directories. +This will give you a chance to perform a reinstall if something goes +wrong with the upgrade. </para> <para> @@ -119,5 +144,4 @@ favorite mirror. </para> </section> - -</chapter> +</chapter>
\ No newline at end of file diff --git a/chapter_19.xml b/chapter_19.xml index bc49aed..e819fe5 100644 --- a/chapter_19.xml +++ b/chapter_19.xml @@ -5,7 +5,7 @@ <chapter> <title>The Linux Kernel</title> -<section> +<section id="ch_kernel"> <title>What Does the Kernel Do?</title> <para> @@ -26,9 +26,18 @@ of software on your computer and the most complex. </section> -<section> +<section id="kernel_modules"> <title>Working with Modules</title> +<indexterm> + <primary>kernel</primary> + <secondary>modules</secondary> +</indexterm> + +<indexterm> +<primary>modules</primary> +</indexterm> + <para> The complexity of a modern linux kernel is staggering. The source code for the kernel weighs in at nearly 400MB uncompressed. There are @@ -49,11 +58,15 @@ It's important to realize that Slackware will automatically handle loading most modules for you. When your system boots, <application>udevd</application>(8) is started and begins to probe your system's hardware. For each device it finds, it loads the proper module -and created a device node in <filename>/dev</filename>. This usually +and created a device node in <filename>/dev</filename>. This usually means that you will not need to load any modules in order to use your computer, but occasionally this is necessary. </para> +<indexterm> + <primary>lsmod</primary> +</indexterm> + <para> So what modules are currently loaded on your computer and how do we load and unload them? Fortunately we have a full suite of tools for @@ -61,7 +74,7 @@ handling this. As you might have guessed, the tool for listing modules is <application>lsmod</application>(8). </para> -<screen><prompt>darkstar:~# </prompt><userinput>lsmod</userinput> +<screen><prompt>darkstar:~# </prompt><userinput>lsmod</userinput> Module Size Used by nls_utf8 1952 1 cifs 240600 2 @@ -77,6 +90,13 @@ In addition to showing you what modules are loaded, it displays the size of each module and tells you what other modules are using it. </para> +<indexterm> + <primary>modprobe</primary> +</indexterm> +<indexterm> + <primary>insmod</primary> +</indexterm> + <para> There are two applications for loading modules: <application>insmod</application>(8) and @@ -87,9 +107,9 @@ preferred because it can load any module dependencies. Using either is straight-forward. </para> -<screen><prompt>darkstar:~# </prompt><userinput>insmod ext3</userinput> -<prompt>darkstar:~# </prompt><userinput>modprobe ext4</userinput> -<prompt>darkstar:~# </prompt><userinput>lsmod | grep ext</userinput> +<screen><prompt>darkstar:~# </prompt><userinput>insmod ext3</userinput> +<prompt>darkstar:~# </prompt><userinput>modprobe ext4</userinput> +<prompt>darkstar:~# </prompt><userinput>lsmod | grep ext</userinput> ext4 239928 1 jbd2 59088 1 ext4 crc16 1984 1 ext4 @@ -98,6 +118,10 @@ jbd 48520 1 ext3 mbcache 8068 2 ext4,ext3 </screen> +<indexterm> + <primary>rmmod</primary> +</indexterm> + <para> Removing modules can be a tricky process, and once again we have two programs for removing them: <application>rmmod</application>(8) and @@ -105,49 +129,61 @@ programs for removing them: <application>rmmod</application>(8) and modprobe, you'll need to use the <arg>-r</arg> argument. </para> -<screen><prompt>darkstar:~# </prompt><userinput>rmmod ext3</userinput> -<prompt>darkstar:~# </prompt><userinput>modprobe -r ext4</userinput> -<prompt>darkstar:~# </prompt><userinput>lsmod | grep ext</userinput> +<screen><prompt>darkstar:~# </prompt><userinput>rmmod ext3</userinput> +<prompt>darkstar:~# </prompt><userinput>modprobe -r ext4</userinput> +<prompt>darkstar:~# </prompt><userinput>lsmod | grep ext</userinput> </screen> </section> -<section> +<section id="kernel_compile"> <title>Compiling A Kernel and Why to do So</title> +<indexterm> + <primary>kernel</primary> + <secondary>compiling</secondary> +</indexterm> + <para> Most Slackware users will never need to compile a kernel. The huge and generic kernels contain virtually all the support you will need. +</para> + +<para> However, some users may need to compile a kernel. If your computer contains bleeding edge hardware, a newer kernel may offer improved support. Sometimes a kernel patch my be available that corrects a problem you are experiencing. In these cases a kernel compile is -probably warranted. Users who simply want the latest and greatest +probably warranted. Users who simply want the latest and greatest version or who believe using a custom compiled kernel will give them -greater performance can certainly upgrade, but are unlikely to notice -any major changes. If you still think compiling your own kernel is -something you want or need to do, this section should walk you through -the many steps. +greater performance can certainly upgrade, but are unlikely to +actually notice any major changes. +</para> + +<para> +If you still think compiling your own kernel is something you want or +need to do, this section should walk you through the many steps. Compiling and installing a kernel is not that difficult, but there are a number of mistakes that can be made along the way, many of which can prevent your computer from booting and cause major frustration. </para> <para> -The first step is ensuring you have the kernel source code installed on -your system. The kernel source package is included in the "k" disk set -in the Slackware installer, or you can download another version from -<ulink url="http://www.kernel.org/">http://www.kernel.org/</ulink>. +The first step is ensuring you have the kernel source code installed +on your system. The kernel source package is included in the +"k" disk set in the Slackware installer, or you can download +another version from <ulink +url="http://www.kernel.org/">http://www.kernel.org/</ulink>. Traditionally, the kernel source is located in -<filename>/usr/src/linux</filename>, a symbolic link that points to the -specific kernel release used, but this is by no means set in stone. You -can place the kernel source code virtually anywhere without -encountering any problems. +<filename>/usr/src/linux</filename>, a symbolic link that +points to the specific kernel release used, but this is by no means +set in stone. You can place the kernel source code virtually anywhere +without encountering any problems. </para> -<screen><prompt>darkstar:~# </prompt><userinput>ls -l /usr/src</userinput> -lrwxrwxrwx 1 root root 14 2009-07-22 19:59 linux -> linux-2.6.29.6/ -drwxr-xr-x 23 root root 4096 2010-03-17 19:00 linux-2.6.29.6/ +<screen><prompt>darkstar:~# </prompt><userinput>ls -l /usr/src</userinput> +lrwxrwxrwx 1 root root 14 2009-07-22 19:59 linux -> linux-2.6.29.6/ +drwxr-xr-x 23 root root 4096 2010-03-17 19:00 linux-2.6.29.6/ </screen> <para> @@ -170,14 +206,14 @@ compile the kernel again and again until you get it right. The best kernel <filename>.config</filename> files to start with are those used by Slackware's default kernels. You can find them on your Slackware install disks or at your favorite mirror in the -<filename>kernels/</filename> directory. +<filename>kernels/</filename> directory. </para> -<screen><prompt>darkstar:~# </prompt><userinput>mount /mnt/cdrom</userinput> -<prompt>darkstar:~# </prompt><userinput>cd /mnt/cdrom/kernels</userinput> -<prompt>darkstar:/mnt/cdrom/kernels# </prompt><userinput>ls</userinput> -VERSIONS.TXT huge.s/ generic.s/ speakup.s/ -<prompt>darkstar:/mnt/cdrom/kernels# </prompt><userinput>ls genric.s</userinput> +<screen><prompt>darkstar:~# </prompt><userinput>mount /mnt/cdrom</userinput> +<prompt>darkstar:~# </prompt><userinput>cd /mnt/cdrom/kernels</userinput> +<prompt>darkstar:/mnt/cdrom/kernels# </prompt><userinput>ls</userinput> +VERSIONS.TXT huge.s/ generic.s/ speakup.s/ +<prompt>darkstar:/mnt/cdrom/kernels# </prompt><userinput>ls genric.s</userinput> System.map.gz bzImage config </screen> @@ -191,26 +227,29 @@ and thus creates a smaller kernel image, but it usually requires the use of an initrd. </para> -<screen><prompt>darkstar:/mnt/cdrom/kernels# </prompt><userinput>cp generic.s/config /usr/src/linux/.config</userinput> +<screen><prompt>darkstar:/mnt/cdrom/kernels# </prompt><userinput>cp generic.s/config /usr/src/linux/.config</userinput> </screen> -<note><para> -The Slackware kernel file lacks the "dot" while the kernel -file includes it. If you forget, or simply copy the -<filename>config</filename> to <filename>/usr/src</filename> whatever -<filename>.config</filename> file was already present will be used -instead. -</para></note> +<important> + <para> + The Slackware kernel file lacks the "dot" while the kernel file + includes it. If you forget, or simply copy the + <filename>config</filename> to + <filename>/usr/src</filename> whatever + <filename>.config</filename> file was already present will be used + instead. +</para> +</important> <para> If you want to use the configuration for the currently running kernel as your base, you may be able to locate it at -<filename>/proc/config.gz</filename>. This is a special kernel-related +<filename>/proc/config.gz</filename>. This is a special kernel-related file that includes the entire kernel configuration in a compressed format and requires that your kernel was built to support it. </para> -<screen><prompt>darkstar:~# </prompt><userinput>zcat /proc/config.gz > /usr/src/linux/.config</userinput> +<screen><prompt>darkstar:~# </prompt><userinput>zcat /proc/config.gz > /usr/src/linux/.config</userinput> </screen> <para> @@ -230,14 +269,14 @@ options. Since options are added at virtually every kernel release, this is generally a good thing to do. </para> -<screen><prompt>darkstar:/usr/src/linux# </prompt><userinput>make oldconfig</userinput> -scripts/kconfig/conf -o arch/x86/Kconfig -* -* Restart config... -* -* -* File systems -* +<screen><prompt>darkstar:/usr/src/linux# </prompt><userinput>make oldconfig</userinput> +scripts/kconfig/conf -o arch/x86/Kconfig +* +* Restart config... +* +* +* File systems +* Second extended fs support (EXT2_FS) [M/n/y/?] m Ext2 extended attributes (EXT2_FS_XATTR) [N/y/?] n Ext2 execute in place support (EXT2_FS_XIP) [N/y/?] n @@ -281,6 +320,11 @@ Automatically append version information to the version string (LOCALVERSION_AUT Support for paging of anonymous memory (swap) (SWAP) [Y/n/?] </screen> +<indexterm> + <primary>kernel</primary> + <secondary>menuconfig</secondary> +</indexterm> + <para> Fortunately, there are two much easier ways to configure your kernel, <arg>menuconfig</arg> and <arg>xconfig</arg>. Both of these create a @@ -302,13 +346,16 @@ the arrow keys. <imagedata fileref="img/make-menuconfig-w.png" format="PNG"/> -<warning><para> -If you are compiling a kernel that is the same release as the stock -Slackware kernel, you must set the "Local version" option. This is -found on the "General setup" submenu. Failure to set this will result -in your kernel compile over-writing all the modules used by the stock -kernels. This can quickly render your system unbootable. -</para></warning> +<warning> + <para> + If you are compiling a kernel that is the same release as the + stock Slackware kernel, you must set the "Local version" + option. This is found on the "General setup" submenu. Failure to + set this will result in your kernel compile over-writing all the + modules used by the stock kernels. This can quickly render your + system unbootable. + </para> +</warning> <para> Once you've finished configuring the kernel, it's time to begin @@ -339,7 +386,8 @@ configuration first. Compile errors are usually caused by a fault we're still not entirely finished, as we need to build the modules. </para> -<screen><prompt>darkstar:/usr/src/linux# </prompt><userinput>make modules</userinput> +<screen> +<prompt>darkstar:/usr/src/linux# </prompt><userinput>make modules</userinput> CHK include/linux/version.h CHK include/linux/utsrelease.h SYMLINK include/asm -> include/asm-x86 @@ -358,8 +406,9 @@ images located there. Traditionaly kernel images are named appended. </para> -<screen><prompt>darkstar:/usr/src/linux# </prompt><userinput>cat arch/x86/boot/bzImage > /boot/vmlinuz-release_number-local_version</userinput> -<prompt>darkstar:/usr/src/linux# </prompt><userinput>make modules_install</userinput> +<screen> + <prompt>darkstar:/usr/src/linux# </prompt><userinput>cat arch/x86/boot/bzImage > /boot/vmlinuz-release_number-local_version</userinput> + <prompt>darkstar:/usr/src/linux# </prompt><userinput>make modules_install</userinput> </screen> <para> |