Problems and Solutions, If Any

This page summarizes problems I encountered and their solutions, if any. The problems are tried to be listed logically, instead of chronologically, if possible. Once again, be careful that the solutions might not work for your MkLinux box, though it worked for mine. Try them at your own risk.



Problems and Solutions, If Any

  1. Can't Input "*" and "H" in Kterm
  2. $ vi ~/.bashrc
    ....
    stty susp '^Z' lnext '^V'
    ....
    Use "stty -a" to see your current setting and make sure that "*" and "H" are not assigned to some special functions.

  3. How to Add New Fonts
  4. Added a12, 6x12rk, and k12 to /usr/lib/X11/fonts/misc
    $ su
    # cd /usr/lib/X11/fonts/misc
    # ls <somewhere>
    a12.pcf.Z 6x12rk.pcf.Z k12.pcf.Z
    # mv <somewhere>/*.pcf.Z .
    # mkfontdir
    # vi fonts.alias
    --> add a12, r12, rk12, and k12
    # cd /usr/lib/X11/fonts/75dpi
    # vi fonts.alias
    --> add helvb08, ....
    # xset fp rehash

  5. How to Mount Mac Disks
  6. In order to mount Mac disks, do the following. As of wip971026, MkLinux's device numbering scheme changed in such a way that SCSI devices are assigned to /dev/sda, sdb, sdc, ..., in the order they are found at the boot time. When you disconnect a SCSI device, therefore, all the other SCSI devices that have SCSI ID's larger than that of the disconnected will change. Considering this the root disk has to have a smaller SCSI ID than any removable ones.

    If you want to mount a MacOS partition on the first SCSI disk (/dev/sda), use pdisk to see the partition map and hmount to mount the HFS partition. It goes like:

    $ su
    # /sbin/pdisk -l /dev/sda
    ....
    7: Apple_HFS 3 524288 @ 3174309 (256.0M)
    ....
    # hmount /dev/sda7
    Now you can do something like:
    # hcd ":System Folder:Extensions"
    # hcopy -r /tmp/Mach_Kernel ":Mach Kernel"
    # hcopy -r ":vmlinux.gz" /tmp/vmlinux.gz
    and to dismount the disk
    # humount
    Type
    $ man hfsutils
    for more information.

  7. How to Use CDROM
  8. In order to mount a CDROM, do the following.
    $ su
    # mkdir /cdrom
    # mount -t iso9660 -o ro /dev/scd0 /cdrom

    ---> scd0 means the first CD device.
    To dismount it, type:
    # umount /cdrom

    In order to mount a Mac CDROM, do something like:
    $ su
    # hmount /dev/scd0

    Just like in the case of a SCSI disk, now you can use

    hdir : to see directory contents
    hcd : to cd
    hcopy : to copy a file
    To unmount it
    humount

  9. How to Use MO
  10. First setup A/UX partition on a 230 MB MO as we have done to the system disk (see the installation notes) using a modified Apple HD SC Setup. In my case it looks like:
    	
    	+-------------------------------+
    	|  Partition Map and Driver     |
    	+-------------------------------+
    	|  A/UX Root & User (Slice 0)   |
    	|          221.7MB(Max)         |
    	+-------------------------------+
    
    Notice that the A/UX partition is partition No.2 on MacOS where counting starts from 0 with the Apple HD SC Setup, which means partition No.3 on MkLinux where counting starts from 1. In my case the MO drive (Yano J.Compo J230MO) is the last (4th) SCSI device excluding the CD device, thus having a device file /dev/sdd3.

    In order to mount the MO, you need to first set up an ext2 file system on it:

    $ su
    # /sbin/mkfs -t ext2 /dev/sdd3

    Now you are ready to mount the MO by:

    # mkdir -p /mnt/mo
    # mount -t ext2 /dev/sdd3 /mnt/mo

    To dismount it, type:

    # umount /mnt/mo

  11. How to Set Up Network Printers
  12. If your system does not have a version of "lpr" installed, get lpr from ftp://ftp.mklinux.apple.com/pub/DR3/RedHat/RPMS/ first.

    Then do

    $ su
    # rpm -Uvh <somewhere>/lpr-0.31-1a.ppc.rpm

    In order to add a network printer called "qms3g414" for instance, do the following:

    # vi /etc/printcap
    qms3g414:\
    :lp=:rp=lp:rm=qms3g414:sd=/var/spool/lpd/qms3g414:\
    :lf=/var/log/lpd-errs:
    # mkdir -p /var/spool/lpd/qms3g414

    Then restart lpd by

    # /etc/rc.d/init.d/lpd.init start

  13. Is Netscape Available?
  14. Yes! Take a look at this for more information.

  15. Is Java Developer's Kit Available?
  16. Oct. 22, 1998: jdk117-v1 is out. Get it from the PowerPC JDK porting team. Take a look at this for more information.

  17. Is FORTRAN Available?
  18. July 31, 1998: DR3 is out now, which includes "g77" as a part of its official compiler suite:
    egcs-1.0-2e
    egcs-g77-1.0-2e
    egcs-c++-1.0-2a
    egcs-objc-1.0-2e

    Necessary packages for FORTRAN program development (egcs,egcs-g77) are installed in your DR3 installation if you choose to install the "C Development" packages. The C++ and Objective C packages can also be installed by adding the "C++ Development" packages to your selection.

    Take a look at my personal note summarizing FORTRAN program porting isssues.

  19. Is JLaTeX2e Available?
  20. There is a wornderful site by Uchiyama titled "ASCII pTeX on MkLinux" and there is nothing for me to add.

    If you want to skip building the pTeX related packages and use a set of binary RPM packages instead, you can get them from the JRPM ftp site. For convenience, I have put necessary binary files in one place in my JRPM directory: JRPM/tex.

    Install them as

    # rpm -Uvh kpathsea-*
    # rpm -Uvh pTeX-*
    # rpm -Uvh asiya-*
    # rpm -Uvh watanabe-*
    # rpm -Uvh vf-*
    # rpm -Uvh pLaTeX2e-*
    # rpm -Uvh LaTeX2e-*
    # rpm -Uvh dvipsk-*
    # rpm -Uvh dviselect-*
    # rpm -Uvh dviconcat-*
    # rpm -Uvh xdvik-20cjp-1a.ppc.rpm

    To compile and preview a latex file:

    $ platex foo.tex
    $ xdvi -paper a4 -s 5 foo.dvi
    To convert the dvi file to a PS file:

    $ dvips foo.dvi -o foo.ps
    then you can see the PS file by

    $ ghostview foo.ps
    In TkDesk, you can bind file type *.tex to platex, *.dvi to xdvi or dvips by setting ~/.tkdesk/Popups appropriately. See here for details.

  21. Why No Page Numbers Show Up in Ghostview ?
  22. How come no page numbers show up, when a postscript file made from a dvi file through dvips is ghostviewed?

    $ su
    # vi /usr/local/lib/texmf/dvips/config.ps
    ....
    % Too-smart spoolers and/or printers get confused.
    % Our LJ4 gets `22 Error' (inconsistently) from the structured comments.
    %N
    ....
    # exit
    $ dvips foo.dvi -o foo.ps
    This time, page numbers should show up.

  23. How to Edit PS Figures
  24. In writing transparencies, it often becomes necessary to include some PS figure. It's highly desirable that the include file be editable. Pstoedit allows you to do it. You can translate PS to xfig, tgif, gnuplot, ... etc. so that you can do, for instance:

    $ pstoedit -f fig foo.ps foo.fig
    $ xfig foo.fig
    or
    $ pstoedit -f tgif foo.ps foo.obj
    $ tgif foo.obj
    Oct. 29, 1998: An unofficial patch applied to make pstoedit-2.60 work with gs-5.50. With gs-5.10 you still need "-psargs "level1.ps". Feb. 1, 1998: I have recently found that pstoedit-2.60 is incompatible with gs-5.10 (it worked fine with gs-4.03). The problem is not solved yet, but here is a temporary workaround: You add -psargs "level1.ps".
    For example, what you might try is:
    $ pstoedit -f tgif -psargs "level1.ps" foo.ps foo.obj
    You get some complaints from "gs" but the resultant converted file seems editable.

  25. How to Print 2 Pages Up
  26. First install a2ps and psnup, etc:

    $ su
    # rpm -Uvh <somewhere>/a2ps.pl-1.41-1.noarch.rpm
    # rpm -Uvh <somewhere>/psutils-1.17-2.ppc.rpm
    Then do

    $ a2ps <file name> | psnup -2 | lpr
    to print two ascii text pages on a single sheet of paper. For a postscript, do
    $ psnup -2 <file name> | lpr
    instead. The psutils package contains some other useful tools to resize, rotate, or extract some page in a postscript file.

  27. How to Use MkLinux as an X Terminal
  28. In order to use MkLinux as an X terminal, do

    $ X -query <host name> -fp tcp/<font server>:<port no>
    where the font path setting to use a font server is optional. It is, however, mandatory if you want to use CDE, which requires a special font set.

    (e.g.)
    If you want to connect to a host called "cdehost" running CDE, do the following:

    $ X -query cdehost -fp tcp/cdehost:7000

  29. How to Exit from X
  30. COMMAND+CONTROL+BACKSPACE(DELETE)

    or

    OPTION+POWER

  31. How to Use Virtual Consoles
  32. COMMAND+CONTROL+Fi (i=2,..,6: F1 is the original console)

    If you are currently running "X", you may need to use "F7" instead of "F1" to return to the screen where the X is running. Otherwise, you should be able to move from one virtual console to another by appropriately choosing a function key.

  33. How For A Non-Root User to Shut Down a Machine
  34. CONTROL+SHIFT+POWER

  35. How to Offline Register Words to Canna Dictionaries
  36. When using tkdesk's builtin editor, no builtin mechanism is available to register Japanese words to user's canna dictionary. One needs to offline-add words to user's dictionary. Here is the way to do it.

  37. Is an Automounter Available?
  38. Jul 31, 1998: amd-920824upl102-10b.ppc.rpm comes with DR3 as an extra package.

    Using this rpm package, it's easy:

    $ su
    # rpm -ivh amd-920824upl102-10b.ppc.rpm
    If the "rpm" complains that it needs a "portmap" rpm, do the following:
    $ su
    # rpm -ivh portmap-4.0-7b.ppc.rpm

    Once installed, all you need to do is to reboot the system or

    # /etc/rc.d/init.d/amd start
    which starts the automounter. Provided that some directories are exported from a host "foo", you can do, for instance,

    $ ls /net/foo
    ... tmp ...
    $ ls -F /net/foo/tmp
    ... bar/ ...
    $ cp -r /net/foo/tmp/bar .
    If not, you may want to do the following as root on "foo":

    # vi /etc/exports
    ---> add your mklinux box to the list of destinations
    # exportfs -a
    To stop the automounter:

    $ su
    # /etc/rc.d/init.d/amd stop
    The configuration files include:

    /etc/amd.conf : a map file which sets up /net by default
    /etc/sysconfig/amd : sets ADIR (temp mount dir) and MOUNTPS (mount point)
    By default, the temporary mount directory is /.automount and the mount point is /net.

    Enjoy!

  39. What About NFS Then?
  40. Oct 14, 1998: (nfs-server-2.2beta29-2c) an sprintf buffer overflow security hole pluged.
    Jul 31, 1998: nfs support comes with DR3 as base packages (portmap,nfs-serever). These packages are installed as a part of your DR3 installation if you choose the "NFS Server" packages. Using rpm packages, their installation is easy:

    $ su
    # rpm -Uvh portmap-4.0-7b.ppc.rpm
    # rpm -Uvh nfs-server-2.2beta29-2c.ppc.rpm
    # rpm -Uvh nfs-server-clients-2.2beta29-2c.ppc.rpm

    Edit /etc/exports to tell to which machines you export your file system:

    # vi /etc/exports
    / *.kek.jp(rw,anonuid=65535)

    In this example, you export everything under the root directory to any host in the "kek.jp" domain with read/write permission. Dangerous huh? See the manpage for exports for detail.

    To start NFS, reboot or

    # /etc/rc.d/init.d/nfs start
    Then you can do something like:

    $ rlogin foo.kek.jp
    $ ls /net/bar
    assuming your machine is "bar" and "foo" is running an automounter.

  41. How to Make an RPM Package
  42. You need to prepare a TAR-GZIPped source code (foo.tar.gz) and patches (bar1.patch, bar2.patch, ...) and a spec file (howtobuild.spec). Once have this done, the rest is simple:

    $ su
    # cd /usr/src/redhat/SOURCES
    # cp <somewhere>/foo.tar.gz .
    # cp <somewhere>/*.patch .
    # cd ../SPECS
    # cp <somewhere>/howtobuild.spec .
    # rpm -ba --test howtobuild.spec
    # rpm -ba --clean howtobuild.spec

    This creates an RPM binary package in /usr/src/redhat/RPMS/ppc and an RPM source package in /usr/src/redhat/SRPMS.

    You can consult RPM-HOWTO and RPM-Tips retrieved from MkArchive.

    Note 1: If an SRPM file is available

    When a Source RPM file is available, you can install it by

    # rpm -i foo.src.rpm

    then you get everything set up in /usr/src/redhat as was done above by hand. Notice that this does not involve any source compilation but just installs source files and a spec file. You can then modify the source codes or the spec file, if any modifications are necessary:

    # cd /usr/src/redhat/SPECS
    # vi howtobuild.spec
    ... modifications, if necessary
    Then the rest is the same.

    Note 2: If you just want to rebuild the package

    If you don't need to make any modifications but just need to rebuild the binary package, just do:
    # rpm --rebuild foo.src.rpm
    where you have the SRPM file. This rebuilds the binary package and stores it as /usr/src/redhat/RPMS/ppc/foo.ppc.rpm. The rebuilt binary package can be reinstalled as usual by
    # rpm -Uvh foo.ppc.rpm
    When some binary rpm did not work, this might help.

  43. How to Extract Files from an RPM Package
  44. If you want to extract a file called "bar" from an RPM, foo-xxx-yy.ppc.rpm, try something like
    $ rpm -qpl foo-xxx-yy.ppc.rpm | grep bar
    /usr/bin/bar
    $ rpm2cpio foo-xxx-yy.ppc.rpm | cpio -i -d /usr/bin/bar
    xx blocks
    $ ls
    usr

    Try

    $ rpm2cpio foo-xxx-yy.ppc.rpm | cpio -i -d
    instead, if you want to extract everything in the RPM package.

Back to Keisuke Fujii's MkLinux Page
fujiik@jlcuxf.kek.jp Aug 5, 1998