Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
most efficient way to reinstall gentoo in place[SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
mikefot
l33t
l33t


Joined: 19 Nov 2014
Posts: 627

PostPosted: Thu Apr 30, 2020 11:31 am    Post subject: most efficient way to reinstall gentoo in place[SOLVED] Reply with quote

Dear All,

I am interested to figure out the most efficient way of reinstalling gentoo in place.

I am running gentoo stable on an hp laptop running an amd athlon processor.

I have got a recalcitrant circular dependency problem at present.

With help from the gentoo forum users I might be able to fix it.

But if not then I will likely reinstall gentoo.

Since I already have the disk partitions and the make.conf files se up correctly for the current installation
could I simply just unmerge every package in the current distro and then reinstall from the latest gentoo tar file download?

Would that repopulate the existing file tree with fresh packages and allow a new install to be made from scratch that will circumvent the circular dependencies?

What would be most efficient command to use here?

I can mount the gentoo distribution on top of a debian distro I have on the same laptop using chroot to make things easier.

Comments appreciated.

Regards

Michael Fothergill


Last edited by mikefot on Sun May 03, 2020 6:44 am; edited 1 time in total
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


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

PostPosted: Thu Apr 30, 2020 11:54 am    Post subject: Reply with quote

reinstall extremely unlikely to solve circular dependencies
suggest post the command and its output from the chroot, guessing you were doing the initial portage update
Code:
emerge --nodeps wgetpaste
emerge -avuND world | wgetpaste -t

and post the url returned here

--nodeps to guarantee emerge will not try to update dependencies while installing wgetpaste (very unlikely it will try)
_________________
Defund the FCC.
Back to top
View user's profile Send private message
mikefot
l33t
l33t


Joined: 19 Nov 2014
Posts: 627

PostPosted: Thu Apr 30, 2020 5:35 pm    Post subject: Reply with quote

Many thanks for your response and suggestions.

The
Code:
emerge --nodeps
suggestion was a helpful one.

Changing the use flag to -crypt did not help.

What is weird is that at present for some reason or other the connection to the gentoo mirror site is does not work.

I cannot fetch the files to emerge them.


I am also getting this portage invalid group error message..... Portage user or group missing etc.

But running gentoo on the other PC I have here works fine. And so is the internet connection in the debian
OS I have chrooted gentoo into. Strange stuff.

The other PC with gentoo installed can fetch files from the identical mirror site just fine and emerge them. I checked it today.

Comments appreciated.

Regards

MF
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


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

PostPosted: Thu Apr 30, 2020 9:04 pm    Post subject: Reply with quote

Quote:
I am also getting this portage invalid group error message..... Portage user or group missing etc.

see https://forums.gentoo.org/viewtopic-p-7489550.html

you should get error messages if fetch fails
if you post them someone may be able to guess what they mean
do you have internet connection when in the chroot?
ping your router/gateway ---works?
ping -c2 8.8.8.8 ---works?
ping -c2 google.com ---works?
are you hinting that the circular dependencies resolved?
_________________
Defund the FCC.
Back to top
View user's profile Send private message
mikefot
l33t
l33t


Joined: 19 Nov 2014
Posts: 627

PostPosted: Fri May 01, 2020 8:13 am    Post subject: Reply with quote

Many thanks for your response and suggestions.

You asked whether the emerge --nodeps command had got round the circular dependency problem.

Here is the output from a world update command using it:

Code:
flatus / # !383
emerge --nodeps @world
portage: 'portage' user or group missing.
         For the defaults, line 1 goes into passwd, and 2 into group.
         portage:x:250:250:portage:/var/tmp/portage:/bin/false
         portage::250:portage
*** WARNING ***  For security reasons, only system administrators should be
*** WARNING ***  allowed in the portage group.  Untrusted users or processes
*** WARNING ***  can potentially exploit the portage group for attacks such as
*** WARNING ***  local privilege escalation.


>>> Verifying ebuild manifests
>>> Running pre-merge checks for sys-devel/gcc-9.3.0
chgrp: invalid group: ‘portage’
chgrp: invalid group: ‘portage’
chgrp: invalid group: ‘portage’
chgrp: invalid group: ‘portage’
chgrp: invalid group: ‘portage’
chgrp: invalid group: ‘portage’
chgrp: invalid group: ‘portage’
chgrp: invalid group: ‘portage’
chgrp: invalid group: ‘portage’
chgrp: invalid group: ‘portage’
chgrp: invalid group: ‘portage’
chgrp: invalid group: ‘portage’
chgrp: invalid group: ‘portage’
chgrp: invalid group: ‘portage’
chgrp: invalid group: ‘portage’
chgrp: invalid group: ‘portage’
chgrp: invalid group: ‘portage’
chgrp: invalid group: ‘portage’
chgrp: invalid group: ‘portage’
chgrp: invalid group: ‘portage’
chgrp: invalid group: ‘portage’
chgrp: invalid group: ‘portage’
chgrp: invalid group: ‘portage’
chgrp: invalid group: ‘portage’
chgrp: invalid group: ‘portage’
chgrp: invalid group: ‘portage’
chgrp: invalid group: ‘portage’
chgrp: invalid group: ‘portage’
chgrp: invalid group: ‘portage’
chgrp: invalid group: ‘portage’
chgrp: invalid group: ‘portage’
chgrp: invalid group: ‘portage’
chgrp: invalid group: ‘portage’
chgrp: invalid group: ‘portage’
chgrp: invalid group: ‘portage’
chgrp: invalid group: ‘portage’
chgrp: invalid group: ‘portage’
chgrp: invalid group: ‘portage’
chgrp: invalid group: ‘portage’
chgrp: invalid group: ‘portage’
chgrp: invalid group: ‘portage’
chgrp: invalid group: ‘portage’
chgrp: invalid group: ‘portage’
chgrp: invalid group: ‘portage’
chgrp: invalid group: ‘portage’
chgrp: invalid group: ‘portage’
chgrp: invalid group: ‘portage’
chgrp: invalid group: ‘portage’
portage: 'portage' user or group missing.
         For the defaults, line 1 goes into passwd, and 2 into group.
         portage:x:250:250:portage:/var/tmp/portage:/bin/false
         portage::250:portage
*** WARNING ***  For security reasons, only system administrators should be
*** WARNING ***  allowed in the portage group.  Untrusted users or processes
*** WARNING ***  can potentially exploit the portage group for attacks such as
*** WARNING ***  local privilege escalation.


>>> Emerging (1 of 67) sys-apps/findutils-4.7.0::gentoo
 * Fetching files in the background.
 * To view fetch progress, run in another terminal:
 * tail -f /var/log/emerge-fetch.log
>>> Downloading 'https://mirror.bytemark.co.uk/gentoo/distfiles/findutils-4.7.0.tar.xz'
--2020-05-01 09:08:14--  https://mirror.bytemark.co.uk/gentoo/distfiles/findutils-4.7.0.tar.xz
Resolving mirror.bytemark.co.uk... failed: Device or resource busy.
wget: unable to resolve host address ‘mirror.bytemark.co.uk’
>>> Downloading 'https://artfiles.org/gnu.org/findutils/findutils-4.7.0.tar.xz'
--2020-05-01 09:08:14--  https://artfiles.org/gnu.org/findutils/findutils-4.7.0.tar.xz
Resolving artfiles.org... failed: Device or resource busy.
wget: unable to resolve host address ‘artfiles.org’
>>> Downloading 'https://ftp.gnu.org/gnu/findutils/findutils-4.7.0.tar.xz'
--2020-05-01 09:08:14--  https://ftp.gnu.org/gnu/findutils/findutils-4.7.0.tar.xz
Resolving ftp.gnu.org... failed: Device or resource busy.
wget: unable to resolve host address ‘ftp.gnu.org’
>>> Downloading 'https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/findutils/findutils-4.7.0.tar.xz'
--2020-05-01 09:08:14--  https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/findutils/findutils-4.7.0.tar.xz
Resolving www.mirrorservice.org... failed: Device or resource busy.
wget: unable to resolve host address ‘www.mirrorservice.org’
!!! Couldn't download 'findutils-4.7.0.tar.xz'. Aborting.
 * Fetch failed for 'sys-apps/findutils-4.7.0', Log file:
 *  '/var/tmp/portage/sys-apps/findutils-4.7.0/temp/build.log'

>>> Failed to emerge sys-apps/findutils-4.7.0, Log file:

>>>  '/var/tmp/portage/sys-apps/findutils-4.7.0/temp/build.log'

 * Messages for package sys-apps/findutils-4.7.0:

 * Fetch failed for 'sys-apps/findutils-4.7.0', Log file:
 *  '/var/tmp/portage/sys-apps/findutils-4.7.0/temp/build.log'
flatus / #



It says to me that the world update might actually succeed here if I could fix the problem of fetching the source code files from the mirror sites.....

It also lists the funny portage group errors discussed in an earlier post.

I will try out some of the ping commands you suggested and see what they do.

Regards

MF

PS Here is some ping output:

Code:
flatus / # ping -c2 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=57 time=23.3 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=57 time=22.10 ms

--- 8.8.8.8 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 3ms
rtt min/avg/max/mdev = 22.981/23.141/23.302/0.221 ms
flatus / #


and

Code:
flatus / # ping -c2 www.google.com
ping: www.google.com: System error
flatus / # ping -c 3 www.google.com
ping: www.google.com: System error
flatus / #


and

Code:
flatus / # ping -c 3 66.249.93.104
PING 66.249.93.104 (66.249.93.104) 56(84) bytes of data.
64 bytes from 66.249.93.104: icmp_seq=1 ttl=109 time=30.1 ms
64 bytes from 66.249.93.104: icmp_seq=2 ttl=109 time=30.2 ms
64 bytes from 66.249.93.104: icmp_seq=3 ttl=109 time=30.1 ms

--- 66.249.93.104 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 5ms
rtt min/avg/max/mdev = 30.072/30.125/30.161/0.038 ms
flatus / #


This last one suggests that the problem I have is with name resolving....

Suggestions on fixing this would be appreciated.

I ran this command:

Code:
flatus / # grep -E '^hosts' /etc/nsswitch.conf
grep: /etc/nsswitch.conf: No such file or directory
flatus / #


The output should be

hosts: files dns

So it does look as though this could be the issue.


Code:
flatus / # ip route show default
default via 192.168.0.1 dev enp0s10 proto dhcp metric 100
default via 192.168.0.1 dev wlan0 proto dhcp metric 600
flatus / #


I don't know how to ping the router I use.

MF

PPS

My resolv.conf file looks like this:

Code:
flatus / # more /etc/resolv.conf
# Generated by dhcpcd from enp0s10.dhcp, enp0s10.ra
# /etc/resolv.conf.head can replace this line
domain Home
nameserver 192.168.0.1
nameserver fdee:615d:e88b:0:a2bd:cdff:fe72:2000
# /etc/resolv.conf.tail can replace this line
flatus / #



The last line looks a bit funny to me.

I don't have
Code:
dig
insralled on gentoo here but it is installed on the debian OS that my gentoo chroot is sitting on,

Running dig on the underlying debian OS works:

Code:
root@flatus:/home/mikef# dig www.google.com

; <<>> DiG 9.10.3-P4-Debian <<>> www.google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 23874
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;www.google.com.         IN   A

;; ANSWER SECTION:
www.google.com.      60   IN   A   216.239.38.120

;; Query time: 20 msec
;; SERVER: 192.168.0.1#53(192.168.0.1)
;; WHEN: Fri May 01 10:09:49 BST 2020
;; MSG SIZE  rcvd: 48

root@flatus:/home/mikef


There is no nsswitch.conf file in my gentoo install. Is that a critical issue?




[
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


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

PostPosted: Fri May 01, 2020 11:38 am    Post subject: Reply with quote

https://forums.gentoo.org/viewtopic-p-7489550.html should contain a fix for the portage group errors, recommend trying them
_________________
Defund the FCC.
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


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

PostPosted: Fri May 01, 2020 12:48 pm    Post subject: Reply with quote

Quote:
My resolv.conf file looks like this:

Code:
flatus / # more /etc/resolv.conf
# Generated by dhcpcd from enp0s10.dhcp, enp0s10.ra
# nstld.verisign-grs.com.
domain Home
nameserver 192.168.0.1
nameserver fdee:615d:e88b:0:a2bd:cdff:fe72:2000
# /etc/resolv.conf.tail can replace this line
flatus / #

copying the debian resolv.conf into the gentoo install per the handbook seems to be problematic. Suggest /etc/resolv.conf in chroot be edited to:
Code:
nameserver 192.168.0.1
nameserver 8.8.8.8
nameserver fdee:615d:e88b:0:a2bd:cdff:fe72:2000

nameserver entries in order: your router for speed
google public name server for reliability
nstld.verisign-grs.com. server for ipv6 (from your existing info)
Quote:
# /etc/resolv.conf.tail can replace this line
is to remind you that you can create a file /etc/resolv.conf.tail containing nameserver entries that will replace those read from /etc/resolv.conf This allows for human user override of automatically generated name server lists.
_________________
Defund the FCC.
Back to top
View user's profile Send private message
mikefot
l33t
l33t


Joined: 19 Nov 2014
Posts: 627

PostPosted: Fri May 01, 2020 1:41 pm    Post subject: Reply with quote

Many thanks for your help with this.

I have fixed the resolv.conf file as you recommended.

I need glibc but can't emerge it.

Neddy Seagoon knew of a gentoo developer web page which had fresh binaries on it uncluding e.g. glibc etc.

He also knew which directory in gentoo the binary needed to be parked in any soft links or other fancy
stuff you needed to put in place to get gentoo use the binary.

I did it once when I had unmerged glibc by mistake and it worked well.

But I have forgotten where the binaries live and the other instructions so I can't do it again now.

Regards

MF
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


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

PostPosted: Fri May 01, 2020 1:44 pm    Post subject: Reply with quote

are you still seeing the portage group errors?

what error messages from emerge -uND glibc ?

This Neddy work of art? https://forums.gentoo.org/viewtopic-t-1047564-start-0.html
_________________
Defund the FCC.
Back to top
View user's profile Send private message
mikefot
l33t
l33t


Joined: 19 Nov 2014
Posts: 627

PostPosted: Fri May 01, 2020 2:08 pm    Post subject: Reply with quote

Many thanks for your response,

I ran the emerge -uND glibc command you suggested:

See here

https://paste.debian.net/1144145/

The portage errors are still present.

I tried the chmod command in the link you provided but it didn't fix the problem.

I also ran
Code:
emerge --nodeps -uND glibc


The build.log file for this is here:

https://paste.debian.net/1144146/

The output of
Code:
emerge --info '=sys-libs/glibc-2.29-r8::gentoo'
is here:

https://paste.debian.net/1144147/

Suggestions appreciated.

Regards

MF
Back to top
View user's profile Send private message
GDH-gentoo
Apprentice
Apprentice


Joined: 20 Jul 2019
Posts: 264
Location: South America

PostPosted: Fri May 01, 2020 2:45 pm    Post subject: Re: most efficient way to reinstall gentoo in place........ Reply with quote

mikefot wrote:
I also ran
Code:
emerge --nodeps -uND glibc


The build.log file for this is here:

https://paste.debian.net/1144146/
Code:
make -j3 -s glibc-test
cc: error trying to exec 'as': execvp: No such file or directory
glibc-test.c:1:10: fatal error: unistd.h: No such file or directory
 #include <unistd.h>
          ^~~~~~~~~~
compilation terminated.
make: *** [<builtin>: glibc-test] Error 2

mikefot wrote:
The output of
Code:
emerge --info '=sys-libs/glibc-2.29-r8::gentoo'
is here:

https://paste.debian.net/1144147/
Code:
Portage 2.3.66 (python 3.6.5-final-0, default/linux/amd64/17.0, gcc-8.3.0, unavailable, 4.9.0-9-amd64 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.9.0-9-amd64-x86_64-AMD_Athlon-tm-_64_X2_Dual-Core_Processor_TK-57-with-gentoo-2.6
KiB Mem:     1986260 total,    277232 free
KiB Swap:    2177020 total,   2166892 free
Timestamp of repository gentoo: Wed, 29 Apr 2020 19:00:01 +0000
Head commit of repository gentoo: 95b02b1136ba1544e770910644daf4fc804c3ec9
sh bash 4.4_p23-r1
distcc 3.3.2 x86_64-pc-linux-gnu [disabled]
app-shells/bash:          4.4_p23-r1::gentoo
dev-lang/perl:            5.30.1::gentoo
dev-lang/python:          3.6.5::gentoo
dev-util/cmake:           3.14.3::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/openrc:          0.41.2::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.69-r4::gentoo
sys-devel/automake:       1.16.1-r1::gentoo
sys-devel/gcc:            8.3.0-r1::gentoo
sys-devel/gcc-config:     2.0::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 4.14-r1::gentoo (virtual/os-headers)
Repositories:
It seems the system you are using to reinstall the package no longer has a preexisting, working libc, and no longer has GNU Binutils installed. If that's the case, you broke your system. It looks like you'll have to go the binary packages repository route to repair it, if still feasible, or just reinstall the system.

mikefot wrote:
Since I already have the disk partitions and the make.conf files se up correctly for the current installation
could I simply just unmerge every package in the current distro and then reinstall from the latest gentoo tar file download?
"Unmerge" as in doing emerge --unmerge? Highly unlikely. At some point in the process, you'll uninstall critical packages and remove all the tools needed to install the stage3 archive...
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


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

PostPosted: Fri May 01, 2020 5:45 pm    Post subject: Reply with quote

run
Code:
whoami
users
groups
groups $(whoami) 
groups $(users)
 

from the chroot and post the results

were you root in debian when you entered the chroot?
are you root in the chroot?
are you in the portage group in the chroot?
_________________
Defund the FCC.
Back to top
View user's profile Send private message
mikefot
l33t
l33t


Joined: 19 Nov 2014
Posts: 627

PostPosted: Fri May 01, 2020 7:01 pm    Post subject: Reply with quote

Many thanks for your response and suggestions.

I went in to the
Code:
/
directory and ran
Code:
 tar xpvf stage3-*.tar.xz --xattrs-include='*.*' --numeric-owner

and reinstalled the stage3 tarball.

This cured the missing binutils and glibc problem and I could
Code:
emerge glibc
and fetch files from the mirrors.

It has created some file collision grumbles but not too worrying overall.

The circular dependency problem has gone away.

I ran
Code:
emerge-webrsync
successfully.

I am getting some problems some blocked packages when trying to run deep world updates.

I will bat on with this and post blocked package problems if I can't fix them myself.

More on this later.

Regards

MF


Last edited by mikefot on Sat May 02, 2020 6:34 am; edited 1 time in total
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


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

PostPosted: Fri May 01, 2020 7:33 pm    Post subject: Reply with quote

Good show.
_________________
Defund the FCC.
Back to top
View user's profile Send private message
mikefot
l33t
l33t


Joined: 19 Nov 2014
Posts: 627

PostPosted: Sat May 02, 2020 6:33 am    Post subject: Reply with quote

Many thanks again.

The deep world update has worked.

I ran
Code:
emerge depclean
and 252 packages were removed.

I have done
Code:
perl-cleaner --all
and
Code:
revdep-rebuild -v
.

This was a crude way of fixing the circular dependency problem.

Any diagnostics/updates I should run to check the system really is fixed would be appreciated.

Cheers

MF
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
Page 1 of 1

 
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