Author Topic: beta update the MDs?  (Read 10332 times)

schaferj

  • Veteran
  • ***
  • Posts: 133
    • View Profile
beta update the MDs?
« on: August 13, 2009, 08:57:11 pm »
Hello,

We were very happy to see news of the monster 0810 beta update on 10 August and 12 August. 

In previous beta installs, we have reinstalled from scratch and this time we'd like to try the update procedure at http://wiki.linuxmce.org/index.php/LinuxMCE-0810_alpha2

On dcerouter we do:
Code: [Select]
sudo apt-get update
sudo apt-get dist-upgrade

Will this update the media directors as well or do we need to chroot into them and execute the apt-get update / upgrade for each?

much thanks,
joseph

buckle

  • Veteran
  • ***
  • Posts: 68
    • View Profile
Re: beta update the MDs?
« Reply #1 on: August 13, 2009, 10:00:08 pm »
Doing a
Code: [Select]
sudo apt-get update
sudo apt-get dist-upgrade
on the core will not update the MD's. 
The same commands will need to be run from the MD's as well.  You should be able to take advantage of the core's local cache of the packages to speed it up (thanks to the new update from niz23).  At least it will happen much faster.

I _assume_ that the cache will be utilized from a chroot also, but I am not 100% sure.

schaferj

  • Veteran
  • ***
  • Posts: 133
    • View Profile
Re: beta update the MDs?
« Reply #2 on: August 14, 2009, 06:32:01 am »
the update / dist-upgrade does NOT appear to use the cache.

Can someone suggest whether it is faster & more reliable to delete the MD device and recreate it?

thanks,
joseph

niz23

  • Guru
  • ****
  • Posts: 361
    • View Profile
Re: beta update the MDs?
« Reply #3 on: August 14, 2009, 09:01:57 am »
hi,
the update / dist-upgrade does NOT appear to use the cache.

Can someone suggest whether it is faster & more reliable to delete the MD device and recreate it?

thanks,
joseph

To utilize the apt cache on existing MDs you need to do a manual change on your MD since there is no post install script that modify existing MDs.

The easiest way to make caching work on MDs it to copy a file named /etc/apt/apt.conf.d/02proxy to the same location within your MDs root.
When it is copied edit it to look like below. Make sure that you can do "ping dcerouter" from your MD first.
If not enter ip addr to core´s internal interface instead of hostname.

This line is in the file:
Acquire::http { Proxy "http://dcerouter:3142"; };



/niz23

pga57

  • Veteran
  • ***
  • Posts: 145
    • View Profile
Re: beta update the MDs?
« Reply #4 on: August 14, 2009, 10:45:16 am »
Hi,

I've not the /etc/apt/apt.conf.d/02proxy on the core or MD's (installed from alpha 2.28).
May I create it with a touch command or is there something else to do ?


Thanl's.
Philippe

gadget

  • Veteran
  • ***
  • Posts: 136
    • View Profile
Re: beta update the MDs?
« Reply #5 on: August 14, 2009, 01:47:47 pm »
I have just done the update on 2 of my MD's and was unable to boot either one afterwards.
sudo apt-get update
sudo apt-get dist-upgrade

Both froze at PVR250... something, dont remember exactly what.

Now i am unable to add an MD.

Code:

sudo apt-get update
sudo apt-get dist-upgrade

gadget

niz23

  • Guru
  • ****
  • Posts: 361
    • View Profile
Re: beta update the MDs?
« Reply #6 on: August 14, 2009, 02:20:41 pm »
Hi,

I've not the /etc/apt/apt.conf.d/02proxy on the core or MD's (installed from alpha 2.28).
May I create it with a touch command or is there something else to do ?


Thanl's.
Philippe


As I wrote earlier.
Copy the one you have on  your core to your same destination within your MD.
Edit the file and replace localhost or whatever is in there with the ip to your internal interface of your core.

/niz23

niz23

  • Guru
  • ****
  • Posts: 361
    • View Profile
Re: beta update the MDs?
« Reply #7 on: August 14, 2009, 04:07:44 pm »
There is a problem with apt-cacher-ng not being installed when you do a apt-get upgrade && apt-get dist-upgrade.
The cache functionality as of now is only installed on a new installation.

Sorry people.

I´ll try to sort it out this weekend and add a how to install it manually. With a script bash script.

/niz23

Zaerc

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 2256
  • Department of Redundancy Department.
    • View Profile
Re: beta update the MDs?
« Reply #8 on: August 14, 2009, 08:02:41 pm »
There is a problem with apt-cacher-ng not being installed when you do a apt-get upgrade && apt-get dist-upgrade.
The cache functionality as of now is only installed on a new installation.

Sorry people.

I´ll try to sort it out this weekend and add a how to install it manually. With a script bash script.

/niz23
Ummm, apt-get install apt-cacher-ng perhaps?
"Change is inevitable. Progress is optional."
-- Anonymous


niz23

  • Guru
  • ****
  • Posts: 361
    • View Profile
Re: beta update the MDs?
« Reply #9 on: August 14, 2009, 08:06:09 pm »
zaerc,
There is a problem with apt-cacher-ng not being installed when you do a apt-get upgrade && apt-get dist-upgrade.
The cache functionality as of now is only installed on a new installation.

Sorry people.

I´ll try to sort it out this weekend and add a how to install it manually. With a script bash script.

/niz23
Ummm, apt-get install apt-cacher-ng perhaps?

There is some mods to new-installer that take care of installing apt-cacher-ng and the create the 02proxy file in /etc/apt/apt.conf.d/
The other mod is for mce-diskless. A small fix that make sure apt is set up to use the cache when a new MD is generated.

It seem these mods is not committed to svn and therefore not included in 2.28 and later.

/niz23

schaferj

  • Veteran
  • ***
  • Posts: 133
    • View Profile
Re: beta update the MDs?
« Reply #10 on: August 16, 2009, 02:02:56 am »
Hello,

I can confirm that we do not have a 02proxy file in /etc/apt/apt.conf.d on the core.
For background - we have successfully updated to our core hybrid to alpha2.29 and our last install from scratch was 20090511 alpha2.19 and we look forward to the new cache capability soon.

thanks,
joseph




schaferj

  • Veteran
  • ***
  • Posts: 133
    • View Profile
Re: beta update the MDs?
« Reply #11 on: August 16, 2009, 03:30:28 am »
Hello,

We're still trying to update the MDs and appreciate advice. 

For now, we're trying to update our MDs from version alpha 2.19. Here's what we did.

radmin@dcerouter:~$ sudo su
[sudo] password for radmin:
dcerouter_112841:/home/radmin# chroot /usr/pluto/diskless/37/

root@dcerouter:/# sudo apt-get update
and then
root@dcerouter:/# sudo apt-get dist-upgrade

I also could not recall whether the MD was supposed to be on or not and so I tried it both ways.
[does it matter?] 

OUTPUT from apt-get update
....
Fetched 199B in 2s (79B/s)
W: GPG error: http://packages.medibuntu.org intrepid Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 2EBC26B60C5A2783
W: Failed to fetch file:/usr/pluto/deb-cache/./Packages.gz  File not found

I copied the /usr/pluto/deb-cache/./Packages.gz from core into the diskless and reran apt-get update I still get the public key error - is that the problem?

OUTPUT from apt-get dist-upgrade
...
57 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
15 not fully installed or removed.
Need to get 0B/94.5MB of archives.
After this operation, 1114kB of additional disk space will be used.
packages are listed and there are warnings about authentication and locale.
Then:
Preconfiguring packages ...
Can not write log, openpty() failed (/dev/pts not mounted?)
(Reading database ... 111857 files and directories currently installed.)
Preparing to replace linux-image-diskless 2.6.27-11-generic-lmce1 (using .../linux-image-diskless_2.6.27-14-generic-lmce1_i386.deb) ...
Unpacking replacement linux-image-diskless ...
dpkg: error processing /var/cache/apt/archives/linux-image-diskless_2.6.27-14-generic-lmce1_i386.deb (--unpack):
 trying to overwrite `/lib/modules/2.6.27-14-generic/kernel/arch/x86/crypto/twofish-i586.ko', which is also in package linux-image-2.6.27-14-generic
dpkg-deb: subprocess paste killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/linux-image-diskless_2.6.27-14-generic-lmce1_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@dcerouter:/#

so it errors off.
Can someone tell me where the issue is that prevents the upgrade & update from completing?

much thanks,
joseph

Zaerc

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 2256
  • Department of Redundancy Department.
    • View Profile
Re: beta update the MDs?
« Reply #12 on: August 16, 2009, 03:06:04 pm »
As some packages might do some sort of hardware detection, you should not update or install packages from a chroot environment for the best results.

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

Login on the MD as root, and execute the following commands:
Code: [Select]
wget -q http://packages.medibuntu.org/medibuntu-key.gpg -O- | apt-key add -
apt-get update

...
W: Failed to fetch file:/usr/pluto/deb-cache/./Packages.gz  File not found
...

It would be better to generate new package lists on the spot, again when logged into the MD as root:
Code: [Select]
cd /usr/pluto/deb-cache
dpkg-scanpackages -m . /dev/null | tee ./Packages | gzip -9c >./Packages.gz
apt-get update
"Change is inevitable. Progress is optional."
-- Anonymous


schaferj

  • Veteran
  • ***
  • Posts: 133
    • View Profile
Re: beta update the MDs?
« Reply #13 on: August 16, 2009, 03:35:22 pm »
Zaerc,
Thank you.

I thought that the suggested method to update the diskless MDs was to chroot into their respective environments on the core - i.e. /usr/pluto/diskless/##  Clearly I misunderstood.

I understand your reasoning.  Earlier I had issues with getting root on MD and had to chroot in to solve.  How is it supposed to work?

And do updates directly on the MD get synced back to /usr/pluto/diskless/##?

thanks again,
joseph


Zaerc

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 2256
  • Department of Redundancy Department.
    • View Profile
Re: beta update the MDs?
« Reply #14 on: August 16, 2009, 06:04:16 pm »
The directory /usr/pluto/diskless/## is used directly as root filesystem by the diskless MD over the network.  So technically the updates do not get "synced", they are done directly (and instantly) on the files there.

Logging in as root can be difficult when the MD in question hasn't been fully set up yet, as a crude workaround you could bluntly set a password for root with the passwd utility after chrooting into the corresponding /usr/pluto/diskless/## directory.
"Change is inevitable. Progress is optional."
-- Anonymous