Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 19 Sep 1998 14:57:45 -0700
From:      "William R. Somsky" <wrsomsky@halcyon.com>
To:        freebsd-current@FreeBSD.ORG
Subject:   Re: aout-to-elf-build failure [2.2.7-STABLE -> 3.0-CURRENT]
Message-ID:  <19980919145745.A376@gramarye>
In-Reply-To: <19980918021205.A28767@gramarye>; from William R. Somsky on Fri, Sep 18, 1998 at 02:12:05AM -0700
References:  <19980918005638.A22744@gramarye> <19980918021205.A28767@gramarye>

next in thread | previous in thread | raw e-mail | index | archive | help
Further reports on my experiments in "elfification".  Hopefully this
will help in the further perperation and refinement of the 2.2-aout
to 3.0-elf conversion process:

On Fri, Sep 18, 1998 at 12:56:38AM -0700, I (William R. Somsky) wrote:

> Ok, I'm attempting to convert my 2.2.7-STABLE system (last sync'd
> around 98/08/29) over 3.0-CURRENT as a test of 3.0 beta.  I've 
> cvsup'd the sources as of 19:45 this evening, and began a 
> 'make aout-to-elf-build" and it hung at this point:
> 
>   ===> games/fortune
>   ===> games/fortune/fortune

    [...]

Then, On Fri, Sep 18, 1998 at 02:12:05AM -0700, I (William R. Somsky) wrote:

> Ok, disabling the build of games/fortune lets me get further along
> in the process, but now I have a failure in perl:
> 
>   ===> gnu/usr.bin/perl/perl

Ok, well, I decided to make another attempt at "elfifying" my 2.2.7-STABLE
system, so, after cleaning out the remnants of my earlier test/attempts,
I did a "make -DNOGAMES -DNOPERL aout-to-elf-build", and everything seemed
to compile ok.

>From there, I went on to do an aout-to-elf-install.  I shutdown to
single user mode, and when asked for the shell to use, chose
/usr/local/bin/tcsh, since I'm more comfortable w/ the tcsh.
This, however, seems to have been somewhat of a mistake.

On trying to do the -install, make complained repeatedly about
failures to find ldconfig, and finally died w/:

  [...]
  Move libXtst.so.6.1 from /usr/X11R6/lib to /usr/X11R6/lib/aout
  ldconfig: not found
  Move liboldX.so.6.0 from /usr/X11R6/lib to /usr/X11R6/lib/aout
  ldconfig: not found
  ldconfig: not found
  *** Error code 1

Looks like /sbin wasn't in my path when running a single-user tcsh,
and the makefiles didn't do anything to correct the situation (not
that I'm sure they should have).

I then exited single-user mode and let the system return to multi-user
mode.  After some poking and prodding -- and moving some of the aout
libraries back to their original locations so that some useful commands
would work properly -- I noted that ldconfig was in /sbin, and assumed
that I had had a path problem earlier.

So, I again dropped to single-user mode, and this time, went w/
the default /bin/sh.

The new attempt at -install went much nicer, and had no trouble w/
ldconfig.

However, it failed in trying to build the new generic kernel using
the new aout tools:

  [...]
  mkdep -a -f .newdep -nostdinc [...]
  cc: ../../dev/aic6x60/aic.c: No such file or directory
  cc: ../../i386/isa/aic_isa.c: No such file or directory
  ../../pci/tek390.c:70: scsi/scsiconf.h: No such file or directory
  mkdep: compile failed
  *** Error code 1

Hmm...  Well, I've a 2940U PCI card, which uses the ahc pci driver,
so I made a new copy of the GENERICupgrade kerne configuration file,
and commented out whole groups of drivers that I was sure I didn't
need for my particular system configuration, and tried again.

This time, it ran all the way to completion, and rebooted my system.

The reboot proceeded successfully, although sshd and xdm failed to
start because the couldn't find their shared libraries.  However,
the system did otherwise seem to come up successfully.

Ok, time to update /etc and /dev.  A 'make distribution' in /usr/src/etc
to /home/ELF created an "installation image" to work off of.  It took a
bit of time, but not too much effort, to merge the new and old /etc files
to what I thought was right.

Then the update of /dev and /etc/fstab to match.  This was a bit
confusing about what was actually needed.  Do I use "da" or "sd"
deviced for SCSI? And what about "da0a" vs "da0s2a"?  Well, I could
fsck the SCSI disks currently mounted through the "da0<partition>"
devices -- it seemed like the devices which didn't mention the
slice defaulted to the BSD slice on that disk -- so I decided to
go with those.  I make sure the devices were made and updated fstab
to use "da0x" devices.  Bad move -- at least partially...

On rebooting, things started out ok, it found devices and such,
but then it got to the point to mount all the disks -- specifically,
to the point where it upgrades the mount of / to read-write.  It
reported:

  mount: /dev/da0a on /: specified drive does not match device

(or something like that -- I'm having a hard time reading my own writing)

A check of "mount" showed that it had "sd0s2a" mounted as /, and although
that and "sd0a" currently pointed to the same thing, evidentally mount
didn't know this, and balked at the naming difference.  (Um, what is the
exact required setup here?)

So, just update /etc/fstab and /dev, right?  Well, it's not that easy,
since / is still mounted read-only, and I couldn't figure out how to
change it to read-write.  (I think there's a way, isn't there?  I just
couldn't remember at the time.  Can someone remind me for future reference?)
So, out w/ the boot floppy and CD-rom: boot from floppy, fixit from CD,
mount the disk on /mnt and fix (/mnt)/etc/fstab and (after a failed
boot attempt) (/mnt)/dev.

Ok, now I can fully boot the new system w/ the revised /etc and /dev.
With this, all the shared libraries are found and sshd and xdm start up
as usual.

So, at this point, I seem to have a fully functioning "3.0-BETA(elf)"
system converted from my "2.2.7-STABLE(aout)" system.  At some
point, I'll do an elf-native "make world" to see if that takes care
of the problems w/ "fortune" and "perl".  Is there anything I
missed?  Also, can anyone fill me in on the details of "sd" vs "da"
(part of CAM, right?) drivers and the "implicit slice" implications
of "da0a" vs "da0s2a", esp in regards to its use in /etc/fstab and
booting?

________________________________________________________________________
William R. Somsky                                   wrsomsky@halcyon.com

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19980919145745.A376>