237 lines
9.6 KiB
HTML
237 lines
9.6 KiB
HTML
<title>FAQ</title>
|
|
<h1>5 <a name="s5"> FAQ </h1>
|
|
<p> <a href="Bootdisk-HOWTO.html#toc5"> Contents of this section</a></p>
|
|
|
|
<p></p>
|
|
<h2>5.1 <A Name="ss5.1"> Q. How can I make a boot disk with a XXX driver? </h2>
|
|
|
|
<p>The easiest way is to obtain a Slackware kernel from your nearest
|
|
Slackware mirror site. Slackware kernels are generic kernels which atttempt
|
|
to include drivers for as many devices as possible, so if you have a
|
|
SCSI or IDE controller, chances are that a driver for it is included
|
|
in the Slackware kernel.</p>
|
|
<p>Go to the a1 directory and select either IDE or SCSI
|
|
kernel depending on the type of controller you have. Check the xxxxkern.cfg
|
|
file for the selected kernel to see the drivers which have been included
|
|
in that kernel. If the device you want is in that list, then the
|
|
corresponding kernel should boot your computer. Download the xxxxkern.tgz
|
|
file and copy it to your boot diskette as described above in the section
|
|
on making boot disks.</p>
|
|
<p>You must then check the root device in the kernel, using the rdev
|
|
command:
|
|
<blockquote><code>
|
|
<pre>
|
|
rdev vmlinuz
|
|
</pre>
|
|
</code></blockquote>
|
|
</p>
|
|
<p>Rdev will then display the current root device in the kernel. If this
|
|
is not the same as the root device you want, then use rdev to change it.
|
|
For example, the kernel I tried was set to /dev/sda2, but my root
|
|
scsi partition is /dev/sda8. To use a root diskette, you would have
|
|
to use the command:
|
|
<blockquote><code>
|
|
<pre>
|
|
rdev vmlinuz /dev/fd0
|
|
</pre>
|
|
</code></blockquote>
|
|
</p>
|
|
<p>If you want to know how to set up a Slackware root disk as well,
|
|
that's outside the scope of this HOWTO, so I suggest you check the
|
|
Linux Install Guide or get the Slackware distribution. See the section
|
|
in this HOWTO titled "References".</p>
|
|
<p></p>
|
|
|
|
<h2>5.2 <A Name="ss5.2"> Q. How do I update my boot floppy with a new kernel? </h2>
|
|
|
|
<p>Just copy the kernel to your boot diskette using the dd command for
|
|
a boot diskette without a filesystem, or the cp command for a
|
|
boot/root disk. Refer to the section in this HOWTO titled "Boot"
|
|
for details on creating a boot disk. The description applies equally
|
|
to updating a kernel on a boot disk.</p>
|
|
<p></p>
|
|
|
|
<h2>5.3 <A Name="ss5.3"> Q. How do I remove LILO so that I can use DOS to boot again? </h2>
|
|
|
|
<p>This is not really a Bootdisk topic, but it is asked so often, so: the
|
|
answer is, use the DOS command:
|
|
<blockquote><code>
|
|
<pre>
|
|
FDISK /MBR
|
|
</pre>
|
|
</code></blockquote>
|
|
</p>
|
|
<p>MBR stands for Master Boot Record, and it replaces the boot sector
|
|
with a clean DOS one, without affecting the partition table. Some
|
|
purists disagree with this, but even the author of LILO, Werner
|
|
Almesberger, suggests it. It is easy, and it works.</p>
|
|
<p>You can also use the dd command to copy the backup saved by LILO
|
|
to the boot sector - refer to the LILO documentation if you wish
|
|
to do this.</p>
|
|
<p></p>
|
|
|
|
<h2>5.4 <A Name="ss5.4"> Q. How can I boot if I've lost my kernel AND my boot disk? </h2>
|
|
|
|
<p>If you don't have a boot disk standing by, then probably
|
|
the easiest method is to obtain a Slackware kernel for your
|
|
disk controller type (IDE or SCSI) as described above for "How do I
|
|
make a boot disk with a XXX driver?". You can then boot your
|
|
computer using this kernel, then repair whatever damage there is.</p>
|
|
<p>The kernel you get may not have the root device set to the disk
|
|
type and partition you want. For example, Slackware's generic
|
|
scsi kernel has the root device set to /dev/sda2, whereas my
|
|
root Linux partition happens to be /dev/sda8. In this case the
|
|
root device in the kernel will have to be changed.</p>
|
|
<p>You can still change the root device and ramdisk settings in the kernel
|
|
even if all you have is a kernel, and some other operating system,
|
|
such as DOS.</p>
|
|
<p>Rdev changes kernel settings by changing the
|
|
values at fixed offsets in the kernel file, so you can do the same
|
|
if you have a hex editor available on whatever systems you do still
|
|
have running - for example, Norton Utilities Disk Editor under DOS.
|
|
You then need to check and if necessary change the values in the
|
|
kernel at the following offsets:
|
|
<blockquote><code>
|
|
<pre>
|
|
0x01F8 Low byte of RAMDISK size
|
|
0x01F9 High byte of RAMDISK size
|
|
0x01FC Minor device number - see below
|
|
0X01FD Major device number - see below
|
|
</pre>
|
|
</code></blockquote>
|
|
</p>
|
|
<p>The ramdisk size is the number of blocks of ramdisk to create.
|
|
If you want to boot from a root diskette then set this to decimal
|
|
1440, which is 0x05A0, thus set offset 0x01F8 to 0xA0 and
|
|
offset 0x01F9 to 0x05. This will allocate enough space for
|
|
a 1.4Mb diskette.</p>
|
|
<p>The major and minor device numbers must be set to the device
|
|
you want to mount your root filesystem on. Some useful values
|
|
to select from are:
|
|
<blockquote><code>
|
|
<pre>
|
|
device major minor
|
|
/dev/fd0 2 0 1st floppy drive
|
|
/dev/hda1 3 1 partition 1 on 1st IDE drive
|
|
/dev/sda1 8 1 partition 1 on 1st scsi drive
|
|
/dev/sda8 8 8 partition 8 on 1st scsi drive
|
|
</pre>
|
|
</code></blockquote>
|
|
</p>
|
|
<p>Once you have set these values then you can write the file to
|
|
a diskette using either Norton Utilities Disk Editor, or a program called
|
|
rawrite.exe. This program is included
|
|
in several distributions, including the SLS and Slackware distributions.
|
|
It is a DOS program which writes a file to the "raw" disk, starting
|
|
at the boot sector, instead of writing it to the file system. If you use
|
|
Norton Utilities, then you must write the file to a physical disk
|
|
starting at the beginning of the disk.</p>
|
|
<p></p>
|
|
|
|
<h2>5.5 <A Name="ss5.5"> Q. How can I make extra copies of boot/root diskettes? </h2>
|
|
|
|
<p>It is never desirable to have just one set of rescue disks - 2 or 3
|
|
should be kept in case one is unreadable.</p>
|
|
<p>The easiest way of making copies of any diskettes, including
|
|
bootable and utility diskettes, is to use the dd command to copy the
|
|
contents of the original diskette to a file on your hard drive, and
|
|
then use the same command to copy the file back to a new diskette.
|
|
Note that you do not need to, and should not, mount the diskettes,
|
|
because dd uses the raw device interface.</p>
|
|
<p>To copy the original, enter the command:
|
|
<blockquote><code>
|
|
<pre>
|
|
dd if=<device> of=<filename>
|
|
where <device> = the device name of the diskette
|
|
drive
|
|
and <filename> = the name of the file where you
|
|
want to copy to
|
|
</pre>
|
|
</code></blockquote>
|
|
</p>
|
|
<p>For example, to copy from /dev/fd0 to a temporary file called
|
|
/tmp/diskette.copy, I would enter the command:
|
|
<blockquote><code>
|
|
<pre>
|
|
dd if=/dev/fd0 of=/tmp/diskette.copy
|
|
</pre>
|
|
</code></blockquote>
|
|
</p>
|
|
<p>Omitting the "count" parameter, as we have done here, means that the
|
|
whole diskette of 2880 (for a high-density) blocks will be copied.</p>
|
|
<p>To copy the resulting file back to a new diskette, insert the new
|
|
diskette and enter the reverse command:
|
|
<blockquote><code>
|
|
<pre>
|
|
dd if=<filename> of=<device>
|
|
</pre>
|
|
</code></blockquote>
|
|
</p>
|
|
<p>Note that the above discussion assumes that you have only one diskette
|
|
drive. If you have two of the same type, then you can copy diskettes
|
|
using a command like:
|
|
<blockquote><code>
|
|
<pre>
|
|
dd if=/dev/fd0 of=/dev/fd1
|
|
</pre>
|
|
</code></blockquote>
|
|
</p>
|
|
<p></p>
|
|
|
|
<h2>5.6 <A Name="ss5.6"> Q. How can I boot without typing in "ahaxxxx=nn,nn,nn" every time? </h2>
|
|
|
|
<p>Where a disk device cannot be autodetected it is necessary to supply
|
|
the kernel with a command device parameter string, such as:
|
|
<blockquote><code>
|
|
<pre>
|
|
aha152x=0x340,11,3,1
|
|
</pre>
|
|
</code></blockquote>
|
|
|
|
This parameter string can be supplied in several ways using LILO:
|
|
<ul>
|
|
<li>By entering it on the command line every time the system
|
|
is booted via LILO. This is boring, though.</li>
|
|
<li>By using the LILO "lock" keyword to make it store the
|
|
command line as the default command line, so that LILO will use
|
|
the same options every time it boots.</li>
|
|
<li>By using the APPEND statement in the lilo config file. Note that
|
|
the parameter string must be enclosed in quotes.</li>
|
|
</ul>
|
|
</p>
|
|
<p>For example, a sample command line using the above parameter string
|
|
would be:
|
|
<blockquote><code>
|
|
<pre>
|
|
vmlinux aha152x=0x340,11,3,1 root=/dev/sda1 lock
|
|
</pre>
|
|
</code></blockquote>
|
|
|
|
This would pass the device parameter string through, and also ask the
|
|
kernel to set the root device to /dev/sda1 and save the whole command
|
|
line and reuse it for all future boots.</p>
|
|
<p>A sample APPEND statement is:
|
|
<blockquote><code>
|
|
<pre>
|
|
APPEND = "aha152x=0x340,11,3,1"
|
|
</pre>
|
|
</code></blockquote>
|
|
</p>
|
|
<p>Note that the parameter string must NOT be enclosed in quotes on the
|
|
command line, but it MUST be enclosed in quotes in the APPEND statement.</p>
|
|
<p>Note also that for the parameter string to be acted on, the kernel
|
|
must contain the driver for that disk type. If it does not, then there
|
|
is nothing listening for the parameter string, and you will have to
|
|
rebuild the kernel to include the required driver. For details on
|
|
rebuilding the kernel, cd to /usr/src/linux and read the README, and
|
|
read the Linux FAQ and Installation HOWTO. Alternatively you could
|
|
obtain a generic kernel for the disk type and install that.</p>
|
|
<p>Readers are strongly urged to read the LILO documentation before
|
|
experimenting with LILO installation. Incautious use of the "BOOT"
|
|
statement can damage partitions.</p>
|
|
<p></p>
|
|
|
|
<p><a href="Bootdisk-HOWTO-6.html"> Next </a> Chapter, <a href="Bootdisk-HOWTO-4.html"> Previous </a> Chapter</p><p>Table of contents of <a href="Bootdisk-HOWTO.html#toc5">this chapter</a>,
|
|
General <a href="Bootdisk-HOWTO.html#toc">table of contents</a></p>
|
|
<p><a href="Bootdisk-HOWTO.html"> Top </a> of the document,
|
|
<a href="#0"> Beginning of this Chapter</a></p> |