Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Offline Gentoo install
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
darkstar44
n00b
n00b


Joined: 05 Oct 2012
Posts: 14
Location: America

PostPosted: Tue Apr 04, 2017 10:46 pm    Post subject: Offline Gentoo install Reply with quote

Don't know where this belongs, But is it possible to do a offline Gentoo install from just the online /distfiles directory? I have the entire (240-260GB) /distfiles directory on a external USB Hard drive but don't know how to proceed or if I spent many months downloading for nothing. I'm not concerned with being up to date because if this is possible, then the Computer would not be connected to the internet anyway. I'm thinking of going offline in the distant future and wanted something to occupy my time (some of it) by tinkering with Gentoo.
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7552
Location: Goose Creek SC

PostPosted: Tue Apr 04, 2017 11:02 pm    Post subject: Reply with quote

https://forums.gentoo.org/viewtopic-p-3461249.html NeddySeagoon 's sneakernet
_________________
Defund the FCC.
Back to top
View user's profile Send private message
szatox
Veteran
Veteran


Joined: 27 Aug 2013
Posts: 1746

PostPosted: Wed Apr 05, 2017 9:12 pm    Post subject: Reply with quote

Yes, it is possible. No, you don't want to do that (exceptions do apply if you have a reason good enough. There are exceptions to everything after all.)
Any linux is much more usable on-line, though of course you can at some point decide "it's completed" and disconnect it, and then keep using it for some off-line tasks.

This said, if you have 2 machines with very similar (preferably the same) settings, then yes, you can copy /usr/portage from one machine to another and use it to build the other system. Since you already have all ebuilds and all sources required by those ebuilds, there is no need to download anything extra. You could even build binary packages on the online box and save time otherwise spent on redundant compilation.
The problems will find you once you decide to switch from vim to emacs on that offline machine without polluting your online system though.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43198
Location: 56N 3W

PostPosted: Wed Apr 05, 2017 10:02 pm    Post subject: Reply with quote

darkstar44,

You need a distfiles that matches the portage tree or you will be in a world of pain.
There are a few mirror and or fetch restricted packages, too that Gentoo cannot mirror and/or fetch

Code:
qgrep -H RESTRICT | grep fetch
will list all the fetch restricted ebuilds.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
cwr
Veteran
Veteran


Joined: 17 Dec 2005
Posts: 1969

PostPosted: Fri Apr 07, 2017 2:45 pm    Post subject: Reply with quote

Yes, most of my installs have been in effect off-line. You need a Portage snapshot, a stage 3 file,
some way of booting a Linux distro (eg. Ubuntu) and some way of documenting which files the
emerge process needs besides those already in the distfiles directory.

Starting from scratch it usually took me two or three passes to download all the files I needed;
it always turned out that some minor file got missed. As the awk/bash scripts I used improved,
these problems receded. However, updating such a setup is a major problem, since that really
has to be done online.

Will
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43198
Location: 56N 3W

PostPosted: Fri Apr 07, 2017 4:17 pm    Post subject: Reply with quote

cwr,

You can fetch a new portage snapshot offline and put it into /usr/portage/
Once thats done run,
Code:
emerge -uDNpfv @world --with-bdeps=y

Fetch all the files into distfiles, then emerge for real.

Its not much different from the initial offline install.
It helps if you don't mount ./packages and ./distfiles inside /usr/prortage, since that allows /usr/portage to be deleted to make way for the new snapshot.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
darkstar44
n00b
n00b


Joined: 05 Oct 2012
Posts: 14
Location: America

PostPosted: Sat Apr 22, 2017 5:02 pm    Post subject: Gentoo offline install Reply with quote

Thank you for your help, I have almost got it figured out
but my current problem is i can do most of the base install
offline. but when it gets to the part "Installing system tools"
that's where i get stuck. I copied the gentoo-sources plus dependencies
to the /usr/portage/distfiles directory, and emerge works fine. but
when I try to do system tools (syslog-ng vixie-cron) emerge complains
about not being able to download the files from gentoo.org.distfiles.

sorry to be a pain, I know my way around gentoo, but this has me stumped
any help would be appreciated
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43198
Location: 56N 3W

PostPosted: Sat Apr 22, 2017 7:06 pm    Post subject: Reply with quote

darkstar44,

Code:
emerge -fp syslog-ng vixie-cron

Download the files.
Put them in distfiles.
Ensure that the portage user can read them

emerge for real.

Its a bad idea to keep your distfiles in /usr/portage/distfiles as it makes updating the ebuild repository more difficult.
As its a local cache, they should be in /var/cache someplace but that's a muck bigger discussion.

If emerge is trying to download things, its because portage can't read the files you have or you still have files missing.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7552
Location: Goose Creek SC

PostPosted: Sat Apr 22, 2017 7:28 pm    Post subject: Reply with quote

As Neddy pointed out earlier some ebuilds will require a download from a site each time the package is emerged. Other ebuilds will store the downloaded package in /usr/portage/distfiles for use and for reuse. If the ebuild and package are updated to a new version, use of the new version will require that portage be updated, your portage be synced, and all installed packages that have new versions in the synced portage have their updated versions installed in /usr/portage/distfiles. If you did not stock your /usr/portage/distfiles with syslog-ng vixie-cron versions that match those calculated by portage, emerge will complain . Running emerge --pvuND --with-bdeps=y world (or package(s)) should produce a list of packages you need to find, download, transport to, and install in your off-line machine's /usr/portage/distfiles.

I see I am a less clear echo. :?
_________________
Defund the FCC.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo 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