LDP/LDP/howto/linuxdoc/LILO-crash-rescue-HOWTO.sgml

683 lines
25 KiB
Plaintext

<!doctype linuxdoc system>
<!--
************************** begin comment *****************************
The following is the HOW-TO for recovering from linux crash, if
linux fails to boot, LILO is destroyed and to rescue the system.
This document is in the SGML format. You must use sgml package to
process this document
************************* end of comment *****************************
-->
<!--
************************** SGML USER GUIDE *****************************
The SGML user guide on linux is located at /usr/doc/sgml-tools
Read the example.sgml and guide.html documents.
Usage:
HTML sgml2html foo (Do not give extension .sgml here!!)
Text sgml2txt foo.sgml
Latex sgml2latex foo.sgml
(note: put extra dash - before language below, removed to compile)
Postscript sgml2latex -language=english -o ps foo.sgml
DVI sgml2latex -d foo.sgml
Lyx sgml2lyx foo.sgml
Richtext sgml2rtf foo.sgml
gnuinfo sgml2info foo.sgml
man sgml2txt -man foo.sgml
SGML sgmlcheck foo.sgml
************************* end of comment *****************************
-->
<article>
<!-- Title information -->
<title>LILO, Linux Crash Rescue HOW-TO
<!-- chapt change
LILO, Linux Crash Rescue HOW-TO
-->
<author>Al Dev (Alavoor Vasudevan)
<htmlurl url="mailto:alavoor[AT]yahoo.com"
name="alavoor[AT]yahoo.com">
<date>v10.8, 25 Jan 2003
<abstract>
This document discusses methods to recover from Linux system failures.
Various reasons for linux system failures can be -
LILO is destroyed, or linux fails to boot, or Master Boot Record (MBR)
is damaged or linux fails to boot when another
operating system like Windows NT is installed which erases LILO or MBR.
</abstract>
<!-- Table of contents -->
<toc>
<!-- Begin the document -->
<sect>Introduction
<p>
<bf>
(The latest version of this document is
at <url url="http://www.milkywaygalaxy.freeservers.com">. You may
want to check there for changes).
</bf>
You cannot avoid accidents and if it happens to linux systems then it
may damage the
master boot record (MBR) or LILO (Linux boot Loader).
There may be cases where linux will not boot due to hard disk
failures. The LILO may also fail if you accidentally re-partition the
hard disk or you install another additional operating system like
Windows 98/NT on the linux computer.
This document gives you some ideas, tips and quick guide to recover
fast without wading through hundreds of pages of documentation on
LILO or Linux.
<sect1> Tiny Floppy Linux <label id="tiny">
<p>
To recover any Windows 95/NT/2000, OS/2, BeOS or Linux box you may need the
tiny linux which fits on a single floppy disk.
See the list of tiny floppy linux given below -
<itemize>
<item> The best <url name="Tomsrtbt" url="http://www.toms.net/~toehser/rb">
<item> Second best floppy linux <url name="MuLinux" url="http://sunsite.dk/mulinux">
<item> <url name="Trinux" url="http://www.trinux.org">
<item> <url name="DLX" url="http://www.wu-wien.ac.at/usr/h93/h9301726/dlx.html">
<item> <url name="FloppyFW" url="http://www.zelow.no/floppyfw">
<item> <url name="Linux Router Proejct floppy" url="http://www.psychosis.com/linux-router">
<item> <url name="Tiny Linux distributions" url="http://www.txdirect.net/users/mdfranz/tinux.html">
<item> <url name="TINYLinux" url="http://tiny.seul.org/en">
</itemize>
<sect1> Tiny Pocket CDROM Linux <label id="tinycdrom">
<p>
<itemize>
<item> Linuxcare Bootable Toolbox <url url="http://lbt.linuxcare.com">
<item> LNX-BBC <url url="http://lnxbbc.org">
<item> Tom's Root and Boot "the most GNU/Linux on one floppy disk"
<url url="http://www.toms.net/rb">
<item> "Innominate-Linux-Rescue-System" - a CD-based rescue system
<url url="http://innominate.org/projects/rescueCD">
<item> Irish Linux Users Group (ILUG) BBC: A bootable CD ISO
<url url="ftp://ftp.blackstar.co.uk/pub/ILUG/">
<item> Lubbock: Meant to be the "Tom's Root Boot" of CDs <url url="http://lubbock.sourceforge.net">
<item> Repairlix: a networked Linux distribution/bootable system intended to
fit in 12MB of media. <url url="http://repairlix.sourceforge.net">
<item> SuperRescue: a Red Hat-based bootable CD
<url url="http://www.kernel.org/pub/dist/superrescue">
<item> Timo's Rescue CD Set: an easy way of generating el Torito Boot Cd's
<url url="http://rescuecd.sourceforge.net">
</itemize>
<sect> Crash Recovery<label id="crash">
<p>
<sect1> Preparation Tips <label id="tips">
<p>
It is a good idea to backup the important system files like /etc/fstab, /etc/lilo.conf
after you login using Tomsrtbt floppy or RedHat Linux CDROM (Rescue option)
in following sections. This can be very handy during
crash situation or something happens to system files.
<code>
bash# cp /etc/fstab /etc/fstab.orig
bash# cp /etc/lilo.conf /etc/lilo.conf.orig
bash# cp /etc/hosts /etc/hosts.orig
bash# cp /etc/hosts.allow /etc/hosts.allow.orig
bash# cp /etc/hosts.deny /etc/hosts.deny.orig
bash# cp /etc/inetd.conf /etc/inetd.conf.orig
bash# cp /etc/inittab /etc/inittab.orig
bash# cp /etc/networks /etc/networks.orig
</code>
<sect1> Using Linux CDROM In Rescue Mode
<p>
Most of the distributions like RedHat, SUSE, Debian provide CDROM which have "Rescue"
option. For this, you have should set the BIOS of your computer to boot first from
IDE CDROM drive. Usually you set the BIOS (using F8 key during boot) to boot
first from CDROM drive, second from Floppy drive and third from hard disk.
Load the Linux cdrom into the CD drive and reboot the system.
The Linux distribution will load and at the prompt select "Rescue Operation".
In the resuce operation mount the hard disks and try to repair.
<code>
# chroot /mnt/SYSIMAGE
# df
</code>
After doing chroot, the system will look as if you had booted the system
from hard disk.
You can see all the partitions and you can repair or recover the files.
<sect1> Quick Steps to recovery
<p>
Follow these steps to recover from LILO or system failures.
<enum>
<item> <bf>SCENE 1:</bf> If your system does not boot -
<p>
Get the tomsrtbt floppy <url url="http://www.toms.net/rb"> or MuLinux floppy
(see also <ref name="Tiny Linux" id="tiny">).
Boot with tomsrtbt floppy
Use fdisk to find the partitions. Try to recognise the
root and boot partition. Watch out, you may be having the /boot files on
the root partition itself.
The Linux's root partition has the following directories
<bf>bin</bf>,
<bf>boot</bf>,
<bf>etc</bf>,
<bf>usr</bf>.
And the Linux's boot partition has these directories:
<bf>vmlinuz</bf>,
<bf>boot.b</bf>,
<bf>chain.b</bf>,
<bf>map</bf>.
To find out root partition do this :
<code>
bash# fdisk /dev/hda
Command (m for help): m (Gives you help on commands)
Command (m for help): p (Gives you list of partitons)
Command (m for help): q
bash# mkdir /test
bash# mount /dev/hda1 /test
bash# ls /test
You should see root-partition list like this -
bin fd lib mnt proc sbin usr
boot dev etc home lost+found opt root tmp var
</code>
If this is not a root partition, then try the next partition /dev/hda2.
Keep trying hda3, hda4, hda5, etc.. untill you find the root partition.
If you do not find root partition in <bf>hda</bf> device then repeat the above
steps for other hard disk devices like <bf>hdb</bf>, <bf>hdc</bf>, <bf>hdd</bf> etc..
Next, you should find the /boot, /usr and /var partitions.
The disk locations of these partitions are needed to create the new lilo configuration.
In my case the root partition is /dev/hda4 which is used in the examples below:
<code>
bash# mkdir /rootpart
bash# mount /dev/hda4 /rootpart
bash# cat /rootpart/etc/fstab
Read the output of fstab and mount partitions as per fstab file, see below -
bash# mount /dev/hda5 /rootpart/boot
bash# mount /dev/hda6 /rootpart/usr
bash# mount /dev/hda7 /rootpart/var
bash# mount /dev/hda8 /rootpart/opt
bash# mount /dev/hda9 /rootpart/root
bash# mount /dev/hda10 /rootpart/home
</code>
In my case, as per fstab file hda5 was <bf>boot</bf>, hda6 was <bf>usr</bf>,
hda7 was <bf>var</bf>, hda8 was <bf>opt</bf>,
hda9 was <bf>root</bf>, hda10 was <bf>home</bf> and hda11 was windows95 (FAT16 partition).
Edit /etc/fstab (not /rootpart/etc/fstab) and put (sample code given here) -
<code>
/dev/hda4 /rootpart ext2 defaults 1 1
/dev/hda5 /rootpart/boot ext2 defaults 1 1
/dev/hda6 /rootpart/usr ext2 defaults 1 1
/dev/hda7 /rootpart/var ext2 defaults 1 1
/dev/hda8 /rootpart/opt ext2 defaults 1 1
/dev/hda9 /rootpart/root ext2 defaults 1 1
/dev/hda10 /rootpart/home ext2 defaults 1 1
/dev/hda11 /rootpart/win95part vfat defaults 1 1
On my computer hda4 contains the linux root partition, hda5 had boot partition and
hda11 has windows 95 vfat system.
bash# mkdir /rootpart/win95part
bash# mount /rootpart/win95part
And repair the problem partitions using fsck or e2fsck commands.
bash# man fsck
bash# man e2fsck
</code>
<p>
<item> <bf>SCENE 2:</bf> If LILO is not working..
<p>
Follow scene 1 above, if that fails then follow these steps.
After executing steps in scene 1 above, you should have
already mounted /rootpart and have created /etc/fstab file.
Note: It is very important to note how chroot command works below. The <bf>/sbin/lilo</bf>
file which chroot uses is actually located in <bf>/rootpart/sbin/lilo</bf> and
NOT in /sbin!! Hence, do not get confused.
<code>
bash# mount -a
bash# chroot /rootpart /sbin/lilo -q
bash# man chroot
bash# chroot /rootpart /sbin/lilo
</code>
Note: New users of chroot will be confused. If chroot command complains that
it cannot find /boot/map file then it actually
means it that it cannot find /rootpart/boot/map. Because you gave /rootpart as the
first argument to chroot and all references are with respect to /rootpart.
Alternatively, you can directly use /sbin/lilo instead of chroot. The
-r option of lilo actually does chroot.
It is very <bf>strongly recommended</bf> that you use chroot, instead of lilo -r,
as it is more convenient and can catch errors more easily.
<code>
bash# man lilo
bash# /sbin/lilo -r /rootpart
</code>
<p>
<item> <bf>SCENE 3:</bf> If LILO is not working..
<p>
If scene 1 and 2 failes, then
if you made the boot disk with 'mkbootdisk' (during install or
by using 'man mkbootdisk'), boot with it and repair your partitions.
The mkbootdisk is in mkbootdisk*.rpm package, you must install this.
Or get boot disks for Linux/NT/Windows/DOS/Mac are at <url url="http://www.bootdisk.com">
Other option is - get a hold of installation Linux-CDROM. Just about every Linux distribution
provides a image of a rescue disk on their CD. Under Linux use
"dd if=/cdrom/disks/rescue of=/dev/fd0" to create a rescue floppy disk. Under DOS
use rawrite.exe (included on Linux CD) and then do "rawrite image-name a:".
<p>
<item> <bf>SCENE 4:</bf> If 1, 2 and 3 above fails and you do not have boot disk
<p>
If you have another computer running linux, then
login as root and do -
Note: If you compile your own kernel as a bzImage (for instance, bzImage-2.4.4),
then you should create a hard link to vmlinuz-2.4.4 as follows (note the
the z in name vmlinuz and it is not vmlinux). If you do not do this then
mkbootdisk command may fail.
<code>
bash# cd /boot
bash# ls -l vmlinuz*
bash# ln /boot/bzImage-2.4.4 /boot/vmlinuz-2.4.4
</code>
Now that you have bzImage and vmlinuz, give these commands -
<code>
bash$ man mkbootdisk
bash# cp /etc/lilo.conf /etc/lilo-original.conf
</code>
Edit the /etc/lilo.conf and put the root partition name as you
obtained in 'scene 1' above and insert a blank floppy and give -
<code>
bash$ mkbootdisk --device /dev/fd0 2.2.12-20
</code>
The mkbootdisk is in mkbootdisk*.rpm package, you must install this.
Make sure you move the /etc/lilo-original.conf back to /etc/lilo.conf!!
And then take this floppy and goto scene 3
<p>
<item> <bf>SCENE 5: </bf> This is the worst scenerio and hopefully you will never come to this
stage. Scenes from 1 to 4 will take care of majority of cases. But just in case, all the above
scenes 1, 2, 3 and 4 fail then -
<p>
<it><bf>Step 1: </bf></it>
Boot tomsrtbt
(see <ref name="Tiny Linux" id="tiny">)
and mount the partitions and backup the root
partition to another partition having disk space with comamnds -
<code>
Edit /etc/fstab and put (sample code given here, you may have to
change as per your disk layout) -
/dev/hda4 /rootpart ext2 defaults 1 1
/dev/hda11 /b1 vfat defaults 1 1
bash$ mkdir /rootpart; mount /rootpart
bash$ mkdir /b1; mount /b1
bash$ cd /
bash$ df
And see that there is enough disk space in /b1 to tar up the root partition
bash$ tar cvf /b1/root-hda4.tar /rootpart
</code>
<p>
<it><bf>Step 2: </bf></it>
Insert Linux cdrom, reboot and install the redhat linux
on /dev/hda4 (but DO NOT install any extra packages, you just
need to install only the root, boot systems and LILO manager that is, a very
bare minimum). This will also install the LILO on hard disk.
Boot linux now and login as root and do -
<code>
bash$ man mkbootdisk
bash# cp /etc/lilo.conf /etc/lilo-original.conf
</code>
Note: You MUST remember to copy back lilo-original.conf to lilo.conf!!
Edit the /etc/lilo.conf and put the root partition name as you
obtained in 'scene 1' above and insert a blank floppy and give -
<code>
bash$ mkbootdisk --device /dev/fd0 2.2.12-20
bash# cp /etc/lilo-original.conf /etc/lilo.conf
</code>
Test this boot floppy to see that this works and then
restore back the all the files which you backedup using tar on
/b1/root-hda4.tar as in step 1 above.
</enum>
<sect1> Precautionary measures
<p>
You should take the following pre-cautionary measures to tackle the
problems in future.
<itemize>
<item> You MUST make emergency boot disk from time to time and whenever you
make changes to the partition. Insert a blank floppy and do this -
<code>
bash$ man mkbootdisk
The mkbootdisk is in mkbootdisk*.rpm package, you must install this.
bash$ mkbootdisk --help
bash$ mkbootdisk --device /dev/fd0 2.2.12-20
</code>
<p>
<item> You MUST backup the partition tables setup to a floppy and to a hard disk.
You should also print this out and paste it on the computer box.
<code>
bash$ su - root
bash# man fdisk
bash# fdisk -l /dev/sda > partition_table_backup.txt
</code>
Very helpful if you need to repartition the hard disk.
From the printout, you would know where your partition starts.
During recovery, after repatitioning and formating you can restore data from the backup.
<p>
<item>
You must keep the tomsrtbt boot floppy handy. Visit
<url url="http://www.toms.net/rb">
(see also <ref name="Tiny Linux" id="tiny">)
<p>
<item>
You must keep the Yard rescue and boot floppy disk handy. Visit
<url url="http://www.linuxlots.com/~fawcett/yard">
<p>
<item> Backup /root and /boot directories. Boot the Tomsrtbt
floppy
(see also <ref name="Tiny Linux" id="tiny">)
and then
<code>
bash# vi /etc/fstab
And put these lines -
/dev/hda1 /a1 vfat defaults 1 1
/dev/hdb1 /b1 vfat defaults 1 1
In my case hda1 had the linux root partition '/'
bash# cd /
bash# tar cvf /b1/linux-root-partition-hda1.tar a1
bash# tar cvf /b1/linux-boot-partition-hda1.tar a1/boot
</code>
</itemize>
<sect1> Removing LILO
<p>
You can replace the boot sector with the DOS boot loader by issuing the DOS
command at MS DOS prompt:
<code>
FDISK /MBR
</code>
where MBR stands for "Master Boot Record".
See also LILO documentation on linux at /usr/doc/lilo* for other methods of
uninstalling the LILO. And see also 'man lilo'.
<sect1> Common mistakes
<p>
After making changes to /etc/lilo.conf you <bf>MUST run lilo</bf> to make changes
to go in effect. It is a very common mistake committed by newusers. Type -
<code>
bash# lilo -v -v -v
</code>
<sect> Related URLs
<p>
Visit following locators which are related to LILO, Rescue Linux, crash recovery -
<itemize>
<item> Mini Lilo HOWTO at <url url="http://www.linuxdoc.org/HOWTO/mini/LILO.html">
<item> Bootdisk-HOWTO at <url url="http://www.metalab.unc.edu/LDP/HOWTO/Bootdisk-HOWTO/index.html">
<p>
<item> Pre-made boot disks at <url url="http://www.linuxdoc.org/HOWTO/Bootdisk-HOWTO">
<item> Boot disks for Linux/NT/Windows/DOS/Mac at <url url="http://www.bootdisk.com">
<item> Tomsrtbt boot floppy disk <url url="http://www.toms.net/rb">
and (see also <ref name="Tiny Linux" id="tiny">)
<item> Yard rescue and boot floppy disk
<url url="http://www.linuxlots.com/~fawcett/yard">
<p>
<item> BootPrompt-HOWTO at <url url="http://www.linuxdoc.org/HOWTO/BootPrompt-HOWTO.html">
<item> Multiboot with LILO mini HOWTO at <url url="http://www.linuxdoc.org/HOWTO/mini/Multiboot-with-LILO.html">
<item> Linux+WinNT mini HOWTO at <url url="http://www.linuxdoc.org/HOWTO/mini/Linux+WinNT.html">
<p>
<item> Linux goodies main site <url url="http://www.milkywaygalaxy.freeservers.com">
Mirror sites are at -
<url url="http://aldev0.webjump.com">,
<url name="angelfire" url="http://www.angelfire.com/country/aldev0">,
<url name="geocities" url="http://www.geocities.com/alavoor/index.html">,
<url name="virtualave" url="http://aldev0.virtualave.net">,
<url name="50megs" url="http://aldev0.50megs.com">,
<url name="theglobe" url="http://members.theglobe.com/aldev1/index.html">,
<url name="NBCi" url="http://members.nbci.com/alavoor">,
<url name="Terrashare" url="http://aldev.terrashare.com">,
<url name="Fortunecity" url="http://members.fortunecity.com/aldev">,
<url name="Freewebsites" url="http://aldev.freewebsites.com">,
<url name="Tripod" url="http://members.tripod.lycos.com/aldev">,
<url name="Spree" url="http://members.spree.com/technology/aldev">,
<url name="Escalix" url="http://www.escalix.com/freepage/aldev">,
<url name="Httpcity" url="http://www.httpcity.com/aldev/index.html">,
<url name="Freeservers" url="http://aldev.freeservers.com">.
<item> Vim color text editor for C++, C <url url="http://metalab.unc.edu/LDP/HOWTO/Vim-HOWTO.html">
</itemize>
<sect> Other Formats of this Document
<p>
This document is published in 14 different formats namely - DVI, Postscript,
Latex, Adobe Acrobat PDF,
LyX, GNU-info, HTML, RTF(Rich Text Format), Plain-text, Unix man pages, single
HTML file, SGML (Linuxdoc format), SGML (Docbook format), MS WinHelp format.
This howto document is located at -
<itemize>
<item> <url url="http://www.linuxdoc.org"> and click on HOWTOs and search
for howto document name using CTRL+f or ALT+f within the web-browser.
</itemize>
You can also find this document at the following mirrors sites -
<itemize>
<item> <url url="http://www.caldera.com/LDP/HOWTO">
<item> <url url="http://www.linux.ucla.edu/LDP">
<item> <url url="http://www.cc.gatech.edu/linux/LDP">
<item> <url url="http://www.redhat.com/mirrors/LDP">
<item> Other mirror sites near you (network-address-wise) can be found at
<url url="http://www.linuxdoc.org/mirrors.html">
select a site and go to directory /LDP/HOWTO/xxxxx-HOWTO.html
</itemize>
<itemize>
<item>
You can get this HOWTO document as a single file tar ball in HTML, DVI,
Postscript or SGML formats from -
<url url="ftp://www.linuxdoc.org/pub/Linux/docs/HOWTO/other-formats/">
and <url url="http://www.linuxdoc.org/docs.html#howto">
<p>
<item>Plain text format is in: <url url="ftp://www.linuxdoc.org/pub/Linux/docs/HOWTO">
and <url url="http://www.linuxdoc.org/docs.html#howto">
<p>
<item>Single HTML file format is in:
<url url="http://www.linuxdoc.org/docs.html#howto">
<p> Single HTML file can be created with command (see man sgml2html) -
sgml2html -split 0 xxxxhowto.sgml
<p>
<item>Translations to other languages like French, German, Spanish,
Chinese, Japanese are in
<url url="ftp://www.linuxdoc.org/pub/Linux/docs/HOWTO">
and <url url="http://www.linuxdoc.org/docs.html#howto">
Any help from you to translate to other languages is welcome.
</itemize>
The document is written using a tool called "SGML-Tools" which can be got from -
<url url="http://www.sgmltools.org">
Compiling the source you will get the following commands like
<itemize>
<item>sgml2html xxxxhowto.sgml (to generate html file)
<item>sgml2html -split 0 xxxxhowto.sgml (to generate a single page html file)
<item>sgml2rtf xxxxhowto.sgml (to generate RTF file)
<item>sgml2latex xxxxhowto.sgml (to generate latex file)
</itemize>
<sect1> Acrobat PDF format <label id="acrobatpdf">
<p>
PDF file can be generated from postscript file using
either acrobat <bf>distill</bf> or <bf>Ghostscript</bf>.
And postscript file is generated
from DVI which in turn is generated from LaTex file.
You can download distill software from <url url="http://www.adobe.com">. Given below
is a sample session:
<code>
bash$ man sgml2latex
bash$ sgml2latex filename.sgml
bash$ man dvips
bash$ dvips -o filename.ps filename.dvi
bash$ distill filename.ps
bash$ man ghostscript
bash$ man ps2pdf
bash$ ps2pdf input.ps output.pdf
bash$ acroread output.pdf &
</code>
Or you can use Ghostscript command <bf>ps2pdf</bf>.
ps2pdf is a work-alike for nearly all the functionality of
Adobe's Acrobat Distiller product: it
converts PostScript files to Portable Document Format (PDF) files.
<bf>ps2pdf</bf> is implemented as a very small command script
(batch file) that invokes Ghostscript, selecting a special "output device"
called <bf>pdfwrite</bf>. In order to use ps2pdf, the pdfwrite
device must be included in the makefile when Ghostscript was compiled;
see the documentation on building Ghostscript for details.
<sect1> Convert Linuxdoc to Docbook format <label id="linuxdoc2docbook">
<p>
This document is written in linuxdoc SGML format. The Docbook SGML format
supercedes the linuxdoc format and has lot more features than linuxdoc.
The linuxdoc is very simple and is easy to use. To convert linuxdoc SGML
file to Docbook SGML use the program <bf>ld2db.sh</bf> and some perl scripts.
The ld2db output is not 100% clean and you need to use the <bf>clean_ld2db.pl</bf>
perl script. You may need to manually correct few lines in the document.
<itemize>
<item> Download ld2db program from <url url="http://www.dcs.gla.ac.uk/~rrt/docbook.html">
or from <url name="Milkyway Galaxy site" url="http://www.milkywaygalaxy.freeservers.com">
<item> Download the cleanup_ld2db.pl perl script from
from <url name="Milkyway Galaxy site" url="http://www.milkywaygalaxy.freeservers.com">
</itemize>
The ld2db.sh is not 100% clean, you will get lots of errors when you run
<code>
bash$ ld2db.sh file-linuxdoc.sgml db.sgml
bash$ cleanup.pl db.sgml > db_clean.sgml
bash$ gvim db_clean.sgml
bash$ docbook2html db.sgml
</code>
And you may have to manually edit some of the minor errors after
running the perl script. For e.g. you may need to put closing tag <
/Para> for each <
Listitem>
<sect1> Convert to MS WinHelp format <label id="mswinhelp">
<p>
You can convert the SGML howto document to Microsoft Windows Help file,
first convert the sgml to html using:
<code>
bash$ sgml2html xxxxhowto.sgml (to generate html file)
bash$ sgml2html -split 0 xxxxhowto.sgml (to generate a single page html file)
</code>
Then use the tool <url name="HtmlToHlp" url="http://javadocs.planetmirror.com/htmltohlpe.html">.
You can also use sgml2rtf and then use the RTF files for generating winhelp files.
<sect1> Reading various formats <label id="readformats">
<p>
In order to view the document in dvi format, use the xdvi program. The xdvi
program is located in tetex-xdvi*.rpm package in Redhat Linux which can be
located through ControlPanel | Applications | Publishing | TeX menu buttons.
To read dvi document give the command -
<tscreen><verb>
xdvi -geometry 80x90 howto.dvi
man xdvi
</verb></tscreen>
And resize the window with mouse.
To navigate use Arrow keys, Page Up, Page Down keys, also
you can use 'f', 'd', 'u', 'c', 'l', 'r', 'p', 'n' letter
keys to move up, down, center, next page, previous page etc.
To turn off expert menu press 'x'.
You can read postscript file using the program 'gv' (ghostview) or
'ghostscript'.
The ghostscript program is in ghostscript*.rpm package and gv
program is in gv*.rpm package in Redhat Linux
which can be located through ControlPanel | Applications | Graphics menu
buttons. The gv program is much more user friendly than ghostscript.
Also ghostscript and gv are available on other platforms like OS/2,
Windows 95 and NT, you view this document even on those platforms.
<itemize>
<item>Get ghostscript for Windows 95, OS/2, and for
all OSes from <url url="http://www.cs.wisc.edu/~ghost">
</itemize>
To read postscript document give the command -
<tscreen><verb>
gv howto.ps
ghostscript howto.ps
</verb></tscreen>
You can read HTML format document using Netscape Navigator, Microsoft Internet
explorer, Redhat Baron Web browser or any of the 10 other web browsers.
You can read the latex, LyX output using LyX a X-Windows front end to latex.
<sect> Copyright
<p>
Copyright policy is GNU/GPL as per LDP (Linux Documentation project).
LDP is a GNU/GPL project.
Additional requests are that you retain the author's name, email address
and this copyright notice on all the copies. If you make any changes
or additions to this document then you please
intimate all the authors of this document.
Brand names mentioned in this document are property of their respective
owners.
</article>