DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Following advice from linuxquestions I have switched to Debian specifically to make use of apt-offline. I have an offline linux box that I installed with a Wheezy DVD yesterday. The plan was to use apt-offline to update and install extra packages using a USB stick and an online Windows XP box at work. A day later and I am still stuck at the second hurdle.
After reading many guides, I have upgraded the apt-offline package in wheeze to the latest 1.5 release (bug fixes) on the offline machine. Installed python 2.7, pyQt, and apt-offline 1.5 on Windows.
Run the following command (as root) on offline Debian:
Code:
apt-offline set up.sig --upgrade
Generates the .sig file:
Code:
'cdrom:[Debian GNU/Linux 7.7.0 _Wheezy_ - Official i386 DVD Binary-1 20141018-11:53]/dists/wheezy/contrib/binary-i386/Packages.bz2' Debian%20GNU_Linux%207.7.0%20%5fWheezy%5f%20-%20Official%20i386%20DVD%20Binary-1%2020141018-11:53_dists_wheezy_contrib_binary-i386_Packages 0 :
'cdrom:[Debian GNU/Linux 7.7.0 _Wheezy_ - Official i386 DVD Binary-1 20141018-11:53]/dists/wheezy/main/binary-i386/Packages.bz2' Debian%20GNU_Linux%207.7.0%20%5fWheezy%5f%20-%20Official%20i386%20DVD%20Binary-1%2020141018-11:53_dists_wheezy_main_binary-i386_Packages 0 :
'cdrom:[Debian GNU/Linux 7.7.0 _Wheezy_ - Official i386 DVD Binary-1 20141018-11:53]/dists/wheezy/contrib/i18n/Translation-en.bz2' Debian%20GNU_Linux%207.7.0%20%5fWheezy%5f%20-%20Official%20i386%20DVD%20Binary-1%2020141018-11:53_dists_wheezy_contrib_i18n_Translation-en 0 :
'cdrom:[Debian GNU/Linux 7.7.0 _Wheezy_ - Official i386 DVD Binary-1 20141018-11:53]/dists/wheezy/main/i18n/Translation-en.bz2' Debian%20GNU_Linux%207.7.0%20%5fWheezy%5f%20-%20Official%20i386%20DVD%20Binary-1%2020141018-11:53_dists_wheezy_main_i18n_Translation-en 0 :
'cdrom:[Debian GNU/Linux 7.7.0 _Wheezy_ - Official i386 DVD Binary-1 20141018-11:53]/dists/wheezy/Release' Debian%20GNU_Linux%207.7.0%20%5fWheezy%5f%20-%20Official%20i386%20DVD%20Binary-1%2020141018-11:53_dists_wheezy_Release 0 :
'cdrom:[Debian GNU/Linux 7.7.0 _Wheezy_ - Official i386 DVD Binary-1 20141018-11:53]/dists/wheezy/Release.gpg' Debian%20GNU_Linux%207.7.0%20%5fWheezy%5f%20-%20Official%20i386%20DVD%20Binary-1%2020141018-11:53_dists_wheezy_Release.gpg 0 :
Combinations or omissions of 'upgrade' and 'update' flags seem to make no difference to the generated file, except if 'update' is effectively turned off, the .sig file is empty. The 'install' flags do not allow me to get the packages I want: presumably because the offline machine is not aware of their existence yet.
The problem manifests when I subsequently run apt-offline on the windows machine. It never downloads anything. It does not download the list of available packages for me to transfer to the offline box. It does not give any errors, it is quite happy to do nothing.
Code:
C:\apt-offline> python apt-offline get g:\\up.sig --bundle debian-updates-please.zip --threads 2
Fetching APT Data
Downloaded data to C:\apt-offline\debian-updates-please.zip
C:\apt-offline>
The command completes instantly, there is no network timeout or Firewall issue going on. Plenty of disc space.
The problem is that the resulting bundle file is a zero length zip. When I do not use the bundle option, it defaults to creating an empty directory somewhere instead. Same problems when the Firewalls are turned off. Without a list of packages to transfer back to the offline box, I can't get any further. Methinks this is wrong.
Web research revealed that the 1.2 (methinks) version included in Wheezy DVD is known to contain bugs that make it inoperable when using the DVD installed repository. I appreciate that making the change directly was foolish, but it would have been more foolish to have been surprised when I found a version that is reported to be broken did not work.
After a day of hassle.. I did it exactly the wrong way, but for a reason I hope you can relate to. I obviously cannot use the correct method for obtaining packages as apt-offline is not working for me and I am offline. I snagged a copy of the apt-offline_1.5_all.deb file.
This upgrade is not related to my problem. The .sig files generated with the wheezy version and the 1.5 version are identical and the only thing windows sees is the .sig files.
Quote:
Originally Posted by Head_on_a_Stick
You shouldn't use Testing/Unstable repositories in wheezy (see my signature).
I do appreciate that. I apologize. I think I should switch to the testing release once I have resolved the windows problem.
Quote:
Originally Posted by Head_on_a_Stick
Guide for apt-offline here:
I had read this and many other guides to apt-offline. I think the steps I detailed demonstrate I had followed them. It is just behaving wrong. If the mistake is mine, I am far too close to it to see it. Hopefully someone can see what mistake I have made.
No need to apologise -- it's your system and you appear to be aware of the risks...
I've never actually used apt-offline, so I must also apologise.
Glancing through the linked documentation, it would appear you should use:
Code:
apt-offline set apt-offline.sig
This will generate both the "update" & "upgrade" components.
Then run this on the Windows machine:
Code:
apt-offline get C:\apt-offline.sig --threads 5
Then feed the data back to your Debian box:
Code:
apt-offline install /media/USB/apt-offline.zip
As I say, I've never used this so I may be completely wrong here.
Just to note: although the package version in wheezy may only be 1.2, Debian does provide bug-fixes for that version so it is probably far more usable than the versioning alone may suggest (again, see the link in my sig.)...
I may as well make some notes for other travelers.
Quote:
Originally Posted by Head_on_a_Stick
This will generate both the "update" & "upgrade" components.
Yes. It's quite interesting actually, but a bit academic. I noticed that the upgrade component adds no information to the .sig file right now. Makes sense: there is no upgrade component as the offline box has never received a list of upgradeable packages.
Quote:
Originally Posted by Head_on_a_Stick
Then run this on the Windows machine:
Code:
apt-offline get C:\apt-offline.sig --threads 5
Then feed the data back to your Debian box:
Code:
apt-offline install /media/USB/apt-offline.zip
As I say, I've never used this so I may be completely wrong here.
The guides are a bit confusing on that point. apt-offline only generates the .zip file if you explicitly tell it to with the '--bundle' option. The default action is to create a directory and put the downloaded files there. So the quotes from the guide don't work together when cut-and-paste.
I am tempted to email the maintainer to let him know this thread exists. Its confusing to find such a fatal problem since I doubt I am the only apt-offline user. This strongly suggests that the mistake is mine.
Fix your sources.list so it actually points to the online repo's, rather than the CD/DVD, which clearly aren't available to the Win machine (which would be rather pointless too, no?)
I have managed to get an error message. It maybe unrelated to the problem at hand. apt-offline is Python. When using the python gui version of apt-offline, there are 2 strange things:
1, It refuses to acknowledge the 'download' button is pressed if the target is set to be a directory.
2, If the target is a .zip file, the download button works but the dialog window gives the following messages and generates a zero length file.
Code:
Fetching APT Data
ERROR: some int parsing problem
ERROR: some int parsing problem
ERROR: some int parsing problem
ERROR: some int parsing problem
ERROR: some int parsing problem
ERROR: some int parsing problem
Downloaded data to C:\apt-offline\debian-update2s.zip
Might just be related to the gui as no errors come out when using the command line.
I am running Win32 Python 2.7.9 default Dec 10 2014 MSC v. 1500 32bit intel (on a 32bit machine). I think I will downgrade Windows Python and try again when I can.
Fix your sources.list so it actually points to the online repo's, rather than the CD/DVD, which clearly aren't available to the Win machine (which would be rather pointless too, no?)
I think you have cracked it. The .sig file is changed. It is downloading something now. Thank you.
As a non-debian user, I would not think to do this when none of the guides mention it. It should also give an error ;o) Seemed reasonable to assume the online part did the online part.
Still not working. Failed at the 3rd hurdle. I think I am going to go back to bed, wasted so much time making this more difficult than it needs to be.
Code:
offline# cat /etc/apt/sources.list
deb http://ftp.us.debian.org/debian stable main contrib non-free
deb http://ftp.debian.org/debian/ wheezy-updates main contrib non-free
deb http://security.debian.org/ wheezy/updates main contrib non-free
Generate a new .sig with apt-offline. Now looks like...
Then transfer the .sig to windows
Then generate the .zip from the .sig on windows with apt-offline doing it's downloading thing.
Then transfer .zip file generated on windows back to Debian.
offline# apt-offline install debian-updatiie00.zip
ERROR: I couldn't understand file type ftp.us.debian.org_debian_dists_stable_Release.gpg.
ERROR: I couldn't understand file type ftp.debian.org_debian_dists_wheezy-updates_Release.gpg.
ERROR: I couldn't understand file type security.debian.org_dists_wheezy_updates_Release.gpg.
Then attempt to generate a new .sig file to get some packages -> they don't exist.
Code:
offline# apt-offline set --update --upgrade --install-packages libimlib2-dev libxtst-dev wm2 -- up40.sig
Generating database of files that are needed for an update.
Generating database of files that are needed for an upgrade.
Generating database of package libimlib2-dev, libxtst-dev, wm2, and its dependencies.
E: Unable to locate package libimlib2-dev
E: Package 'libxtst-dev' has no installation candidate
E: Unable to locate package wm2
ERROR: FATAL: Something is wrong with the apt system.
offline#
Seems to have give a different error for xtst than the other 2 packages requested. That is interesting.
So I am still looking into getting it working. Still struggling in my ignorance. I think I would be better equipped for this if I were to somehow become accustomed to the ordinary way of using Debian first. The fight goes on.
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628
Rep:
I am just curious as to why you are doing this.
You are using a completely unsuported Win version at work. This sounds like a bad OS to be facing the internet with.
Have you pursued the idea of running a light install of Debian on work computers? With VM or VB installed you could be running Win XP as a guest on the Debian host. Using the Debian browser and email client for on line work.
Much safer and you could then be familiar with "normal" package management of Debian.
I have nothing to offer on apt-offline. I have heard of it. That is the total extent of my knowledge of it.
Seeing dos prompt commands does bring back very old memories of running MSDos though.
Never used it either, but I would try to do just an update first, to get your package lists up to date (the cdrom entries you have been using up to now might have crippled it a bit).
Then do an upgrade.
Then install your extra packages.
One of the errors stated that apt is broke, so I am downloading the debian-testing-i386-DVD-1.iso from a mirror (dated 2015-01-05). I will restart from scratch in case I broke something while frustrated. Jessie has the latest apt-offline so life should be simpler.
No point using the smaller CD images as I require -dev version of many files so I need the DVD. The Xtst-dev I need is on DVD-2 but it seems excessive to download an iso for a couple of files, plus the Imlib2-dev that I also seek is not in DVD-2 or DVD-3, so it would not get me all I need anyway. I will still need to add packages after install regardless.
Quote:
Originally Posted by descendant_command
Never used it either, but I would try to do just an update first, to get your package lists up to date (the cdrom entries you have been using up to now might have crippled it a bit).
Then do an upgrade.
Then install your extra packages.
Yes, the first round-trip is supposed to update the package list on the offline box. But after this was performed the packages I wanted didn't seem to be known to the apt-offline package manager. I looked at the default package manager Gui on Wheeze for a second opinion and it only listed the packages I had already actually installed as existing. Something went wrong.
Hopes reinstalling with a Jessica DVD-1 instead will give a better clean slate to try again.
Quote:
Originally Posted by widget
I am just curious as to why you are doing this.
You are using a completely unsuported Win version at work. This sounds like a bad OS to be facing the internet with.
Couldn't agree more. Can't do anything about it. Had a nice boss that let me use Gentoo for a while, but times change. I appreciate the post, and grumble about the reality!
Also change that "stable" in your sources.list to "wheezy" or you will have an interesting time in summer when jessie moves to Stable...
Good spot. I feared finger trouble so that particular sources.list file was actually generated by http://debgen.simplylinux.ch/ with 'Wheezy' selected on the left. Give it a try. You can expect everyone who used that web site to have fun in summer!
Does anyone generate debian-testing-i386-DVD-4.iso? If they do, it would belay my problems.
Quote:
Originally Posted by Gordon47
I require -dev version of many files so I need the DVD. The Xtst-dev I need is on DVD-2 but it seems excessive to download an iso for a couple of files, plus the Imlib2-dev that I also seek is not in DVD-2 or DVD-3, so it would not get me all I need anyway. I would still need to add packages after install regardless.
I have just noticed that Imlib2-dev is listed in debian-testing-i386-DVD-4.list.gz Do any of the sites carry debian-testing-i386-DVD-4.iso? If they do, I could get DVD-2, and DVD-4 (attempt to skip DVD-3 if DVD-4 happens to work without it in my case). These two deb packages would full-fill my minimum initial requirements. If DVD-4 exists, I'd be OK for a few months without needing apt-offline.
Now that I have written the above; perhaps it would make more sense to use Wheezy 7.8 DVDs 1,2&4. Give up on new versions of software and stay on 7.8 Wheezy DVDs as a fixed and consistent reference point for a few years. At a fixed reference version I could downloading additional old DVDs from that version as and when I find I need other programs they contain.
Giving up on newer package versions would allow me to use Debian offline while retaining the ability to add other packages later. An annoying compromise since apt-offline isn't working.
*Edit* Weird, the MD5SUM for debian-7.8.0-i386-DVD-4.iso is given on primary
cdimage.debian.org/debian-cd/current/i386/iso-dvd/
..so it must exist, but there is no file? I can understand why the .iso might not exist. But then why publish it's MD5 sum?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.