old-www/LDP/LG/issue63/nielsen3.html

392 lines
16 KiB
HTML

<!--startcut ==============================================-->
<!-- *** BEGIN HTML header *** -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML><HEAD>
<title>Installing USB, PCMCIA and Kernel 2.2.18 On My Laptop LG #63</title>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#0000AF"
ALINK="#FF0000">
<!-- *** END HTML header *** -->
<CENTER>
<A HREF="http://www.linuxgazette.com/">
<H1><IMG ALT="LINUX GAZETTE" SRC="../gx/lglogo.png"
WIDTH="600" HEIGHT="124" border="0"></H1></A>
<!-- *** BEGIN navbar *** -->
<IMG ALT="" SRC="../gx/navbar/left.jpg" WIDTH="14" HEIGHT="45" BORDER="0" ALIGN="bottom"><A HREF="nielsen2.html"><IMG ALT="[ Prev ]" SRC="../gx/navbar/prev.jpg" WIDTH="16" HEIGHT="45" BORDER="0" ALIGN="bottom"></A><A HREF="index.html"><IMG ALT="[ Table of Contents ]" SRC="../gx/navbar/toc.jpg" WIDTH="220" HEIGHT="45" BORDER="0" ALIGN="bottom" ></A><A HREF="../index.html"><IMG ALT="[ Front Page ]" SRC="../gx/navbar/frontpage.jpg" WIDTH="137" HEIGHT="45" BORDER="0" ALIGN="bottom"></A><A HREF="http://www.linuxgazette.com/cgi-bin/talkback/all.py?site=LG&article=http://www.linuxgazette.com/issue63/nielsen3.html"><IMG ALT="[ Talkback ]" SRC="../gx/navbar/talkback.jpg" WIDTH="121" HEIGHT="45" BORDER="0" ALIGN="bottom" ></A><A HREF="../faq/index.html"><IMG ALT="[ FAQ ]" SRC="./../gx/navbar/faq.jpg"WIDTH="62" HEIGHT="45" BORDER="0" ALIGN="bottom"></A><A HREF="okopnik.html"><IMG ALT="[ Next ]" SRC="../gx/navbar/next.jpg" WIDTH="15" HEIGHT="45" BORDER="0" ALIGN="bottom" ></A><IMG ALT="" SRC="../gx/navbar/right.jpg" WIDTH="15" HEIGHT="45" ALIGN="bottom">
<!-- *** END navbar *** -->
<P>
</CENTER>
<!--endcut ============================================================-->
<H4 ALIGN="center">
"Linux Gazette...<I>making Linux just a little more fun!</I>"
</H4>
<P> <HR> <P>
<!--===================================================================-->
<center>
<H1><font color="maroon">Installing USB, PCMCIA and Kernel 2.2.18 On My Laptop</font></H1>
<H4>By <a href="mailto:articles@gnujobs.com">Mark Nielsen</a></H4>
</center>
<P> <HR> <P>
<!-- END header -->
<BLOCKQUOTE><EM>
[<STRONG>Editor's note:</STRONG> Linux users are currently
migrating from kernel series 2.2 to 2.4. Linux 2.4 includes
vastly improved USB support. Most distributions and users have not
yet made the switch, but will during the next several months. The
steps below were written for kernel 2.2.8. See the links in the
<A HREF="#REF">References</A> section below (especially the Linux-USB
Guide), for the latest information on getting USB to work with Linux.
<P> Also, the 2.4 kernel includes PCMCIA support, so try that first.
Those drivers don't work for everyone; if you're one of the unlucky few,
get the pcmcia-cs package.
</EM></BLOCKQUOTE>
<H3>Contents</H3>
<ol>
<li>
<a href="#Introduction">Introduction</a></li>
<li>
<a href="#kernel">Installing 2.2.18</a></li>
<li>
<a href="#lilo">Configuring Lilo to use the old and new kernels</a></li>
<li>
<a href="#usb">Setting up USB</a></li>
<li>
<a href="#ricochet">Changing the Ricochet modem from serial to USB.</a></li>
<li>
<a href="#problems">Some problems with laptop and resources.</a></li>
<li>
<a href="#Conclusion">Conclusion</a></li>
<li>
<a href="#REF">References</a></li>
</ol>
<h3>
<a NAME="Introduction"></a>Introduction</h3>
I wanted to use my Ricochet modem on my laptop using the USB port.
I had successfully downloaded kernel 2.2.18 and used USB with my
other computers. I didn't feel like getting kernel 2.4 at the time.
<p>
The problem with my laptop was the fact it was using pcmcia devices.
I found out later that I had to download pcmcia-cs and install it
after I installed the new kernel 2.2.18.
<p>
Getting USB to work on my laptop meant I had to do several things,
<ol>
<li> Install the new kernel 2.2.18.
<li> Install the pcmcia drivers.
<li> Configure Lilo to use the old kernel and the new kernel.
<li> Make sure the usb modules are loaded at boot time.
<li> Create a node under /dev/usb for the Ricochet modem.
<li> Reconfigure my ppp settings.
<li> When I was confident the new kernel was working good, make it the
default when the computer boots.
<li>Unfortunately, because of the stupidity of the BIOS on my laptop
and because of this stupid plug-and-pray garbage, I can only have
my USB port working when neither of the pcmcia slots are in use. This means
I can't hook up my laptop to the my local network using my pcmcia ethernet
card. This isn't the Linux kernels fault, but the dumb computer.
</ol>
<h3>
<a NAME="kernel"></a>Installing 2.2.18</h3>
Here are the steps I used to install the kernel and the pcmcia drivers.
<ol>
<li> Configure and install
the new kernel with console drivers, usb support, and pcmcia.
I also selected a bunch of other options. </li>
<li> Download pcmcia-cs and install using the src directory from the new
kernel. </li>
</ol>
Here are the commands I used to install the new kernel
<pre>
## change to the src directory for the linux kernel
## for xconfig, I selected the usb options and VESA VGA graphics console
## under console drivers for my laptop
make xconfig
make clean
make dep
make bzImage
make install
make modules
make modules_install
</pre>
Here are the steps I used to install pcmcia-cs.
<pre>
tar -zxvf pcmcia-cs-3.1.23.tar.gz
### Make sure you specify the root directory for the new kernel
### mine was /usr/src/linux-2.2.18/linux
### I didn't change the other default options.
make config
make all
### This puts the modules under /lib/modules/2.2.18
make install
</pre>
<h3>
<a NAME="lilo"></a>Configuring lilo to use the old and new kernel.</h3>
Here is the old and new configuration I had for /etc/lilo.conf.
I highly recommend that you do not use this for yourself, as I customized
lilo.conf for my own needs. After I edited /etc/lilo.conf to the new
configuration, I just typed "lilo" at the command prompt.
Then, when I rebooted my computer, I had a choice of "linux_new" or "linux".
After I was confident the new kernel was working, I changed it to be the
default.
<p>
Old configuration.
<pre>
### Configuration for GNUJobs.com test laptop
vga=791
boot=/dev/hda
map=/boot/map
install=/boot/boot.b
prompt
timeout=50
default=linux
image=/boot/vmlinuz-2.2.12-32
label=linux
initrd=/boot/initrd-2.2.12-32.img
read-only
append="hdc=ide-scsi"
# ramdisk_size=40000
root=/dev/hda5
</pre>
New lilo.conf configuration.
<pre>
### Configuration for GNUJobs.com test laptop
### New kernel installed. Remember to install console drivers
### into new kernels otherwise vga=791 doesn't work.
vga=791
#vga=ask
boot=/dev/hda
map=/boot/map
install=/boot/boot.b
prompt
timeout=50
default=linux_new
image=/boot/vmlinuz-2.2.18
label=linux_new
read-only
append="hdc=ide-scsi"
### /dev/hda5 is root for GNUJobs.com laptop
root=/dev/hda5
image=/boot/vmlinuz-2.2.12-32
label=linux
initrd=/boot/initrd-2.2.12-32.img
read-only
append="hdc=ide-scsi"
### /dev/hda5 is root for GNUJobs.com laptop
root=/dev/hda5
</pre>
<h3>
<a NAME="usb"></a>Setting up USB</h3>
In order to setup USB, I had to put these commands into my /etc/rc.d/rc.local file.
<pre>
### This command mounts the filesystem for usb to /proc/bus/usb.
mount -t usbdevfs none /proc/bus/usb
### Load a generic usb module -- choose one of these three depending on your
### motherboard or USB card. I have been able to use
### uhci or usb-uhci on all my motherboards so far. If you aren't sure
### which module to use, see "Basic USB Configuration" in the Linux-USB Guide
### at http://www.linux-usb.org/USB-guide/c122.html#AEN124
insmod /lib/modules/2.2.18/usb/uhci.o
# insmod /lib/modules/2.2.18/usb/usb-uhci.o
# insmod /lib/modules/2.2.18/usb/usb-ohci.o
### Load the module for modems, like Ricochet
insmod /lib/modules/2.2.18/usb/acm.o
</pre>
<h3>
<a NAME="ricochet"></a>Changing the Ricochet modem from serial to USB</h3>
In order to change my Ricochet modem to use the new usb, I had to load
the modules described in the previous section, and then create a new
node and make my ppp configuration use the new node.
<pre>
mkdir /dev/usb
mknod /dev/usb/ttyACM0 c 166 0
</pre>
<P> Again, I changed my modem from using /dev/ttyS0 to /dev/usb/ttyACM0.
Now my Ricochet modem is working, and it seems like it is going faster
than the serial modem, like it should be, but it could be my imagination.
Note that <EM>these</EM> two commands are permanent: you only need to run them
once. Also, this is /dev/usb, not /proc/bus/usb (explained in the Linux-USB
Guide). Kernel files magically appear and disappear in /proc/bus/usb as
devices are plugged in and unplugged, but that's not what this file is. USB
Ricochet modems require a /dev entry; some other USB devices don't. The
usbdevfs manages /proc/bus/usb, not /dev/usb.
<h3>
<a NAME="problems"></a>
Some problems with laptop and resources</h3>
I installed the new kernel on my laptop from DELL.
I did have some problems. It seems like my stupid laptop doesn't have
enough irqs to handle using the USB port. Thus, I now have to buy a
USB mouse (and maybe keyboard) to free up some irqs. I also had this problem
when I tried to use my pcmcia modem and pcmcia ethernet card at the same time.
I haven't been able to solve this problem. Now when I use the USB port, I can't
use either pcmcia card. It is extremely annoying that I can't get anything
to use irq 10, and that I can't disable the parallel port, serial port, and
internal ps/2 mouse. The DELL computer was by far the best Linux laptop
I had seen, but now it will become outdated soon. I imagine with kernel
2.4, there will be a lot more commercial support for Linux.
Why on earth the software evil empire and the
hardware evil empire came together to create the user-friendly plug-and-pray
nonsense is beyond me. I know my laptop has free resources but I cannot
force it to use those resources. Very annoying. I am extremely unimpressed
with the BIOS of the particular DELL laptop I got.
<p>
I bought another laptop for one of my employees at GNUJobs.com from
Emperor Linux, and it was properly configured, and I grilled the salesperson
to make sure I got everything working without any problems. I am much
happier with the laptop I got from Emperor Linux.
<p>
Another goofy thing I did was I forgot to install the iso9660 format into
the kernel (or as a module). Now I can't read cdroms. I will have to compile
the kernel one more time and specify to include the iso9660 filesystem format
as a module.
<h3>
<a NAME="Conclusion"></a>Conclusion</h3>
I am extremely impressed with the USB support in the Linux kernel
2.2.18. After Kernel 2.4.1 comes out, I will most likely upgrade
my kernel to 2.4. I have read all the new features about kernel
2.4, and it looks exciting!
<p>
Overall, I am impressed with the fact that is was pretty painless to
install the new kernel. Installing one kernel didn't blow away
earlier kernels, which made it so I could test out the new kernel
without getting rid of the old one. This is helpful if I want to revert
back to the old kernel. For example, before I installed pcmcia-cs for the
new kernel, my laptop's ethernet card didn't work, and hence, it was
helpful that I could boot to the old kernel where the ethernet card would
still work. Had this happened in a lame operating system which just forces
upgrades and wouldn't let you choose how to control your system, I might
have been screwed.
<p>
Even though the installation was fairly easy for me, it might be easier
for other people to just use rpms and to rely on their favorite
Linux distribution to help them out. This is the easiest installation
of the kernel and pcmcia drivers for a laptop that I have ever experienced.
It is nice to see the installation getting easier and easier. After years
of having to fight with the kernel for one reason or another, it is nice
to see all these technologies come together.
<p> I don't see how the
evil empire will be able to resist its downfall considering the fact that
GNU/Linux (and
<a href="http://www.openbsd.org">OpenBSD</a> and
<a href="http://www.freebsd.org">FreeBSD</a>) are technologically
superior and are
providing user friendliness with
<a href="http://www.gnome.org">GNOME</a> and
<A href="http://www.kde.org">KDE</a>. The evil empire has never
cared about technology, but marketing and user-friendliness.
Some of the evil commercial
UNIX vendors only cared about technology and did not care about making
their environment pleasant to use or user-friendly. Since
<a href="http://www.gnu.org">GNU</a>/Linux
is merging technology with user-friendliness, which is the way people want
it, we get the best of both worlds, instead of having evil empires
dictate to us what they think is best (or how to control us so that they
can milk us).
<h3>
<a NAME="REF"></a>References</h3>
<ol>
<li>Taken directly from linux/Documentation/usb/usb-help.txt
<pre>
2000-July-12
For USB help other than the readme files that are located in
linux/Documentation/usb/*, see the following:
Linux-USB project: <A HREF="http://www.linux-usb.org">http://www.linux-usb.org</A>
mirrors at <A HREF="http://www.suse.cz/development/linux-usb/">http://www.suse.cz/development/linux-usb/</A>
and <A HREF="http://usb.in.tum.de/linux-usb/">http://usb.in.tum.de/linux-usb/</A>
Linux USB Guide: <A HREF="http://www.linux-usb.org/USB-guide/book1.html">http://www.linux-usb.org/USB-guide/book1.html</A>
<STRONG>READ THIS!</STRONG> (or other Linux-USB mirrors)
Linux-USB device overview (working devices and drivers):
<A HREF="http://www.qbik.ch/usb/devices/">http://www.qbik.ch/usb/devices/</A>
The Linux-USB mailing lists are:
linux-usb-users@lists.sourceforge.net for general user help
linux-usb-devel@lists.sourceforge.net for developer discussions
</pre>
</li>
<li><a href="ftp://ftp.kernel.org/pub/linux/kernel/v2.2/linux-2.2.18.tar.gz">Linux Kernel 2.2.18</a></li>
<li> <a href="http://www.ibiblio.org/pub/Linux/kernel/pcmcia/pcmcia-cs-3.1.23.tar.gz">PCMCIA-CS source</a></li>
<li><a href="http://www.gnujobs.com/Articles/11/Ricochet.html">
Using the wireless modem Ricochet </a></li>
<li><a href="http://www.gnujobs.com/Articles/15/USB.html">
Original site for this article - http://www.gnujobs.com/Articles/15/USB.html.</a> (any updates will be here)
</ol>
<!-- *** BEGIN copyright *** -->
<P> <hr> <!-- P -->
<H5 ALIGN=center>
Copyright &copy; 2001, Mark Nielsen.<BR>
Copying license <A HREF="../copying.html">http://www.linuxgazette.com/copying.html</A><BR>
Published in Issue 63 of <i>Linux Gazette</i>, Mid-February (EXTRA) 2001</H5>
<!-- *** END copyright *** -->
<!--startcut ==========================================================-->
<HR><P>
<CENTER>
<!-- *** BEGIN navbar *** -->
<IMG ALT="" SRC="../gx/navbar/left.jpg" WIDTH="14" HEIGHT="45" BORDER="0" ALIGN="bottom"><A HREF="nielsen2.html"><IMG ALT="[ Prev ]" SRC="../gx/navbar/prev.jpg" WIDTH="16" HEIGHT="45" BORDER="0" ALIGN="bottom"></A><A HREF="index.html"><IMG ALT="[ Table of Contents ]" SRC="../gx/navbar/toc.jpg" WIDTH="220" HEIGHT="45" BORDER="0" ALIGN="bottom" ></A><A HREF="../index.html"><IMG ALT="[ Front Page ]" SRC="../gx/navbar/frontpage.jpg" WIDTH="137" HEIGHT="45" BORDER="0" ALIGN="bottom"></A><A HREF="http://www.linuxgazette.com/cgi-bin/talkback/all.py?site=LG&article=http://www.linuxgazette.com/issue63/nielsen3.html"><IMG ALT="[ Talkback ]" SRC="../gx/navbar/talkback.jpg" WIDTH="121" HEIGHT="45" BORDER="0" ALIGN="bottom" ></A><A HREF="../faq/index.html"><IMG ALT="[ FAQ ]" SRC="./../gx/navbar/faq.jpg"WIDTH="62" HEIGHT="45" BORDER="0" ALIGN="bottom"></A><A HREF="okopnik.html"><IMG ALT="[ Next ]" SRC="../gx/navbar/next.jpg" WIDTH="15" HEIGHT="45" BORDER="0" ALIGN="bottom" ></A><IMG ALT="" SRC="../gx/navbar/right.jpg" WIDTH="15" HEIGHT="45" ALIGN="bottom">
<!-- *** END navbar *** -->
</CENTER>
</BODY></HTML>
<!--endcut ============================================================-->