LinuxMCE Forums

General => Users => Topic started by: schaferj on August 13, 2009, 08:57:11 pm

Title: beta update the MDs?
Post by: schaferj 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
Title: Re: beta update the MDs?
Post by: buckle 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.
Title: Re: beta update the MDs?
Post by: schaferj 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
Title: Re: beta update the MDs?
Post by: niz23 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
Title: Re: beta update the MDs?
Post by: pga57 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
Title: Re: beta update the MDs?
Post by: gadget 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
Title: Re: beta update the MDs?
Post by: niz23 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
Title: Re: beta update the MDs?
Post by: niz23 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
Title: Re: beta update the MDs?
Post by: Zaerc 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?
Title: Re: beta update the MDs?
Post by: niz23 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
Title: Re: beta update the MDs?
Post by: schaferj 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



Title: Re: beta update the MDs?
Post by: schaferj 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
Title: Re: beta update the MDs?
Post by: Zaerc 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
Title: Re: beta update the MDs?
Post by: schaferj 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

Title: Re: beta update the MDs?
Post by: Zaerc 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 (http://wiki.linuxmce.org/index.php/Logging_In#Media_Director) 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.
Title: Re: beta update the MDs?
Post by: schaferj on August 16, 2009, 06:14:18 pm
Zaerc,
Thank you.  I should have remembered that.  And #passwd from chroot is exactly what I did earlier.

If it's working correctly is there supposed to be a way to get root on an MD without the crude workabound.
joseph
Title: Re: beta update the MDs?
Post by: Zaerc on August 16, 2009, 06:18:55 pm
Normally, if the MD has set itself up properly, that is not needed.  See also: http://wiki.linuxmce.org/index.php/Logging_In#Media_Director
Title: Re: beta update the MDs?
Post by: huh on August 16, 2009, 07:01:23 pm

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


Thanks Zaerc- the first part about the key helped me as well.  This second part I can't get to work.  dpkg-scanpackages exists on the core, but does not exist on my other MDs.  Any ideas?
Title: Re: beta update the MDs?
Post by: Zaerc on August 16, 2009, 07:46:21 pm
...
Thanks Zaerc- the first part about the key helped me as well.  This second part I can't get to work.  dpkg-scanpackages exists on the core, but does not exist on my other MDs.  Any ideas?
In that case, you could install the "dpkg-dev" package on the MD, or just run it on the core, provided that you "cd" into the right directory, like this:
Code: [Select]
cd /usr/pluto/diskless/##/usr/pluto/deb-cache
dpkg-scanpackages -m . /dev/null | tee ./Packages | gzip -9c >./Packages.gz

Title: Re: beta update the MDs?
Post by: schaferj on August 16, 2009, 08:12:40 pm
Zaerc, Thanks for the link saying that default root passwd is not set.  It helps to know which symptoms are anomolies.  I had to chroot and set root password and then I could proceed. 

And thanks for your solution to the dpkg-scanpackages issue.  I ran it from the core as you suggested.

huh,
I also had success with the apt-key add, and dpkg-scanpackages command is not found on the MD.
But I had a problem with /usr/pluto/deb-cache reporting as read only (though mount shows it as rw) and it's not an issue since we can run it from core.

On the MD, apt-gt update did run without error with the apt-key add and the Packages.gz created on the core

But apt-get dist-upgrade had the same error as earlier with the twofish conflict.

DETAILS
Authentication warning overridden.
Extracting templates from packages: 100%
Preconfiguring packages ...
(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@moon37:~#

Anyone have any thoughts as to why twofish is conflicted?
much thanks,
joseph