829 lines
30 KiB
Plaintext
829 lines
30 KiB
Plaintext
Hi Linuxers,
|
|
The next release of FAQ will come out in one day or two, in advance this
|
|
is a short Q/A samples about gcc-1.4 of hlu@eecs.wsu.edu
|
|
Any comment appreciated
|
|
|
|
==============
|
|
QUESTION: What are the contents of the files newggc.tar.Z newlib.tar.Z ?
|
|
|
|
ANSWER: newgcc.tar.Z contains all the binaries/libraries needed to use
|
|
gcc-1.40 whilst newlib.tar.Z contains the library sources.
|
|
|
|
QUESTION: Is the installation identical to the previous gcc stuff ?
|
|
|
|
ANSWER: No, after uncompressing the newgcc.tar.Z you have to untar it
|
|
below /usr cause the libraries /must/ go to /usr/lib (I've tried under
|
|
/usr/local and the compiler complains "ld: no file crt0.o").
|
|
Moreover the distrib contains cc1, cpp in the directory lib and
|
|
gcc ar as ld strip size ranlib under bin.
|
|
So you have to link cc1 and cpp under bin, and link
|
|
gar/ar gas/as gld/ld to prevent a lot off /stupid/ problems
|
|
|
|
QUESTION: What are the main differencies with the old release?
|
|
|
|
ANSWER: There were some bugs in the old port that have been corrected,
|
|
moreover this package contains 387 support (that I have not yet tested)
|
|
there is libm.a (for those with 387)
|
|
libsoft.a (for those without, I for example)
|
|
libtermcap.a (from tput 1.10)
|
|
|
|
The -mstring-insns option is no longuer needed nor supported :( [As
|
|
an example to recompile (successfully) linux you have to thraw
|
|
away this flag in all the Makefile]
|
|
|
|
BTW for those who want to recompile the lib sources you have to change all
|
|
the paths in Makefile(s) to fit with your organization. Notice also that
|
|
include files have changed (stdio.h which is no more ansi complient)
|
|
|
|
==========
|
|
|
|
|
|
V. SOME CLASSICAL PROBLEMS
|
|
==========================
|
|
|
|
QUESTION: While running du I get "Kernel panic: free_inode: bit
|
|
already cleared". Also, du produces a ENOENT error for all the files
|
|
in certain of my directories. What's going on?
|
|
|
|
ANSWER: These are both consistent with a bad file-system. That's
|
|
relatively easy to produce by not syncing before rebooting, as linux
|
|
usually has 1.5MB of buffer space held in memory (unless you have <=4M
|
|
RAM, in which case the buffers are only about 0.5MB). Also linux
|
|
doesn't do anything special about the bit-map blocks, and as they are
|
|
used often, those are the thing most likely to be in memory. If you
|
|
reboot, and they haven't been written to disk ...
|
|
|
|
Just do an fsck on the device, the -a flag might repair it otherwise,
|
|
the only thing to do is to reinstall the filesystem from the Images.
|
|
|
|
A sync is done only every 30 seconds normally (standard unix
|
|
practice), so do one by hand (some people think you should do 3 syncs
|
|
after each other, but that's superstition), or by logging out from the
|
|
startup-shell, which automatically syncs the system. Unmounting a
|
|
filesystem also syncs it (but of course you can never unmount root).
|
|
|
|
Another (sad) possibility is that you have bad blocks on your disk.
|
|
Not very probable, as they would have to be in the inode-tables, just
|
|
a couple of blocks in size. Again there aren't programs available to
|
|
read a disk for bad sectors and put them in some kind of
|
|
"bad-sector-file". On IDE drives this is no problem (bad sectors are
|
|
automatically mapped away).
|
|
|
|
|
|
QUESTION: How can I partition my hard-drive to use Linux?
|
|
|
|
ANSWER: There are (at least) two ways to answer this. The easy way is
|
|
probably to use a program which will do it for you, such as the MS-DOS
|
|
fdisk, Minix fdisk, Xenix/Unix fdisk, or programs such as edpart.exe
|
|
or part.exe.
|
|
|
|
On the other hand, you can use a disk editor and modify the contents
|
|
of the partition table directly. This has been already done, and an
|
|
extensive explanatory note can be found in the mailing-list archives
|
|
(25th Jan. 92).
|
|
|
|
BTW It might be useful to set three (3) separated partitions for
|
|
Linux, one for the root, another one for the usr and a third one for
|
|
swap, as an illustration, my root partition is 10Meg, the usr is 22Meg
|
|
and the swap partition is 8Meg (twice the size of RAM on my box). As
|
|
an experience I have used MS-DOS fdisk to partition my two hd and got
|
|
no peculiar difficulties.
|
|
|
|
QUESTION: What must I do to mkfs a floppy?
|
|
|
|
ANSWER: blocks are of size 1K so 1.44 floppy is 1440 blocks. The
|
|
floppy has to be formatted before this will work.
|
|
|
|
|
|
QUESTION: When I run kermit under Linux, I get "Warning, Read access
|
|
to lock directory denied". What am I doing wrong?
|
|
|
|
ANSWER: Nothing, you just need to create /usr/spool/uucp, which is
|
|
where kermit like to lock files.
|
|
|
|
|
|
QUESTION: du seems buggy when i used it the number of disk occupation
|
|
is wrong.
|
|
|
|
ANSWER: Take care, if you want size in kbytes use the -k flags.
|
|
|
|
|
|
QUESTION: du works just fine on directories, except on / and /dev,
|
|
moreover "ls -l" returns either big or negative number on /dev. Why?
|
|
|
|
ANSWER: This is a "feature" added in Linux 0.12; it was originally
|
|
present in Minix; more specifically, when you stat a device file
|
|
belong to a block device, it will return the maximum size of the block
|
|
device in the st_size member of the stat structure. If you don't like
|
|
it, it's very simple to patch it out. Look in the fs/inode.c, in the
|
|
subroutine read_inode().
|
|
BTW I have not tested it under 0.95a
|
|
|
|
QUESTION: When I try to (un)compress many files in one command, the
|
|
command partially fails?
|
|
|
|
ANSWER: This is a bug, many partial fixes are floating around but ..
|
|
You can solve it by a bash command "for i in whateverfiles;do
|
|
compress $i; done". Another possibility is to download the
|
|
compress-fixed.tar file.
|
|
|
|
|
|
QUESTION Sometimes, I get "mount can't open lock file"; what does this
|
|
means?
|
|
|
|
ANSWER: This can happened for two reason:
|
|
A) You try to mount something as non-root. In that case you can either
|
|
retry as root, or set the setuid bit to mount.
|
|
B) You are root. mount wants to open /etc/mtab and /etc/mtab~ - the
|
|
first one for reading, the second as lock file. If there is already a
|
|
mtab~ remove it. This can happen if you used once gnuemacs on mtab.
|
|
|
|
VI. INSTALLATION HINTS
|
|
======================
|
|
|
|
QUESTION: Where can I find the basic starting help?
|
|
|
|
ANSWER: You have to download the INSTALL notes, and more specially
|
|
the 0.11, 0.12 and the current one 0.95(a). Pretty soon, a special
|
|
help for beginners will be available on the net.
|
|
|
|
|
|
QUESTION: I've got all the things on site ??? but I don't know what
|
|
goes where.
|
|
|
|
ANSWER: include.tar.Z goes to /usr/include; system.tar.Z contains
|
|
the latest sources of the
|
|
system files (mkswap, mkfs, fsck and fdisk). In version 0.12
|
|
utilbin.tar.Z has been replaced by fileutil.tar.Z and utils.tar.Z
|
|
which contains a new tar to handle the symbolic links, make, uemacs
|
|
kermit and minor programs (sed,...). Other utilities have been ported
|
|
separately.
|
|
|
|
|
|
QUESTION: I don't know how to install gcc stuff, is there special places?
|
|
|
|
ANSWER: It depends on the release of gcc you are using. Right now
|
|
there are 3 packages : the original one gccbin.tar.Z contains all
|
|
the gcc-1.37 binary distrib; recently the gcc-1.40 has been ported,
|
|
it's in newgcc.tar.Z and a few days ago the BETA version of gcc-2.0
|
|
Choose yours
|
|
|
|
A) gccbin.tar.Z goes in /usr/local/lib except gcc which goes in
|
|
/usr/local/bin. Moreover each gcc-xxx of /usr/local/lib should be
|
|
linked with gxxx and xxx in /usr/local/bin.
|
|
|
|
B) newgcc.tar.Z goes in /usr, then uncompress and untar it. Files are
|
|
directed to /usr/lib, /usr/include and /usr/bin. You have to link ar,
|
|
as, ld with gar, gas and gld, this will prevent some error while using
|
|
make (especially whilst re-compiling Linux kernel). More information can
|
|
be found in section VIII.
|
|
|
|
C) gcc-2.0 is splitted in 2 files 2lib.tar.Z and 2misc.tar.Z, to
|
|
install them do the following:
|
|
cd /usr
|
|
tar xvofvz 2misc.tar.Z
|
|
|
|
read the FAQ in /usr/gcc2/install. Then
|
|
|
|
cd /usr
|
|
tar xvovfz 2lib.tar.Z
|
|
|
|
|
|
QUESTION: When I use the images, and i type "tar xvf ..." I got
|
|
"command not found". What did I wrong?
|
|
|
|
ANSWER: Nothing, in the distribution of 0.95 there is no tar (due to
|
|
lack of place); you should get the 0.12 images where the tar is in
|
|
compressed form (lack of place). You have first to copy tar.Z on
|
|
another disk/diskette and uncompress it, this command is available
|
|
on your diskettes.
|
|
|
|
|
|
QUESTION: It seems that $#@! ported on linux don't run correctly
|
|
|
|
ANSWER: Possible, but check first if the size of your file corresponds
|
|
to the one on the ftp sites, if it is then check the BUGLIST available
|
|
on the main linux sites. If the bug is not reported, do a complete
|
|
report of the error, try to correct it and send your result to
|
|
johnsonm@stolaf.edu.
|
|
|
|
|
|
QUESTION: Does anyone port this to linux?, if not i'll compile it
|
|
|
|
ANSWER: First check on the sites, have a look to the info-sheet
|
|
monthly post and also available on sites. Have a look in the "old"
|
|
digest files and mail-archives of linux-activists, these are kept at
|
|
least at tsx-11 and nic possibly at tupac. Look also at the GNU(*)
|
|
utilities to see if someone has already written a freely distribuable
|
|
version. Ask then on the list/news.
|
|
|
|
|
|
(*) GNU stands for GNU's Not Unix, which (besides being a recursive
|
|
acronym) is a project started by the Free Software Foundation (the FSF)
|
|
to write a freely distributable version of Unix. The GNU kernel is
|
|
named HURD, and is based on Mach. It is currently being written, and is
|
|
not yet done. Many of the GNU utilities, however, are completed and are
|
|
much more functional than the original Unix utilities. Since they are
|
|
freely available, Linux is using them as well.
|
|
|
|
|
|
QUESTION: I've ported *** to Linux, what should i do to add it in the
|
|
standard distribution?
|
|
|
|
ANSWER: Read first the previous Q/A, then to make something available to
|
|
others you have to post it (with cdiffs of the source, a short README if
|
|
needed) in the incoming directory of one of nic,tupac,tsx-11, then drop
|
|
a short note to the list/group and to the site advisor.
|
|
On nic it's arl@sauna.cs.hut.fi (Ari Lemmke)
|
|
On tupac it's blum@cip-s01.informatik.rwth-aachen.de (Robert Blum)
|
|
On tsx-11 it's tytso@athena.mit.edu (Ted Ts'o)
|
|
|
|
|
|
QUESTION: I want to port *** to Linux, what are the flags?
|
|
|
|
ANSWER: Recall that Linux implements subset of SYSV and POSIX, so
|
|
-DUSG and -DPOSIX work in general. Moreover throw away most of the ld
|
|
flags such as -ltermcap, -lg, since the libg.a and libtermcap.a are
|
|
missing.
|
|
|
|
|
|
QUESTION: Linux lacks on ****/ Linux has a bug in ***, what are the
|
|
rules to enhance/correct the kernel?
|
|
|
|
ANSWER: Before anything check if some one else is working on that
|
|
subject, contact those people, since end february a buglist (thanks to
|
|
Michael Johnson) is kept on the major sites. Test your improvment (it
|
|
should work is NOT enough), then send the patches in cdiffs form to
|
|
Linus and/or the list, moreover the localization must be clear. This
|
|
does NOT mean that bug-reports and patches are not accepted. Moreover,
|
|
you should sent a brief note to Michael: johnsonm@stolaf.edu
|
|
|
|
|
|
QUESTION: I seem to be unable to compile anything with gcc. Why?
|
|
|
|
ANSWER: If you have only 2 MB RAM, gcc will die silently without
|
|
compiling anything. You must have at least 4 MB to do compilations
|
|
|
|
BTW Since swapping is possible, I have heard that compilation is
|
|
possible with only 2Meg and a lot disk traffic :) Isn't it great?
|
|
|
|
QUESTION: I'm using a program that uses signal handlers which are
|
|
installed using sigaction() with the SA_NOMASK, and they get a general
|
|
protection error right after the signal handler tries to return.
|
|
What's going wrong?
|
|
|
|
ANSWER: You are using a libc.a that has an out-of-date signal.o and
|
|
sig_restore.o file, and they don't know how to deal with SA_NOMASK.
|
|
(The one in gccbin.tar.Z is out-of-date). Get the new libc.a and put
|
|
it in /usr/lib or /usr/local/lib. Again check your compiler version
|
|
|
|
|
|
QUESTION: gcc complains about not finding crt0.o and the system
|
|
include files What am I doing wrong ?
|
|
|
|
ANSWER: The include files normal place is in /usr/include. lib*.a and
|
|
*.o should be in /usr/lib or /usr/local/lib
|
|
|
|
|
|
QUESTION: While compiling some GNU packages gcc chokes on regex.c with
|
|
an insn code, what can I do?
|
|
|
|
ANSWER: There is a little bug in the port of gcc-1.37, this will be
|
|
corrected on the port of v2.0 (with g++). Right now throw away the -O
|
|
flag (to compile regex) and every thing will be alright.
|
|
|
|
BTW there are some minor bugs with this release of gcc because it was
|
|
compiled under linux-0.10, whith odd libraries. These problems have
|
|
disappeared with the new gcc-1.40 package.
|
|
|
|
QUESTION: I tried to port a /new/ version of gnu stuff. But in the
|
|
linking phase, gcc complains about the missing libg.a.
|
|
|
|
ANSWER: Yes this is well known, throw away the flag -g that's all,
|
|
anyway libg.a is /only/ for debugging purpose.
|
|
|
|
|
|
QUESTION: What are the device minor/major numbers?
|
|
|
|
ANSWER: (early Linus mail Nov. 6th 91, last update Jan. 19th 92)
|
|
Memory devices: Major = 1 (characted devices) minor
|
|
0 /dev/ram
|
|
1 /dev/mem
|
|
2 /dev/kmem - not implemented (easy, but I haven't done it)
|
|
3 /dev/null
|
|
4 /dev/port (implemented, but untested - don't play with it)
|
|
|
|
example: "mknod /dev/null c 1 3"
|
|
|
|
|
|
Floppy disks: Major = 2 (block devices)
|
|
|
|
minor = drive + 4*type, drive = 0,1,2,3 for A,B,C or D-diskette
|
|
|
|
type 1: 360kB floppy in 360kB drive (5.25")
|
|
2: 1.2M floppy in 1.2M drive (5.25")
|
|
3: 360kB floppy in 720kB/1.44Mb drive (3.5")
|
|
4: 720kB floppy in 720kB/1.44Mb drive (3.5")
|
|
5: 360kB floppy in 1.2M drive (5.25")
|
|
6: 720kB floppy in 1.2M drive (5.25")
|
|
7: 1.44M floppy in 1.44M drive (3.5")
|
|
|
|
Thus minor nr for a 1.44Mb floppy in B is: 1 + 4*7 = 29, and to read
|
|
an old 360kB floppy in a 1.2M A-drive you need to use minor= 0 + 4*5
|
|
= 20.
|
|
|
|
Example: "mknod /dev/PS0 b 2 28" (b for block: 2 for floppy, 28 for
|
|
1.44 in A)
|
|
|
|
|
|
Hard disks: Major = 3 (block devices) minor
|
|
0 /dev/hda - The whole hd0, including partition table sectors
|
|
etc.
|
|
1 /dev/hda1 - first partition on hd0
|
|
...
|
|
4 /dev/hda4 - fourth partition on hd0
|
|
5 /dev/hda5 - Extended partition
|
|
65 /dev/hdb - The whole hd1, again including partition table info
|
|
66 /dev/hdb1 - first partition on hd1
|
|
...
|
|
69 /dev/hdb4 - fourth partition on hd1
|
|
70 /dev/hdb5 - extended partition on hd1
|
|
|
|
NOTE! Be /very/ careful with /dev/hda and /dev/hdb - you seldom need
|
|
them, and if you write to them you can destroy the partition tables:
|
|
something you probably don't want. The only things that use /dev/hda
|
|
are things like "fdisk" etc.
|
|
|
|
NOTE 2!! The names for hd's are no longer the same as under minix,
|
|
there is a straightforward correspondance, but I think
|
|
minix orders the partitions in some way (so that the partition numbers
|
|
will be in the same order as the partitions are physically on the
|
|
disk). Linux doesn't order anything: it has the partitions in the
|
|
same order as in the partition table (ie /dev/hd?1 might be physically
|
|
after /dev/hd?2).
|
|
|
|
NOTE 3!! Extended partitions are recently detected, use them VERY VERY
|
|
carefully.
|
|
|
|
Tty's: Major = 4 (character devices) minor
|
|
0 /dev/tty0 - general console 1 -
|
|
63 - reserved for virtual console
|
|
64-127 - reserved for serial io
|
|
128- - reserved for pty's
|
|
|
|
And more particularly we have:
|
|
64 /dev/tty64 - com1
|
|
65 /dev/tty65 - com2
|
|
|
|
|
|
QUESTION: How to start Linux from drive B?
|
|
|
|
ANSWER: There is a DOS utility called boot_b.exe (look at DOS ftp).
|
|
Another simple way is to open the box and invert the cables.
|
|
|
|
QUESTION: The program boot_b works fine /but/ once the first disk is
|
|
read the system go back to the first drive, any hints?
|
|
|
|
ANSWER: Yes, change the bootimage in just the same way that you change
|
|
it to boot on the hard drive, execept that the major/minor pair is
|
|
different. All these information are in the file INSTALL-0.10.
|
|
Remember that if you use a sun or other endian machine, you will need
|
|
to reverse the byte order when you run the filter program (also in the
|
|
same file).
|
|
|
|
|
|
VII. FEATURES
|
|
|
|
=============
|
|
|
|
QUESTION: I've read that linux has virtual consoles, what must I do to
|
|
get them?
|
|
|
|
ANSWER: Yes there are, you can access them with the left <alt>-key
|
|
together with <Fn>-key. With the Linux 0.95a Images distribution, 4
|
|
consoles are available, agetty runs on them.
|
|
|
|
BTW: the serial ports are now /dev/tty64 and /dev/tty65. tty0 is the
|
|
general console. tty128- are reserved to pty's
|
|
|
|
|
|
QUESTION: What kind of shell is /bin/sh ?
|
|
|
|
ANSWER: Until v0.95 it's the Bourne Again Shell, bash-1.11 and
|
|
compilation was straightforward (Linus dixit), just "make"
|
|
that's all or nearly. But as the shell comes bigger and bigger the
|
|
v0.95a /bin/sh is ash the BSD 4.3 sh.
|
|
|
|
|
|
QUESTION: Does there exist a man page for **** ?
|
|
|
|
ANSWER: Download man.tar.Z from your favorite linux ftp site, there is
|
|
most of the fileutils man page -- either **** or g****, example there
|
|
is nothing on ld, but there is for gld :) --, check the whatis
|
|
database provided. The files in the cat1 dir are pre-formatted man
|
|
pages that the man program can use.
|
|
|
|
BTW there is no roff,troff nor nroff for Linux. Cawf 2.0 works just
|
|
fine for simple man pages, and a partial ms support too.
|
|
|
|
|
|
QUESTION: What are the editors available in linux?
|
|
|
|
ANSWER: Right now there are uemacs, elvis-1.4, some one (R. Blum)
|
|
is working on some other vi clone. The port of emacs 18.57 has been
|
|
done by John T Kohl, files can be found at the different sites
|
|
at nic it's in the directory xtra
|
|
at tsx-11 it's in the directory ports/emacs-18.57.
|
|
Also the port of mg (micro gnu) has been done and can be found at
|
|
least at athos.rutgers.edu (128.6.4.4) in pub/linux, mg is the binary
|
|
and mg.tar.Z is the sources file.
|
|
|
|
QUESTION: Does there exist a printer package for Linux?
|
|
|
|
ANSWER: There are lp patches for linux.0.12, which implement a
|
|
parallel printer interface and feature a greatly improved driver
|
|
design. the patches are in lp.12.tar.Z As I have no printer (yet), I
|
|
don't know how good it is. There is nothing yet for 0.95(a).
|
|
|
|
|
|
QUESTION: Does there exist a ps for Linux?
|
|
|
|
ANSWER: Yes in ps095.tar.Z I have not tested it yet.
|
|
|
|
QUESTION: It's nice to have the df utility, but it would be nicer if
|
|
it would give statistics of the root file system. Would it be
|
|
difficult to do?
|
|
|
|
ANSWER: surely not, in your file /etc/rc, instead of the line
|
|
> etc/mtab
|
|
put the following
|
|
echo "/dev/hdX (root)" > /etc/mtab
|
|
where the X is the hard drive you use as root partition.
|
|
|
|
|
|
QUESTION: How do I make swapping work?, when I boot I get the
|
|
following message: "Unable to get size of swap device"
|
|
|
|
ANSWER: There are two ways (as far as I know). Recompile the kernel
|
|
and makes the swap device available (have a look in the main
|
|
Makefile). Or else you can modify the bootimage, in that case you have
|
|
to put a full device number in the word reserved for the swap device:
|
|
the logic is the same as for the root device. Thus, if you want
|
|
/dev/hda2 to be your swap-device, you'll have to write a 2 (minor nr)
|
|
into byte 506, and a 3 (= harddisk) into byte 507. You can use
|
|
virtually the same program as for the root-device (look in INSTALL
|
|
files).
|
|
|
|
|
|
QUESTION: When I boot I get one of the following messages:
|
|
"Unable to find swap signature" or "Bad swap-space bitmap"
|
|
|
|
ANSWER: You probably forgot to make your swap-device, use the mkswap
|
|
command.
|
|
|
|
|
|
QUESTION: How do I know if it is swapping?
|
|
|
|
ANSWER: You will notice it :)) First of all, Linux tells you at boot
|
|
time, "Adding swap: XXX pages of swap space", and if you start running
|
|
out of memory, you will notice that the disk will work overtime, and
|
|
things slow down. Generally a 2Meg RAM will make the system swap
|
|
constantly while running gcc, 4 Meg will swap occasionnaly when
|
|
optimizing big files (and having other things active, such as make).
|
|
|
|
|
|
QUESTION: Is there only the %$#@ keyboard ?
|
|
|
|
ANSWER: There are Dannish, Finnish, French, German, Uk and US
|
|
keyboards. Set it in linux/kernel/chr_drv/keyboard.S, then
|
|
compile the kernel again.
|
|
|
|
|
|
QUESTION: Does there exist shared libs ?
|
|
|
|
ANSWER: They seem to work. The kernel features are in Linux 0.12
|
|
already.
|
|
|
|
|
|
QUESTION: Does Linux permit/support bitmapped graphics on vga/svga
|
|
cards?
|
|
|
|
ANSWER: No, there is no interface for graphics operations on Linux
|
|
(yet). Some work has been done by Orest Zborowski (mmap/munmap, and
|
|
vga demonstration). The (un)mmap was patches for 0.12 kernel, but I've
|
|
been told that new versions (for 0.95a) will be out in a short while.
|
|
|
|
QUESTION: There are a lot of patches available (fd patch, lp patch
|
|
login patch ...) can I be fairly confident the subsequent patches will
|
|
work?
|
|
|
|
ANSWER: This is not true yet for the current version; but it will be
|
|
so I kept it :)
|
|
No you can't, patching is a real beta tester art :)). People are not
|
|
working on the same patched release, so you have to check if the
|
|
patches you already applied works on the same kernel part, if not,
|
|
/great/, just apply them. If yes, check if there is an order, patch
|
|
creator knows that, and (should) try to warn patch user (in other
|
|
words: beta tester) otherwise you should edit the patch files (and
|
|
possibly make a brief note to others on this list/newsgroup or even a
|
|
cdiff) before applying them, another solution is to keep cool and wait
|
|
for the next version of Linux where, in general, the modifications
|
|
have been done but this behavior is /not/ Linux helpful.
|
|
|
|
|
|
QUESTION: I got the patches on some ftp sites, and applied them to the
|
|
kernel and tried to compile. It didn't !!. Are the patches buggy?
|
|
|
|
ANSWER: Before remake, just do a make clean in the directories
|
|
involved by the patches. This will force a rebuild of the .o and .a
|
|
files.
|
|
If you have a RCS running on your source tree, did you checked a
|
|
patched version of the files changed before /any/ CO either by you or
|
|
make
|
|
|
|
|
|
VIII. MORE HINTS
|
|
================
|
|
|
|
This part is recent and try to keep track of the different information
|
|
that appeared in alt.os.linux and on the list since beginning of
|
|
February. I tried to update it for v0.95(a), so there might be some
|
|
mistakes. Moreover take care to use the correct library and include
|
|
stuff for linux-0.12 and the ad-hoc gcc you use !!!
|
|
|
|
|
|
QUESTION: How can I backup my Hd under Linux ?
|
|
|
|
ANSWER: I know at least two ways. One possibility is tar and mtools,
|
|
another possibility is the diskbackup/diskrestore of Diamano Bolla
|
|
(digest44 vol. #1) which saves big hd to floppies using the
|
|
stdin/stdout. These utilities have been uploaded to the major sites in
|
|
file disksplit.tar.Z.
|
|
An example usage (Roger Binns) is:
|
|
|
|
tar cvf - bin dev usr etc .. | compress | diskbackup
|
|
|
|
and to restore:
|
|
|
|
diskrestore | uncompress | tar xvf -
|
|
|
|
|
|
QUESTION: How to use setterm: for the novice?
|
|
|
|
ANSWER:The setterm utility provides access to most of Virtual Consoles
|
|
(VCs) functionality. You can set your screen up to blank at 10
|
|
minutes using:
|
|
setterm -blank 10
|
|
|
|
You can set colors, and clear the screen. For a full list of commands,
|
|
just type "setterm" with no arguments.
|
|
|
|
There are a few tricks with the screen dumper can really make VCs go a
|
|
long way. Here are a few of the common ones that I use:
|
|
|
|
setterm dump
|
|
|
|
Dumps the contents of the current VC to screen.dump (in the current dir).
|
|
|
|
setterm dump 4
|
|
|
|
Dumps the contents of VC 4 to screen.dump
|
|
|
|
setterm -file mydumpfile -dump 4
|
|
|
|
Dump the contents of VC 4 to the file mydumpfile
|
|
|
|
setterm -file /dev/tty0 -dump 4
|
|
|
|
Dumps the contents of VC 4 to the current VC.
|
|
|
|
setterm -file /dev/tty4 -dump
|
|
|
|
Dumps the contents of the current VC to VC 4.
|
|
|
|
setterm -file /dev/tty64 -dump
|
|
|
|
Dumps the contents of the current VC to the serial port.
|
|
Handy if you are logged on and want to paste a screen full without
|
|
having to resort to doing a file transfer.
|
|
|
|
setterm -file mydumpfile -append 4
|
|
|
|
Appends to instead of overwriting the dump file. Useful if you
|
|
have several screens you wish to concatenate.
|
|
|
|
|
|
QUESTION: I know there are VC, but where is the setterm stuff?
|
|
|
|
ANSWER: It's in the current distribution (i.e. on the images)
|
|
|
|
|
|
QUESTION: While using emacs in 80x25 mode, the mode line is constantly
|
|
moving around, why?
|
|
|
|
ANSWER: This appear to be a bug in the scroll region handling of the
|
|
console. Some one has suggested to simply remove the last entry in the
|
|
vt100 termcap that refers to the scroll region escape. Namely remove
|
|
the cs entry.
|
|
|
|
|
|
QUESTION: When I use make as non root, it doesn't work, why?
|
|
|
|
ANSWER: ?????, the message is either (null) setuid ..., or (null)
|
|
setgid... I don't know how to fix it.
|
|
BTW This problem does not exist with the pmake (make for BSD 4.3 Reno
|
|
and BSD 4.4) package.
|
|
|
|
|
|
QUESTION: How can I get Linux to boot directly from the harddisk?
|
|
|
|
ANSWER: Right now, this can be done via the shoelace stuff or the
|
|
bootany package.
|
|
|
|
|
|
QUESTION: Sometimes, when I want to remove a directory, I get an error
|
|
message, is it a (known) bug?
|
|
|
|
ANSWER: No, There is no bug at all, you probaly have another shell
|
|
on another VC whose working directory is either the one you try to
|
|
remove, either a subdirectory of it.
|
|
|
|
|
|
QUESTION: can anyone give me a sample /etc/inittab entry for login
|
|
from a pc attached to serial line /dev/tty65?
|
|
|
|
ANSWER: "Humberto speaking :)"
|
|
First step up the modem to turn off echo and enable auto answer, I do
|
|
this in kermit by connecting to the modem and typing "ate0s0=1"
|
|
followed by enter (w/o quotes). Then setup inittab to spawn getty on
|
|
the modem
|
|
tty65:console:/etc/agetty -m 1200 tty65
|
|
|
|
Then it should work. Some modems can be permanently set to disable
|
|
echo and set auto answer, see your manual.
|
|
|
|
QUESTION: When compiling some code, cc1 complains about some insn
|
|
code, what's that?
|
|
|
|
ANSWER: An insn is an internal representation that gcc uses when
|
|
compiling. The main part of gcc is to take ordinary c (or c++) code,
|
|
and compile it, while ding optimizations in insn part, which is
|
|
soft/hard independant. Then another part which is hard/Os dependant
|
|
takes the insns and translate it in assembly language. The fix is only
|
|
to turn off the optimization flag (-O) or download the new gcc release
|
|
(1.4) which has been made available at tsx-11 (newgcc.tar.Z and the
|
|
ad-hoc libraries newlibc.tar.Z).
|
|
|
|
|
|
QUESTION: While compiling some stuff, I'm getting the following
|
|
error message:
|
|
Undefined symbol ___addsf3 referenced from text segment
|
|
as well as ___mulsf3 and __cmpsf2.
|
|
These symbols are not in the program or in it's header files.
|
|
|
|
ANSWER: These are math helper functions, and you can usually compile
|
|
these programs to use the kernel floating point routines by adding
|
|
'-m80387' to the compiler switches. If the program does any wierd
|
|
fp math (exp(), sin()) it'll die when you run it though.
|
|
|
|
|
|
QUESTION: What are the enhancement of the newgcc.tar.Z ?
|
|
|
|
ANSWER: There were some bugs in the old port that have been corrected,
|
|
moreover this package contains 387 support
|
|
there is libm.a (for those with 387)
|
|
libsoft.a (for those without, I for example)
|
|
libtermcap.a (from tput 1.10)
|
|
|
|
The -mstring-insns option is no longer needed nor supported :( [As
|
|
an example to recompile (successfully) linux0.12 you have to throw away
|
|
this flag in all the Makefile]
|
|
|
|
gcc-1.40 has some registers problem, you should had -fcombine-regs
|
|
flag while compiling (the linux kernel for example)
|
|
|
|
BTW Notice also that include files have changed (stdio.h which is no
|
|
more ansi compliant).
|
|
|
|
|
|
QUESTION What's about gcc2.0 ?
|
|
|
|
ANSWER: It has been ported to linux, but remember that gcc2.0 is an
|
|
ALPHA, it is not stable at all (have a look in gnu.gcc.bug or
|
|
gnu.gcc.help). Anyway the files are 2lib.tar.Z and 2misc.tar.Z
|
|
Uncompress and untar 2misc, read the FAQ and play with it.
|
|
|
|
QUESTION: I've been trying to get Linux to run on my [3/4]86 box. It
|
|
can't even boot. Any suggestions?
|
|
|
|
ANSWER: The most common error/problem is writing the bootimage to a
|
|
low density disk. It fits, but the bootstrap code will only recognize
|
|
high density disk. So try to format explicitely disk as high density:
|
|
- for 3.5", 'format a: /n:18 /t:80 '
|
|
- for 5.25", 'format a: /n:15 /t:80 '
|
|
|
|
|
|
QUESTION: Does there exist games, languages (other than C), and
|
|
anything which make the system more friendly?
|
|
|
|
ANSWER: Yes, among other things there are rogue and yatzee; TeX;
|
|
Prolog.. but in general, if you want some extra tool port it to Linux
|
|
this is also a good beta-testing exercice.
|
|
|
|
|
|
QUESTION: Does emacs handle the arrows-key
|
|
|
|
ANSWER: Yes it does, one simple way is to put some elisp code in your
|
|
.emacs, this is an except of mine:
|
|
|
|
(global-unset-key "\e[")
|
|
(setq esc-c-map(make-keymap))
|
|
(fset 'esc-c-prefix esc-c-map)
|
|
(define-key global-map "\e[" 'esc-c-prefix)
|
|
(define-key global-map "\e[B" 'next-line)
|
|
(define-key global-map "\e[A" 'previous-line)
|
|
(define-key global-map "\e[C" 'forward-char)
|
|
(define-key global-map "\e[D" 'backward-char)
|
|
|
|
The keycode was obtained by ^Q followed by the key
|
|
|
|
|
|
QUESTION: Whenever I use uemacs 3.1X on a symlink, the symlink does
|
|
not exist anymore, why?
|
|
|
|
ANSWER: (Tristram Mabbs) Since ue3.10, uemacs uses 'safe save' mode,
|
|
writing the file to a temporary and moving it OVER the original. In
|
|
the process, this deletes the original. To prevent this just add the
|
|
following in your emacs '.rc' file: set $ssave FALSE
|
|
|
|
===========================
|
|
===========================
|
|
Newsgroups: alt.os.linux
|
|
From: snowden@cray.com (Jim Snowden)
|
|
Subject: gcc1.4 and mtools
|
|
Message-ID: <1992Mar25.035002.14870@hemlock.cray.com>
|
|
Organization: Cray Research, Inc.
|
|
Date: 25 Mar 92 03:50:01 CST
|
|
|
|
|
|
Firstly, thanks to all those who sent me suggestions about how to
|
|
get gcc 1.4 installed and working. I don't think I quite followed
|
|
anybody's suggestions exactly, but this is what I did:
|
|
|
|
1. Got include-0.12.tar.Z fromt tsx-11.mit.edu in pub/linux/sources/system
|
|
Untarred it in the root diretcory / of my linux system
|
|
|
|
2. Got newgcc.tar and untarred in directory /usr of my linux system
|
|
|
|
3. Got newlibc.tar.Z from tsx-11.mit.edu in pub/linux/sources/lib and
|
|
extracted limits.h and placed this in /usr/include
|
|
|
|
4. Linked *all* of what was in /usr/lib to /usr/local/lib:
|
|
|
|
ln -s /usr/lib/* /usr/local/lib
|
|
|
|
(I still got some funny error message if I only linked cc1 and cpp)
|
|
|
|
And that was that.
|
|
|
|
To compile mtools, I untarred mtools-2.0.5.tar.Z
|
|
from hpb.mcc.ac.uk (130.88.200.7) in pub/linux/tools into / on my linux
|
|
system (the mtools files are placed in a new /mtools directory).
|
|
|
|
The Makefile seems to expect a compiler called cc rather than gcc, so I just
|
|
copied gcc to make a new command called cc (I didn't know what else to do, but
|
|
there is probably an easier way - just changing the line LD = cc in the
|
|
Makefile didn't work). I left the Makefile file as it was.
|
|
|
|
Then I edited devices.c to include a devices structure for my DOS disk
|
|
drives. This is full of #ifdefs which I didn't like the look of so I copied
|
|
the dell entries, deleted the #ifdef and #endif lines and edited them as
|
|
follows:
|
|
|
|
struct device devices[] = {
|
|
{'A', "/dev/flpy", 0L, 12, 0, (int (*) ()) 0, 80, 2, 18},
|
|
{'C', "/dev/dos", 0L, 12, 0, (int (*) ()) 0, 0, 0, 0},
|
|
{'\0', (char *) NULL, 0L, 0, 0, (int (*) ()) 0, 0, 0, 0}
|
|
};
|
|
|
|
(Drive A is 1.44 Mb 3.5 inch floppy - see the Configure file for others.
|
|
My drive C is only 15 Mbytes, so it is FAT 12, but anything bigger is
|
|
probably FAT 16)
|
|
|
|
Then entering the make command, and a cup of coffee and it was all done.
|
|
I linked the device names I used in devices.c to the actual disk
|
|
device names:
|
|
|
|
ln -s /dev/PS0 /dev/flpy
|
|
ln -s /dev/hda1 /dev/dos
|
|
|
|
And yippee, mcopy, mdir, etc all worked.
|
|
|
|
Thanks again for the help - the above may not be the most elegant way to
|
|
do it - apologies, but I don't know any better!
|
|
|
|
Jim
|
|
|
|
========================
|
|
========================
|