238 lines
7.4 KiB
HTML
238 lines
7.4 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
|
<HTML>
|
|
<HEAD>
|
|
<META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
|
|
<TITLE>Installing Linux on ZIP disk using ppa ZIP Drive Mini-Howto: Setting up the ZIP disk</TITLE>
|
|
<LINK HREF="ZIP-Install-4.html" REL=next>
|
|
<LINK HREF="ZIP-Install-2.html" REL=previous>
|
|
<LINK HREF="ZIP-Install.html#toc3" REL=contents>
|
|
</HEAD>
|
|
<BODY>
|
|
<A HREF="ZIP-Install-4.html">Next</A>
|
|
<A HREF="ZIP-Install-2.html">Previous</A>
|
|
<A HREF="ZIP-Install.html#toc3">Contents</A>
|
|
<HR>
|
|
<H2><A NAME="s3">3. Setting up the ZIP disk</A></H2>
|
|
|
|
<P>(Common for both Red Hat and Slackware distributions.)
|
|
Before starting, make sure that you have access to the ZIP drive;
|
|
either by having ppa in the kernel or by having the ppa module
|
|
loaded. One easy way to find this out is by checking dmesg:
|
|
<P><B> ==> dmesg</B>
|
|
<P>You may have to pipe this to more as dmesg tends to be rather long.
|
|
Here's a snip from mine:
|
|
<BLOCKQUOTE><CODE>
|
|
<HR>
|
|
<PRE>
|
|
scsi0 : PPA driver version 0.26 using 4-bit mode on port 0x3bc.
|
|
scsi : 1 host.
|
|
Vendor: IOMEGA Model: ZIP 100 Rev: D.08
|
|
Type: Direct-Access ANSI SCSI revision: 02
|
|
Detected scsi removable disk sda at scsi0, channel 0, id 6, lun 0
|
|
SCSI device sda: hdwr sector= 512 bytes. Sectors= 196608 [96 MB] [0.1 GB]
|
|
sda: Write Protect is off
|
|
sda: sda1 sda2
|
|
</PRE>
|
|
<HR>
|
|
</CODE></BLOCKQUOTE>
|
|
<P>If you only see something like:
|
|
<BLOCKQUOTE><CODE>
|
|
<HR>
|
|
<PRE>
|
|
scsi : 0 hosts.
|
|
scsi : detected total.
|
|
</PRE>
|
|
<HR>
|
|
</CODE></BLOCKQUOTE>
|
|
|
|
then you have SCSI support but the ZIP wasn't found.
|
|
<P>
|
|
<H2><A NAME="ss3.1">3.1 Partitioning ZIP disk</A>
|
|
</H2>
|
|
|
|
<P>To partition the ZIP disk, run fdisk:
|
|
<P><B> ==> fdisk /dev/sda/</B>
|
|
<P>Here is a snap of the partition table I have setup:
|
|
<BLOCKQUOTE><CODE>
|
|
<HR>
|
|
<PRE>
|
|
Disk /dev/sda: 64 heads, 32 sectors, 96 cylinders
|
|
Units = cylinders of 2048 * 512 bytes
|
|
|
|
Device Boot Begin Start End Blocks Id System
|
|
/dev/sda1 1 1 81 82928 83 Linux native
|
|
/dev/sda2 82 82 96 15360 82 Linux swap
|
|
</PRE>
|
|
<HR>
|
|
</CODE></BLOCKQUOTE>
|
|
|
|
I decided to use a swap partition since I wanted to be able to use
|
|
this with any machine.
|
|
<P>
|
|
<H2><A NAME="ss3.2">3.2 Formatting and mounting the ZIP disk</A>
|
|
</H2>
|
|
|
|
<P>After running fdisk, format the new partition:
|
|
<P><B> ==> mke2fs -c /dev/sda1</B>
|
|
<P>Then, create the swap partition: (15360 blocks as taken from fdisk)
|
|
<P><B> ==> mkswap -c /dev/sda2 15360</B>
|
|
<P>Last, you'll need to mount the ZIP disk:
|
|
<P><B> ==> mount /dev/sda1 /iomega -t ext2</B>
|
|
<P>
|
|
<H2><A NAME="ss3.3">3.3 Creating the boot disk</A>
|
|
</H2>
|
|
|
|
<P>Since the ppa version of the ZIP drive isn't a true SCSI device, it
|
|
isn't a bootable device and, therefore, requires a boot disk which
|
|
has ppa included in the kernel and not as a module.
|
|
<P>
|
|
<H3>Configuring and making the kernel</H3>
|
|
|
|
<P>First, you'll need to configure and make a kernel that has ppa
|
|
support enabled and not as a loadable module. In order to get to
|
|
the ppa option, select SCSI support:
|
|
<P><I> SCSI support (CONFIG_SCSI) [Y/m/n/?] </I>
|
|
<P>Plus, SCSI disk support:
|
|
<P><I> SCSI disk support (CONFIG_BLK_DEV_SD) [Y/m/n/?] </I>
|
|
<P>And finally, under the SCSI low-level drivers, is the ppa support:
|
|
<P><I> IOMEGA Parallel Port ZIP drive SCSI support (CONFIG_SCSI_PPA) [Y/m/n/?] </I>
|
|
<P>Again, be sure not to include ppa as a module, but rather in the
|
|
kernel. Thus far, without the use of the parport kernel patch
|
|
(see 1.4), the ppa driver will not allow the passive port of the ZIP
|
|
drive to be used for a printer, so you may want to say no to parallel
|
|
printer support:
|
|
<P><I> Parallel printer support (CONFIG_PRINTER) [N/y/m/?] </I>
|
|
<P>
|
|
<BLOCKQUOTE><CODE>
|
|
<HR>
|
|
<PRE>
|
|
NOTE: For more information concerning the ppa driver, please
|
|
refer to the ZIP-Drive mini-HOWTO.
|
|
</PRE>
|
|
<HR>
|
|
</CODE></BLOCKQUOTE>
|
|
<P>Once the kernel is configured, make the kernel:
|
|
<P><B> ==> make dep; make clean; make zImage </B>
|
|
<P>The new kernel should be found in arch/i386/boot/zImage.
|
|
<P>
|
|
<H3>Getting the kernel to a floppy</H3>
|
|
|
|
<P>After having to have 4 separate floppies due to different kernels
|
|
and needing different parameters, (plus the great email I got
|
|
telling me how to do this) I have included a section on LILO as one
|
|
of the means of creating a bootable floppy.
|
|
<P>
|
|
<H3>LILO installation</H3>
|
|
|
|
<P>For those who have to, or for that matter just want to, have several
|
|
kernels on one floppy (now adays, mine are too large) or just want
|
|
to be able to pass arguments (such as single user mode) I received
|
|
email on how to install LILO on a floppy.
|
|
<P>
|
|
<H3>Creating the ext2 filesystem</H3>
|
|
|
|
<P>To create an ext2 filesystem on a floppy, just do the same command
|
|
for the ZIP disk:
|
|
<P><B> ==> mke2fs -t /dev/fd0 </B>
|
|
<P>
|
|
<H3>Copying the essential files</H3>
|
|
|
|
<P>Next, make sure there's a directory for a mount point, and mount the
|
|
floppy (I used /mnt/floppy):
|
|
<P><B> ==> mount /dev/fd0 /mnt/floppy -t ext2 </B>
|
|
<P>is to boot properly, you'll need the same files that LILO uses on your
|
|
current Linux installation.
|
|
<P>
|
|
<BLOCKQUOTE><CODE>
|
|
<HR>
|
|
<PRE>
|
|
NOTE: The file locations here are from my machine
|
|
and may not be the same for everyone.
|
|
</PRE>
|
|
<HR>
|
|
</CODE></BLOCKQUOTE>
|
|
<P><B> ==> cp /boot/boot.b /mnt/floppy </B>
|
|
<P><B> ==> cp /boot/map /mnt/floppy </B>
|
|
<P><B> ==> cp /usr/src/linux/arch/i386/boot/zImage /mnt/floppy/vmlinuzDESK </B>
|
|
<P>
|
|
<P>Now to create the config file for LILO, now I miss the liloconfig
|
|
program... (Thanks to Javier Rodriguez for this info) First, create
|
|
the LILO config file, /mnt/floppy/lilo.conf, for the kernel(s) for
|
|
the ZIP disk. Here's what I used so that I could have different
|
|
kernels to test with:
|
|
<BLOCKQUOTE><CODE>
|
|
<HR>
|
|
<PRE>
|
|
boot=/dev/fd0
|
|
map=/mnt/floppy/map
|
|
install=/mnt/floppy/boot.b
|
|
prompt
|
|
compact
|
|
timeout=50
|
|
image=/mnt/floppy/vmlinuzLAP
|
|
label=Laptop
|
|
root=/dev/sda1
|
|
read-only
|
|
image=/mnt/floppy/vmlinuzDESK
|
|
label=Desktop
|
|
root=/dev/sda1
|
|
read-only
|
|
image=/mnt/floppy/vmlinuzDESK
|
|
label=rescue
|
|
root=/dev/hdc1
|
|
read-only
|
|
</PRE>
|
|
<HR>
|
|
</CODE></BLOCKQUOTE>
|
|
|
|
I have two kernels, one for my 486 laptop which required the math-co
|
|
emulation in the kernel and the other for my desktop. The rescue
|
|
allows me to make an emergency boot to the hard drive.
|
|
<P>Last but not least, with the floppy still mounted, run LILO to
|
|
install it on the floppy with the command:
|
|
<P><B> ==> lilo -C /mnt/floppy/lilo.conf</B>
|
|
<P>Once LILO has been installed on the floppy, skip the next two steps,
|
|
unless you enjoy doing this over again :)
|
|
<P>
|
|
<H3>Kernel only installation</H3>
|
|
|
|
<P>
|
|
<BLOCKQUOTE><CODE>
|
|
<HR>
|
|
<PRE>
|
|
NOTE: This does not pertain for the LILO install.
|
|
</PRE>
|
|
<HR>
|
|
</CODE></BLOCKQUOTE>
|
|
<P>Copy the newly made kernel to a floppy disk:
|
|
<P><B> ==> cp arch/i386/boot/zImage /dev/fd0</B>
|
|
<P>or
|
|
<P><B> ==> cat arch/i386/boot/zImage > /dev/fd0</B>
|
|
<P>Yes, there are many ways to copy the kernel to a floppy, but the
|
|
last way, my favorite, is a little more encrypted. Try not to
|
|
forget the > unless you like viewing binary files :)
|
|
<P>
|
|
<H3>Setting the root and swap on the floppy</H3>
|
|
|
|
<P>
|
|
<BLOCKQUOTE><CODE>
|
|
<HR>
|
|
<PRE>
|
|
NOTE: This does not pertain for the LILO install.
|
|
</PRE>
|
|
<HR>
|
|
</CODE></BLOCKQUOTE>
|
|
<P>Once the kernel is on the floppy, you need to set the root device to
|
|
the ZIP disk:
|
|
<B> ==> rdev /dev/fd0 /dev/sda1</B>
|
|
I'm not sure if the next option is needed, but I did it none the
|
|
less. To set the swap:
|
|
<P><B> ==> rdev -s /dev/fd0 /dev/sda2</B>
|
|
<P>
|
|
<HR>
|
|
<A HREF="ZIP-Install-4.html">Next</A>
|
|
<A HREF="ZIP-Install-2.html">Previous</A>
|
|
<A HREF="ZIP-Install.html#toc3">Contents</A>
|
|
</BODY>
|
|
</HTML>
|