README.RedHat.fd 8.9 KB
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
Adding BRLTTY to a Red Hat Linux Install Floppy =============================================== Written on April 7, 2002 Here is an outline of a procedure for adapting the RedHat (or similar) installation boot disk so that BRLTTY can be used during the installation process. History: -Initial draft from Stéphane Doyon <email@example.com> -Additions from Nicolas Pitre <firstname.lastname@example.org> -April 7, 2002: Mostly rewritten by Stéphane Doyon to take into account the INIT_PATH hack -September 26, 2002: Amended by Dave Mielke <email@example.com> due to change from make file editing to autoconf in 3.1. TODO: -Figure out how to use shared libraries from a statically linked executable, when the lib references symbols from the main program. With that we could do generic bootdisk with dynamic selection of braille driver. -Give working instructions on how to make higher sized floppies for a one-floppy solution. You need an already working Linux station to perform this. A certain level of Linux/Unix expertise is also required. Please read to the end before doing anything. You'll probably end up asking for sighted help at some point (such as to know why it won't boot, or to help install BRLTTY on the new machine), but if you can get this to work then you'll be free to spend an hour on your own choosing which packages you want installed. This was last tried with RedHat 7.2. First step is compiling BRLTTY. The bootdisk will use one and only one BRLTTY driver, so you must choose wich. Do: make distclean ./configure --enable-standalone-programs --with-init-path --with-braille-driver=<driver> --with-text-table=<table> make where <driver> is the driver to build into BRLTTY (one of the possible values listed under --with-braille-driver in the output from ./configure --help) and <table> is the text translation table to use (such as text.french.tbl, text.german.tbl, ...) (see the the BrailleTables/ subdirectory). This will build BRLTTY with the chosen display driver built-in, and will link the BRLTTY executable statically so that it doesn't depend on any shared libraries. If your display is on the second serial port instead of the first, you will need to add "--with-braille-device=/dev/ttyS1". You should get an executable called "brltty" (in the "Programs/" subdirectory) whose size is around 570K, depending on the driver you chose. If you do: file Programs/brltty it should say, among other things, "statically linked". The Red Hat installation boot disk is a DOS disk that contains a boot loader (called syslinux), a kernel (called vmlinuz), and an initial ramdisk (called initrd.img). This initial ramdisk is the initial root filesystem containing a bootstrap installation program: /sbin/init. We'll just put brltty on that ramdisk image and make sure it is started before anything else. However, because the statically linked brltty executable is so large, we will have to put the ramdisk image on a second floppy, because it won't fit on the original single boot floppy (with the kernel). So now we must hack floppies. Make a temporary work directory. We will call it ".../work", could be "~/work". mkdir .../work mkdir .../work/etcbrltty Now copy relevant files from your BRLTTY build. Copy the executable, the translation table, the contraction table (if you want it), and the help file(s) to your work directory. cp Programs/brltty .../work cp BrailleTables/*.tbl .../work/etcbrltty cp ContractionTables/*.ctb .../work/etcbrltty cp help/* .../work/etcbrltty (You can also copy alternative translation tables from BrailleTables/ to .../work/etcbrltty. These CAN be loaded dynamically.) Now change to the work directory: cd .../work The executable is way too large for a boot disk because it contains lots of unneeded symbol table and debugging information. Remove this excess data in order to make the executable as small as possible. strip brltty Next step is to select an installation boot floppy image from your distribution. This could be images/boot.img or images/bootnet.img from an RH CDROM. Consider checking the updates site for your distribution in case they have updated installation disk images. If what you have is an actual floppy, use "dd if=/dev/fd0 of=boot.img bs=512" to make an image file from it. Copy the chosen image to your work directory and if necessary rename it to boot.img. So now the current directory should contain boot.img, brltty, and etcbrltty/. Now run the rhmkbot script (which is located in the same directory as this README). It will copy boot.img to myboot.img, and it will modify the syslinux.cfg: it will add a new boot entry called "brltty". That entry will have options to cause syslinux to load a ramdisk from a second floppy, instead of using the initrd.img on the first floppy. The brltty entry has the "text" keyword parameter to trigger the text-mode install. rhmkbot also makes this new entry the default boot entry. Now run the rhmkroot script. It will get initrd.img (the initial ramdisk) from boot.img and call it myroot.img. It will modify that image: -Rename /sbin/init to /sbin/init_real, -Copy brltty to /sbin/brltty, -Link /sbin/init to /sbin/brltty -Copy files from etcbrltty to /etc/brltty, -Try to make sure necessary devices such as vcsa, serial ports, and console device exist in /dev. (vcsa is usually missing.) If it turns out that the brltty executable is too large, do "./configure --help" and check out the various "--disable-..." options. Each removes a specific feature from BRLTTY, and results in a corresponding decrease in the size of the executable. Recommended possibilities include: --disable-table-selection --disable-learn-mode --disable-contracted-braille --disable-pcm-support --disable-midi-support --disable-fm-support --disable-api --disable-gpm --disable-speech-support --without-x If building the Papenmeier driver, then also consider: --disable-pm-configfile Remember to do "make distclean" if you need to reconfigure BRLTTY. Assuming there are no errors, the next step is to actually write the floppies. So get two formatted floppies. One will be the boot floppy, the other the ramdisk floppy. To write the boot floppy do: dd if=myboot.img of=/dev/fd0 bs=512 To write the ramdisk floppy do: dd if=myroot.img of=/dev/fd0 bs=512 That's it! So now boot the boot floppy on the machine you want to install. At the prompt you can press ENTER to choose the brltty entry. If you want to specify boot parameters, remember to use the label "brltty" instead of "linux". You can pass options to BRLTTY from the boot prompt by using option names similar to those in the brltty.conf file: use only uppercase, use underscores instead of minus signs, and prefix with BRLTTY_. For example: brltty BRLTTY_BRAILLE_DEVICE=/dev/ttyS1 When you press ENTER, syslinux will load the kernel. When the floppy stops spinning the kernel will start to run and will prompt you for the ramdisk floppy. Put the second floppy in and press ENTER. The kernel will load the ramdisk. When the floppy stops spinning, BRLTTY SHOULD (hopefullY) come on and the installation program should start. One of the problems you may have during the installation process is that some autoconfiguration programs may play around with the serial ports to try to autodetect hardware, thereby upsetting them and causing BRLTTY to stop working. This can also occur when the system itself boots. More recent RedHat versions are less aggressive though. Two tricks if you have problems: -If kudzu runs when your system boots and upsets BRLTTY, either disable that service (using chkconfig or ntsysv) or modify /etc/sysconfig/kudzu or the script that uses kudzu to make it use the --safe option. -To get the installation program to leave a serial port alone, you might try to modify the ramdisk to change /dev/ttyS0 to say /dev/ttySmyown, and tell BRLTTY to use that as it's serial port. This might have the effect of hiding the serial port from bad applications. Note that you must also install BRLTTY on your new machine. When it will boot Linux after the installation, BRLTTY will not be installed and the machine will be inaccessible. One way to simplify things is to use the statically linked brltty you compiled for the installation disk, as it is fairly self-contained. Once it's running, then you can build yourself a shared version and modify your boot scripts or inittab to have BRLTTY start automatically. A nice way to get brltty onto your new machine is this: during the installation process, after your target partition has been formatted, it is (at least with the current RH installation program) mounted under /mnt/sysimage. You can temporarily put aside the installation program and get a shell by going to the second virtual console (alt-F2). There you can do: cp /sbin/brltty /mnt/sysimage/bin/ I am not sure if at that point it is possible to edit inittab or startup scripts. Otherwise on your first boot, you just have to log in as root (without braille support) and type "/bin/brltty" and if all went well BRLTTY should come on. Good luck!