LinuxMCE Forums
June 20, 2013, 11:12:54 am GMT-1 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Rule #1 - Be Patient - Rule #2 - Don't ask when, if you don't contribute - Rule #3 - You have coding skills - LinuxMCE's small brother is available: http://www.agocontrol.com
 
   Home   Help Search Chat Login Register  
Pages: [1] 2 3
  Print  
Author Topic: Time to update your whole system? Try GlobalUpgrades.sh Need testers.  (Read 2844 times)
l3mce
NEEDS to work for LinuxMCE
***
Posts: 1031



View Profile
« on: June 15, 2012, 03:47:52 pm »

So I wrote this a while back, and have made some adjustments to it. I need to do this the right way and use the DB to determine MDs instead of the cheat I am using, but for now it will do. I also need to log... so it is likely to change shortly, but what it does is upgrade your entire system at the same time, upgrading the MDs locally. The steps it takes are:

1. Update/upgrade the core.
2. Copies the packages files to /usr/pluto/deb-cache
3. Creates a new Packages.gz file
4. Backs up the entire /usr/pluto/diskless directory in a tarball in /usr/pluto/backup
5. Updates/upgrades MDs, regardless of their on/off state using NFS link to cores deb-cache (meaning, the upgrades for MDs are local)
6. Cleans up and exits.

So, at the moment, you shouldn't turn an MD off if it is on while it is upgrading. Nor should you try and use this if you have different MD versions (like 810 MD on a 1004 hybrid).

Would appreciate feedback. Just put it somewhere on the core (/usr/pluto/bin would be a good place), and run it as root.
Code:
svn co http://svn.linuxmce.org/svn/people/l3mce/GlobalUpgrades.sh
If you don't have subversion, then
Code:
wget http://svn.linuxmce.org/svn/people/l3mce/GlobalUpgrades.sh; chmod +x GlobalUpgrades.sh


This is an upgrade. It COULD break things. Remember, there is a backup of the MDs. This occurs before upgrade so you can restore.
This is an upgrade. ALL Machines will need to be restarted. I do not do this automatically in case they are in use.

This is a little bulky atm because I am a bit hesitant to use a mv command with the packages, so I am duplicating them. That WILL change. The backup also takes up some space... and atm this all happens on the core drive... so... you will need a little free space...
There is no more duplication of packages. I have also added some mounting which fixes certain kinds of package upgrades with MD's that are not active.

This will work on any version of LMCE.

« Last Edit: June 17, 2012, 01:33:42 pm by l3mce » Logged

I never quit... I just ping out.
l3mce
NEEDS to work for LinuxMCE
***
Posts: 1031



View Profile
« Reply #1 on: June 15, 2012, 06:56:31 pm »

For the record, I ran the script last night, and it upgraded my core and all 5 of my MDs, some of them on, and some of them off, without incident.
Logged

I never quit... I just ping out.
pointman87
Veteran
***
Posts: 97


View Profile
« Reply #2 on: June 18, 2012, 06:58:28 pm »

Hi L3mce, your script just finished upgrading my core and 4 MDs with very good result Smiley
Logged

Aviator
Veteran
***
Posts: 79



View Profile
« Reply #3 on: June 20, 2012, 02:44:26 am »

Worked like a charm on my 10.04 core.  Both MD's work fine after.
Logged

JaseP
Addicted
*
Posts: 526



View Profile WWW
« Reply #4 on: June 20, 2012, 02:57:19 am »

Is this for use with the web installed version too,... or just the snapshots?
Logged

See my User page on the LinuxMCE Wiki for a description of my system configuration (click the little globe under my profile pic).
ardirtbiker
Guru
****
Posts: 218



View Profile
« Reply #5 on: June 20, 2012, 11:56:09 pm »

No problems experienced here either...  One core/hybrid and 2 MDs

Dennis
Logged
bushtech
Veteran
***
Posts: 82


View Profile
« Reply #6 on: June 21, 2012, 12:03:52 am »

For the bandwidth deprived. Rough idea of the size of these downloads? Huh
Logged

Core:Asus P5P43TD, Intel core 2 quad Q9550, Inno 3D Nvidia 240 GT (DVI+VGA+HDMI), 2Gb ram,10/100/1000 2nd NIC
MD: Zotax Zbox ID41
pointman87
Veteran
***
Posts: 97


View Profile
« Reply #7 on: June 21, 2012, 01:26:46 am »

For the bandwidth deprived. Rough idea of the size of these downloads? Huh

The download for each upgrade are about 420-500MB
Logged

bushtech
Veteran
***
Posts: 82


View Profile
« Reply #8 on: June 21, 2012, 08:29:07 am »

Thanks Daniel
Logged

Core:Asus P5P43TD, Intel core 2 quad Q9550, Inno 3D Nvidia 240 GT (DVI+VGA+HDMI), 2Gb ram,10/100/1000 2nd NIC
MD: Zotax Zbox ID41
l3mce
NEEDS to work for LinuxMCE
***
Posts: 1031



View Profile
« Reply #9 on: June 21, 2012, 03:24:27 pm »

Thank you guys for the feedback!

JaseP this will work on any version of LMCE, and any install method.

Bushtech, it is (as usual) with the bandwidth deprived in mind that I did this. Normally EACH MD has to pull down upwards of 500Mb. This way, ONLY the core pulls down the updated packages, and the MDs leech off of that.
Logged

I never quit... I just ping out.
_if_
Guru
****
Posts: 222


View Profile
« Reply #10 on: June 21, 2012, 04:05:23 pm »

will that script get integrated into the UI under "Advanced" (where we have that unfunctional button already) as well?

IF
Logged
l3mce
NEEDS to work for LinuxMCE
***
Posts: 1031



View Profile
« Reply #11 on: June 21, 2012, 04:24:55 pm »

No. There are a few reasons why... for now at least...

1) If something breaks upstream, it breaks everything in your system. So, for instance, when KDM upgraded last year, forcing the desktop over LMCE until we could figure out a fix, everyones entire system becomes unusable. This is a real problem for newbs... and would result in a LOT of complaining.

2) People running non-standard systems could seriously hose stuff.

Having to manually run the script, knowing the potential consequences cuts down on support time, should things go awry. I originally wrote it for that purpose though... and I could make the button function as an individual upgrade if someone wanted to make a ticket.

To be honest, this was intended to do dist-upgrades globally, which will be my next round of testing once I get this to a happy place... it was to get around the "NEVER do dist-upgrades to an installed system" rule, fixing all of the problems which that can cause. I still need to do some work now that it seems to be "working" without incident. I need to figure out what to keep/remove from backups. There is no purpose in keeping all of the tarballs a year of upgrading would create. I should probably do some cleanup with regards to multiple old versions in deb-cache... and some other little things. It has led me to want to extend the JobHandler to take script arguments so that things like this can be placed into pending tasks from a script, preventing shutdown (without forcing), and showing progress.

Thanks again.
« Last Edit: June 21, 2012, 04:34:04 pm by l3mce » Logged

I never quit... I just ping out.
bushtech
Veteran
***
Posts: 82


View Profile
« Reply #12 on: June 21, 2012, 09:47:00 pm »

L3mce
Big, big thanks to you, I really do appreciate it
Logged

Core:Asus P5P43TD, Intel core 2 quad Q9550, Inno 3D Nvidia 240 GT (DVI+VGA+HDMI), 2Gb ram,10/100/1000 2nd NIC
MD: Zotax Zbox ID41
avajon
Veteran
***
Posts: 120


View Profile
« Reply #13 on: June 21, 2012, 10:25:04 pm »

L3mce

I also want to thank you for the great work you've done so far!
But i also have a question:

My LinuxMCE 0810 runs since more than a year very good on a 2TB drive. I also bought a 60 GB SSD for a new core (1004) because i also have a NAS (unRaid) since 3 months. So, in my opinion i have two options: 1. install from scratch LMCE 1004 on the new SSD with all the work (DVB-S2 on mythtv, MD's, and a lot of other stuff which is running on the server). or 2. use this cool script. But before i can do this i had to clone the content of the drive to the 60 GB SSD - there's only 40GB data on the 2TB drive, so this should work with gparted/clonezilla?

What do you think is the "best" solution?

thanks
Markus
Logged
l3mce
NEEDS to work for LinuxMCE
***
Posts: 1031



View Profile
« Reply #14 on: June 21, 2012, 10:40:38 pm »

L3mce

I also want to thank you for the great work you've done so far!
But i also have a question:

My LinuxMCE 0810 runs since more than a year very good on a 2TB drive. I also bought a 60 GB SSD for a new core (1004) because i also have a NAS (unRaid) since 3 months. So, in my opinion i have two options: 1. install from scratch LMCE 1004 on the new SSD with all the work (DVB-S2 on mythtv, MD's, and a lot of other stuff which is running on the server). or 2. use this cool script. But before i can do this i had to clone the content of the drive to the 60 GB SSD - there's only 40GB data on the 2TB drive, so this should work with gparted/clonezilla?

What do you think is the "best" solution?

thanks
Markus

Well... clonezilla isn't going to work because of the partition sizes. Clonezilla is gonna puke trying to put a bigger partition onto a smaller one, even though the data would fit... so I see you have put gparted in there, so I assume you want to shrink the size of the partition, and clone it off... which SHOULD work... assuming you also created the swap partition etc, and you would have to install grub2 and update it.

You could also just plug the drive in, boot to a live disk, and dd the stuff over.

I dislike resizing the partition because if anything goes wrong... yuck.
DD is often named disk destroyer because one wrong character can destroy your data, so... yuck.

What I would do, if I were you, is grab the 1004 snapshot, and install fresh on the ssd, and add the 2tb as an extra drive AFTER 1004 is installed on the new... then just cp what you want from the small install over to the new... then use the 2tb for storage.

Of course, having written the dvd creator for 1004 I am a little biased... but it is a much cleaner experience.
Logged

I never quit... I just ping out.
Pages: [1] 2 3
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!