Fix python for equo

Anything that pertains to Entropy, Equo or Sulfur

Moderator: Moderators

Post Reply
Freier Radikaler
Simple Hen
Posts: 54
Joined: Tue Dec 03, 2013 16:12

Fix python for equo

Post by Freier Radikaler » Sun Apr 28, 2019 15:44

Hi,

somehow one of the last updates or an interruption of one of these killed one of my Sabayon installations. The box still boots fine but equo as well as emerge isn't working anymore. The error message shows that python seems to be broken so equo can't be executed. However I still have python 2.7 installed but no python 3.*. I can't switch back to python 2.* via eselect as it complains about a missing python-exec2c which however is installed according to eix.
I already tried to reemerge python 3.* via a live cd and "emerge --root /mnt/gentoo" option where the broken sabayon install was mounted there. However this doesn't look promising due to tons of dependency conflicts. Is there are similar approach for sabayon or how can I get back my python 3.* so equo works again? :oops:

Looks like a hen and egg problem...

Stupot
Sagely Hen
Posts: 1733
Joined: Wed Feb 14, 2007 3:44
Location: St. Louis, MO, USA

Re: Fix python for equo

Post by Stupot » Mon Apr 29, 2019 4:43

That is problematic indeed. It really shouldn't have uninstalled python 3 accidentally, so an interruption seems likely.

If you have the live cd, you can boot it up and try to fix it via chroot: https://wiki.sabayon.org/index.php?titl ... m_a_LiveCD

Or probably easier would be to simply save your home directory off somewhere, reinstall, then restore your home directory.

Freier Radikaler
Simple Hen
Posts: 54
Joined: Tue Dec 03, 2013 16:12

Re: Fix python for equo

Post by Freier Radikaler » Mon Apr 29, 2019 12:24

As I already wrote: Getting a chroot isn't the real problem here but to get equo running. Is there a similar way for equo like there is for emerge to change it's root? So I can use the equo of the chroot environment and install stuff to the broken system which is mounted in on of the subdirectories of the chroot environment?
Might it be possible to extract the python binary from the bin package and put it at it's place manually so that equo can be executed? Or are there too many dependencies?

Stupot
Sagely Hen
Posts: 1733
Joined: Wed Feb 14, 2007 3:44
Location: St. Louis, MO, USA

Re: Fix python for equo

Post by Stupot » Mon Apr 29, 2019 19:17

I'm afraid I'm not familiar enough to really walk anyone else through this. I've not needed to rescue an install for years. While I could probably stumble through it myself, I don't know it well enough to assist remotely.
Using chroot should change your root at the system level, so it shouldn't really be equo or emerge specific. It should just be a matter of chrooting properly, then using equo (from the LiveDVD) to install python (on the chrooted mount). Then reboot and finish updating your installation.

Freier Radikaler
Simple Hen
Posts: 54
Joined: Tue Dec 03, 2013 16:12

Re: Fix python for equo

Post by Freier Radikaler » Tue Apr 30, 2019 15:12

Exactly this is the question. Equo requires python to be executed. However if I chroot into my broken system it will use the equo installed in this broken installation which can't be executed as python is missing on this broken chroot environment then. This can only work if I can use the equo outside of the chroot to install stuff inside the chroot or by using a working sabayon chroot environment where equo is pointed to the broken installation to install its stuff there (like I tried with emerge --root ... -config ...). So how can I do this with equo?

Also I have an other issue booting the current Sabayon LiveDVD. See here: viewtopic.php?f=50&t=35179

Might it be possible to just applay all files in dev-lang_python-3.6.6.6c9a67515fb8f48e1aa6c4e0e1de2ef70fa3aa07~0.tar to the broken system so that this python binary can be used by the system to execute equo. If so what tool + parameters lets me apply the content of this package to the broken installation directory system :?:

Fitzcarraldo
Sagely Hen
Posts: 8193
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom
Contact:

Re: Fix python for equo

Post by Fitzcarraldo » Wed May 01, 2019 1:20

Boot a Sabayon Linux KDE LivePenDrive or LiveDVD and enter exactly the following commands as root user:

Code: Select all

[email protected] ~ $ su
sabayon sabayonuser # mkdir /mnt/mychroot
sabayon sabayonuser # mount /dev/sda3 /mnt/mychroot
mount: /mnt/mychroot: unknown filesystem type 'LVM2_member'.                                                                                                                      
sabayon sabayonuser # partitionmanager # Just check the partitions and exit. But you must run partitionmanager.
sabayon sabayonuser # mount /dev/sabayon_sabayon/root /mnt/mychroot
sabayon sabayonuser # mount --rbind /dev /mnt/mychroot/dev
sabayon sabayonuser # mount --make-rslave /mnt/mychroot/dev
sabayon sabayonuser # mount -t proc /proc /mnt/mychroot/proc
sabayon sabayonuser # mount --rbind /sys /mnt/mychroot/sys
sabayon sabayonuser # mount --make-rslave /mnt/mychroot/sys
sabayon sabayonuser # mount --rbind /tmp /mnt/mychroot/tmp
sabayon sabayonuser # chroot /mnt/mychroot /bin/bash
sabayon / # source /etc/profile
sabayon / # env-update
>>> Regenerating /etc/ld.so.cache...
sabayon / # export PS1="(chroot) $PS1"
(chroot) sabayon / # equo search --installed equo
╠  @@ Searching...
╠      @@ Package: app-admin/equo-319 branch: 5, [__system__] 
╠          Installed:     version: 319 ~ tag: NoTag ~ revision: 0
╠          Slot:          0
╠          Homepage:      http://www.sabayon.org 
╠          Description:   Entropy Package Manager text-based 
╠                         client 
╠          License:       GPL-2
╠   Keywords:  equo
╠   Found:     1 entry
(chroot) sabayon / # equo version
319
(chroot) sabayon / # exit
exit
sabayon sabayonuser # umount -R /mnt/mychroot/dev
sabayon sabayonuser # umount -R /mnt/mychroot/sys
sabayon sabayonuser # umount -R /mnt/mychroot/tmp
sabayon sabayonuser # umount -R /mnt/mychroot/proc
sabayon sabayonuser # umount /mnt/mychroot
sabayon sabayonuser # equo search --installed equo
╠  @@ Searching...
╠      @@ Package: app-admin/equo-310 branch: 5, [__system__] 
╠          Installed:     version: 310 ~ tag: NoTag ~ revision: 0
╠          Slot:          0
╠          Homepage:      http://www.sabayon.org 
╠          Description:   Entropy Package Manager text-based 
╠                         client 
╠          License:       GPL-2
╠   Keywords:  equo
╠   Found:     1 entry
sabayon sabayonuser # equo version
310
sabayon sabayonuser #
I used the 'equo search' and 'equo version' commands in the chroot and in the LiveDVD environment just to show that the two environments really are different. As you can see in the output above, the LiveDVD I used has the package equo-310 installed, whereas the installation on the HDD has equo-319 installed.


EDIT: In the above, I just used partitionmanager on the LiveDVD as a trick to simplify mounting the root partition in the LVM group. I could have done it the following way instead:

Code: Select all

[email protected] ~ $ su
sabayon sabayonuser # mkdir /mnt/mychroot
sabayon sabayonuser # mount /dev/sda3 /mnt/mychroot
mount: /mnt/mychroot: unknown filesystem type 'LVM2_member'.
sabayon sabayonuser # pvscan
File descriptor 16 (socket:[30370]) leaked on pvscan invocation. Parent PID 2635: bash
  PV /dev/sda3   VG sabayon_sabayon   lvm2 [39.31 GiB / 4.00 MiB free]
  Total: 1 [39.31 GiB] / in use: 1 [39.31 GiB] / in no VG: 0 [0   ]
sabayon sabayonuser # vgscan
File descriptor 16 (socket:[30370]) leaked on vgscan invocation. Parent PID 2635: bash
  Reading volume groups from cache.
  Found volume group "sabayon_sabayon" using metadata type lvm2
sabayon sabayonuser # vgchange -ay
File descriptor 16 (socket:[30370]) leaked on vgchange invocation. Parent PID 2635: bash
  2 logical volume(s) in volume group "sabayon_sabayon" now active
sabayon sabayonuser # lvscan
File descriptor 16 (socket:[30370]) leaked on lvscan invocation. Parent PID 2635: bash
  ACTIVE            '/dev/sabayon_sabayon/swap' [2.00 GiB] inherit
  ACTIVE            '/dev/sabayon_sabayon/root' [37.31 GiB] inherit
sabayon sabayonuser # mount /dev/sabayon_sabayon/root /mnt/mychroot
sabayon sabayonuser #

Fitzcarraldo
Sagely Hen
Posts: 8193
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom
Contact:

Re: Fix python for equo

Post by Fitzcarraldo » Wed May 01, 2019 11:56

Freier Radikaler,

You could try downloading Python from the Gentoo Tinderbox in your broken installation.

If that does not fix your broken installation, Stupot's suggestion to backup your home directory and re-install Sabayon Linux is probably the easiest course of action.

EDIT: More up-to-date Gentoo Tinderbox with Python here: http://packages.gentooexperimental.org/ ... /dev-lang/

Post Reply