You are not logged in.
Hi all
I have one machine that has access internet and is updated and all downloaded packages are still in cache
my other machine doesn't have access to internet
i'm wandering if there is a way to update my second machine using files already on the first one
i know how to configure the cache directory
but i dont know how to refresh the sync when i pacman -Syy
what exactly happens we do pacman -Syy ?
can i just copy some files from the firest machine to the second to have the same effect ?
thanks
Offline
Just copy all the packages from the cache and install them manually(with pacman -U). You will not even need to refresh the database(pacman -Sy(pacman -Syy do the same)).
Offline
thanks for the reply
there're a lot of packages and manually it would take too long
so can i just put all my packages into cache
and pacman -U (or other switch) that update the system ?
actually my second machine is a fresh archlinxu intall with almost nothing on it
Offline
If you copy the packages in the cache of the computer without internet access you can just:
# pacman -Su
And it will use look to see if they are in the cache first then try to download them.
pacman -Sy #What this does is: (as explain in the man page) "Download[s] a fresh copy of the master package list"
pacman -Syy #Forces the download, normally it wouldn't download the file if it doesn't need too.
Offline
i did but when i do pacman -Su
pacman told me that local database is up to date
i understand this coz i havnt sync to the internet package list
and that is why i want to know what exactly happens when i do pacman -Sy
and whether i can do this by hand
Offline
on your machine with internet access run this to download all the package databases:
for db in core extra community;
do
wget http://ftp.tu-chemnitz.de/pub/linux/archlinux/$db/os/i686/$db.db.tar.gz
done
then copy these three files onto your other machine and run this as root:
for db in core extra community;
do
tar xvf $db.db.tar.gz -C /var/lib/pacman/sync/$db/
done
EDIT: This is what pacman -Sy does
then run this:
pacman -Sup > packages.list
this creates a file named packages.list which contains all the URLs for all the packages which need to be updated on your not-internet-accessible machine.
this file you put back on your internet-accessible machine and run:
mkdir -p downloadedpackages
wget -P downloadedpackages -i packages.list
this downloads all the needed packages from the file packages.list into a new directory called downloadedpackages. this directory must go back to the other machine and all the files in there need to go into the folder /var/cache/pacman/pkg/
then you can run pacman -Su on the non-internet machine
tadaaa!
cheers
Barde
Last edited by Heller_Barde (2008-12-13 11:25:09)
Offline
Hmmm...
pacman -Su is not performing the upgrade because it doesn't have a new package list. To get one, you have to use pacman -Sy, which unfortunately for you connects to the internet. I suggest you read up on http://wiki.archlinux.org/index.php/Cus … repository
edit: Hellen_Barde's suggestion is better.
Last edited by mentallaxative (2008-12-13 11:30:01)
Offline
thank you man
im gonna try that out
Offline
Right no internet, makes that a problem too.
There's a file (core..db.tar.gz) that is downloaded and extracted to /var/lib/pacman/
You'll need to either get that file from the internet OR tar the directory and copy it across. Something like that.
Offline
Right no internet, makes that a problem too.
There's a file (core..db.tar.gz) that is downloaded and extracted to /var/lib/pacman/
You'll need to either get that file from the internet OR tar the directory and copy it across. Something like that.
Or just create one yourself for the packages you have downloaded.
repo-add --help
Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest
Offline
there're a lot of packages and manually it would take too long
You can copy the files and use shell expansion, i.e.
cd /directory/with/packages/
pacman -U *.pkg.tar.gz
I think it's the easiest way how to upgrade system without internet access if you don't mind that pacman database won't be upgraded.
Offline
elflord wrote:there're a lot of packages and manually it would take too long
You can copy the files and use shell expansion, i.e.
cd /directory/with/packages/ pacman -U *.pkg.tar.gz
I think it's the easiest way how to upgrade system without internet access if you don't mind that pacman database won't be upgraded.
setting up your own local repo is better imo, since you get around the issue that all packages installed with -U is marked "explicitly installed" unless you use --asdeps
Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest
Offline
+1 for setting up a custom repo (it's really quite easy)
*edit*
I actually repeated most of what Heller-Barde, only adding this:
Once you have the packages in /path/to/some/dir on the unconnected computer, you can run this command to update them (assuming you've updated the database as explained above):
pacman -Su --cachedir /path/to/some/dir
Be careful with the pkglist URLs though, they will be linked to a single server (the one at the top of your mirror list). If that's down when you want to download them, you'll need to manually change it. To avoid this hassle (and really speed up downloads), you could use these steps instead:
run "powerpill -Su --get-metalink pkglist.metalink" on the unconnected system instead of "pacman -Sup >packages.list"
run "aria2c -M pkglist.metalink" on the connected system instead of "wget -i packages.list"
Btw, how are you actually transferring files between the two?
Last edited by Xyne (2008-12-15 15:58:56)
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline