Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Profile update over chroot
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
NichtDerHans
Tux's lil' helper
Tux's lil' helper


Joined: 27 Jan 2023
Posts: 131

PostPosted: Tue Mar 26, 2024 4:13 pm    Post subject: Profile update over chroot Reply with quote

Hi, my name is not Hans.

I have a fast and a slow computer. The file system of the slow computer is exported to the network with nfs. I use the fast one to update the slow one. For this I use this "chroot" script (I found it basicly here in the forum):

Code:

set -x

ROOT=/mnt/x220/export/root

mount --bind {,${ROOT}}/dev
mount --bind {,${ROOT}}/dev/pts
mount --bind {,${ROOT}}/dev/shm
mount --bind {,${ROOT}}/proc
mount --bind {,${ROOT}}/sys
#mount --bind {,${ROOT}}/usr/local/portage
#mount --bind {,${ROOT}}/usr/portage
mount --bind {,${ROOT}}/var/cache/edb/dep
mount --bind {,${ROOT}}/var/cache/ccache
mount --bind {,${ROOT}}/var/tmp/portage

exec chroot ${ROOT} /bin/bash -i


The fast computer is still on profile 17 (with the old glibc). Can I still build the new (profile 23) packages for the slow computer? Or does the fast computer also have to be on profile 23?
Back to top
View user's profile Send private message
CooSee
Veteran
Veteran


Joined: 20 Nov 2004
Posts: 1441
Location: Earth

PostPosted: Tue Mar 26, 2024 4:46 pm    Post subject: Reply with quote

Quote:
Or does the fast computer also have to be on profile 23?

you answered the question yourself, so yes, NichtDerHans <<< if this is really NOT your Name :lol:

8)
_________________
" Die Realität ist eine Illusion, die durch Mangel an ehrlicher Kommunikation entsteht "
---
" Der Mensch ist von Natur aus neugierig, was am Ende übrig bleibt ist die Gier "
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3138

PostPosted: Tue Mar 26, 2024 4:47 pm    Post subject: Reply with quote

Hi Fritz

The computer you're borrowing CPU from doesn't even have to be Gentoo, none of its code will run during your update anyway.
Sharing ccache is a bit sketchy though, if you have any differences between toolchains on both machines, resulting code can break in unexpected ways. I'd suggest you skip it unless you know what you're doing.
Don't share edb either, I don't know what information it holds, but it looks like you're about to screw up portage on 2 systems.
Also, since you're sharing /dev, make sure not to update bootloader. It could be a good idea to only mount /dev/pts which is actually required by portage ( /dev/null and /dev/console are often needed too for basic operation), but not give your chroot access to CPU donor's hard disks. I'm not sure portage will let you get away with this cheat, but at lest don't mess up your bootloader.

Sharing portage tree (ebuilds) and working space, as well as distfiles is fine and should in fact speed things up.
_________________
Make Computing Fun Again
Back to top
View user's profile Send private message
NichtDerHans
Tux's lil' helper
Tux's lil' helper


Joined: 27 Jan 2023
Posts: 131

PostPosted: Tue Mar 26, 2024 5:33 pm    Post subject: Reply with quote

Thanks for the answer, CooSee.

And thanks for the tips, szatox. It's true, I don't have to pass everything from /dev from the host computer, I change that. But it has been working like this for almost a year. I use syslinux as bootloader on the small laptop. I just have to copy the kernel to one folder and that's it, no complicated grub-update...


Regards and thanks to both of you for your comments.
Fritz, or maybe Hans. Maybe something completely different. 8)
Back to top
View user's profile Send private message
NichtDerHans
Tux's lil' helper
Tux's lil' helper


Joined: 27 Jan 2023
Posts: 131

PostPosted: Thu Mar 28, 2024 7:14 pm    Post subject: Reply with quote

Yesterday I updated my Gentoo test VM to profile 23. At the same time I built binutils, gcc, glibc and libtool alone on the slow computer.

Today during the day I rebuilt (--emptytree) the slow computer with the VM via chroot. It worked great. :wink:
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming 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