Re: [gentoo-user] Updating a Standalone
Okay, thanks, it looks like I'll have to set up a mirror site on my laptop. Is there a good howto for this? How much space does it require? Thanks again, dhk On 08/12/2011 10:43 AM, Thanasis wrote: on 08/12/2011 05:08 PM Paul Hartman wrote the following: On Fri, Aug 12, 2011 at 8:26 AM, Thanasis thana...@asyr.hopto.org wrote: Keep an updated image of the standalone on laptop, update it via chroot, and sync back to the standalone. This is what i came here to suggest. :) But I think it'll only work if the 2 machines are using compatible arch, right? If the host is 64bit (amd or intel) it can work with a 32bit (and 64bit) chroot. You only need to fix* the -march= in the chroot(ed) make.conf (CFLAGS=) and call chroot via linux32 or linux64 accordingly. ls -l /usr/bin/linux* lrwxrwxrwx 1 root root 7 Aug 9 09:58 /usr/bin/linux32 - setarch lrwxrwxrwx 1 root root 7 Aug 9 09:58 /usr/bin/linux64 - setarch *(do not set march to native)
Re: [gentoo-user] Updating a Standalone
On Wed, 24 Aug 2011 17:34:55 -0400, dhk wrote: Okay, thanks, it looks like I'll have to set up a mirror site on my laptop. Is there a good howto for this? How much space does it require? 1) NFS export $DISTDIR on server 2) Mount shared NFS dir on each client 3) Set DISTDIR to mounted share in make.conf on each client -- Neil Bothwick With free advice you often get what you pay for. signature.asc Description: PGP signature
[gentoo-user] Updating a Standalone
I have a Gentoo Box that is a standalone with no internet access. Is there a way I can update it by using my laptop? It would be nice to be able to sync a copy of my world list on my laptop without clobbering my laptop's world list. Then do a fetch for the standalone world and when on the console pf the standalone do the update to the fetched packages on the laptop. The idea is not to have the laptop as an image of the standalone, but as a server to sync to while keeping the laptop's world separate. Thanks, dhk
Re: [gentoo-user] Updating a Standalone
Am 12.08.2011 11:58, schrieb dhk: I have a Gentoo Box that is a standalone with no internet access. Is there a way I can update it by using my laptop? It would be nice to be able to sync a copy of my world list on my laptop without clobbering my laptop's world list. Then do a fetch for the standalone world and when on the console pf the standalone do the update to the fetched packages on the laptop. The idea is not to have the laptop as an image of the standalone, but as a server to sync to while keeping the laptop's world separate. Thanks, dhk emerge supports an environment variable PORTAGE_CONFIGROOT which specifies the root directory for stuff like $PORTAGE_CONFIGROOT/etc/make.conf $PORTAGE_CONFIGROOT/var/lib/portage/world and so on. You can simply copy all relevant files over to your laptop, in a dedicated directory structure and then run emerge --fetchonly --config-root custom_dir -avuD @world There is also a ROOT environment variable (and --root parameter). You might have to play around with both to get the right results. If you play around with ROOT, I'd be happy to hear some experiences. especially where it affects portage and where not. Hope this helps, Florian Philipp signature.asc Description: OpenPGP digital signature
Re: [gentoo-user] Updating a Standalone
on 08/12/2011 12:58 PM dhk wrote the following: I have a Gentoo Box that is a standalone with no internet access. Is there a way I can update it by using my laptop? It would be nice to be able to sync a copy of my world list on my laptop without clobbering my laptop's world list. Then do a fetch for the standalone world and when on the console pf the standalone do the update to the fetched packages on the laptop. The idea is not to have the laptop as an image of the standalone, but as a server to sync to while keeping the laptop's world separate. Keep an updated image of the standalone on laptop, update it via chroot, and sync back to the standalone. ie: fix CFLAGS=-march=... in etc/make.conf to reflect your cpu in standalone pc. rsync the standalone file system (excluding the virtual dirs, and /dev and tmp dirs) to a standalone directory on laptop's disk or to an external (usb) disk. mount appropriate dirs in standalone Better make an init script (like /etc/init.d/standalone), so you can easily start/stop the mounts like: #!/sbin/runscript depend() { need localmount need bootmisc } start() { ebegin Mounting chroot dirs mount -o bind /dev /mnt/standalone/dev /dev/null mount -o bind /dev/pts /mnt/standalone/dev/pts /dev/null mount -o bind /dev/shm /mnt/standalone/dev/shm /dev/null mount -o bind /proc /mnt/standalone/proc /dev/null mount -o bind /proc/bus/usb /mnt/standalone/proc/bus/usb /dev/null mount -o bind /sys /mnt/standalone/sys /dev/null mount -o bind /tmp /mnt/standalone/tmp /dev/null mount -o bind /usr/portage /mnt/standalone/usr/portage/ /dev/null mount -o bind /usr/distfiles /mnt/standalone/usr/distfiles /dev/null eend $? An error occured while attempting to mount chroot directories ebegin Copying chroot files cp -pf /etc/resolv.conf /mnt/standalone/etc /dev/null cp -Ppf /etc/localtime /mnt/standalone/etc /dev/null eend $? An error occured while attempting to copy chroot files. } stop() { ebegin Unmounting chroot dirs umount -f /mnt/standalone/dev/pts /dev/null umount -f /mnt/standalone/dev/shm /dev/null umount -f /mnt/standalone/dev /dev/null umount -f /mnt/standalone/proc/bus/usb /dev/null umount -f /mnt/standalone/proc /dev/null umount -f /mnt/standalone/sys /dev/null umount -f /mnt/standalone/tmp /dev/null umount -f /mnt/standalone/usr/portage/ /dev/null umount -f /mnt/standalone/usr/distfiles/ /dev/null eend $? An error occured while attempting to unmount chroot directories } then in laptop: /etc/init.d/standalone start linux64 chroot standalone /bin/bash or (if standalone is 32bit) linux32 chroot standalone /bin/bash then once inside the chroot update the environment like: cd env-update source /etc/profile export PS1='(standalone) \W # ' Then update as normal (emerge -DNuv world) ...etc (*) Once finished, exit chroot and unmount: exit /etc/init.d/standalone stop connect laptop (or external disk) to standalone and sync the filesystem back, but _taking_care_not_to_delete_directories_you_need_to_keep_ like /home/... eg, make a script like: #!/bin/bash ( mount |grep standalone ) /etc/init.d/standalone stop cd /mnt/standalone \ rsync -aHvx --exclude lost+found --delete boot/ standalone:/boot/ \ rsync -aHvx --exclude lost+found --delete bin/ standalone:/bin/ \ rsync -aHvx --exclude lost+found --delete sbin/ standalone:/sbin/ \ rsync -aHvx --exclude lost+found --delete usr/ standalone:/usr/ \ rsync -aHvx --exclude lost+found --delete lib/ standalone:/lib/ \ rsync -aHvx --exclude lost+found --delete mnt/ standalone:/mnt/ \ rsync -aHvx --exclude lost+found --delete net/ standalone:/net/ \ rsync -aHvx --exclude lost+found --delete misc/ standalone:/misc/ \ rsync -aHvx --exclude lost+found --delete var/ standalone:/var/ \ rsync -aHvx --exclude lost+found --delete media/ standalone:/media/ \ rsync -aHvx --exclude lost+found --delete opt/ standalone:/opt/ \ rsync -aHvx --exclude lost+found --delete etc/ standalone:/etc/ \ rsync -aHvx --exclude lost+found --delete root/ standalone:/root/ \ echo ALL DONE (*) OR maybe this is safer, once in chroot environment, fetch the needed distfiles only: emerge -DNuvf world then rsync the /usr/distfiles/ and portage dirs to the standalone's machine dirs, and build the packages (update) on standalone. And rsync the standalone fs to the standalone dir on laptop/disk when you want to update again. Hope you got the idea. ;)
Re: [gentoo-user] Updating a Standalone
On Fri, Aug 12, 2011 at 8:26 AM, Thanasis thana...@asyr.hopto.org wrote: Keep an updated image of the standalone on laptop, update it via chroot, and sync back to the standalone. This is what i came here to suggest. :) But I think it'll only work if the 2 machines are using compatible arch, right?
Re: [gentoo-user] Updating a Standalone
on 08/12/2011 05:08 PM Paul Hartman wrote the following: On Fri, Aug 12, 2011 at 8:26 AM, Thanasis thana...@asyr.hopto.org wrote: Keep an updated image of the standalone on laptop, update it via chroot, and sync back to the standalone. This is what i came here to suggest. :) But I think it'll only work if the 2 machines are using compatible arch, right? If the host is 64bit (amd or intel) it can work with a 32bit (and 64bit) chroot. You only need to fix* the -march= in the chroot(ed) make.conf (CFLAGS=) and call chroot via linux32 or linux64 accordingly. ls -l /usr/bin/linux* lrwxrwxrwx 1 root root 7 Aug 9 09:58 /usr/bin/linux32 - setarch lrwxrwxrwx 1 root root 7 Aug 9 09:58 /usr/bin/linux64 - setarch *(do not set march to native)