From:     Digestifier <Linux-Admin-Request@senator-bedfellow.mit.edu>
To:       Linux-Admin@senator-bedfellow.mit.edu
Reply-To: Linux-Admin@senator-bedfellow.mit.edu
Date:     Thu, 28 Oct 93 14:14:35 EDT
Subject:  Linux-Admin Digest #128

Linux-Admin Digest #128, Volume #1               Thu, 28 Oct 93 14:14:35 EDT

Contents:
  Re: How to use a secondary IDE interface. (John Ngai)
  Drive mapping problems... (Arthur Harvey)
  Re: Fails: mounting Linux filesystem fro (Gareth Bult)
  Re: lilo, vmlinuz zImage (Craig Sanders)
  LAN Software for Linux (Dhawal Tyagi)
  Re: Chatting programs without net (tim)
  Re: syslogd hangs inetd (SuperGirl)
  Re: Help with routing under Linux (Dan Warburton)
  Bug in shadow-packages (patch included) (Hendrik G. Seliger)

----------------------------------------------------------------------------

From: ngai@nova.bellcore.com (John Ngai)
Subject: Re: How to use a secondary IDE interface.
Reply-To: ngai@apostle.bellcore.com
Date: Wed, 27 Oct 1993 16:52:41 GMT


I want to thank you for all the tips I received over email about using
the 2nd IDE controller. It is wonderful to be in a group of people so
willing to help out.

Now I have a follow up question. I read all these *great* benefits of using
SCSI with multiple drives, that allows concurrent disk access. This makes
me wonder if I can derive similar performance benefits if I put the swap and
root (mostly system executables) partitions on a separate hard disk under IDE 
controller 1, and user home directories on another hard disk under IDE 
controller 2.

I can see 3 partitioning scenarios:
(1) Swap/root and /home on same IDE hard disk.
(2) Swap/root and /home on different hard disks but under same IDE controller.
(3) Swap/root and /home on different hard disks and each under a different IDE
    controller.

Case (1) is slow since the disk head has to move back and forth to access swap
and user date files.

Case (2) seems to solve the problem of case (1), but will there be access
overhead for the IDE controller to switch between its two drives?

Case (3) may or may not solve the problem in case (2), depending on if LINUX
can simultaneously issue read commands to both controllers to get the two
drives going.

I am ignorant about the IDE interface. Can someone comment on the relative
merits of these cases?

Thanks -- John



------------------------------

From: harvey@gate.ee.lsu.edu (Arthur Harvey)
Subject: Drive mapping problems...
Date: 27 Oct 1993 16:35:09 GMT

I've got .9.11 running on my secondary drive on my primary drive
controller ( ultrastor 12f - ESDI). It runs great - But it will not allow
me to access my 740mb Hitachi which is the primary drive on that controller.
I've got the sector mapping on the drive enabled so that I can keep a dos
file system on that drive as well ,but the linux can't seem to handle it.
I've tried rebuilding my kernel with xt support and defining the drive 
parameters - still no luck. Would anybody out there know where I can find
some info on Linux and drive mapping? Didn't I read somewhere that someone
was working on a Drive-HOWTO ? 

__________________________________________________________________________
ARTHUR HARVEY

...To aimlessly meander where no man has aimlessly meandered before...
__________________________________________________________________________

------------------------------

From: gareth@gblinux.demon.co.uk (Gareth Bult)
Subject: Re: Fails: mounting Linux filesystem fro
Date: Wed, 27 Oct 1993 00:09:50 GMT

The 'correct' format for /etc/exports is;                                                       
<path> <machine>(flags)                                                                         
                                                                                                
for example;

/ remote(rw)

to allow machine 'remote' to mount my root with
read/write.

Permission denied is often associates with
/etc/hosts.equiv and /.rhosts.                                                                  

(or am I teaching my Granny...)                                                                 
                                                                                                
Regards                                                                                         
Gareth.                                                                                         

------------------------------

From: cas@muffin.apana.org.au (Craig Sanders)
Subject: Re: lilo, vmlinuz zImage
Date: 27 Oct 93 05:35:42 GMT

pcg@aber.ac.uk (Piercarlo Grandi) writes:

 [...much deleted...]

>One can not only put several alternative kernels ona floppy, have
>different boot floppies, and so on. It is also useful to have another
>floppy with a miniroot filesystem on it, for disaster recovery; to use
>it one simply boots the usual floppy, but with a different root
>directory (the floppy), and perhaps with a suitable RAM disk size.

yep, this makes sense.  I did something like this today in order to create
a boot disk which had support for the qic-02 tape drive in the kernel so 
i could just boot from that floppy and restore my system from tape without
having to go through the hassle of inserting 30 disks into the drive again.

what i did was:

  1.  used dd to create an image of the SLS 'a1' install disk onto my hard
      disk.
  2.  used dd to copy that image back onto another floppy.

  (there's probably an easier way to do steps 1. & 2. but it seemed like
   the fastest way at the time)

  3.  mounted the floppy as /mnt
  4.  deleted a few un-necessary files (like do.install, install.info,
      compress was replaced with a sym-link to gzip etc) so there was
      enough room for my kernel.
  5.  copied my working kernel onto the floppy

  (I'm using a clean 0.99pl13 kernel as the SLS released has broken or
   non-existant support for my wangtek en5099-24 tape drive)

  6.  made sure that mt, tar, gzip, were on the disk
  7.  mknod /mnt/dev/tape c 12 4
  8.  cd /mnt/etc/lilo
  9.  export ROOT=/mnt
  10. ./install
  11. sync; cd / ; umount /mnt

  12. used dd to make an image of this new 'tape restore' floppy so I can
      easily make another one anytime i want.

  and of course, reboot and test if it worked :-)

I now have a boot floppy which I can use to bring linux back up even if the
whole hd gets wiped clean.  This is good, because I just spent the entire
weekend installing linux - i had to reinstall from disk 'a1' three times
before I got it right.  I **NEVER** want to put those 30 disks into my 
drive again!  All I have to do is make sure I have an up-to-date backup.

>Having a boot floppy has at least two advantages, apart from flexibility
>in choosing what/how to boot: if you have another OS, you need not
>change its booting arrangements at all, and installing Linux can be
>totally transparent; there is no problem with limitations of the disk
>BIOS, e.g. wrt more than 1204 cylinders, as the boot is entirely from
>the floppy, and once the Linux kernel is running, there is no problem.

OK.  this paragraph interests me.  One of the reasons I had to reinstall 
several times over the weeked appeared to be that i was running into the
old 1024 cylinder limit.

I've got an old Priam 638 ESDI drive (1225 cyl * 15 heads * 36 sectors, 
approx 320MB).  This drive worked very nicely under OS/2 with Boot Manager
when I just had a 100MB partition for linux.  however, I wanted to get rid
of OS/2 and go to a pure linux system, so i backed up everything to tape,
repartitioned, and re-installed linux.

After numerous attempts, I finally got it working, but it wont boot off
the hard disk.  I'm not certain, but I think the problems were due to the
fact that my main linux partition wasn't fully contained within the 1024
cylinder limit (there was some cryptic message from fdisk saying something
about 'partition /dev/hda?? has different physical and logical endings').

i ended up partitioning it so that my partition table looks like:


The number of cylinders for this disk is set to 1225.
This is larger than 1024, and may cause problems with some software.

Command (m for help): p
Disk /dev/hda: 15 heads, 36 sectors, 1225 cylinders
Units = cylinders of 540 * 512 bytes

   Device Boot  Begin   Start     End  Blocks   Id  System
/dev/hda1   *       1       1       4    1062    a  OPUS
/dev/hda2   *       5       5    1023  275130   83  Linux extfs
/dev/hda3        1024    1024    1225   54540    5  Extended
/dev/hda5        1024    1024    1084   16469+  82  Linux swap
/dev/hda6   *      61    1085    1225   38069+   6  DOS 16-bit >=32M

I've kept the OS/2 Boot Manager (/dev/hda1) because I also want to boot
from /dev/hda6 into MS-DOS occasionally.  I guess I can do this with just
lilo as well, so i'll probably get rid of it next time around.

what happens now is that when I try to boot from the hard disk I get an
error message saying "Partition table invalid" or something like that. I 
can, at least, boot from a floppy but I don't really like having to do
this.

what i'd like to do is to repartition the disk (AGAIN!!) and reformat and
install so that it boots from the hard disk.  I don't really care that much
whether I've got a bootable dos partition or not (it would be nice, though).

so, my questions (to you and to anyone else who cares to comment) are:

  - can i use lilo to do this?  

  - what would you say was a good/optimal partitioning scheme?

  - what should i be particularly careful of when repartitioning,
    re-installing, etc?


i'm glad i made that 'tape restore' disk now - I can experiment without
risking having to put those 30 damned disks in again.

-- 
Craig Sanders
======================THIS SPACE INTENTIONALLY LEFT BLANK======================
The Utility Muffin Research Kitchen              muffin!cas@zikzak.apana.org.au

------------------------------

From: tyagi@birch.ee.vt.edu (Dhawal Tyagi)
Subject: LAN Software for Linux
Date: 27 Oct 1993 23:30:45 GMT
Reply-To: tyagi@birch.ee.vt.edu

Hi everybody!
I'm planning to install Linux on my machine, but before that I'd like to make sure
that I can do everything that I want to do. Is there any LAN software available
for Linux like Microsoft LAN Manager for SCO Unix is available from SCO. Is it
free or can I buy it from some company?

Thanks, please e-mail if you can
Dhawal.

Home Address:               Office Address:
424 North Main St., Apt #E  1700, Pratt Dr., #209
Blacksburg, VA 24060.       Information Systems Building
TEL#:   (703)951-3979       Corporate Research Center
                            Blacksburg, VA 24061
                            TEL#:   (703)231-3905, 231-8398.

**************************************************************************

Chand tasveer-e-butan, chand haseenon ke khutoot,
Baad marne ke mere, Ghar se ye saaman nikla.

-Mirza Asadullah Khan "Ghalib".

**************************************************************************


------------------------------

Crossposted-To: comp.os.linux.misc
From: tim@stingray.micro.umn.edu (tim)
Subject: Re: Chatting programs without net
Date: Thu, 28 Oct 1993 02:08:50 GMT


a few years ago i wrote a talk program that uses AF_UNIX sockets.  it
looks quite alot like the BSD talk, but you don't need network
sockets.  if there is interest, i'll ftp it out somewhere.

        tim


------------------------------

From: root@calvin.iaf.nl (SuperGirl)
Subject: Re: syslogd hangs inetd
Date: 27 Oct 1993 12:19:32 +0100

>My net-2 connection seems to hang when syslogd is running.

>Apparently, I seem to be getting this error at random times ONLY when
>I'm running syslogd.  Any suggestions?

>recvfrom unix: Bad file number

>Currently, syslogd is off (even though inetd still routes through
>tcpd)... although, I don't like the idea of leaving syslogd off.

>Any suggestions?

Hmm, this is no solution, you simple won't see them anymore :-(
But i admit, i'm having them too, using an 13e kernel...

------------------------------

From: warb@faatcrl.faa.gov (Dan Warburton)
Subject: Re: Help with routing under Linux
Date: 28 Oct 93 02:17:52 GMT

smithc@kelvin.physics.uq.oz.au (Craig Smith) writes:

>: >>Now, the fun part.  When I try using "routed".  The routes change to:
>: >Not surprising.  With a bogus routing table, things only get worse if
>: >you run 'routed'. 

Do you really need to run routed? How about just setting up  a default route
/etc/route add default gw xxx.xxx.xxx.xxx ? to a smart router or single
route off your network. static routing works for me.
-- 
Dan Warburton warb@faa.gov warb@tgf.tc.faa.gov warb@pilot.njin.net 
TGF (Target Generation Facility, an Air Traffic Control Simulator) 
FAA Technical Center, Atlantic City International Airport, NJ
08405  Mail Stop ACN-400c  Phone: 609-485-4480 

------------------------------

From: hank@Blimp.automat.uni-essen.de (Hendrik G. Seliger)
Subject: Bug in shadow-packages (patch included)
Date: Thu, 28 Oct 1993 07:47:54 GMT
Reply-To: hank@Blimp.automat.uni-essen.de

Hi everyone!

When trying to make the group administration of our linux machines
easier (ie have other people administer the groups) I found a bug in
the shadow package (actually, more than one):

In gpasswd (gpmain.c):
- if an group entry is changed, the name of the group has been written
as passwd-entry, restricting this group;

- the administrators field has not been scanned, not allowing more
than one administrator.

In libshadow.a (sgroupio.c):
- the number of administrators has not been calculated (typical
block-copy-problem), so that the number of members has been used to
allocate memory for the administrators, giving a segmentation error if
there're more admins. than members.

I've sent the following patch to the author/editor of the shadow
package, hoping he'll incorporate it in a new release.

By the way, when making the library libshadow.a, the file sppwd.o is
not included by the Makefile, which results in some programs not
compiling. My Makefile has been so much tampered with that it's better
not to distribute any diffs, but it should be no problem:

 make sppwd.o; ar rv libshadow.a sppwd.o; ranlib libshadow.a; rm sppwd.o

So here's the diffs:
==================snippy==============
*** gpmain.c.orig       Fri Dec  4 13:13:33 1992
--- gpmain.c    Wed Oct 27 18:12:18 1993
***************
*** 10,19 ****
--- 10,23 ----
   *
   * This software is provided on an AS-IS basis and the author makes
   * no warrantee of any kind.
   */
  
+ /*
+  * Multi-admin repaired by HGS, Oct. 26, 1993
+  */
+ 
  #include <sys/types.h>
  #include <stdio.h>
  #include "pwd.h"
  #include "shadow.h"
  #include <grp.h>
***************
*** 290,300 ****
        grent.gr_mem[i] = (char *) 0;
  #ifdef        SHADOWGRP
        if (sg = getsgnam (group)) {
                sgent = *sg;
                sgent.sg_name = strdup (sg->sg_name);
!               sgent.sg_passwd = strdup (sg->sg_name);
  
                for (i = 0;sg->sg_mem[i];i++)
                        ;
                sgent.sg_mem = (char **) malloc (sizeof (char *) * (i + 1));
                for (i = 0;sg->sg_mem[i];i++)
--- 294,304 ----
        grent.gr_mem[i] = (char *) 0;
  #ifdef        SHADOWGRP
        if (sg = getsgnam (group)) {
                sgent = *sg;
                sgent.sg_name = strdup (sg->sg_name);
!               sgent.sg_passwd = strdup (sg->sg_passwd);
  
                for (i = 0;sg->sg_mem[i];i++)
                        ;
                sgent.sg_mem = (char **) malloc (sizeof (char *) * (i + 1));
                for (i = 0;sg->sg_mem[i];i++)
***************
*** 328,353 ****
  
                sg = &sgent;
        }
  #endif
  
!       /*
!        * The policy for changing a group is that 1) you must be root
!        * or 2) you must be the first listed member of the group.  The
!        * first listed member of a group can do anything to that group
!        * that the root user can.
!        */
! 
!       if (! amroot) {
!               if (grent.gr_mem[0] == (char *) 0)
!                       goto failure;
! 
!               if (strcmp (grent.gr_mem[0], name) != 0)
!                       goto failure;
!       }
! 
!       /*
         * Removing a password is straight forward.  Just set the
         * password field to a "".
         */
  
        if (rflg) {
--- 332,356 ----
  
                sg = &sgent;
        }
  #endif
  
!         /* Changed by HGS
!          * The policy for changing a group is that 1) you must be root
!          * or 2) you must be in the list of administrators
!          * who can do anything to that group
!          * that the root user can.
!          */
! 
!         if (! amroot) { /*HGS*/
!                 for(i=0; (sgent.sg_adm[i] != (char *) 0) &&
!                         (strcmp(sgent.sg_adm[i], name) != 0); i++);
!                 if (sgent.sg_adm[i] == (char *) 0)
!                         goto failure;
!         }
!         
!       /*
         * Removing a password is straight forward.  Just set the
         * password field to a "".
         */
  
        if (rflg) {
*** sgroupio.c.orig     Fri Dec  4 14:10:41 1992
--- sgroupio.c  Wed Oct 27 18:10:49 1993
***************
*** 99,108 ****
--- 99,111 ----
                if (! (sgr->sg_mem[i] = strdup (sgrent->sg_mem[i])))
                        return 0;
  
        sgr->sg_mem[i] = 0;
  
+       for (i = 0;sgrent->sg_adm[i];i++) /*HGS*/
+               ;
+ 
        sgr->sg_adm = (char **) malloc (sizeof (char *) * (i + 1));
        for (i = 0;sgrent->sg_adm[i];i++)
                if (! (sgr->sg_adm[i] = strdup (sgrent->sg_adm[i])))
                        return 0;
  

=========snappy============================


Hank

--
======================================================================
         Hendrik G. Seliger                  Universitaet Essen
   hank@Blimp.automat.uni-essen.de            Schuetzenbahn 70
      Tel.: +49-201-183-2898                45117 Essen, Germany
======================================================================
             "Handling interrupts is simple." (G. Pajari)
             "Interrupts are an unpleasant fact of life." (A. Tanenbaum)
-- 
Martin Preusser, Universitaet Essen GH, Tel.: 0201/183-2176

------------------------------


** FOR YOUR REFERENCE **

The service address, to which questions about the list itself and requests
to be added to or deleted from it should be directed, is:

    Internet: Linux-Admin-Request@NEWS-DIGESTS.MIT.EDU

You can send mail to the entire list (and comp.os.linux.admin) via:

    Internet: Linux-Admin@NEWS-DIGESTS.MIT.EDU

Linux may be obtained via one of these FTP sites:
    nic.funet.fi				pub/OS/Linux
    tsx-11.mit.edu				pub/linux
    sunsite.unc.edu				pub/Linux

End of Linux-Admin Digest
******************************
