Re: Change install-order? (upgrade from static to dynamic root)
At 9:39 PM -0500 11/26/03, Garance A Drosihn wrote: I just installed 5.1-release on a sparc64, and then cvsup'ed to the latest snapshot of -current. Since that update is such a large jump in time, I was going from a system which had no /rescue or /libexec to one which builds everything dynamically. This gets one into a mess in the middle of installworld, where suddenly almost everything dies with messages like: ELF interpreter /libexec/ld-elf.so.1 not found I know others have run into this problem, but there seems to be nothing in UPDATING to warn people about it. Or at least, I didn't see anything in /usr/src/UPDATING under sparc64. I did some more tests today, and it looks like it is still true that updating from a non-/libexec system to a system with both /libexec and dynamic-root will not work right. There is a check in /usr/src/Makefile.inc1 which tries to help out, but when I try a test-run of make (with the right environment and parameters), that section does not seem to do anything. That section says: # When upgrading to a dynamically linked root, install the runtime # linker early into its new location before make(1) has a chance # to run the dynamically linked /bin/sh. .if !defined(NO_DYNAMICROOT) !defined(NOPIC) \ (!defined(TARGET_ARCH) || ${TARGET_ARCH} == ${MACHINE_ARCH}) \ !defined(DISTDIR) \ (!defined(DESTDIR) || empty(DESTDIR) || ${DESTDIR} == /) \ !exists(/libexec/ld-elf.so.1) SUBDIR+= libexec/rtld-elf .endif However, libexec/rtld-elf does not get added to the list of subdirectories. I am not completely sure what all those lines in the .if are checking for, but if I change DISTDIR to DESTDIR on the third line, I do get libexec/rtld-elf added to the the SUBDIR variable. But even if that fixes the check, I don't understand why we would not just move up the: .if exists(${.CURDIR}/libexec) SUBDIR+= libexec .endif so that it will be installed before /bin is. We already install /include and /lib before we install /bin, and I would think that we would *always* want a new /libexec installed before installing /bin files which may depend on some change to libraries in that directory. Disclaimer: I realize there could be many subtleties here that I am not aware off, so consider this more of a question than a statement that something is definitely wrong. Why *wouldn't* we want /libexec installed before /bin? I do know that the current setup still does not work (going from 5.1-secure to 5.1-rightNow), but I may be pushing for the wrong solution. [also, I intended to do more checking of this, but I've run out of weekend and I doubt I'll work on this much until next weekend] -- Garance Alistair Drosehn= [EMAIL PROTECTED] Senior Systems Programmer or [EMAIL PROTECTED] Rensselaer Polytechnic Instituteor [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to [EMAIL PROTECTED]
Change install-order? (upgrade from static to dynamic root)
I just installed 5.1-release on a sparc64, and then cvsup'ed to the latest snapshot of -current. Since that update is such a large jump in time, I was going from a system which had no /rescue or /libexec to one which builds everything dynamically. This gets one into a mess in the middle of installworld, where suddenly almost everything dies with messages like: ELF interpreter /libexec/ld-elf.so.1 not found I know others have run into this problem, but there seems to be nothing in UPDATING to warn people about it. Or at least, I didn't see anything in /usr/src/UPDATING under sparc64. Instead of warning people, I was wondering if there would be any downside to having installworld always install /rescue first (since that should not depend on anything else), and install /libexec before installing executables. - - - - I did recover from that mess by taking advantage of tips given in previous threads on this situation. I used the rescue binary in to give me a few key commands, doing something like: cd /usr/obj/usr/src/rescue/rescue ./rescue mkdir /usr/tempbin ./rescue ln rescue /usr/tempbin/cp ./rescue ln rescue /usr/tempbin/cat ./rescue ln rescue /usr/tempbin/ldconfig ./rescue ln rescue /usr/tempbin/ln ...etc... PATH=/usr/tempbin cd /usr/obj/usr/src/libexec/rtld-elf cp -p * /libexec ldconfig -m /lib cd /usr/obj/usr/src/usr.bin/xinstall cp -p xinstall /usr/bin/install I may have missed a few steps there, but I think that got me far enough along that I could 'make install's in /usr/src/lib and /usr/src/libexec. Once I was confident that I had enough working parts installed, I went back and repeated the 'make installworld'. Seems to have worked out OK. -- Garance Alistair Drosehn= [EMAIL PROTECTED] Senior Systems Programmer or [EMAIL PROTECTED] Rensselaer Polytechnic Instituteor [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: upgrade from static to dynamic root
On Wed, 17 Sep 2003, Gordon Tetlow wrote: GTOn Tue, Sep 16, 2003 at 06:11:01PM +0200, Harti Brandt wrote: GT On Tue, 16 Sep 2003, Richard Nyberg wrote: GT GT RNAt Thu, 11 Sep 2003 14:44:55 +0200 (CEST), GT RNHarti Brandt wrote: GT RN Hi, GT RN GT RN I just tried to upgrade one of my systems from a static root from july to GT RN an actual dynamic root. The installworld went fine 'til the place where GT RN /bin/test is installed. At that point the installation stopped with ELF GT RN interpreter /libexec/ld-elf.so.1 not found. And really /libexec is not GT RN populated yet. GT RN GT RNMe too :( GT RNTo get installworld back on track I used cp under linux emulation to GT RNcopy ld-elf.so.1. Then I also had to run ldconfig -m /lib. After that GT RNmake installworld completed successfully. GT GT Or you could cd into /usr/obj/usr/src/rescue/rescue and do ./rescue cp ... GT (as long as you have a working shell) GT GTWhich of course exists in /rescue too. No, it doesn't. Rescue is installed after /bin, so if something goes wrong early in installworld, your system is hosed: no /libexec, no /rescue. You need to know how to get yourself out of this by pulling your hair... Seems that Ruslan has taken care of and emergency install of rtld-elf. This leaves you still without /rescue, but enables you to run at least /bin/sh. harti -- harti brandt, http://www.fokus.fraunhofer.de/research/cc/cats/employees/hartmut.brandt/private [EMAIL PROTECTED], [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: upgrade from static to dynamic root
On Tue, Sep 16, 2003 at 06:11:01PM +0200, Harti Brandt wrote: On Tue, 16 Sep 2003, Richard Nyberg wrote: RNAt Thu, 11 Sep 2003 14:44:55 +0200 (CEST), RNHarti Brandt wrote: RN Hi, RN RN I just tried to upgrade one of my systems from a static root from july to RN an actual dynamic root. The installworld went fine 'til the place where RN /bin/test is installed. At that point the installation stopped with ELF RN interpreter /libexec/ld-elf.so.1 not found. And really /libexec is not RN populated yet. RN RNMe too :( RNTo get installworld back on track I used cp under linux emulation to RNcopy ld-elf.so.1. Then I also had to run ldconfig -m /lib. After that RNmake installworld completed successfully. Or you could cd into /usr/obj/usr/src/rescue/rescue and do ./rescue cp ... (as long as you have a working shell) Which of course exists in /rescue too. -gordon pgp0.pgp Description: PGP signature
Re: upgrade from static to dynamic root
At Wed, 17 Sep 2003 09:54:42 -0700, Gordon Tetlow wrote: [1 text/plain; us-ascii (quoted-printable)] On Tue, Sep 16, 2003 at 06:11:01PM +0200, Harti Brandt wrote: On Tue, 16 Sep 2003, Richard Nyberg wrote: RNAt Thu, 11 Sep 2003 14:44:55 +0200 (CEST), RNHarti Brandt wrote: RN Hi, RN RN I just tried to upgrade one of my systems from a static root from july to RN an actual dynamic root. The installworld went fine 'til the place where RN /bin/test is installed. At that point the installation stopped with ELF RN interpreter /libexec/ld-elf.so.1 not found. And really /libexec is not RN populated yet. RN RNMe too :( RNTo get installworld back on track I used cp under linux emulation to RNcopy ld-elf.so.1. Then I also had to run ldconfig -m /lib. After that RNmake installworld completed successfully. Or you could cd into /usr/obj/usr/src/rescue/rescue and do ./rescue cp ... (as long as you have a working shell) Ah! I wondered why only found the rescue binary there and no cp or mv. I didn't quite get it... :) Which of course exists in /rescue too. No because it wasn't installed yet. -Richard ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: upgrade from static to dynamic root
At Thu, 11 Sep 2003 14:44:55 +0200 (CEST), Harti Brandt wrote: Hi, I just tried to upgrade one of my systems from a static root from july to an actual dynamic root. The installworld went fine 'til the place where /bin/test is installed. At that point the installation stopped with ELF interpreter /libexec/ld-elf.so.1 not found. And really /libexec is not populated yet. Me too :( To get installworld back on track I used cp under linux emulation to copy ld-elf.so.1. Then I also had to run ldconfig -m /lib. After that make installworld completed successfully. -Richard ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: upgrade from static to dynamic root
On Tue, 16 Sep 2003, Richard Nyberg wrote: RNAt Thu, 11 Sep 2003 14:44:55 +0200 (CEST), RNHarti Brandt wrote: RN Hi, RN RN I just tried to upgrade one of my systems from a static root from july to RN an actual dynamic root. The installworld went fine 'til the place where RN /bin/test is installed. At that point the installation stopped with ELF RN interpreter /libexec/ld-elf.so.1 not found. And really /libexec is not RN populated yet. RN RNMe too :( RNTo get installworld back on track I used cp under linux emulation to RNcopy ld-elf.so.1. Then I also had to run ldconfig -m /lib. After that RNmake installworld completed successfully. Or you could cd into /usr/obj/usr/src/rescue/rescue and do ./rescue cp ... (as long as you have a working shell) harti -- harti brandt, http://www.fokus.fraunhofer.de/research/cc/cats/employees/hartmut.brandt/private [EMAIL PROTECTED], [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: upgrade from static to dynamic root
On Sun, 14 Sep 2003, Ruslan Ermilov wrote: REOn Thu, Sep 11, 2003 at 02:44:55PM +0200, Harti Brandt wrote: RE RE Hi, RE RE I just tried to upgrade one of my systems from a static root from july to RE an actual dynamic root. The installworld went fine 'til the place where RE /bin/test is installed. At that point the installation stopped with ELF RE interpreter /libexec/ld-elf.so.1 not found. And really /libexec is not RE populated yet. May it be, that the makefile uses one of the newly RE installed tools during install? For example 'ln' to make the link test - RE [? RE REIt shouldn't happen, because we save test and [ in ${INSTALLTMP}. REIt looks like something hardcodes /bin/test. I've grepped the REsrc/ makefiles and cannot find such a place. Where exactly did REit happen in the installworld for you? It installed /bin/test and then failed just when it was going to make the link to '['. Unfortunately this is rather hard to reproduce, unless I roll everything back. harti RE Also, wouldn't it be helpful to populate /rescue before /bin? Just in RE the case something goes wrong between installing been and rescue for the RE first time? RE REGood idea! RE RE RECheers, RE -- harti brandt, http://www.fokus.fraunhofer.de/research/cc/cats/employees/hartmut.brandt/private [EMAIL PROTECTED], [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: upgrade from static to dynamic root
On Mon, Sep 15, 2003 at 09:42:27AM +0200, Harti Brandt wrote: On Sun, 14 Sep 2003, Ruslan Ermilov wrote: REOn Thu, Sep 11, 2003 at 02:44:55PM +0200, Harti Brandt wrote: RE RE Hi, RE RE I just tried to upgrade one of my systems from a static root from july to RE an actual dynamic root. The installworld went fine 'til the place where RE /bin/test is installed. At that point the installation stopped with ELF RE interpreter /libexec/ld-elf.so.1 not found. And really /libexec is not RE populated yet. May it be, that the makefile uses one of the newly RE installed tools during install? For example 'ln' to make the link test - RE [? RE REIt shouldn't happen, because we save test and [ in ${INSTALLTMP}. REIt looks like something hardcodes /bin/test. I've grepped the REsrc/ makefiles and cannot find such a place. Where exactly did REit happen in the installworld for you? It installed /bin/test and then failed just when it was going to make the link to '['. Unfortunately this is rather hard to reproduce, unless I roll everything back. I will see if I can reproduce it on my devbox. Cheers, -- Ruslan Ermilov Sysadmin and DBA, [EMAIL PROTECTED] Sunbay Software Ltd, [EMAIL PROTECTED] FreeBSD committer pgp0.pgp Description: PGP signature
Re: upgrade from static to dynamic root
On Thu, Sep 11, 2003 at 02:44:55PM +0200, Harti Brandt wrote: Hi, I just tried to upgrade one of my systems from a static root from july to an actual dynamic root. The installworld went fine 'til the place where /bin/test is installed. At that point the installation stopped with ELF interpreter /libexec/ld-elf.so.1 not found. And really /libexec is not populated yet. May it be, that the makefile uses one of the newly installed tools during install? For example 'ln' to make the link test - [? Also, wouldn't it be helpful to populate /rescue before /bin? Just in the case something goes wrong between installing been and rescue for the first time? A dynamic root is still a little bit of a no seatbelt kind of activity. We should probably bring back the ${OBJDIR}/bin/sh test and if we fail, install /libexec/ld-elf.so.1 then reattempt the ${OBJDIR}/bin/sh test and continue on with life. -gordon pgp0.pgp Description: PGP signature
Re: upgrade from static to dynamic root
On Thu, Sep 11, 2003 at 02:44:55PM +0200, Harti Brandt wrote: Hi, I just tried to upgrade one of my systems from a static root from july to an actual dynamic root. The installworld went fine 'til the place where /bin/test is installed. At that point the installation stopped with ELF interpreter /libexec/ld-elf.so.1 not found. And really /libexec is not populated yet. May it be, that the makefile uses one of the newly installed tools during install? For example 'ln' to make the link test - [? It shouldn't happen, because we save test and [ in ${INSTALLTMP}. It looks like something hardcodes /bin/test. I've grepped the src/ makefiles and cannot find such a place. Where exactly did it happen in the installworld for you? Also, wouldn't it be helpful to populate /rescue before /bin? Just in the case something goes wrong between installing been and rescue for the first time? Good idea! Cheers, -- Ruslan Ermilov Sysadmin and DBA, [EMAIL PROTECTED] Sunbay Software Ltd, [EMAIL PROTECTED] FreeBSD committer pgp0.pgp Description: PGP signature
upgrade from static to dynamic root
Hi, I just tried to upgrade one of my systems from a static root from july to an actual dynamic root. The installworld went fine 'til the place where /bin/test is installed. At that point the installation stopped with ELF interpreter /libexec/ld-elf.so.1 not found. And really /libexec is not populated yet. May it be, that the makefile uses one of the newly installed tools during install? For example 'ln' to make the link test - [? Also, wouldn't it be helpful to populate /rescue before /bin? Just in the case something goes wrong between installing been and rescue for the first time? harti -- harti brandt, http://www.fokus.fraunhofer.de/research/cc/cats/employees/hartmut.brandt/private [EMAIL PROTECTED], [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to [EMAIL PROTECTED]