Mailing List Archive

Reinstall
Hello

After a main HD failure, I'll have to reinstall Gentoo from almost zero - I
have a full and recent copy of the /etc directory and the file
/var/lib/portage/world in a secondary HD (along many personal backups).

Installation basics done, now it is time for an emerge world.

Although the emerge lists is as huge as expected, it doesn't even start,
portage says there are cyclic USE flags that I should avoid at the first
moment, but may restore afterwards.

But it doesn't say which are those USE flags that block each other.

Is there any way to find those better than brute force?

By the way, I also have a copy of all binary packages (I always use the -b
flag while emerging any package) in that second disk. But that didn't help
so far, even trying to use the -K flag. I thought on un-tar'ing those
binary packages by hand, but portage will be unaware of this, not knowing
the packages are installed.

Any hint will be greatly appreciated!

Thanks

Francisco
Re: Reinstall [ In reply to ]
On Wednesday, 11 May 2022 10:57:03 BST Francisco Ares wrote:
> Hello
>
> After a main HD failure, I'll have to reinstall Gentoo from almost zero - I
> have a full and recent copy of the /etc directory and the file
> /var/lib/portage/world in a secondary HD (along many personal backups).
>
> Installation basics done, now it is time for an emerge world.
>
> Although the emerge lists is as huge as expected, it doesn't even start,
> portage says there are cyclic USE flags that I should avoid at the first
> moment, but may restore afterwards.
>
> But it doesn't say which are those USE flags that block each other.
>
> Is there any way to find those better than brute force?
>
> By the way, I also have a copy of all binary packages (I always use the -b
> flag while emerging any package) in that second disk. But that didn't help
> so far, even trying to use the -K flag. I thought on un-tar'ing those
> binary packages by hand, but portage will be unaware of this, not knowing
> the packages are installed.
>
> Any hint will be greatly appreciated!
>
> Thanks
>
> Francisco

Try emerging @system first and see if this succeeds. I recall something
similar on a recent fresh (re)installation, but the USE flags causing the
circular block were reported in the emerge output, so I was able to unset and
reset them at the time.
Re: Reinstall [ In reply to ]
Hi,

What I would suggest is to try yo emerge @world first with a reduced
list of USE flags, maybe the default, and after success you could
introduce back the wanted USE flags and emerge @world once more.

It could be a bit too much compilation, but if you have already binary
packages, it will not be so expensive the second round, IMHO.

Best

On 11/5/22 11:57, Francisco Ares wrote:
> Hello
>
> After a main HD failure, I'll have to reinstall Gentoo from almost
> zero - I have a full and recent copy of the /etc directory and the
> file /var/lib/portage/world in a secondary HD (along many personal
> backups).
>
> Installation basics done, now it is time for an emerge world.
>
> Although the emerge lists is as huge as expected, it doesn't even
> start, portage says there are cyclic USE flags that I should avoid at
> the first moment, but may restore afterwards.
>
> But it doesn't say which are those USE flags that block each other.
>
> Is there any way to find those better than brute force?
>
> By the way, I also have a copy of all binary packages (I always use
> the -b flag while emerging any package) in that second disk. But that
> didn't help so far, even trying to use the -K flag. I thought on
> un-tar'ing those binary packages by hand, but portage will be unaware
> of this, not knowing the packages are installed.
>
> Any hint will be greatly appreciated!
>
> Thanks
>
> Francisco
Re: Reinstall [ In reply to ]
On Wednesday, 11 May 2022 10:57:03 BST Francisco Ares wrote:

> Although the emerge lists is as huge as expected, it doesn't even start,
> portage says there are cyclic USE flags that I should avoid at the first
> moment, but may restore afterwards.
>
> But it doesn't say which are those USE flags that block each other.
>
> Is there any way to find those better than brute force?

Can you paste the few lines showing the first circle? Add -v to the emerge
command to show the USE flags in conflict.

I built a new system a few days ago, and I had to break out of a couple of
cycles, separately of course. I don't remember just what they were at the
moment, but seeing yours should help.

--
Regards,
Peter.
RE: Reinstall [ In reply to ]
And sometimes if you use --binpkg-respect-use=n and/or --with-bdeps=n you can jostle it into using more of the binaries on both passes.

Additionally, you can use the ebuild command directly to force it to just install things without checking all the dependencies, that's sometimes handy for breaking cycles too.

Do pay careful attention to the merge order though. Make sure any updates to glibc happen first or else you'll wedge your system pretty badly. Having static-compiled busybox installed as a backup is often a good idea.

Alternatively, fully update the system before putting in your world file, and then instead of copying in the world file all at once just run a loop to emerge the lines in it one at a time.

LMP

-----Original Message-----
From: David Palao <palao@csc.uni-frankfurt.de>
Sent: Wednesday, May 11, 2022 5:26 AM
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Reinstall

Hi,

What I would suggest is to try yo emerge @world first with a reduced list of USE flags, maybe the default, and after success you could introduce back the wanted USE flags and emerge @world once more.

It could be a bit too much compilation, but if you have already binary packages, it will not be so expensive the second round, IMHO.

Best

On 11/5/22 11:57, Francisco Ares wrote:
> Hello
>
> After a main HD failure, I'll have to reinstall Gentoo from almost
> zero - I have a full and recent copy of the /etc directory and the
> file /var/lib/portage/world in a secondary HD (along many personal
> backups).
>
> Installation basics done, now it is time for an emerge world.
>
> Although the emerge lists is as huge as expected, it doesn't even
> start, portage says there are cyclic USE flags that I should avoid at
> the first moment, but may restore afterwards.
>
> But it doesn't say which are those USE flags that block each other.
>
> Is there any way to find those better than brute force?
>
> By the way, I also have a copy of all binary packages (I always use
> the -b flag while emerging any package) in that second disk. But that
> didn't help so far, even trying to use the -K flag. I thought on
> un-tar'ing those binary packages by hand, but portage will be unaware
> of this, not knowing the packages are installed.
>
> Any hint will be greatly appreciated!
>
> Thanks
>
> Francisco
Re: Reinstall [ In reply to ]
On Wed, 11 May 2022 16:45:31 +0000, Laurence Perkins wrote:

> Alternatively, fully update the system before putting in your world
> file, and then instead of copying in the world file all at once just
> run a loop to emerge the lines in it one at a time.

Now you mention it, that's what I did last time, although my loop emerge
ten lines at a time to cut down on the number of dependency
recalculations.


--
Neil Bothwick

ISDN: It Still Does Nothing
RE: Reinstall [ In reply to ]
> -----Original Message-----
> From: Neil Bothwick <neil@digimed.co.uk>
> Sent: Wednesday, May 11, 2022 11:35 AM
> To: gentoo-user@lists.gentoo.org
> Subject: Re: [gentoo-user] Reinstall
>
> On Wed, 11 May 2022 16:45:31 +0000, Laurence Perkins wrote:
>
> > Alternatively, fully update the system before putting in your world
> > file, and then instead of copying in the world file all at once just
> > run a loop to emerge the lines in it one at a time.
>
> Now you mention it, that's what I did last time, although my loop emerge ten lines at a time to cut down on the number of dependency recalculations.
>
Well, and have it check the exit status and spit any lines that fail into another file to try again later. Then shuffle the new file so the bad ones move around, or do the second pass one at a time.

LMP
Re: Reinstall [ In reply to ]
On 11/05/2022 19:34, Neil Bothwick wrote:
> On Wed, 11 May 2022 16:45:31 +0000, Laurence Perkins wrote:
>
>> Alternatively, fully update the system before putting in your world
>> file, and then instead of copying in the world file all at once just
>> run a loop to emerge the lines in it one at a time.
>
> Now you mention it, that's what I did last time, although my loop emerge
> ten lines at a time to cut down on the number of dependency
> recalculations.
>
>
I seem to remember a harfbuzz loop that was a nightmare to fix ...

Can't remember what it collided with, but if you can manage to emerge
that and the other one, that might cure the loop ...

Cheers,
Wol
Re: Reinstall [ In reply to ]
Good day!

First of all, sorry for the late reply. I had to attend to a course a
bit far away from home and it was pretty intense.

Now, back home, I'll try the suggestions, thanks!

Just for the sake of preventing a future failure, besides personal
files (minimum and obvious) the "world" file and the binary packages,
built along with the package installation, what else should I backup
so that I would be able to quickly restore the same full working
Gentoo in a new hardware without having to work from stage3 up? The
portage tree is one of those items, for sure. But what else?

Thank you all and a good sunday.
Francisco
Re: Reinstall [ In reply to ]
On 2022-06-19, Francisco Ares <frares@gmail.com> wrote:

> Just for the sake of preventing a future failure, besides personal
> files (minimum and obvious) the "world" file and the binary packages,
> built along with the package installation, what else should I backup
> so that I would be able to quickly restore the same full working
> Gentoo in a new hardware without having to work from stage3 up? The
> portage tree is one of those items, for sure. But what else?

Make a backup copy of everything under /etc.

I used to try to backup individual /etc/... files that I would need,
but I always forgot something.

--
Grant
Re: Re: Reinstall [ In reply to ]
On Sunday, 19 June 2022 18:22:34 BST Grant Edwards wrote:
> On 2022-06-19, Francisco Ares <frares@gmail.com> wrote:
> > Just for the sake of preventing a future failure, besides personal
> > files (minimum and obvious) the "world" file and the binary packages,
> > built along with the package installation, what else should I backup
> > so that I would be able to quickly restore the same full working
> > Gentoo in a new hardware without having to work from stage3 up? The
> > portage tree is one of those items, for sure. But what else?
>
> Make a backup copy of everything under /etc.
>
> I used to try to backup individual /etc/... files that I would need,
> but I always forgot something.
>
> --
> Grant

Yes, besides /var/lib/portage/world and /etc/ you may also want to back up
your /boot and kernel config, assuming the hardware (MoBo & peripherals) is the
same (same drivers). I wouldn't bother backing up portage, a resync will
download it afresh. You might want to save /distfiles if you're on a slow
Internet link, but it has to be a copy of the current versions, otherwise the
latest version of each package source will have to be downloaded anyway.

If you're running databases you'll also want to keep a backup of the
respective /var/lib/*sql directory and if you're running a webserver /var/www/
* - but you would be aware of the need to keep a fresh backup of all this data
anyway.
Re: Re: Reinstall [ In reply to ]
Em dom., 19 de jun. de 2022 às 14:22, Grant Edwards
<grant.b.edwards@gmail.com> escreveu:
>
> On 2022-06-19, Francisco Ares <frares@gmail.com> wrote:
>
> > Just for the sake of preventing a future failure, besides personal
> > files (minimum and obvious) the "world" file and the binary packages,
> > built along with the package installation, what else should I backup
> > so that I would be able to quickly restore the same full working
> > Gentoo in a new hardware without having to work from stage3 up? The
> > portage tree is one of those items, for sure. But what else?
>
> Make a backup copy of everything under /etc.
>
> I used to try to backup individual /etc/... files that I would need,
> but I always forgot something.
>
> --
> Grant
>
>
>
>

Good point, thanks!

Francisco
Re: Re: Reinstall [ In reply to ]
Em dom., 19 de jun. de 2022 às 14:33, Michael
<confabulate@kintzios.com> escreveu:
>
> On Sunday, 19 June 2022 18:22:34 BST Grant Edwards wrote:
> > On 2022-06-19, Francisco Ares <frares@gmail.com> wrote:
> > > Just for the sake of preventing a future failure, besides personal
> > > files (minimum and obvious) the "world" file and the binary packages,
> > > built along with the package installation, what else should I backup
> > > so that I would be able to quickly restore the same full working
> > > Gentoo in a new hardware without having to work from stage3 up? The
> > > portage tree is one of those items, for sure. But what else?
> >
> > Make a backup copy of everything under /etc.
> >
> > I used to try to backup individual /etc/... files that I would need,
> > but I always forgot something.
> >
> > --
> > Grant
>
> Yes, besides /var/lib/portage/world and /etc/ you may also want to back up
> your /boot and kernel config, assuming the hardware (MoBo & peripherals) is the
> same (same drivers). I wouldn't bother backing up portage, a resync will
> download it afresh. You might want to save /distfiles if you're on a slow
> Internet link, but it has to be a copy of the current versions, otherwise the
> latest version of each package source will have to be downloaded anyway.
>
> If you're running databases you'll also want to keep a backup of the
> respective /var/lib/*sql directory and if you're running a webserver /var/www/
> * - but you would be aware of the need to keep a fresh backup of all this data
> anyway.

Also good point, one can always do a "make oldconfig" on a new kernel
to recover specific tweaks.

Regarding backing up the portage tree, the binary packages won't do
much if the last sync is, say, one or two months old or even worse if
older. To use "emerge -K" one must have the same package version built
in the binary package as the one present in portage. That's what I'm
facing right now, it seems my binary packages won't be so helpful
after all - I'm beginning to think I'll have to go back to stage-3...

Thanks!
Francisco
Re: Re: Reinstall [ In reply to ]
I suggest either taking a full dd|bzip2 style backup of the hardisk to removable media for the simplest reinstall. Compliment with borgbackup or dervish for space efficient backups to capture more recent changes. Reinstall is the reverse .. lay down the dd image update from the backups with rsync. No need to get caught in messy install routines that will take a lot longer with an uncertain outcome. I have a few arm systems and seem to be doing it at least once a month as the sdcards reach their end of life.
BillK


On 20 June 2022 2:26:27 am AWST, Francisco Ares <frares@gmail.com> wrote:
>Em dom., 19 de jun. de 2022 às 14:33, Michael
><confabulate@kintzios.com> escreveu:
>>
>> On Sunday, 19 June 2022 18:22:34 BST Grant Edwards wrote:
>> > On 2022-06-19, Francisco Ares <frares@gmail.com> wrote:
>> > > Just for the sake of preventing a future failure, besides personal
>> > > files (minimum and obvious) the "world" file and the binary packages,
>> > > built along with the package installation, what else should I backup
>> > > so that I would be able to quickly restore the same full working
>> > > Gentoo in a new hardware without having to work from stage3 up? The
>> > > portage tree is one of those items, for sure. But what else?
>> >
>> > Make a backup copy of everything under /etc.
>> >
>> > I used to try to backup individual /etc/... files that I would need,
>> > but I always forgot something.
>> >
>> > --
>> > Grant
>>
>> Yes, besides /var/lib/portage/world and /etc/ you may also want to back up
>> your /boot and kernel config, assuming the hardware (MoBo & peripherals) is the
>> same (same drivers). I wouldn't bother backing up portage, a resync will
>> download it afresh. You might want to save /distfiles if you're on a slow
>> Internet link, but it has to be a copy of the current versions, otherwise the
>> latest version of each package source will have to be downloaded anyway.
>>
>> If you're running databases you'll also want to keep a backup of the
>> respective /var/lib/*sql directory and if you're running a webserver /var/www/
>> * - but you would be aware of the need to keep a fresh backup of all this data
>> anyway.
>
>Also good point, one can always do a "make oldconfig" on a new kernel
>to recover specific tweaks.
>
>Regarding backing up the portage tree, the binary packages won't do
>much if the last sync is, say, one or two months old or even worse if
>older. To use "emerge -K" one must have the same package version built
>in the binary package as the one present in portage. That's what I'm
>facing right now, it seems my binary packages won't be so helpful
>after all - I'm beginning to think I'll have to go back to stage-3...
>
>Thanks!
>Francisco
>

--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
RE: Reinstall [ In reply to ]
Be careful about the binpackages if you add any instruction set optimizations to your make.conf. Trying to install incompatible binaries will wreck your whole day.

Otherwise, I usually just save the world file and any USE flags that I remember setting on purpose. Save copies of the keywords and whatnot, but it's also a good opportunity to clean out the cruft that always slips in over time.

Distfiles can be good too so you don't have to download everything again.

If you're moving everything to a new computer, you can also just try a straight copy of everything... As long as your instruction sets are compatible it goes pretty quickly. I've got an install that's on its third set of hardware now...

LMP

-----Original Message-----
From: Francisco Ares <frares@gmail.com>
Sent: Sunday, June 19, 2022 9:24 AM
To: gentoo-user <gentoo-user@lists.gentoo.org>
Subject: Re: [gentoo-user] Reinstall

Good day!

First of all, sorry for the late reply. I had to attend to a course a bit far away from home and it was pretty intense.

Now, back home, I'll try the suggestions, thanks!

Just for the sake of preventing a future failure, besides personal files (minimum and obvious) the "world" file and the binary packages, built along with the package installation, what else should I backup so that I would be able to quickly restore the same full working Gentoo in a new hardware without having to work from stage3 up? The portage tree is one of those items, for sure. But what else?

Thank you all and a good sunday.
Francisco