* [gentoo-user] Updating a Standalone
@ 2011-08-12 9:58 dhk
2011-08-12 10:16 ` [gentoo-user] " Nikos Chantziaras
` (2 more replies)
0 siblings, 3 replies; 13+ messages in thread
From: dhk @ 2011-08-12 9:58 UTC (permalink / raw
To: Gentoo
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
^ permalink raw reply [flat|nested] 13+ messages in thread
* [gentoo-user] Re: Updating a Standalone
2011-08-12 9:58 [gentoo-user] Updating a Standalone dhk
@ 2011-08-12 10:16 ` Nikos Chantziaras
2011-08-12 10:25 ` Pandu Poluan
2011-08-12 10:37 ` Mick
2011-08-12 10:32 ` [gentoo-user] " Florian Philipp
2011-08-12 13:26 ` Thanasis
2 siblings, 2 replies; 13+ messages in thread
From: Nikos Chantziaras @ 2011-08-12 10:16 UTC (permalink / raw
To: gentoo-user
On 08/12/2011 12:58 PM, dhk wrote:
> 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.
Er, can't you just give the box Internet access by using the laptop's
connection?
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] Re: Updating a Standalone
2011-08-12 10:16 ` [gentoo-user] " Nikos Chantziaras
@ 2011-08-12 10:25 ` Pandu Poluan
2011-08-12 10:35 ` dhk
2011-08-12 10:37 ` Mick
1 sibling, 1 reply; 13+ messages in thread
From: Pandu Poluan @ 2011-08-12 10:25 UTC (permalink / raw
To: gentoo-user
On Fri, Aug 12, 2011 at 17:16, Nikos Chantziaras <realnc@arcor.de> wrote:
> On 08/12/2011 12:58 PM, dhk wrote:
>>
>> 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.
>
> Er, can't you just give the box Internet access by using the laptop's
> connection?
>
Agree with Nikos.
Another (ultra-roundabout) way:
* Get portage-latest.tar.xz
* Untar to your standalone system
* emerge -puf @world
* Get the files on an Internet-connected system
* Put the files on the standalone's portage DISTDIR
* emerge -au @world
DISCLAIMER: Not tested :-)
Rgds,
--
FdS Pandu E Poluan
~ IT Optimizer ~
• Blog : http://pepoluan.tumblr.com
• Linked-In : http://id.linkedin.com/in/pepoluan
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] Updating a Standalone
2011-08-12 9:58 [gentoo-user] Updating a Standalone dhk
2011-08-12 10:16 ` [gentoo-user] " Nikos Chantziaras
@ 2011-08-12 10:32 ` Florian Philipp
2011-08-12 13:26 ` Thanasis
2 siblings, 0 replies; 13+ messages in thread
From: Florian Philipp @ 2011-08-12 10:32 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1275 bytes --]
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
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] Re: Updating a Standalone
2011-08-12 10:25 ` Pandu Poluan
@ 2011-08-12 10:35 ` dhk
0 siblings, 0 replies; 13+ messages in thread
From: dhk @ 2011-08-12 10:35 UTC (permalink / raw
To: gentoo-user
On 08/12/2011 06:25 AM, Pandu Poluan wrote:
> On Fri, Aug 12, 2011 at 17:16, Nikos Chantziaras <realnc@arcor.de> wrote:
>> On 08/12/2011 12:58 PM, dhk wrote:
>>>
>>> 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.
>>
>> Er, can't you just give the box Internet access by using the laptop's
>> connection?
>>
>
> Agree with Nikos.
>
> Another (ultra-roundabout) way:
>
> * Get portage-latest.tar.xz
> * Untar to your standalone system
> * emerge -puf @world
> * Get the files on an Internet-connected system
> * Put the files on the standalone's portage DISTDIR
> * emerge -au @world
>
> DISCLAIMER: Not tested :-)
>
> Rgds,
There's no Internet access where the standalone is, it's remote, when I
go with the laptop the laptop doesn't have Internet access either.
I didn't really want to tar or burn stuff to disk. I think I'd like to
just be able --sync the laptop for itself and then have the ability to
do another sync for the standalone. Of coarse the second sync for the
standalone wouldn't install anything. Then when I travel to the
standalone I'd like to do any "emerge -uDNp world" to the laptop which
would most likely be the setting in the make.conf on the standalone. Thanks
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] Re: Updating a Standalone
2011-08-12 10:16 ` [gentoo-user] " Nikos Chantziaras
2011-08-12 10:25 ` Pandu Poluan
@ 2011-08-12 10:37 ` Mick
2011-08-12 11:53 ` James Broadhead
1 sibling, 1 reply; 13+ messages in thread
From: Mick @ 2011-08-12 10:37 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: Text/Plain, Size: 1058 bytes --]
On Friday 12 Aug 2011 11:16:10 Nikos Chantziaras wrote:
> On 08/12/2011 12:58 PM, dhk wrote:
> > 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.
>
> Er, can't you just give the box Internet access by using the laptop's
> connection?
Yes and in addition, set up your laptop as an rsync server for your desktop to
use, as well as a GENTOO_MIRROR.
I'm sure there's a wiki somewhere describing the ins and outs of setting this
up (there's more than one way to share distfiles - I use boa because of its
small footprint).
--
Regards,
Mick
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] Re: Updating a Standalone
2011-08-12 10:37 ` Mick
@ 2011-08-12 11:53 ` James Broadhead
2011-08-12 14:21 ` Grant Edwards
0 siblings, 1 reply; 13+ messages in thread
From: James Broadhead @ 2011-08-12 11:53 UTC (permalink / raw
To: gentoo-user
> On 08/12/2011 12:58 PM, dhk wrote:
> 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?
My immediate response is that a PCI/USB wifi card costs less than the
combined brainpower that you have had respond to this question.
My actual approach would be to set up the laptop as an rsync mirror, then:
laptop $ emerge --sync
(connect laptop to null-internet box via crossover cable + sync from laptop)
nointernet $ emerge --sync
nointernet $ emerge -pvfuDN world > getfile
(copy getfile to laptop, move laptop to delicious bandwidth)
laptop $ wget -flags getfile
(move laptop back to target machine)
laptop $ rsync gotfiles/* no-internet-box/usr/portage/distfiles
nointernet $ emerge -uDvN world
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] Updating a Standalone
2011-08-12 9:58 [gentoo-user] Updating a Standalone dhk
2011-08-12 10:16 ` [gentoo-user] " Nikos Chantziaras
2011-08-12 10:32 ` [gentoo-user] " Florian Philipp
@ 2011-08-12 13:26 ` Thanasis
2011-08-12 14:08 ` Paul Hartman
2 siblings, 1 reply; 13+ messages in thread
From: Thanasis @ 2011-08-12 13:26 UTC (permalink / raw
To: gentoo-user; +Cc: dhk
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. ;)
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] Updating a Standalone
2011-08-12 13:26 ` Thanasis
@ 2011-08-12 14:08 ` Paul Hartman
2011-08-12 14:43 ` Thanasis
0 siblings, 1 reply; 13+ messages in thread
From: Paul Hartman @ 2011-08-12 14:08 UTC (permalink / raw
To: gentoo-user
On Fri, Aug 12, 2011 at 8:26 AM, Thanasis <thanasis@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?
^ permalink raw reply [flat|nested] 13+ messages in thread
* [gentoo-user] Re: Updating a Standalone
2011-08-12 11:53 ` James Broadhead
@ 2011-08-12 14:21 ` Grant Edwards
0 siblings, 0 replies; 13+ messages in thread
From: Grant Edwards @ 2011-08-12 14:21 UTC (permalink / raw
To: gentoo-user
On 2011-08-12, James Broadhead <jamesbroadhead@gmail.com> wrote:
>> On 08/12/2011 12:58 PM, dhk wrote:
>> 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?
>
> My immediate response is that a PCI/USB wifi card costs less than the
> combined brainpower that you have had respond to this question.
So you're going to provide ISP and WiFi service at the OP's remote
site?
--
Grant Edwards grant.b.edwards Yow! World War III?
at No thanks!
gmail.com
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] Updating a Standalone
2011-08-12 14:08 ` Paul Hartman
@ 2011-08-12 14:43 ` Thanasis
2011-08-24 21:34 ` dhk
0 siblings, 1 reply; 13+ messages in thread
From: Thanasis @ 2011-08-12 14:43 UTC (permalink / raw
To: gentoo-user
on 08/12/2011 05:08 PM Paul Hartman wrote the following:
> On Fri, Aug 12, 2011 at 8:26 AM, Thanasis <thanasis@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)
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] Updating a Standalone
2011-08-12 14:43 ` Thanasis
@ 2011-08-24 21:34 ` dhk
2011-08-24 22:19 ` Neil Bothwick
0 siblings, 1 reply; 13+ messages in thread
From: dhk @ 2011-08-24 21:34 UTC (permalink / raw
To: gentoo-user
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 <thanasis@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)
>
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] Updating a Standalone
2011-08-24 21:34 ` dhk
@ 2011-08-24 22:19 ` Neil Bothwick
0 siblings, 0 replies; 13+ messages in thread
From: Neil Bothwick @ 2011-08-24 22:19 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 416 bytes --]
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.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2011-08-24 22:20 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-12 9:58 [gentoo-user] Updating a Standalone dhk
2011-08-12 10:16 ` [gentoo-user] " Nikos Chantziaras
2011-08-12 10:25 ` Pandu Poluan
2011-08-12 10:35 ` dhk
2011-08-12 10:37 ` Mick
2011-08-12 11:53 ` James Broadhead
2011-08-12 14:21 ` Grant Edwards
2011-08-12 10:32 ` [gentoo-user] " Florian Philipp
2011-08-12 13:26 ` Thanasis
2011-08-12 14:08 ` Paul Hartman
2011-08-12 14:43 ` Thanasis
2011-08-24 21:34 ` dhk
2011-08-24 22:19 ` Neil Bothwick
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox