Diff for "AptMoveHowto/simple"


Differences between revisions 8 and 25 (spanning 17 versions)
Revision 8 as of 2006-03-07 19:07:30
Size: 1564
Editor: modemcable234
Comment:
Revision 25 as of 2017-09-10 21:50:25
Size: 2571
Editor: ckimes
Comment: Tag with NeedsUpdating
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
How can I easily transer all the packages I have downloaded with apt to another box which is not connected to the internet?
{{{
sudo apt-get install apt-move
}}}
(Or just use synaptic and install the apt-move package) You need to have enabled the universe repository. See AddingRepositoriesHowto
{{{
sudo apt-move -d breezy update
}}}
Because ubuntu repository structure, not all packages are inserted into the Packages.gz file by apt-move. We must remake the Packages.gz file.
{{{
sudo chmod a+w -R /mirrors/debian/
cd /mirrors/debian/dists/dapper/main/binary-i386
sudo rm Packages.gz
sudo dpkg-scanpackages ../../../../pool/ /dev/null > Packages
sudo mkdir /mirrors/debian/.disk
sudo echo "Custom packages" $(hostname) $(date +%y%m%d) > /mirrors/debian/.disk/info
}}}
<<Include(Tag/NeedsUpdating)>>
Line 19: Line 3:
Then, using nautilus-cd-burner burn the contents of the /mirrors/debian folder to a disk. Be sure to show hidden files so that you can copy the .disk file. How can I easily transfer all the packages I have downloaded with apt to another box which is not connected to the internet?
Line 21: Line 5:
Insert that disk into the non-networked computer and add the cdrom as a repository using synaptic or run This How To is a simpler way to transfer downloaded packages from one machine to another. It does not require the recipient to enter GPG keys. It is not reccommended for someone who wants to distribute a cd publicly, for that reason. This is a "quick-and-dirty" way of getting the job done.
Line 23: Line 7:
{{{
sudo apt-cdrom add
}}}
from the command line. When installing the packages from this cd, you will be asked if you want to install these packages without authentification. For the sake of simplicity, the GPG keys and the release file are not included on this simple packages cd. The packages will still be installed without any problems if you answer yes.
 1. You can need to install apt-move from the Universe Repository and dpkg-deve packages.
 
 2. Then you need to run this command in the terminal
    {{{
sudo mkdir --parents --mode=a+w /mirrors/debian
    }}}
    * If it comes back saying /mirrors/debian already existed then you need to put this line in the terminal.
    {{{
  
    sudo chmod a+w --recursive /mirrors/debian
    }}}

 3. Next you need to update apt-move
    {{{
    apt-move update
    }}}
 4. Because of ubuntu repository structure, not all packages are inserted into the Packages.gz file by apt-move. We must remake the
    Packages.gz file.
    {{{
cd /mirrors/debian
dpkg-scanpackages pool /dev/null | gzip -9 > dists/stable/main/binary-i386/Packages.gz
    }}}
     
    * Problem: The restricted section (e.g. restricted linux drivers) is also taken into account
    {{{
  
    mkdir /mirrors/debian/.disk
    echo "Custom packages" $(hostname) $(date +%y%m%d) > /mirrors/debian/.disk/info
    }}}

 5. Then, using nautilus-cd-burner burn the contents of the /mirrors/debian folder to a disk. Be sure to show hidden files so that you can copy the .disk file.

 6. Insert that disk into the non-networked computer and add the cdrom as a repository using your favorite package manager. When installing the packages from this cd, you will be asked if you want to install these packages without authentication. For the sake of simplicity, the GPG keys and the release file are not included on this simple packages cd. The packages will still be installed without any problems if you answer yes.

 7. Apt will prefer to use an authenticated source over an unauthenticated one. If you are on dialup and enable the universe repository, it will still try to download the package from the net and not from the local (unsigned) cd. You must disable the universe repository (or any other repository), update and install the package from the custom cd.
Line 29: Line 44:

----

Tag/tag.png

Needs Updating
This article needs updating to include the latest versions of Ubuntu. More info...

How can I easily transfer all the packages I have downloaded with apt to another box which is not connected to the internet?

This How To is a simpler way to transfer downloaded packages from one machine to another. It does not require the recipient to enter GPG keys. It is not reccommended for someone who wants to distribute a cd publicly, for that reason. This is a "quick-and-dirty" way of getting the job done.

  1. You can need to install apt-move from the Universe Repository and dpkg-deve packages.
  2. Then you need to run this command in the terminal
    • sudo mkdir --parents --mode=a+w /mirrors/debian
    • If it comes back saying /mirrors/debian already existed then you need to put this line in the terminal.
          sudo chmod a+w --recursive /mirrors/debian
  3. Next you need to update apt-move
    •     apt-move update
  4. Because of ubuntu repository structure, not all packages are inserted into the Packages.gz file by apt-move. We must remake the
    • Packages.gz file.
      cd /mirrors/debian
      dpkg-scanpackages pool /dev/null | gzip -9 > dists/stable/main/binary-i386/Packages.gz
    • Problem: The restricted section (e.g. restricted linux drivers) is also taken into account
          mkdir /mirrors/debian/.disk
          echo "Custom packages" $(hostname) $(date +%y%m%d) > /mirrors/debian/.disk/info
  5. Then, using nautilus-cd-burner burn the contents of the /mirrors/debian folder to a disk. Be sure to show hidden files so that you can copy the .disk file.
  6. Insert that disk into the non-networked computer and add the cdrom as a repository using your favorite package manager. When installing the packages from this cd, you will be asked if you want to install these packages without authentication. For the sake of simplicity, the GPG keys and the release file are not included on this simple packages cd. The packages will still be installed without any problems if you answer yes.
  7. Apt will prefer to use an authenticated source over an unauthenticated one. If you are on dialup and enable the universe repository, it will still try to download the package from the net and not from the local (unsigned) cd. You must disable the universe repository (or any other repository), update and install the package from the custom cd.

Note: Dapper will not copy deb packages from the install cd to the /var/cache/apt/archives directory, so we no longer need to clean it...


AptMoveHowto/simple (last edited 2017-09-10 21:50:25 by ckimes)