View previous topic :: View next topic |
Author |
Message |
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Sat Sep 14, 2013 3:25 am Post subject: |
|
|
sleep well _________________ Defund the FCC. |
|
Back to top |
|
|
auddoula Guru
Joined: 30 Apr 2008 Posts: 387
|
Posted: Sat Sep 14, 2013 12:20 pm Post subject: |
|
|
DONAHUE wrote: | sleep well |
Thank you, I slept fairly well... I have a few weekend errands to do but then I will stop by my office to continue this saga. If you want to suggest further steps ahead of time that would be great. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54300 Location: 56N 3W
|
Posted: Sat Sep 14, 2013 12:32 pm Post subject: |
|
|
auddoula,
Code: | Portage 2.2.1 (default/linux/amd64/13.0/desktop/kde, gcc-4.4.5, glibc-2.15-r3, 3.4.52-std371-amd64 x86_64) |
Shows you are using gcc-4.4.5, which is old.
If you have been doing regular updates, you should have gcc-4.6.3, which has been stable for a long time.
Do and use gcc-config to select your most recent gcc. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
auddoula Guru
Joined: 30 Apr 2008 Posts: 387
|
Posted: Sat Sep 14, 2013 1:08 pm Post subject: |
|
|
NeddySeagoon wrote: | auddoula,
Code: | Portage 2.2.1 (default/linux/amd64/13.0/desktop/kde, gcc-4.4.5, glibc-2.15-r3, 3.4.52-std371-amd64 x86_64) |
Shows you are using gcc-4.4.5, which is old.
If you have been doing regular updates, you should have gcc-4.6.3, which has been stable for a long time.
Do and use gcc-config to select your most recent gcc. | Thank you, I am afraid the latest version of gcc I have is 4.5.3, as you can see from an output on the previous page. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54300 Location: 56N 3W
|
Posted: Sat Sep 14, 2013 1:59 pm Post subject: |
|
|
auddoula,
Ok, try gcc-4.5.3 and see if that produces the same error please. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
auddoula Guru
Joined: 30 Apr 2008 Posts: 387
|
Posted: Sat Sep 14, 2013 2:41 pm Post subject: |
|
|
NeddySeagoon wrote: | auddoula,
Ok, try gcc-4.5.3 and see if that produces the same error please. |
Right, we have done just that. But we still receive similar errors, as you can see from some detailed posts on the previous page. here is a sample:
* ERROR: sys-devel/libtool-2.4-r1::gentoo failed (configure phase):
* econf failed
*
* Call stack:
* ebuild.sh, line 93: Called src_configure
* environment, line 2972: Called default
* phase-functions.sh, line 796: Called __eapi2_src_configure
* phase-helpers.sh, line 626: Called econf
* phase-helpers.sh, line 521: Called die
* The specific snippet of code:
* die "econf failed" |
|
Back to top |
|
|
auddoula Guru
Joined: 30 Apr 2008 Posts: 387
|
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54300 Location: 56N 3W
|
Posted: Sat Sep 14, 2013 5:03 pm Post subject: |
|
|
auddoula,
I guess you want to try some binary installs on your system?
Heres the general idea but first a warning ... do not untar the stage3 to your broken system, that will trash it.
You need to make a directory wherever you have about 10G of space and use the stage3 to create a new chroot install, just as the handbook tells.
The only difference is that this will be an install to a dir, so it will not be bootable.
As your normal user, do This creates a directory /home/<username>/rescue but any location will do.
Become root
Code: | cd /home/<username>/rescue
tar xpf </path/to/stage3> -C /home/<username>/rescue |
Check those commands carefully before you press return.
Code: | cp -a /etc/portage /home/<username>/rescue/etc |
I assume you have already moved /etc/make.conf to /etc/portage/make.conf
Code: | cp /etc/resolv.conf /home/<username>/rescue/etc |
Look at the handbook for any other /etc files you need ... I can't think of any.
Edit /home/<username>/rescue/etc/portage/make.conf to add buildpkg to the FEATURES there.
This saves a binary tarball of everything you build in your rescue chroot to /usr/portage/packages
mount /proc and /dev in /home/<username>/rescue as per the handbook.
Now its time to cheat a little and share your portage tree, distfiles and packages between your broken install and rescue chroot.
Code: | mount -o bind /usr/portage /home/<username>/rescue/usr/portage |
If your portage tree, distfiles and packages are not all in /usr/portage, you will need additional steps here.
Follow the handbook chroot steps to chroot into /home/<username>/rescue
Check that your profile is the same inside and outside the chroot.
Check that /usr/portage and /usr/portage/distfiles are both populated in the chroot.
Inside the chroot, emerge something simple to test ...
Outside the chroot do Code: | emerge wgetpaste -Kav |
If all is well, emerge will offer to install the binary wgetpaste you just made in the chroot.
Now you can try something more complex, like inside the chroot and outside.
Don't forget gcc-config outside the chroot.
There are lots of nuances I'm not explaining in detail but its a handbook install in a dir borrowing bits from your broken install to make sure the setup is identical, so that binaries produced by the chroot match your system.
When you are happy that your broken system works, you can remove /home/<username>/rescue _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Sat Sep 14, 2013 5:32 pm Post subject: |
|
|
@NeddySeagoon
OP original problem was a very old install that was being updated when a power loss occurred. Subsequent boots were read only, some initscripts did not run, and the file system could not be remounted read write.
He has been working in the chroot since.
Would you expect your procedure to work with stage3 extracted in a chroot inside a chroot? _________________ Defund the FCC. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54300 Location: 56N 3W
|
Posted: Sat Sep 14, 2013 6:15 pm Post subject: |
|
|
DONAHUE,
a) as long as he has some writeable space yes.
b) it need not be a chroot inside a chroot.
The process is valid if the OP boots, say systemrescuecd, mounts the broken install at /mnt/gentoo in the normal way but dies not chroot into it, not just yet.
The rescue chroot can be another parallel chroot, say
Code: | mkdir /mnt/gentoo/home/<username>/rescue
mkdir /mnt/rescue
mount -o bind /mnt/gentoo/home/<username>/rescue /mnt/rescue | so that there are two parallel chroots.
This changes the pathnames somewhat but the idea still works as described.
Now in two separate VTs, chroot into both chroots and emerge packages to build binaries in one and install them in the other. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
auddoula Guru
Joined: 30 Apr 2008 Posts: 387
|
Posted: Sat Sep 14, 2013 6:43 pm Post subject: |
|
|
Thank you everyone, I will give this procedure a try and post the results as soon as I am back to my office later this afternoon. There is much to learn about Gentoo..
Last edited by auddoula on Sat Sep 14, 2013 6:53 pm; edited 1 time in total |
|
Back to top |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Sat Sep 14, 2013 6:46 pm Post subject: |
|
|
@NeddySeagoon
Thanks.
random question: Do you know why gcc-config now calls /lib64/rc/sh/functions.sh via symlink /etc/init.d/functions.sh and dies if functions.sh is not found? functions.sh is provided by openrc. inconvenient when trying to upgrade an openrc that is old and did not provide functions.sh. _________________ Defund the FCC. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54300 Location: 56N 3W
|
Posted: Sat Sep 14, 2013 7:06 pm Post subject: |
|
|
DONAHUE,
random answer ... No, I was not even aware that function.sh had moved. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
auddoula Guru
Joined: 30 Apr 2008 Posts: 387
|
Posted: Sat Sep 14, 2013 8:18 pm Post subject: |
|
|
NeddySeagoon wrote: | auddoula,
I guess you want to try some binary installs on your system?
Heres the general idea but first a warning ... do not untar the stage3 to your broken system, that will trash it.
You need to make a directory wherever you have about 10G of space and use the stage3 to create a new chroot install, just as the handbook tells.
The only difference is that this will be an install to a dir, so it will not be bootable.
As your normal user, do This creates a directory /home/<username>/rescue but any location will do.
Become root
Code: | cd /home/<username>/rescue
tar xpf </path/to/stage3> -C /home/<username>/rescue |
Check those commands carefully before you press return.
Code: | cp -a /etc/portage /home/<username>/rescue/etc |
I assume you have already moved /etc/make.conf to /etc/portage/make.conf
Code: | cp /etc/resolv.conf /home/<username>/rescue/etc |
Look at the handbook for any other /etc files you need ... I can't think of any.
Edit /home/<username>/rescue/etc/portage/make.conf to add buildpkg to the FEATURES there.
This saves a binary tarball of everything you build in your rescue chroot to /usr/portage/packages
mount /proc and /dev in /home/<username>/rescue as per the handbook.
| Please, forgive me for my ignorance, I am more of a user than an administrator although I am forced to take care of my machine. I compkleted above steps, and I am in editing make.conf in 'rescue' subdirectory (here is a copy http://bpaste.net/show/132478/). I have two terminals in front of me, one chroot of the broken system, and the other livecd root. What I am not clear is whether I should proceed with the next steps from the existing chroot or livecd root account. |
|
Back to top |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Sat Sep 14, 2013 8:44 pm Post subject: |
|
|
in the chroot: Code: | mkdir rescue
cd rescue
wget http://distfiles.gentoo.org/releases/amd64/autobuilds/current-stage3/stage3-amd64-20130822.tar.bz2
tar xvjpf stage3-*.tar.bz2
cp -a /etc/portage etc
cp /etc/resolv.conf etc
nano etc/portage/make.conf
| add Quote: | FEATURES="buildpkg" | if there is not a current FEATURES= ;if there is already is a FEATURES= ,add buildpkg to it
make a second chroot in the first chroot: Code: |
mount -t proc none /root/rescue/proc
mount --rbind /sys /root/rescue/sys
mount --rbind /dev /root/rescue/dev
chroot /root/rescue /bin/bash
source /etc/profile
export PS1="(rescue chroot) $PS1" |
edit of source line reove portage line
more to be added _________________ Defund the FCC.
Last edited by DONAHUE on Sat Sep 14, 2013 9:31 pm; edited 4 times in total |
|
Back to top |
|
|
auddoula Guru
Joined: 30 Apr 2008 Posts: 387
|
Posted: Sat Sep 14, 2013 9:13 pm Post subject: |
|
|
DONAHUE wrote: |
mount -t proc none mnt/gentoo/proc
[/code]
| I am in chroot in the rescue directory, the above command yields an error:
mount -t proc none mnt/gentoo/proc
mount: mount point mnt/gentoo/proc does not exist
perhaps you meant
Code: |
mount -t proc none mnt/proc |
|
|
Back to top |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Sat Sep 14, 2013 9:20 pm Post subject: |
|
|
you are faster than I anticipated corrected above _________________ Defund the FCC. |
|
Back to top |
|
|
auddoula Guru
Joined: 30 Apr 2008 Posts: 387
|
Posted: Sat Sep 14, 2013 9:21 pm Post subject: |
|
|
I stlle get an error:
mount -t proc none /root/rescue/proc
mount: mount point /root/rescue/proc does not exist |
|
Back to top |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Sat Sep 14, 2013 9:26 pm Post subject: |
|
|
ls /root/rescue _________________ Defund the FCC. |
|
Back to top |
|
|
auddoula Guru
Joined: 30 Apr 2008 Posts: 387
|
Posted: Sat Sep 14, 2013 9:27 pm Post subject: |
|
|
I think it should be
mount -t proc none /home/user_name/rescue/proc |
|
Back to top |
|
|
auddoula Guru
Joined: 30 Apr 2008 Posts: 387
|
Posted: Sat Sep 14, 2013 9:27 pm Post subject: |
|
|
DONAHUE wrote: | ls /root/rescue |
ls /root/rescue
ls: cannot access /root/rescue: No such file or directory |
|
Back to top |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Sat Sep 14, 2013 9:32 pm Post subject: |
|
|
does your prompt say you are in the rescue chroot? _________________ Defund the FCC. |
|
Back to top |
|
|
auddoula Guru
Joined: 30 Apr 2008 Posts: 387
|
Posted: Sat Sep 14, 2013 9:38 pm Post subject: |
|
|
DONAHUE wrote: | does your prompt say you are in the rescue chroot? |
there are a number of entries of this, most pertaining seems to be :
/usr/src/linux-2.6.34-gentoo-r6/arch/cris/boot/rescue
However, isn't it easier just do 'pwd' from the rescue directory I am in?
that would yield /home/usera_name/rescue
but this does not show up in locate since it probably did not get updated properly.. just my naive guess. |
|
Back to top |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Sat Sep 14, 2013 9:39 pm Post subject: |
|
|
ls /root/rescue in the resccd terminal
mount -o bind /usr/portage /root/rescue/usr/portage failed because
we never unpacked a portage snapshot and that was confusion _________________ Defund the FCC. |
|
Back to top |
|
|
auddoula Guru
Joined: 30 Apr 2008 Posts: 387
|
Posted: Sat Sep 14, 2013 9:40 pm Post subject: |
|
|
my prompt says
sysresccd rescue #
I am pretty sure it is chroot since the other terminal (new) says : root@sysresccd |
|
Back to top |
|
|
|