Author Topic: Update / Upgrade with Limited Internet Access  (Read 10193 times)

Armor Gnome

  • Guru
  • ****
  • Posts: 309
    • View Profile
Update / Upgrade with Limited Internet Access
« on: August 06, 2012, 05:01:17 pm »
#What began as a discussion and a request for help is now being written into a guide.  If you have additional suggestions or comments please continue to post them on this thread and I will attempt to keep this current.

Primary complaint(s) covered:

update/upgrade fails
too much to download at once
can't complete an update/upgrade
apt-get upgrade interrupted
apt-get update interrupted

Without a long explanation into the various apt-get commands I am going to generalize some functions and how they may affect those of us with less than ideal network connections, ie. 3G network cards, dial-up, limited download plans, etc.

Quote
sudo apt-get update

You will see reference to this all over the wiki and forums.  This command is used to check your currently installed package versions against what is available from your list of repositories in the sources file.  Think of this command as a way to verify you have the latest (and hopefully) the greatest LinuxMCE features running on your machine.  This step is critical for future steps in the updating process.  If your machine does not know what it needs to fetch it can't very well fetch it.

Quote
sudo apt-get upgrade

If you are reading this thread as a guide than this is more than likely the problem you are having.  After a successful update fetch, your system now has a list of packages that it needs to go out to your repositories and download.  The process by which it does this however may be causing you problems if there is a considerable amount of material to download.  A apt-get upgrade command needs to download EVERY package before it will process and install them on your system.  If at any point during your download your connection to the internet fails the entire process is abandoned and no upgrade occurs.  There is a way around this and while not as quick and easy as using upgrade, it will update your system and gives you a verification step to know you have the latest (and hopefully) the greatest.

Open KDE desktop session
Open a terminal session
Quote
sudo apt-get update
sudo apt-get upgrade
When prompted with the package list and total download size, select "N" for no
Create a new text document in ~/desktop/ name it anything you like or don't name it at all
Copy the list of files to download from your terminal window into the newly created text document

Now you need to be somewhat familiar with the size of various packages before you continue.  This will take some time but in general the lmce-skins and pluto-skins packages can be quite large as can anything with reference to database or mce-diskless.  The majority of remaining packages are fairly lightweight and can be downloaded on even the slowest connection.

Quote
sudo apt-get install <first package in your text document>

What you have just done is instructed your machine to only upgrade one package instead of everything all at once. If the download was successful then it installed needed dependencies and upgraded your system.  To continue on you may wish to do several packages at once...

Quote
sudo apt-get install <first package> <second package> <third package> ...

To verify that you have in fact upgraded your system, once you have completed an install command you simply need to repeat the first steps of this guide.
Quote
sudo apt-get update
sudo apt-get upgrade
Select N for no, and notice that the list of packages remaining to download is now reduced or empty.

The more experience you have with various packages you may wish to skip certain upgrades and do a copy-paste-edit-copy-paste method.  To do this delete large packages from the text file you pasted into.  Keep package names spaced as they were. 
Copy the updated list of packages
Go back to your terminal session
Quote
sudo apt-get install <Ctrl + v>

I hope this guide is helpful to the few of us left suffering with slower internet connections.  Post a reply or drop me a message with any problems you have using the instructions above.




#Original thread content left for the time being

I watched the apt-get update / apt-get upgrade failures on my core closely and have a question for the more experienced bash users.  First my understanding of what these commands do.

sudo apt-get update:  sudo as I understand it is "SuperUserDO" or root permission says do this command.  Apt-get update, I understand to mean check repositories listed in my sources file and see what packages are newer than mine.  I further take this to mean its not looking for things I am missing, just newer versions?

sudo apt-get upgrade: go out and get the items found by doing the update command. Download everything to make them work (addition dependancies, lib files, etc).  Once all are downloaded, install and apply changes.

Please let me know if the above is accurate enough for what I am asking below.

After an update/upgrade command I show that I need roughly 500MB of downloaded items.  I also see a list of the packages and am given a yes/no option to begin.  The process once started goes for 150-200MB fetching this and that until it gets to a large item (80MB) or so.  It hangs here for a moment and then spits 30 lines or so of failed to fetch.  Nothing installed or upgraded that I can tell as it never got to that point.

If the above is also correct and if dropped connection or DL stumble kills the process, is there a command such as:

apt-get upgrade <single_package_name> ?
apt-get upgrade <100MB only> ?



I know I can do a sudo apt-get install <package_name> but I don't see where that checks the version like an update/upgrade would.

I realize I am showing my green here but there is a TON of things to understand if I don't have ideal hardware, Internet connection, etc or if I want to contribute and develop.  
« Last Edit: August 07, 2012, 05:54:03 am by Armor Gnome »
I made a wiki!  Click here to check out my system.

bri_jac

  • Regular Poster
  • **
  • Posts: 22
    • View Profile
Re: apt-get upgrade issues
« Reply #1 on: August 06, 2012, 05:13:44 pm »
The best answer I could find for you is this guide:

https://help.ubuntu.com/community/AptGet/Howto/

JaseP

  • Addicted
  • *
  • Posts: 526
    • View Profile
    • JaseP's LinuxMCE Wiki User page
Re: apt-get upgrade issues
« Reply #2 on: August 06, 2012, 05:50:48 pm »
You can also type:
man apt-get

Which will print out on screen the "man page" or in-system manual page for that command (if you have the man pages installed on the system, which they usually are by default). Arrow keys move around within the man page. The "Q" key (lower case) quits. Man pages will give you syntax, options, and sometimes related commands.

Sudo is technically not the root user,... it is somewhat similar to the su command often (traditionally) used in RPM based distros (Rehat Package Manager), which stands for "Switch User." However, to distinguish,... what sudo does is extend privilege changing  according to a list of authorized users. The sudoers list does not have to extend full authority over the entire system to those found on the sudoers list. Sudo is usually temporary (usually 5 min. duration), while su is usually until you "exit," back to your normal user (at least historically). Ordinarily, Debian based systems do not ship with an enabled root account. However, LinuxMCE changes this... Most "important" LinuxMCE services run as root (possibly a topic for a future security revision, back to a more standard operation scheme).

Hope this helps...
« Last Edit: August 06, 2012, 06:03:21 pm by JaseP »
See my User page on the LinuxMCE Wiki for a description of my system configuration (click the little globe under my profile pic).

Marie.O

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 3676
  • Wastes Life On LinuxMCE Since 2007
    • View Profile
    • My Home
Re: apt-get upgrade issues
« Reply #3 on: August 06, 2012, 06:04:54 pm »
sudo apt-get update <--- Updates the local information about available version

sudo apt-get upgrade <--- Based upon the versions available and the versions installed, installs new version of already installed programs, but does NOT install newly added required packages.

sudo apt-get dist-upgrade <--- Based upon the versions available and the versions installs, installs new version of already installed programs, installs any newly required program, and removes no longer needed programs.

sudo apt-get install <program> <--- Based upon the version available the version installed, installs new version, or the program itself. Will also install any new dependency (like dist-upgrade for all).

Armor Gnome

  • Guru
  • ****
  • Posts: 309
    • View Profile
Re: apt-get upgrade issues
« Reply #4 on: August 06, 2012, 07:54:39 pm »
After reading through that link I believe I will try

apt-get update
apt-get upgrade
decline with N
apt-get install <first listed item> <second listed item>
apt-get install <third listed item> <fourth listed item>
...
....
.....

apt-get update
apt-get upgrade

*success would equal an empty list on the last upgrade command.

Thanks for the input everyone.  The price I needed most was that apt-get install does get all dependancies and checks latest version just as a full upgrade does.
I made a wiki!  Click here to check out my system.

Armor Gnome

  • Guru
  • ****
  • Posts: 309
    • View Profile
Re: apt-get upgrade issues
« Reply #5 on: August 06, 2012, 08:02:09 pm »
apt-get update

runs fine
runs fine
(saving everyone a long read)
runs fine
runs fine

Reading package lists... Done
W: GPG error: http://packages.medibuntu.org lucid Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 2EBC26B60C5A2783


Going along with my plan unless the red above is an issue.
I made a wiki!  Click here to check out my system.

Marie.O

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 3676
  • Wastes Life On LinuxMCE Since 2007
    • View Profile
    • My Home
Re: apt-get upgrade issues
« Reply #6 on: August 06, 2012, 08:12:06 pm »
The GPG error can be ignored. It is merely a safety measure to make sure the other side is trusted by you. Google for NO_PUBKEY and you shall find lots of hits.

bushtech

  • Veteran
  • ***
  • Posts: 98
    • View Profile
Re: apt-get upgrade issues
« Reply #7 on: August 06, 2012, 08:27:06 pm »
 apt-get install medibuntu-keyring
Core:Asus P8H77-V, Intel core i3-3240 LGA155, Inno 3D Nvidia 240 GT (DVI+VGA+HDMI), 4Gb ram, 125Gb SSD
MD: Zotax Zbox ID41

JaseP

  • Addicted
  • *
  • Posts: 526
    • View Profile
    • JaseP's LinuxMCE Wiki User page
Re: apt-get upgrade issues
« Reply #8 on: August 06, 2012, 08:36:36 pm »
What also works with the Medibuntu repositories is switching to the kde desktop, opening a kde terminal, and cutting and pasting the code sections into the terminal from the Medibuntu how-to. Then you can also;

apt-get install synaptic

For the synaptic graphical package manager, afterwards. Synaptic's real easy to use, and search... For example, you can switch the maintainer to Medivuntu in a search to just see the Medibuntu packages. Don't go crazy though, because I've had some Medibuntu stuff mess up previous LinuxMCE 10.04 install attempts...
See my User page on the LinuxMCE Wiki for a description of my system configuration (click the little globe under my profile pic).

Armor Gnome

  • Guru
  • ****
  • Posts: 309
    • View Profile
Re: apt-get upgrade issues
« Reply #9 on: August 06, 2012, 08:42:25 pm »
Thank you Thank you Thank you

I have an updated system! I can honestly say that is probably a first in the 4 years I have been tinkering with LMCE.  I can't wait to go break stuff now! =)

One exception is "mce-diskless-tools" I can't pull down still, my connection spits at about 40MB.  For that one I am either thinking about dl'ing it at a friends house, putting it in a special folder of my /home/desktop and then pointing to that folder in my sources list.

If that doesn't work I will pull that case out of the wall and drive it to my friends place to update/upgrade it.

Thank you Thank you Thank you
I made a wiki!  Click here to check out my system.

Armor Gnome

  • Guru
  • ****
  • Posts: 309
    • View Profile
Re: apt-get upgrade issues
« Reply #10 on: August 06, 2012, 08:48:55 pm »
What also works with the Medibuntu repositories is switching to the kde desktop, opening a kde terminal, and cutting and pasting the code sections into the terminal from the Medibuntu how-to. Then you can also;

apt-get install synaptic

For the synaptic graphical package manager, afterwards. Synaptic's real easy to use, and search... For example, you can switch the maintainer to Medivuntu in a search to just see the Medibuntu packages. Don't go crazy though, because I've had some Medibuntu stuff mess up previous LinuxMCE 10.04 install attempts...

I will follow the guides provided here on adding the medibuntu-keyring, however I don't want to go adding additional 'non-standard' packages that might get in the way of sharing some of the things I have planned to work on for the lmce community.  For example I owe a quick guide on how I got dual display working on my nvidia card.  If I add anything to this system that other uses haven't then I would need to add those packages and repositories to anything I share.  I would also have a very hard time with my limited coding knowledge of knowing what works on standard lmce files and what only works on modified outside files.
I made a wiki!  Click here to check out my system.

JaseP

  • Addicted
  • *
  • Posts: 526
    • View Profile
    • JaseP's LinuxMCE Wiki User page
Re: apt-get upgrade issues
« Reply #11 on: August 06, 2012, 08:58:10 pm »
That's a safe bet... Mostly, all I've added are codecs, libdvdcss2, a couple of graphical ripping tools (AcidRip & Sound Juicer, I save Handbrake for my workstation), and the Intel micro-code stuff (the Intel "firmware" updates)...

The Devs approach LinuxMCE as an appliance, so the more you tinker, especially outside of the LinuxMCE way,... the more ticked they get with you ...  ;D

See my User page on the LinuxMCE Wiki for a description of my system configuration (click the little globe under my profile pic).

l3mce

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1084
    • View Profile
Re: apt-get upgrade issues
« Reply #12 on: August 06, 2012, 09:22:53 pm »
If you did not have internet available during install, the medibuntu key will not be installed. This key should be added as dvd playback will require libdvdcss2 which is available there.

sudo -s
. /usr/pluto/bin/dvd-installer.sh; gpgUpdate

At the moment, every time there is a build, there will be upwards of 500mb available for download. It is just your connection latency dropping you during mce-diskless-tools. I believe it is around 80 mb. Because these packages are available for updated, does not mean they have changed... at all. When a new build happens, a full build happens... so all become repackaged under the new scheme. I have a connection that ranges between 14 and 61kbps... with heaps of latency. What I do, is sudo apt-get upgrade and say no. I then copy this list to a file, and strip out the return characters, extra spaces, and anything with the word skins in it... and mce-diskless-toos and the pluto-sample-media. These packages are all huge, and almost never change. I they type sudo apt-get install <paste list I just made>

This downloads around 70mb usually. Much more manageable.
I never quit... I just ping out.

bushtech

  • Veteran
  • ***
  • Posts: 98
    • View Profile
Re: Update / Upgrade with Limited Internet Access
« Reply #13 on: August 10, 2012, 01:29:06 pm »
L3mce, thanks for this tip, going to help hugely with keeping up to date.

Just a question: I have now done this on my core (showing snap 926326 in webadmin/advanced) Now, what about the md's. My md still showing a much older snap as it's version. What is the best way to now get the md updated?

Thanks
Core:Asus P8H77-V, Intel core i3-3240 LGA155, Inno 3D Nvidia 240 GT (DVI+VGA+HDMI), 4Gb ram, 125Gb SSD
MD: Zotax Zbox ID41

l3mce

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1084
    • View Profile
Re: Update / Upgrade with Limited Internet Access
« Reply #14 on: August 10, 2012, 04:59:38 pm »
Well... the global upgrades script... but that will pull down all of the skins and whatnot... however then all MDs upgrade locally.

You could pin the versions of skins etc to the ones you have.
I never quit... I just ping out.