Cloning the apt-cache!
I've been pondering on the task of installing Linux (Debian wheezy LXDE) to remote laptops (zero internet connectivity), but having a connected laptop at base.
Obviously, a customised Live CD would be the ideal option of installing the system with all the app's needed.
Otherwise, I could "clone" my install on the connected laptop by using the same Live CD on the remote PC's and copying the apt index and apt cache onto them. But would it work?
On connected laptop (a):
- Install Live CD X (preferred Debian)
- Remove/install apps and make apt remove line Y, install line Z
- Copy /var/lib/apt/lists/ (Apt-L), /var/cache/apt/ (Apt-C), plus config files (CF), /etc/apt/sources.list (SL), libflashplayer.so from /usr/lib/chromium/plugins to a USB stick
on remote laptop (b)
- Install X
- Fine details: add user to sudoer, "no recommends" file, edit fstab
- copy over Apt-L and Apt-C
- Execute apt lines Y and Z
- Copy over config files and CTRL-ALT F2, reboot
- Install other apps from deb's
- Copy over SL to (b) (in case of internet connectivity later) and attempt wireless driver install on (b) to make internet-ready
- Copy over libflashplayer.so
Future update of laptop (b) should be possible too.
- on (a) apt clean & apt update & apt upgrade
- copy Apt-L and Apt-C from (a)
- delete and replace Apt-L and Apt-C on (b) with those new from (a)
- on (b) run apt upgrade
This page here http://gnuser.wordpress.com...
is very helpful method for installing packages on a PC with no internet connection. If it is an unknown Debian install, or it's out of date, or out of sync with the connected machine (a), then it would be necessary to find out which packages are needed as there may well be many more needed than the base PC (a) would need during an update.
The right tool
Well, now I found there's a tool that's just right for this... Keryx
. It makes a database for a target box, ie with what packages it has, and what versions, and then uses an online box to retrieve what it needs to update or install new on the target - all via a USB stick.
Get it here https://launchpad.net/keryx