	       Debian Installation tip for BRLTTY users
	      -+======================================+-

		   Written by B. Daix (Thu Aug 22, 2002)


Disclaimer
**********

   This paper was originally written (and hardly tested) for BRLTTY
3.0.  I thought it could be helpful for following releases, so I fixed
some commands to match new requirements (3.0 didn't use autoconf for
example).  But this time, tests weren't made as strong as for BRLTTY
3.0, I'm looking for feedback.
   Since it was written, a Debian mailing-list dedicated to
accessibility was openned.  I suggest you to subscribe to this list,
to help us improve Debian accessibility and/or to ask whatever you'd
like to.  To subscribe, send a mail to
debian-accessibility-request@lists.debian.org with "subscribe" in the
subject field, or go to http://lists.debian.org/.  "Installing Debian"
is right in the scope of our discussions.
B. Daix (Thu Jul 03, 2003)


Purpose
*******

   Woody installation process can be done via a set of floppies,
called "boot floppies". They are two of them by default : the boot one
(with Linux kernel and friends) named "rescue floppy", and the root
one where is put setup stuff. Few other floppies can provide modules
(driver-* ones), but those two boot ones are fundamental. As you can
guess, fitting all those means on only two 1.44Mo-sized floppies was a
real challenge... They were, as a consequence, really well built and
there is no place for guests there ! So we'll have to manage a third
floppy to give BRLTTY a place.
   So there are little things to do to install Debian with BRLTTY
(version >= v3.1), this file says which ones. The tip comes directly
from Mario Lang and his team, so let's thank them loudly ! Please be
really attentive to all points because if you don't, you could
encounter troubles. You should know that a brand-new way to install
Debian is about to be available, so this "boot floppies fashion" is
going to be obsolete soon.


Official boot floppies tune
***************************

1) Get boot floppies images, corresponding to the version you want to
   install. Here, they are the current ones coming with Woody :
   rescue.bin and root.bin
   (/dists/stable/main/disks-i386/current/images-1.44/bf2.4/). We're
   about to work on root.bin.
2) Rename root.bin : "mv root.bin root.gz" then gunzip it, "gunzip
   root.gz" so that we have the mountable image now named "root". 
3) Mount this "root" image on a loop device (like if it was on a
   floppy) : "mount root /mnt -o loop=/dev/loop0", where /mnt is the
   mounting point and /dev/loop0 an unused loop device. Superuser
   (root) permissions are required to do so. To check
   everything goes right, "ls /mnt" should show a kind of normal
   file-system with few things added.
4) Edit the file named "rcS" in the loop-mounted image : "vi
   /mnt/etc/init.d/rcS" for example. Jump to the end of file, and
   insert the following lines before the last one ("exit 0") :
   "echo "Please insert BRLTTY floppy and press ENTER"
    read ret
    cd /
    tar xzf /dev/fd0
    /bin/brltty
    echo "Press enter to continue"
    read ret"
   (Forget double-quotes like each time in this tip file) Save and
   exit. We have to say that those seven lines will untar from
   the third floppy we'll build and will run BRLTTY from the loaded
   file-system, it's not on the target disk yet (as you're about to
   install, hard drives are not ready yet).
5) Edit the file named "inittab" in the loop-mounted image : "vi
   /mnt/etc/inittab" for example. Then near line 21, replace the word
   "null" by "tty1" so that "null::sysinit:/etc/init.d/rcS" becomes
   "tty1::sysinit:/etc/init.d/rcS". Then, near line 25, remove the "u"
   in "::respawn:/sbin/udbootstrap" so that it becomes
   "::respawn:/sbin/dbootstrap" : this will prevent setup programs
   from not using standard console tty1 "the normal way" (so that we
   can be asked for BRLTTY floppy). In some case, this second
modification is
   superfluous, anyway, it's probably a good idea to do it. Save and
   exit.
6) Unmount the modified image : "umount /mnt", gzip it "gzip root" and
   rename it "mv root.gz root.bin". Here it is.


Building the third floppy
*************************

1) Compile BRLTTY "statically" (no dependencies on shared libraries so
   that BRLTTY works on its own), specify the display you want to use,
   specify the braille table you want to use, and install it in a
   personal directory specially built ("mkdir $HOME/tmpbrl"). This is
   respectively done by adding the
   "--enable-standalone-programs",
   "--with-braille-driver=DISPLAY",
   "--with-text-table=TABLE" and
   "--with-install-root=$HOME/tmpbrl" flags to the "configure" script
   (c.f. BRLTTY's documentation; replace the value "DISPLAY" in inner
   flag by the module name you want to use). After having run
   "configure" with these flags at least, do "make install" so that
   all BRLTTY's stuff goes to the temporary directory. Check it to
   recognize etc, lib and bin dirs in it : "ls $HOME/tmpbrl".
2) Create a tarball by first changing to the directory : "cd
   $HOME/tmpbrl", then "tar czf ../brltty.tar.gz *". You should have a
   file named "brltty.tar.gz" in the parent dir now. 
3) Copy this file to a free floppy -- not the usual way, this is what
   I would call a "brute copy"... like this (change to the tarball dir
   before) : "dd if=brltty.tar.gz of=/dev/fd0 bs=1024". If no alert is
   dumped, it worked well. It's "brutal" because in this kind of copy
   you don't mount the device you are writing to, it prevents you from
   having to mount things when you use the tarball (some would call
this a "raw copy").


Going on the install process
****************************

   Of course, you need to copy the images ("rescue.bin" and modified
"root.bin") on floppies -- but it's the traditional fashion
(c.f. Debian's documentation). So you have three boot floppies :
rescue one, root one and BRLTTY one. No way to wait more, try it !
   Restart your computer on rescue floppy, wait until it asks for
"root floppy" (system hangs up), insert it and hit ENTER. Then system
hangs up a second time : because of the first "read ret" line in rcS
script file. Here, insert BRLTTY floppy and hit ENTER again. Then
BRLTTY should be beeping at you, and all goes right. You'll last have
to hit ENTER to begin Debian installation process the usual way, due
to the second "read ret" line.
   You should realize that BRLTTY stuff is loaded temporarily, as
system drives are not ready. So, to install it permanently, you must
wait until they are on (for example, before the reboot time), and as
there is a shell-enabled console available (ALT+F2), you will be able
to do so. Here is an example :

   - Insert the BRLTTY floppy again and then do "cd /target" and again
     "tar xzf /dev/fd0" so that tar content will be put in target
     drive too.
   - Edit an INIT script so that BRLTTY will be run at boot time :
     "nano-tiny /target/etc/init.d/bootmisc.sh" and find a good place
     to insert the line "/bin/brltty" (vi is not available in minimal
     boot stuff). 

   After this last step, nothing wrong can happen to you anymore ! But
let's remark that this last BRLTTY installation is not so clean :
Debian provides a package, so you'll have to do some washing when your
favorite OS is OK.


Author
******

   Boris Daix, reachable via debian-accessibility@lists.debian.org or
directly at Boris.Daix@insa-lyon.fr.
   Thanks to Mario Lang and Dave Mielke for their support, and thanks
to Nath for her test reports.
