Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Broken system: no root account, read only user account
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3, 4, 5, 6 ... 26, 27, 28  Next  
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7552
Location: Goose Creek SC

PostPosted: Sat Sep 14, 2013 3:25 am    Post subject: Reply with quote

sleep well
_________________
Defund the FCC.
Back to top
View user's profile Send private message
auddoula
Guru
Guru


Joined: 30 Apr 2008
Posts: 387

PostPosted: Sat Sep 14, 2013 12:20 pm    Post subject: Reply with quote

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
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43192
Location: 56N 3W

PostPosted: Sat Sep 14, 2013 12:32 pm    Post subject: Reply with quote

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
Code:
gcc-config -l
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
View user's profile Send private message
auddoula
Guru
Guru


Joined: 30 Apr 2008
Posts: 387

PostPosted: Sat Sep 14, 2013 1:08 pm    Post subject: Reply with quote

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
Code:
gcc-config -l
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
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43192
Location: 56N 3W

PostPosted: Sat Sep 14, 2013 1:59 pm    Post subject: Reply with quote

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
View user's profile Send private message
auddoula
Guru
Guru


Joined: 30 Apr 2008
Posts: 387

PostPosted: Sat Sep 14, 2013 2:41 pm    Post subject: Reply with quote

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
View user's profile Send private message
auddoula
Guru
Guru


Joined: 30 Apr 2008
Posts: 387

PostPosted: Sat Sep 14, 2013 4:17 pm    Post subject: Reply with quote

Hi,
I downloaded the the current stage3 tarball http://mirrors.rit.edu/gentoo/releases/amd64/current-stage3/. If you have suggestions about the next steps, please let me know.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43192
Location: 56N 3W

PostPosted: Sat Sep 14, 2013 5:03 pm    Post subject: Reply with quote

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
Code:
mkdir ~/rescue
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 ...
Code:
emerge wgetpaste

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
Code:
emerge gcc
inside the chroot and
Code:
emerge -K1 gcc
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
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7552
Location: Goose Creek SC

PostPosted: Sat Sep 14, 2013 5:32 pm    Post subject: Reply with quote

@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
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43192
Location: 56N 3W

PostPosted: Sat Sep 14, 2013 6:15 pm    Post subject: Reply with quote

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
View user's profile Send private message
auddoula
Guru
Guru


Joined: 30 Apr 2008
Posts: 387

PostPosted: Sat Sep 14, 2013 6:43 pm    Post subject: Reply with quote

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
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7552
Location: Goose Creek SC

PostPosted: Sat Sep 14, 2013 6:46 pm    Post subject: Reply with quote

@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
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43192
Location: 56N 3W

PostPosted: Sat Sep 14, 2013 7:06 pm    Post subject: Reply with quote

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
View user's profile Send private message
auddoula
Guru
Guru


Joined: 30 Apr 2008
Posts: 387

PostPosted: Sat Sep 14, 2013 8:18 pm    Post subject: Reply with quote

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
Code:
mkdir ~/rescue
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
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7552
Location: Goose Creek SC

PostPosted: Sat Sep 14, 2013 8:44 pm    Post subject: Reply with quote

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
View user's profile Send private message
auddoula
Guru
Guru


Joined: 30 Apr 2008
Posts: 387

PostPosted: Sat Sep 14, 2013 9:13 pm    Post subject: Reply with quote

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
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7552
Location: Goose Creek SC

PostPosted: Sat Sep 14, 2013 9:20 pm    Post subject: Reply with quote

you are faster than I anticipated corrected above
_________________
Defund the FCC.
Back to top
View user's profile Send private message
auddoula
Guru
Guru


Joined: 30 Apr 2008
Posts: 387

PostPosted: Sat Sep 14, 2013 9:21 pm    Post subject: Reply with quote

I stlle get an error:
mount -t proc none /root/rescue/proc
mount: mount point /root/rescue/proc does not exist
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7552
Location: Goose Creek SC

PostPosted: Sat Sep 14, 2013 9:26 pm    Post subject: Reply with quote

ls /root/rescue
_________________
Defund the FCC.
Back to top
View user's profile Send private message
auddoula
Guru
Guru


Joined: 30 Apr 2008
Posts: 387

PostPosted: Sat Sep 14, 2013 9:27 pm    Post subject: Reply with quote

I think it should be
mount -t proc none /home/user_name/rescue/proc
Back to top
View user's profile Send private message
auddoula
Guru
Guru


Joined: 30 Apr 2008
Posts: 387

PostPosted: Sat Sep 14, 2013 9:27 pm    Post subject: Reply with quote

DONAHUE wrote:
ls /root/rescue


ls /root/rescue
ls: cannot access /root/rescue: No such file or directory
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7552
Location: Goose Creek SC

PostPosted: Sat Sep 14, 2013 9:32 pm    Post subject: Reply with quote

does your prompt say you are in the rescue chroot?
_________________
Defund the FCC.
Back to top
View user's profile Send private message
auddoula
Guru
Guru


Joined: 30 Apr 2008
Posts: 387

PostPosted: Sat Sep 14, 2013 9:38 pm    Post subject: Reply with quote

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
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7552
Location: Goose Creek SC

PostPosted: Sat Sep 14, 2013 9:39 pm    Post subject: Reply with quote

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
View user's profile Send private message
auddoula
Guru
Guru


Joined: 30 Apr 2008
Posts: 387

PostPosted: Sat Sep 14, 2013 9:40 pm    Post subject: Reply with quote

my prompt says
sysresccd rescue #

I am pretty sure it is chroot since the other terminal (new) says : root@sysresccd
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Goto page Previous  1, 2, 3, 4, 5, 6 ... 26, 27, 28  Next
Page 5 of 28

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum