Author Topic: Update/upgrade MD's from core not internet?  (Read 11917 times)

tompin2

  • Veteran
  • ***
  • Posts: 131
    • View Profile
Update/upgrade MD's from core not internet?
« on: June 02, 2011, 06:31:20 am »
Hi to all,

Is it possible to update/upgrade all the MD's from the core?.  If I have several MD's if i want to keep them updated, all of them have to download from the internet the packages.  Since they all boot up from the core, which means that they all should be at the same version of the core, would be faster to set up all the MD's to do the apt-get update/upgrade  from the core?
My apologies if this is a dumb question, I just couldn't find an answer  on the forum search

Cheers,

T

purps

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1402
  • If it ain't broke, tweak it
    • View Profile
Re: Update/upgrade MD's from core not internet?
« Reply #1 on: June 02, 2011, 11:07:57 am »
I do this with SSH.

If you are on your core, you can do...
Code: [Select]
sudo su -
ssh moonXX

...where XX is the device number of the MD (find this out in web admin).

Alternatively, if you are on another machine on the internal network, you can do...
Code: [Select]
sudo ssh root@192.168.80.1
ssh moonXX

...assuming you are using the standard internal IP of 192.168.80.1.

Note that it is necessary to SSH into the core as root because if you SSH in with your user ("purps" in my case), you won't have any admin privileges once you have SSHed into the MD.

More information about logging in etc here http://wiki.linuxmce.org/index.php/Logging_In

Cheers,
Matt.

EDIT: I just re-read your post. Don't think I answered your question did I. Why don't you want to download from Internet? Do you have monthly download limits or something?
1004 RC :: looking good :: upgraded 01/04/2013
my setup :: http://wiki.linuxmce.org/index.php/User:Purps

bongowongo

  • wants to work for LinuxMCE
  • **
  • Posts: 826
    • View Profile
Re: Update/upgrade MD's from core not internet?
« Reply #2 on: June 02, 2011, 11:31:47 am »
1. Quicker
2. Less bandwith from user and from supplier side
3. Bongojoke

Marie.O

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 3676
  • Wastes Life On LinuxMCE Since 2007
    • View Profile
    • My Home
Re: Update/upgrade MD's from core not internet?
« Reply #3 on: June 02, 2011, 12:30:19 pm »
tompin2,

atm there is no defined way to update the MDs from a single (non Internet point). One way of achieving it, would be to copy the contents of the core's /var/cache/apt/archive directory into each MDs /usr/pluto/deb-cache dir, and rebuild the Packages file in the /usr/pluto/deb-cache directory, remove all the other sources from /etc/apt/sources.list except the file entry pointing to deb-cache.

Try if you can get it working, and maybe even write a small script, doing the steps for you one after the other.

Good luck.

tompin2

  • Veteran
  • ***
  • Posts: 131
    • View Profile
Re: Update/upgrade MD's from core not internet?
« Reply #4 on: June 03, 2011, 03:27:42 am »
Thanks to all, Im not good in linux but I will give it my best.  Maybe I find something usefull for all.  The way I see it is that I see an option under webadmin that you could just click to the MD page and update/upgrade, maybe it is not possible, maybe it is.  For now, a good script should be a good progress.  I hope I get the knoledge soon to make my own script and share it to all.

I will Keep all posted.

T

l3mce

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1084
    • View Profile
Re: Update/upgrade MD's from core not internet?
« Reply #5 on: June 03, 2011, 05:34:17 pm »
http://svn.linuxmce.org/trac.cgi/ticket/1099

Should work. Presumes MDs are on. Testing now. Can probably make a button in computing pretty easy. Will get back.


*I'm an idiot... that first one will exit after first moon unit is upgraded.
« Last Edit: June 03, 2011, 05:44:26 pm by l3mce »
I never quit... I just ping out.

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2428
    • View Profile
    • ago control
Re: Update/upgrade MD's from core not internet?
« Reply #6 on: June 03, 2011, 05:36:56 pm »
http://svn.linuxmce.org/trac.cgi/ticket/1099

Should work. Testing now. Can probably make a button in computing pretty easy. Will get back.
you should backup sources.list before overwriting

br Hari
rock your home - http://www.agocontrol.com home automation

huh

  • Guru
  • ****
  • Posts: 245
    • View Profile
Re: Update/upgrade MD's from core not internet?
« Reply #7 on: June 03, 2011, 06:37:24 pm »
http://svn.linuxmce.org/trac.cgi/ticket/1099

Can probably make a button in computing pretty easy.

Isn't there already a button under advanced called "upgrade" or something similar?

l3mce

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1084
    • View Profile
Re: Update/upgrade MD's from core not internet?
« Reply #8 on: June 03, 2011, 06:43:05 pm »
There is... but I believe this does not address MDs. I am thinking of just a global update button you can click if you want. I am also going to tar all of the md directories on the core, and try and use the systems db backup in case things go terribly wrong.

hari: done

Everyone else: completely redoing this and chrooting the MDs for upgrade. Ignore that first stumble into the idea. And the ticket has been closed. So much for a quick attack.
I never quit... I just ping out.

Marie.O

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 3676
  • Wastes Life On LinuxMCE Since 2007
    • View Profile
    • My Home
Re: Update/upgrade MD's from core not internet?
« Reply #9 on: June 03, 2011, 07:00:34 pm »
The ticket got closed, because we already have ticket 341 which does the same thing, and which already has most of the functionality in place (except the part of disabling the daemon autostart while in chroot). l3mce will take what we have, and add a few things to it.

l3mce

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1084
    • View Profile
Re: Update/upgrade MD's from core not internet?
« Reply #10 on: June 04, 2011, 01:09:16 am »
http://svn.linuxmce.org/trac.cgi/attachment/ticket/341/globalUpgrades.10.sh

That is where I am. Here is the output after upgrading... (note core had already been upgraded, and output was huge due to database upgrade)

Code: [Select]
# /usr/pluto/bin/globalUpgrades.sh
Ign file: ./ Release.gpg
Ign file: ./ Translation-en_US                                                                                     
Ign file: ./ Release                                                                                               
Ign file: ./ Packages                                                                                               
Ign http://debian.slimdevices.com stable Release.gpg                                                               
Hit http://old-releases.ubuntu.com intrepid Release.gpg                                                             
Ign http://old-releases.ubuntu.com intrepid/main Translation-en_US                                               
Ign http://old-releases.ubuntu.com intrepid/restricted Translation-en_US                   
Ign http://archive.ubuntu.com intrepid Release.gpg                                         
Ign http://archive.ubuntu.com intrepid/main Translation-en_US                                                   
Ign http://debian.slimdevices.com stable/main Translation-en_US                                                 
Get:1 http://packages.medibuntu.org intrepid Release.gpg [197B]                           
Ign http://old-releases.ubuntu.com intrepid/universe Translation-en_US                                             
Ign http://old-releases.ubuntu.com intrepid/multiverse Translation-en_US                                           
Hit http://old-releases.ubuntu.com intrepid-security Release.gpg                                                   
Ign http://old-releases.ubuntu.com intrepid-security/main Translation-en_US                                         
Ign http://old-releases.ubuntu.com intrepid-security/restricted Translation-en_US                                   
Ign http://old-releases.ubuntu.com intrepid-security/multiverse Translation-en_US                                   
Ign http://old-releases.ubuntu.com intrepid-security/universe Translation-en_US                                     
Hit http://old-releases.ubuntu.com intrepid-updates Release.gpg                                                     
Ign http://deb.linuxmce.org intrepid Release.gpg                                                                   
Ign http://deb.linuxmce.org intrepid/beta2 Translation-en_US                                                       
Ign http://deb.linuxmce.org 20dev_ubuntu Release.gpg                                                               
Get:2 http://debian.slimdevices.com stable Release [1645B]                                                         
Ign http://old-releases.ubuntu.com intrepid-updates/main Translation-en_US                                         
Ign http://old-releases.ubuntu.com intrepid-updates/restricted Translation-en_US                                   
Ign http://archive.ubuntu.com intrepid Release                                                                     
Ign http://old-releases.ubuntu.com intrepid-updates/multiverse Translation-en_US                                   
Ign http://deb.linuxmce.org 20dev_ubuntu/main Translation-en_US                                                     
Ign http://deb.linuxmce.org replacements_ubuntu Release.gpg                               
Ign http://deb.linuxmce.org replacements_ubuntu/main Translation-en_US                     
Ign http://deb.linuxmce.org intrepid Release                                               
Ign http://old-releases.ubuntu.com intrepid-updates/universe Translation-en_US             
Ign http://old-releases.ubuntu.com replacements_debian Release.gpg                                               
Ign http://old-releases.ubuntu.com replacements_debian/main Translation-en_US                                   
Hit http://old-releases.ubuntu.com intrepid Release                                                             
Hit http://old-releases.ubuntu.com intrepid-security Release                                                     
Ign http://debian.slimdevices.com stable/main Packages                                                             
Ign http://archive.ubuntu.com intrepid/main Packages                                                               
Ign http://packages.medibuntu.org intrepid/free Translation-en_US                                               
Hit http://debian.slimdevices.com stable/main Packages                                                             
Ign http://deb.linuxmce.org 20dev_ubuntu Release                                                                   
Ign http://deb.linuxmce.org replacements_ubuntu Release                                                             
Hit http://old-releases.ubuntu.com intrepid-updates Release                                           
Err http://archive.ubuntu.com intrepid/main Packages                                                               
  404 Not Found [IP: 91.189.88.140 80]
Ign http://old-releases.ubuntu.com replacements_debian Release                                                     
Ign http://deb.linuxmce.org intrepid/beta2 Packages                                                   
Hit http://old-releases.ubuntu.com intrepid/main Packages           
Hit http://old-releases.ubuntu.com intrepid/restricted Packages     
Hit http://old-releases.ubuntu.com intrepid/universe Packages
Hit http://old-releases.ubuntu.com intrepid/multiverse Packages
Hit http://old-releases.ubuntu.com intrepid/main Sources
Hit http://old-releases.ubuntu.com intrepid/restricted Sources
Ign http://packages.medibuntu.org intrepid/non-free Translation-en_US
Hit http://old-releases.ubuntu.com intrepid/multiverse Sources
Hit http://old-releases.ubuntu.com intrepid/universe Sources                   
Hit http://old-releases.ubuntu.com intrepid-security/main Packages             
Hit http://old-releases.ubuntu.com intrepid-security/restricted Packages       
Ign http://deb.linuxmce.org 20dev_ubuntu/main Packages                                               
Hit http://old-releases.ubuntu.com intrepid-security/multiverse Packages                             
Hit http://old-releases.ubuntu.com intrepid-security/universe Packages                               
Hit http://old-releases.ubuntu.com intrepid-security/main Sources                                     
Hit http://old-releases.ubuntu.com intrepid-security/restricted Sources         
Hit http://old-releases.ubuntu.com intrepid-security/multiverse Sources         
Hit http://old-releases.ubuntu.com intrepid-security/universe Sources           
Hit http://old-releases.ubuntu.com intrepid-updates/main Packages               
Ign http://deb.linuxmce.org replacements_ubuntu/main Packages                   
Hit http://old-releases.ubuntu.com intrepid-updates/restricted Packages
Hit http://old-releases.ubuntu.com intrepid-updates/multiverse Packages
Hit http://old-releases.ubuntu.com intrepid-updates/universe Packages
Hit http://old-releases.ubuntu.com intrepid-updates/main Sources
Hit http://old-releases.ubuntu.com intrepid-updates/restricted Sources
Hit http://old-releases.ubuntu.com intrepid-updates/multiverse Sources
Hit http://packages.medibuntu.org intrepid Release                   
Hit http://old-releases.ubuntu.com intrepid-updates/universe Sources
Ign http://old-releases.ubuntu.com replacements_debian/main Packages                                 
Hit http://deb.linuxmce.org intrepid/beta2 Packages                                                   
Err http://old-releases.ubuntu.com replacements_debian/main Packages           
  404 Not Found
Hit http://deb.linuxmce.org 20dev_ubuntu/main Packages                         
Hit http://packages.medibuntu.org intrepid/free Packages
Hit http://deb.linuxmce.org replacements_ubuntu/main Packages
Hit http://packages.medibuntu.org intrepid/non-free Packages
Fetched 198B in 2s (85B/s)                               
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/intrepid/main/binary-i386/Packages.gz  404 Not Found [IP: 91.189.88.140 80]

W: Failed to fetch http://old-releases.ubuntu.com/ubuntu/dists/replacements_debian/main/binary-i386/Packages.gz  404 Not Found

E: Some index files failed to download, they have been ignored, or old ones used instead.
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Core upgraded, tarring Media Directors
touch: cannot touch `/tmp/tmp.viWgH27643/etc/chroot-install': No such file or directory
mv: cannot stat `/tmp/tmp.viWgH27643/usr/sbin/invoke-rc.d': No such file or directory
mv: cannot stat `/tmp/tmp.viWgH27643/sbin/start-stop-daemon': No such file or directory
/usr/pluto/bin/globalUpgrade.sh: line 21: /tmp/tmp.viWgH27643/usr/sbin/invoke-rc.d: No such file or directory
/usr/pluto/bin/globalUpgrade.sh: line 22: /tmp/tmp.viWgH27643/sbin/start-stop-daemon: No such file or directory
chmod: cannot access `/tmp/tmp.viWgH27643/usr/sbin/invoke-rc.d': No such file or directory
chmod: cannot access `/tmp/tmp.viWgH27643/sbin/start-stop-daemon': No such file or directory
 ! Package pluto-system-database (filename /var/cache/apt/archives/pluto-system-database_2.0.0.44.11041123890_i386.deb) is repeat;
   ignored that one and using data from /var/cache/apt/archives/pluto-system-database_2.0.0.44.11052524012_i386.deb !
 ! Package pluto-boot-scripts (filename /var/cache/apt/archives/pluto-boot-scripts_2.0.0.44.11032623855_i386.deb) is repeat;
   ignored that one and using data from /var/cache/apt/archives/pluto-boot-scripts_2.0.0.44.11052524012_i386.deb !
 ! Package pluto-website-admin (filename /var/cache/apt/archives/pluto-website-admin_2.0.0.44.11041423901_i386.deb) is repeat;
   ignored that one and using data from /var/cache/apt/archives/pluto-website-admin_2.0.0.44.11052524012_i386.deb !
 ** Packages in archive but missing from override file: **
  lmce-game-player lmce-game-plugin lmce-mediatomb lmce-sdlmame lmce-
  sdlmess pluto-avwizard pluto-boot-scripts pluto-media-database
  pluto-mythtv-plugin pluto-orbiter pluto-orbitergen pluto-pnp-
  detection pluto-proxy-orbiter pluto-simplephone pluto-std-plugins
  pluto-system-database pluto-updateentarea pluto-updatemedia pluto-
  website-admin pluto-xine-plugin pluto-zwave-lighting

 Wrote 21 entries to output Packages file.
cp: omitting directory `/var/cache/apt/archives/partial'
Ign file: ./ Release.gpg
Ign file: ./ Release
Ign file: ./ Packages
Reading package lists... Done
ping: unknown host moon
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages have been kept back:
  mythtv-backend mythtv-common mythtv-database mythtv-frontend
The following packages will be upgraded:
  pluto-avwizard pluto-boot-scripts pluto-orbiter pluto-pnp-detection pluto-simplephone
5 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
Need to get 0B/25.2MB of archives.
After this operation, 3178kB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
  pluto-avwizard pluto-pnp-detection pluto-boot-scripts pluto-simplephone pluto-orbiter
Authentication warning overridden.
Can not write log, openpty() failed (/dev/pts not mounted?)
(Reading database ... 113779 files and directories currently installed.)
Preparing to replace pluto-avwizard 2.0.0.44.11012423661 (using .../pluto-avwizard_2.0.0.44.11041123890_i386.deb) ...
Unpacking replacement pluto-avwizard ...
Preparing to replace pluto-pnp-detection 2.0.0.44.11030723802 (using .../pluto-pnp-detection_2.0.0.44.11052524012_i386.deb) ...
Unpacking replacement pluto-pnp-detection ...
Preparing to replace pluto-boot-scripts 2.0.0.44.11030723802 (using .../pluto-boot-scripts_2.0.0.44.11052524012_i386.deb) ...
Leaving `diversion of /usr/sbin/NetworkManager to /usr/sbin/NetworkManager.wraped by pluto-boot-scripts'
Unpacking replacement pluto-boot-scripts ...
Preparing to replace pluto-simplephone 2.0.0.44.11012423661 (using .../pluto-simplephone_2.0.0.44.11041123890_i386.deb) ...
Unpacking replacement pluto-simplephone ...
Preparing to replace pluto-orbiter 2.0.0.44.11030723802 (using .../pluto-orbiter_2.0.0.44.11052524012_i386.deb) ...
Unpacking replacement pluto-orbiter ...
Can not write log, openpty() failed (/dev/pts not mounted?)
Setting up pluto-avwizard (2.0.0.44.11041123890) ...

Setting up pluto-pnp-detection (2.0.0.44.11052524012) ...
Setting up pluto-boot-scripts (2.0.0.44.11052524012) ...
Installing new version of config file /etc/init.d/linuxmce ...

Setting up pluto-simplephone (2.0.0.44.11041123890) ...

Setting up pluto-orbiter (2.0.0.44.11052524012) ...
Upgrading from version '2.0.0.44.11030723802'. Not setting up X again

Moon57 upgraded
cp: omitting directory `/var/cache/apt/archives/partial'
Ign file: ./ Release.gpg
Ign file: ./ Release
Ign file: ./ Packages
Reading package lists... Done
ping: unknown host moon
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages have been kept back:
  mythtv-backend mythtv-common mythtv-database mythtv-frontend
The following packages will be upgraded:
  lmce-game-player lmce-sdlmame lmce-sdlmess pluto-avwizard pluto-boot-scripts pluto-orbiter pluto-pnp-detection
  pluto-simplephone
8 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
Need to get 0B/48.9MB of archives.
After this operation, 20.4MB disk space will be freed.
WARNING: The following packages cannot be authenticated!
  lmce-sdlmame lmce-sdlmess lmce-game-player pluto-avwizard pluto-pnp-detection pluto-boot-scripts
  pluto-simplephone pluto-orbiter
Authentication warning overridden.
Can not write log, openpty() failed (/dev/pts not mounted?)
(Reading database ... 113455 files and directories currently installed.)
Preparing to replace lmce-sdlmame 2.0.0.44.11012423661 (using .../lmce-sdlmame_2.0.0.44.11052524012_i386.deb) ...
Unpacking replacement lmce-sdlmame ...
Preparing to replace lmce-sdlmess 2.0.0.44.11012423661 (using .../lmce-sdlmess_2.0.0.44.11052524012_i386.deb) ...
Unpacking replacement lmce-sdlmess ...
Preparing to replace lmce-game-player 2.0.0.44.11012423661 (using .../lmce-game-player_2.0.0.44.11052524012_i386.deb) ...
Unpacking replacement lmce-game-player ...
Preparing to replace pluto-avwizard 2.0.0.44.11012423661 (using .../pluto-avwizard_2.0.0.44.11041123890_i386.deb) ...
Unpacking replacement pluto-avwizard ...
Preparing to replace pluto-pnp-detection 2.0.0.44.11030723802 (using .../pluto-pnp-detection_2.0.0.44.11052524012_i386.deb) ...
Unpacking replacement pluto-pnp-detection ...
Preparing to replace pluto-boot-scripts 2.0.0.44.11030723802 (using .../pluto-boot-scripts_2.0.0.44.11052524012_i386.deb) ...
Leaving `diversion of /usr/sbin/NetworkManager to /usr/sbin/NetworkManager.wraped by pluto-boot-scripts'
Unpacking replacement pluto-boot-scripts ...
Preparing to replace pluto-simplephone 2.0.0.44.11012423661 (using .../pluto-simplephone_2.0.0.44.11041123890_i386.deb) ...
Unpacking replacement pluto-simplephone ...
Preparing to replace pluto-orbiter 2.0.0.44.11030723802 (using .../pluto-orbiter_2.0.0.44.11052524012_i386.deb) ...
Unpacking replacement pluto-orbiter ...
Can not write log, openpty() failed (/dev/pts not mounted?)
Setting up lmce-sdlmame (2.0.0.44.11052524012) ...
Setting up lmce-sdlmess (2.0.0.44.11052524012) ...
Setting up lmce-game-player (2.0.0.44.11052524012) ...

Setting up pluto-avwizard (2.0.0.44.11041123890) ...

Setting up pluto-pnp-detection (2.0.0.44.11052524012) ...
Setting up pluto-boot-scripts (2.0.0.44.11052524012) ...
Installing new version of config file /etc/init.d/linuxmce ...

Setting up pluto-simplephone (2.0.0.44.11041123890) ...

Setting up pluto-orbiter (2.0.0.44.11052524012) ...
Upgrading from version '2.0.0.44.11030723802'. Not setting up X again

Moon69 upgraded
cp: omitting directory `/var/cache/apt/archives/partial'
Ign file: ./ Release.gpg
Ign file: ./ Release
Ign file: ./ Packages
Reading package lists... Done
ping: unknown host moon
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages have been kept back:
  mythtv-backend mythtv-common mythtv-database mythtv-frontend
The following packages will be upgraded:
  pluto-avwizard pluto-boot-scripts pluto-orbiter pluto-pnp-detection pluto-simplephone
5 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
Need to get 0B/25.2MB of archives.
After this operation, 3178kB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
  pluto-avwizard pluto-pnp-detection pluto-boot-scripts pluto-simplephone pluto-orbiter
Authentication warning overridden.
Can not write log, openpty() failed (/dev/pts not mounted?)
(Reading database ... 113450 files and directories currently installed.)
Preparing to replace pluto-avwizard 2.0.0.44.11012423661 (using .../pluto-avwizard_2.0.0.44.11041123890_i386.deb) ...
Unpacking replacement pluto-avwizard ...
Preparing to replace pluto-pnp-detection 2.0.0.44.11030723802 (using .../pluto-pnp-detection_2.0.0.44.11052524012_i386.deb) ...
Unpacking replacement pluto-pnp-detection ...
Preparing to replace pluto-boot-scripts 2.0.0.44.11030723802 (using .../pluto-boot-scripts_2.0.0.44.11052524012_i386.deb) ...
Leaving `diversion of /usr/sbin/NetworkManager to /usr/sbin/NetworkManager.wraped by pluto-boot-scripts'
Unpacking replacement pluto-boot-scripts ...
Preparing to replace pluto-simplephone 2.0.0.44.11012423661 (using .../pluto-simplephone_2.0.0.44.11041123890_i386.deb) ...
Unpacking replacement pluto-simplephone ...
Preparing to replace pluto-orbiter 2.0.0.44.11030723802 (using .../pluto-orbiter_2.0.0.44.11052524012_i386.deb) ...
Unpacking replacement pluto-orbiter ...
Can not write log, openpty() failed (/dev/pts not mounted?)

Setting up pluto-avwizard (2.0.0.44.11041123890) ...

Setting up pluto-pnp-detection (2.0.0.44.11052524012) ...
Setting up pluto-boot-scripts (2.0.0.44.11052524012) ...
Installing new version of config file /etc/init.d/linuxmce ...

Setting up pluto-simplephone (2.0.0.44.11041123890) ...

Setting up pluto-orbiter (2.0.0.44.11052524012) ...
Upgrading from version '2.0.0.44.11030723802'. Not setting up X again

Moon82 upgraded

I clearly have a couple things to fix, and a few things I already have.

***The latest script is untested. I believe it works as desired. Will test shortly... including force closing to test the trap.
« Last Edit: June 06, 2011, 02:50:44 am by l3mce »
I never quit... I just ping out.

phenigma

  • LinuxMCE God
  • ****
  • Posts: 1758
    • View Profile
Re: Update/upgrade MD's from core not internet?
« Reply #11 on: June 06, 2011, 03:40:49 am »
Great work!

An observation:

MDs already mount the core's /usr/pluto/deb-cache when they boot, for chroot upgrades the directory can be bound locally (mount --bind /usr/pluto/deb-cache /usr/pluto/diskless/XX/usr/pluto/deb-cache) on the core, negating the need to copy the .debs to the /usr/pluto/diskless/* locations.  Duplicating the contents of the core's /usr/pluto/deb-cache for each MD is redundant and adds up to a huge amount of HD space.

Upgrade the core, then copy the contents of /var/cache/apt/archives/*.deb to /usr/pluto/deb-cache, run dpkg-scanpackages and gzip the Packages file.  Then all MDs can have access to the latest files.

J.

l3mce

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1084
    • View Profile
Re: Update/upgrade MD's from core not internet?
« Reply #12 on: June 06, 2011, 04:09:29 am »
Great work!

An observation:

MDs already mount the core's /usr/pluto/deb-cache when they boot, for chroot upgrades the directory can be bound locally (mount --bind /usr/pluto/deb-cache /usr/pluto/diskless/XX/usr/pluto/deb-cache) on the core, negating the need to copy the .debs to the /usr/pluto/diskless/* locations.  Duplicating the contents of the core's /usr/pluto/deb-cache for each MD is redundant and adds up to a huge amount of HD space.

Upgrade the core, then copy the contents of /var/cache/apt/archives/*.deb to /usr/pluto/deb-cache, run dpkg-scanpackages and gzip the Packages file.  Then all MDs can have access to the latest files.

J.

Thanks for the feedback.

On my 810 install, the only files that exist in the cores /var/cache/apt/archives are ones which upgrade. This is possibly a result of something in the past I have done.

Yes... it took me a couple of rereads to understand, and a little poking around to confirm, but you are exactly right... and that cleans this whole process up. Thank you very much. MUCH better way to handle it. I didn't realize a lot of that... and now I don't have to edit that Packages file... yay.


http://svn.linuxmce.org/trac.cgi/attachment/ticket/341/globalUpgrades.13.sh

That is so much cleaner. Will test in a few. Thanks again Phenigma! I have never used --bind before... I am presuming that I can umount the second directory in the bind when I am done with the process for each MD to avoid... weirdness.
« Last Edit: June 06, 2011, 05:27:10 am by l3mce »
I never quit... I just ping out.

phenigma

  • LinuxMCE God
  • ****
  • Posts: 1758
    • View Profile
Re: Update/upgrade MD's from core not internet?
« Reply #13 on: June 06, 2011, 05:18:23 am »
Good stuff!  Yep, unmount using the dir listed 2nd in the mount command.

I noticed that you're altering the init/startup scripts on the core instead of the MDs.  This needs to be done for an MD that is updated via chroot, but not ssh.  I'm attaching the version I tinkered with a little, it takes these things into account and should restore the original sources.list files.  I admit I'm only just learning about trap now as well.  I've tested it but not much.  Keep up the good work!

J.
« Last Edit: June 06, 2011, 05:24:58 am by phenigma »

l3mce

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1084
    • View Profile
Re: Update/upgrade MD's from core not internet?
« Reply #14 on: June 06, 2011, 05:40:17 am »
I also made a few changes...

My understanding was that I needed to address the scripts from the core, but expect you are correct. Thank you very much.
I do not understand:
Code: [Select]
mv /usr/pluto/diskless/$moonDir/usr/sbin/invoke-rc.d{,.lmce-update}or
Code: [Select]
mv /usr/pluto/diskless/$moonDir/usr/sbin/invoke-rc.d{.lmce-update,}
Though in the Diskless_CreateTBZ.sh which I was stealing some of this method from it worked similarly. I was just moving the damned files obviously.

Also, if the files exist (as we make fakes), will this methodology require a -f (force) move to avoid overwrite confirmation?

How does this look?
http://svn.linuxmce.org/trac.cgi/attachment/ticket/341/globalUpgrades.15.sh
Other than not being as pretty as yours...
« Last Edit: June 06, 2011, 06:14:10 am by l3mce »
I never quit... I just ping out.