1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378
|
<!--startcut ==============================================-->
<!-- *** BEGIN HTML header *** -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML><HEAD>
<title>Setting Up a Linux Laptop With No CD-ROM Drive LG #61</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.jpg"
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="steffler.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/issue61/ward.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="lg_backpage61.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">Setting Up a Linux Laptop With No CD-ROM Drive</font></H1>
<H4>By <a href="mailto:award@andorra.ad">Alan Ward</a></H4>
</center>
<P> <HR> <P>
<!-- END header -->
<P>This
article comes mainly from my fiddling around with a laptop I bought
at a great price - US $800 some years ago - but lacking a CD-ROM drive. Just
what I needed to see how to get a Linux box going using the network
bootdisks that come with most distributions these days. I also have
some experience with the elderly 486 I recycle as terminals (no CD
drive either - and little else).</P>
<P>There
are different ways of exporting the distribution CD from a Linux
desktop: NFS, FTP and HTTP. I would like to discuss briefly each of
these, before going into some of the interesting problems I
encountered. I will try to keep this at a level accessible to all -
and the techniques <B>are</B> quite easy to use - though NFS can be
something of a bitch.</P>
<P>I
will use the RedHat distribution scheme here. Most of it also applies
directly to derived distributions, such as Mandrake or HispaLinux.
The ideas behind also apply to most other Linux distributions, though
the details of implementation may be different.</P>
<P><B>The
disks</B></P>
<P>Modern
distributions can usually be booted straight from the CD. But they
also come with several boot images that can be written to a floppy
(usually in the <I>/images</I> directory). There is a difference
between a desktop with a standard ISA or PCI ethernet card, and a
laptop with a PCMCIA card. In the latter, you will need to load the
pcmcia support module before the ethernet drivers.</P>
<P>For
example:</P>
<P>-
the RedHat 5.2 distribution comes with <I>boot.img</I> (both CD and
network), though you may also need <I>supp.img</I> for PCMCIA card
support. (And yes, I still use it to convert 486 and early Pentium
boxes into X terminals and routers - though not for servers!).</P>
<P>-
the RedHat 6.0 distribution comes with <I>boot.img</I> (CD only),
<I>bootnet.img</I> (network) and <I>pcmcia.img</I>.
</P>
<P ALIGN=LEFT STYLE="margin-bottom: 0in">-
Mandrake 7.0 comes with <SPAN STYLE="text-decoration: none"><I>cdrom.img</I></SPAN>,
<I>network.img</I> and <I>pcmcia.img</I>, as does Mandrake Corporate
Server.</P>
<P>In
each case, to boot from the network you will need:</P>
<DL>
<DD>
<TABLE WIDTH=460 BORDER=1 BORDERCOLOR="#000000" CELLPADDING=4 CELLSPACING=0>
<COL WIDTH=178>
<COL WIDTH=114>
<COL WIDTH=141>
<THEAD>
<TR VALIGN=TOP>
<TH WIDTH=178>
<P>distribution</P>
</TH>
<TH WIDTH=114>
<P>without PCMCIA</P>
</TH>
<TH WIDTH=141>
<P>with PCMCIA</P>
</TH>
</TR>
</THEAD>
<TBODY>
<TR VALIGN=TOP>
<TD WIDTH=178>
<P>
RedHat 5.2</P>
</TD>
<TD WIDTH=114>
<P>
boot.img</P>
</TD>
<TD WIDTH=141>
<P>
boot.img + supp.img</P>
</TD>
</TR>
<TR VALIGN=TOP>
<TD WIDTH=178>
<P>
RedHat 6.0</P>
</TD>
<TD WIDTH=114>
<P>
bootnet.img</P>
</TD>
<TD WIDTH=141>
<P>
bootnet.img + pcmcia.img</P>
</TD>
</TR>
<TR VALIGN=TOP>
<TD WIDTH=178>
<P>
Mandrake 7.0 and CS</P>
</TD>
<TD WIDTH=114>
<P>
network.img</P>
</TD>
<TD WIDTH=141>
<P>
pcmcia.img</P>
</TD>
</TR>
</TBODY>
</TABLE>
</DL>
<P>Naturally,
you can write these images to floppies using the <I>dd</I>
instruction. For example:</P>
<P><FONT FACE="courier, monospace">dd
if=/mnt/cdrom/images/network.img of=/dev/fd0</FONT></P>
<P><B>Getting
your network up</B></P>
<P>All
network boot disks have a mecanism to get your network up, though the
order in which the steps are taken may be slightly different. For
example, a Mandrake 6.1 boot goes:</P>
<OL>
<LI><P>select
network image protocol (nfs, ftp or http);</P>
<LI><P>select
a network card - this particular boot disk cannot detect your card
automagically - more on this later;</P>
<LI><P>enter
your IP and host configurations, which will in most cases be the
definitive configurations;</P>
<LI><P>tell
it about your server (IP address or name, directory holding the
distribution).</P>
</OL>
<P><B>Installing
through NFS</B></P>
<P>NFS
can be seen as the means Linux boxes have to share directories across
a local or wide area network. Once exported, you can mount these
directories just as you would a local disk unit.</P>
<P>Server-side,
I usually just mount the CD, and then export /mnt/cdrom. This
involves the following steps:</P>
<P>1.
Get the NFS server working (nfsd), for example using <FONT FACE="courier, monospace">setup.</FONT></P>
<P>2.
Mount the CD as usual:
</P>
<P><FONT FACE="courier, monospace">mount
/dev/cdrom /mnt/cdrom</FONT></P>
<P>3.
Include this directory in the server's list of exportable
directories. In <FONT FACE="courier, monospace">/etc/exports</FONT>,
I insert the line:</P>
<P><FONT FACE="courier, monospace">/mnt/cdrom
*(ro,no_root_squash)</FONT></P>
<P>This
means I want to export <I>/mnt/cdrom</I> to all users (<I>*</I>),
with read-only rights (<I>ro</I>). <I>no_root_squash</I> gives remote root
users root privileges over your NFS files; normally, remote root users have the
<EM>nobody</EM> user's permission on them--this is a security measure in case
the remote users are not trustworthy.
<P>5.
I then make the export effective with:</P>
<P><FONT FACE="courier, monospace">exportfs</FONT></P>
<P>This
should reply with a message such as:</P>
<P><FONT FACE="courier, monospace">/mnt/cdrom
localhost</FONT></P>
<P><FONT FACE="courier, monospace">/mnt/cdrom
*</FONT></P>
<P>You
can then test it out on any box on the network with (for example,
with 192.168.0.1 as the server's IP address):</P>
<P><FONT FACE="courier, monospace">mount
192.168.0.1:/mnt/cdrom /mnt</FONT></P>
<P>Client-side,
you will need to tell the installation program:</P>
<P>-
the NFS server name (or IP addess in most small networks with no DNS)</P>
<P>-
the RedHat directory, <FONT FACE="courier, monospace">/mnt/cdrom in
my example.</FONT></P>
<P>This
works, but may not be the easiest way to install Linux. I use it in
networks where the server exports <FONT FACE="courier, monospace">/home
anyway, and NFS is already set up.</FONT></P>
<P><B>Installing
through FTP</B></P>
<P>Server-side,
exporting a RedHat CD through ftp is a rather simple process. In my
setup, I already had the <I>wuftp</I> server going. The package on
installation creates the <I>/home/ftp</I> directory, from which
anonymous ftp queries are served. The most expeditive way the serve
the CD seemed to be:</P>
<P>1)
create a subdirectory, such as /home/ftp/cdrom</P>
<P><FONT FACE="courier, monospace">mkdir
/home/ftp/cdrom</FONT></P>
<P>2)
mount the CD directly on this directory, instead of the more usual
<I>/mnt/cdrom</I>:</P>
<P><FONT FACE="courier, monospace">mount
/dev/cdrom /home/ftp/cdrom</FONT></P>
<P>Just
to be sure, I then checked you can access this directory from an
anonymous ftp session.</P>
<P>Client-side,
I selected <I>FTP image</I>, then went through the normal steps to
set up networking. When asked, I gave it</P>
<P>-
the FTP site name (or IP addess in most small networks with no DNS)</P>
<P>-
the RedHat directory, just <FONT FACE="courier, monospace">cdrom in
my example.</FONT></P>
<P>It
seems you can also use non-anonymous ftp connections, but I haven't
tried it as it doesn't seem too interesting in our case.</P>
<P><B>Installing
through HTTP</B></P>
<P>The
process is very similar to the FTP.
</P>
<P>Server-side,
I used the standard <I>apache</I> installation, with DocumentRoot set
to <I>/home/httpd/html</I>. I then</P>
<P>1)
created a subdirectory, /home/httpd/html/cdrom</P>
<P><FONT FACE="courier, monospace">mkdir
/home/httpd/html/cdrom</FONT></P>
<P>2)
mounted the CD directly on this directory:</P>
<P><FONT FACE="courier, monospace">mount
/dev/cdrom /home/httpd/html/cdrom</FONT></P>
<P>I
also checked the CD was accessible before going on. You can do this
on the server itself by requesting <FONT FACE="courier, monospace">http://localhost/cdrom/</FONT>.
You should obtain a list of the files on the CD.</P>
<P>Client-side,
you need to give the installation program:</P>
<P>-
the Web site name (or IP address in most small networks)</P>
<P>-
the RedHat directory, just <FONT FACE="courier, monospace">cdrom</FONT> in
my example.</P>
<P><B>Wee
problems</B></P>
<P>With
my laptop, my major problem was a Trust PCMCIA ethernet card that is
advertised on the box as being "full NE2000 compatible" -
which is just not true. (Why do they supply their own drivers for
Windows 95?).</P>
<P>I
was stuck on that one with several distributions such as Mandrake
6.1: these ask you to give your card type. Naturally, the <I>ne</I>
module didn't work.</P>
<P>Then
I tried the RedHat 6.0 distribution. This autodetects the card type -
and works fine using module <I>pcnet_cs</I>. This rather weird card
type is not in the usual lists, but is incorporated into most
kernels. The trick is to get a boot disk that either autodetects or
lets you type in your module name instead of selecting from a list.
Note that the RedHat 6.0 network.img disk also works for Mandrake
6.1.</P>
<P>I
had a couple of problems with screen resolution under X. A 800x600
pixel laptop screen will work well with its own resolution - but not
with 640x480 as the pixels get distorted. I also had to fiddle with
the HorizSync value in <I>/etc/X11/XF86Config</I>: the standard VGA
30-40 kHz range worked better for me than the discrete values I got
telling the installation program I had a 800x600 LCD screen. Be
careful though - as ever with X.</P>
<P>Another
problem is when you forget some packages during initial installation.
You then need to get the packages accesible locally once more: either
mounting the CD from the server with NFS, or downloading the packages
via FTP or HTTP. You can then use <I>rpm</I>, <I>kpackage</I> or
whatever.</P>
<P><B>Further
steps</B></P>
<P>One
point I would like to look at is to compare the three system's
relative speeds. From what I saw while preparing this article, there
don't seem to be any major differences. So I guess it depends mostly
on which services are already installed on the server.
</P>
<P>In
most cases these will be FTP and HTTP, as their configuration is
automatic with most modern distributions. NFS seems a less probable
choice as most Linux boxes don't need it for everyday tasks.</P>
<P>Finally,
the last question I would like to discuss is "why a laptop under
Linux"?</P>
<P>Besides
the usual reasons for using Linux, I find it useful as a teacher:</P>
<UL>
<LI><P>to
use StarOffice (my favourite for projections);</P>
<LI><P>to
demonstrate operating system techniques <I>live </I>(also with the
projector);</P>
<LI><P>as
a server for the lab: students see both what happens on the server's
projected screen as well as on their own clients' screen and can
experiment;</P>
<LI><P>as
a portable X terminal;</P>
<LI><P>to
convince decision-makers and money-spenders Linux gets more bang
from hardware than other systems. You carry it around, plug it into
their local network, and let them play. My final line is: "imagine
setting up Windows NT serving HTTP, FTP and mail on my P-133 CPU, 48
Mb RAM laptop ..." Not to speak of Windows 2000 - but that
would be unkind :-)</P>
</UL>
<!-- *** BEGIN copyright *** -->
<P> <hr> <!-- P -->
<H5 ALIGN=center>
Copyright © 2000, Alan Ward.<BR>
Copying license <A HREF="../copying.html">http://www.linuxgazette.com/copying.html</A><BR>
Published in Issue 61 of <i>Linux Gazette</i>, January 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="steffler.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/issue61/ward.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="lg_backpage61.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 ============================================================-->
|