Difference between revisions of "Installing Slackware 10.1 on a PC110"
(→PCMCIA configuration) |
(→Network) |
||
Line 121: | Line 121: | ||
==Network== | ==Network== | ||
+ | |||
+ | {{NOTE|This section describes how to configure [[Hostap]] to use a Zyxel ZyAir B-100 11Mbps 802.11b WLAN card. This card uses the Prism3 chipset, and identifies itself as a "Linksys WPC11 11Mbps 802.11b WLAN Card". The following guidelines may work with other Prism3 chipset WLAN PCMCIA cards, but have only been tested with the card named above.}} | ||
+ | |||
+ | [[Hostap]] isn't included with the <tt>pcmcia-cs</tt> distribution, so needs adding to the configuration files. Edit {{path|/etc/pcmcia/config}} and add this to the "Device driver definitions" | ||
+ | section at the top of the file: | ||
+ | |||
+ | <pre> | ||
+ | device "hostap_cs" | ||
+ | class "network" module "hostap_cs" | ||
+ | </pre> | ||
+ | |||
+ | and in the "Wireless network adapters" section (about half way through the file) change | ||
+ | <pre> | ||
+ | card "Linksys WPC11 11Mbps 802.11b WLAN Card" | ||
+ | manfid 0x0274, 0x1613 | ||
+ | bind "orinoco_cs" | ||
+ | </pre> | ||
+ | to | ||
+ | <pre> | ||
+ | card "Linksys WPC11 11Mbps 802.11b WLAN Card" | ||
+ | manfid 0x0274, 0x1613 | ||
+ | bind "hostap_cs" | ||
+ | </pre> | ||
+ | |||
+ | Compile the driver modules and install them in {{path|/lib/modules/}}: | ||
+ | <pre> | ||
+ | /lib/modules/2.4.29/kernel/drivers/net/pcmcia/hostap_cs.o | ||
+ | /lib/modules/2.4.29/kernel/drivers/net/wireless/hostap.o | ||
+ | /lib/modules/2.4.29/kernel/drivers/net/wireless/hostap_crypt_ccmp.o | ||
+ | /lib/modules/2.4.29/kernel/drivers/net/wireless/hostap_crypt_tkip.o | ||
+ | /lib/modules/2.4.29/kernel/drivers/net/wireless/hostap_crypt_wep.o | ||
+ | /lib/modules/2.4.29/kernel/drivers/net/wireless/hostap_pci.o | ||
+ | /lib/modules/2.4.29/kernel/drivers/net/wireless/hostap_plx.o | ||
+ | /lib/modules/2.4.29/pcmcia/hostap_cs.o | ||
+ | </pre> | ||
+ | ({{path|/lib/modules/2.4.29/pcmcia/hostap_cs.o}} is a symbolic link to | ||
+ | {{path|../kernel/drivers/net/pcmcia/hostap_cs.o}}). | ||
+ | |||
+ | Build and install <tt>wpa_supplicant</tt> according to the instructions in the source package. | ||
+ | See its README file for details. Configure <tt>wpa_supplicant</tt> as described in the README, | ||
+ | and summarised here. | ||
+ | |||
+ | <p> | ||
+ | Create {{path|/etc/wpa_supplicant.conf}}: | ||
+ | <pre> | ||
+ | network={ | ||
+ | ssid="<the network name>" | ||
+ | scan_ssid=1 | ||
+ | key_mgmt=WPA-PSK | ||
+ | psk="<the key>" | ||
+ | } | ||
+ | </pre> | ||
+ | |||
+ | <p> | ||
+ | Add the following block to the end of 'start' action handler in | ||
+ | {{path|/etc/pcmcia/wireless}}: | ||
+ | |||
+ | <pre> | ||
+ | if [ "$WPA" = "y" -a -x /usr/local/bin/wpa_supplicant ]; then | ||
+ | /usr/local/bin/wpa_supplicant -Bw -c/etc/wpa_supplicant.conf -i$DEVICE | ||
+ | fi | ||
+ | </pre> | ||
+ | |||
+ | Separate 'restart', 'resume', 'check' and 'suspend' action handlers from 'stop', and | ||
+ | add the following block to the end of 'stop' action handler in {{path|/etc/pcmcia/wireless}}: | ||
+ | |||
+ | <pre> | ||
+ | if [ "$WPA" = "y" -a -x /usr/local/bin/wpa_supplicant ]; then | ||
+ | killall wpa_supplicant | ||
+ | fi | ||
+ | </pre> | ||
+ | |||
+ | <p> | ||
+ | Edit {{path|/etc/pcmcia/wireless.opts}}. Remove the section marked "SECTION TO REMOVE" | ||
+ | at the beginning of the file and replace it with this: | ||
+ | |||
+ | <pre> | ||
+ | *,*,*,*) | ||
+ | ESSID="<the network name>" | ||
+ | KEY="<the key>" | ||
+ | MODE="Managed" | ||
+ | WPA="y" | ||
+ | ;; | ||
+ | </pre> | ||
+ | |||
+ | Configure the network settings in {{path|/etc/pcmcia/network.opts}}. It's easiest if there is a DHCP server on the network, then the only change necessary is to ensure that | ||
+ | |||
+ | <pre> | ||
+ | DHCP="y" | ||
+ | </pre> | ||
+ | |||
+ | <tt>dhcpcd</tt> will clobber {{path|/etc/ntp.conf}} if you don't tell it not | ||
+ | to. Edit {{path|/etc/rc.d/rc.inet1}} and {{path|/etc/pcmcia/network}} and add | ||
+ | <tt>-N</tt> to every invocation of {{path|/sbin/dhcpcd}}. <tt>dhcpcd</tt> restores | ||
+ | the original {{path|/etc/ntp.conf}} when it exits, so kill any running <tt>dhcpcd</tt> | ||
+ | process before editing {{path|/etc/ntp.conf}}. | ||
==Setting the clock== | ==Setting the clock== |
Revision as of 00:30, 25 July 2006
Contents
Kernel configuration
These instructions are intended for use with kernel version 2.4.29, and not with any of the kernels included with the Slackware 10.1 distribution.
The stock kernel requires a patch before $ make config
will produce a configuration appropriate for an i486. Alternatively, skip the $ make config
stage and use this configuration.
<Compile the kernel and modules (overnight, probably :-) and copy the kernel to
/boot/bzImage-2.4.29. Install the modules in /lib/modules/2.4.29. Reinstall
the hostap modules if # make modules_install
removes them.
Boot sequence
Booting with / on a PCMCIA device is a bit tricky. There are two ways to do it:
- Add "PCMCIA" to the start-up disk choices in the BIOS, or
- Use an initial ram disk to load the pcmcia modules.
The first option is easier -- the BIOS takes over the slot with the Microdrive in, and the other one is free for other devices. This works for booting, but the BIOS doesn't seem to be able to wake the disk up after a suspend-resume cycle. It used to work with the original type III PCMCIA disk, so it seems the Microdrive needs to be prodded in a different way to revive it.
The solution is to create a PCMCIA-aware initrd to initialise the PCMCIA controller before / is mounted. /sbin/pcinitrd, part of the pcmcia-cs package, will do most of the work. The ramdisk it creates uses ash to execute /linuxrc, so make sure ash is installed before running pcinitrd. The ramdisk created by pcinitrd isn't quite complete; add the missing libraries and binaries like so:
root@carrot:~# /sbin/pcinitrd initrd 2400+0 records in 2400+0 records out mke2fs 1.35 (28-Feb-2004) 1836K/2357K used root@carrot:~# mount -o loop initrd /mnt/ root@carrot:~# cp /sbin/insmod.old /mnt/bin/ root@carrot:~# cp /lib/libblkid.so.1 /mnt/lib/ root@carrot:~# cp /lib/libuuid.so.1 /mnt/lib/ root@carrot:~# cp /lib/modules/2.4.29/kernel/drivers/pcmcia/i82365.o /mnt/lib/pcmcia root@carrot:~# cp /lib/modules/2.4.29/kernel/drivers/ide/legacy/ide-cs.o /mnt/lib/pcmcia root@carrot:~# ldconfig -v -r /mnt ldconfig: Can't open configuration file /etc/ld.so.conf: No such file or directory ldconfig: Can't stat /usr/lib: No such file or directory /lib: libuuid.so.1 -> libuuid.so.1 libblkid.so.1 -> libblkid.so.1 ld-linux.so.2 -> ld-linux.so.2 libc.so.6 -> libc.so.6 root@carrot:~# umount /mnt/ root@carrot:~# gzip initrd root@carrot:~# cp initrd.gz /boot/initrd
Set the [http://www.basterfield.com/pc110/bios/startup.htm BIOS startup sequence] to "FDD-1", "HDD-1", in that order1. /boot is mounted on /dev/hda1, the 4MB internal flash disk (Hard disk 1 in the BIOS).
/etc/lilo.conf should look like
boot=/dev/hda map=/boot/map install=/boot/boot.b prompt timeout=50 linear default=slackware-10.1 image=/boot/bzImage-2.4.29 label=slackware-10.1 inirtd=/boot/initrd read-only root=/dev/hdc2 append="hdd=noprobe"
LILO version 22.5.9, as installed with Slackware 10.1, complains about the linear option, but there is no immediate need to take it out; it's always been there and it's always worked. /dev/hda isn't bigger than 8.4GB, so using lba32 instead wouldn't gain anything.
append="hdd=noprobe" prevents the IDE driver probing for a slave device on the second IDE interface (the other PCMCIA slot); nothing bad happens if the probe takes place, but the boot process hangs for a few seconds. We know there's nothing there, so there's no point looking.
/etc/fstab
/etc/fstab looks like this:
/dev/hda1 /boot ext2 ro 1 2 /dev/hdc2 / ext3 defaults 1 1 /dev/fd0 /mnt/floppy auto noauto,owner 0 0 none /proc proc defaults 0 0 none /dev/pts devpts gid=5,mode=620 0 0 /dev/hdc1 swap swap defaults 0 0
PCMCIA configuration
The second serial port and the sound card use IRQs 3 and 5 respectively, and the touch pad uses IRQ 10. Edit /etc/pcmcia/config.opts to prevent any PCMCIA devices being assigned these IRQs:
# Second built-in serial port exclude irq 3 # Sound card exclude irq 5 # Touch pad exclude irq 10
Make sure the /etc/pcmcia/config.opts found in the initial ramdisk /boot/initrd has the same IRQs excluded.
Network
Hostap isn't included with the pcmcia-cs distribution, so needs adding to the configuration files. Edit /etc/pcmcia/config and add this to the "Device driver definitions" section at the top of the file:
device "hostap_cs" class "network" module "hostap_cs"
and in the "Wireless network adapters" section (about half way through the file) change
card "Linksys WPC11 11Mbps 802.11b WLAN Card" manfid 0x0274, 0x1613 bind "orinoco_cs"
to
card "Linksys WPC11 11Mbps 802.11b WLAN Card" manfid 0x0274, 0x1613 bind "hostap_cs"
Compile the driver modules and install them in /lib/modules/:
/lib/modules/2.4.29/kernel/drivers/net/pcmcia/hostap_cs.o /lib/modules/2.4.29/kernel/drivers/net/wireless/hostap.o /lib/modules/2.4.29/kernel/drivers/net/wireless/hostap_crypt_ccmp.o /lib/modules/2.4.29/kernel/drivers/net/wireless/hostap_crypt_tkip.o /lib/modules/2.4.29/kernel/drivers/net/wireless/hostap_crypt_wep.o /lib/modules/2.4.29/kernel/drivers/net/wireless/hostap_pci.o /lib/modules/2.4.29/kernel/drivers/net/wireless/hostap_plx.o /lib/modules/2.4.29/pcmcia/hostap_cs.o
(/lib/modules/2.4.29/pcmcia/hostap_cs.o is a symbolic link to ../kernel/drivers/net/pcmcia/hostap_cs.o).
Build and install wpa_supplicant according to the instructions in the source package. See its README file for details. Configure wpa_supplicant as described in the README, and summarised here.
Create /etc/wpa_supplicant.conf:
network={ ssid="<the network name>" scan_ssid=1 key_mgmt=WPA-PSK psk="<the key>" }
Add the following block to the end of 'start' action handler in /etc/pcmcia/wireless:
if [ "$WPA" = "y" -a -x /usr/local/bin/wpa_supplicant ]; then /usr/local/bin/wpa_supplicant -Bw -c/etc/wpa_supplicant.conf -i$DEVICE fi
Separate 'restart', 'resume', 'check' and 'suspend' action handlers from 'stop', and add the following block to the end of 'stop' action handler in /etc/pcmcia/wireless:
if [ "$WPA" = "y" -a -x /usr/local/bin/wpa_supplicant ]; then killall wpa_supplicant fi
Edit /etc/pcmcia/wireless.opts. Remove the section marked "SECTION TO REMOVE" at the beginning of the file and replace it with this:
*,*,*,*) ESSID="<the network name>" KEY="<the key>" MODE="Managed" WPA="y" ;;
Configure the network settings in /etc/pcmcia/network.opts. It's easiest if there is a DHCP server on the network, then the only change necessary is to ensure that
DHCP="y"
dhcpcd will clobber /etc/ntp.conf if you don't tell it not to. Edit /etc/rc.d/rc.inet1 and /etc/pcmcia/network and add -N to every invocation of /sbin/dhcpcd. dhcpcd restores the original /etc/ntp.conf when it exits, so kill any running dhcpcd process before editing /etc/ntp.conf.