Author Topic: Time to update your whole system? Try GlobalUpgrades.sh Need testers.  (Read 19843 times)

l3mce

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1084
    • View Profile
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: [Select]
svn co http://svn.linuxmce.org/svn/people/l3mce/GlobalUpgrades.shIf you don't have subversion, then
Code: [Select]
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, 02:33:42 pm by l3mce »
I never quit... I just ping out.

l3mce

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1084
    • View Profile
Re: Global Upgrades. Need testers.
« Reply #1 on: June 15, 2012, 07: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.
I never quit... I just ping out.

pointman87

  • Guru
  • ****
  • Posts: 171
    • View Profile
Hi L3mce, your script just finished upgrading my core and 4 MDs with very good result :)

Aviator

  • Veteran
  • ***
  • Posts: 79
    • View Profile
Worked like a charm on my 10.04 core.  Both MD's work fine after.

JaseP

  • Addicted
  • *
  • Posts: 526
    • View Profile
    • JaseP's LinuxMCE Wiki User page
Is this for use with the web installed version too,... or just the snapshots?
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: 308
    • View Profile
No problems experienced here either...  One core/hybrid and 2 MDs

Dennis

bushtech

  • Veteran
  • ***
  • Posts: 98
    • View Profile
For the bandwidth deprived. Rough idea of the size of these downloads? ???
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

pointman87

  • Guru
  • ****
  • Posts: 171
    • View Profile
For the bandwidth deprived. Rough idea of the size of these downloads? ???

The download for each upgrade are about 420-500MB

bushtech

  • Veteran
  • ***
  • Posts: 98
    • View Profile
Thanks Daniel
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
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.
I never quit... I just ping out.

_if_

  • Guru
  • ****
  • Posts: 248
    • View Profile
Re: Time to update your whole system? Try GlobalUpgrades.sh Need testers.
« Reply #10 on: June 21, 2012, 05:05:23 pm »
will that script get integrated into the UI under "Advanced" (where we have that unfunctional button already) as well?

IF

l3mce

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1084
    • View Profile
Re: Time to update your whole system? Try GlobalUpgrades.sh Need testers.
« Reply #11 on: June 21, 2012, 05: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, 05:34:04 pm by l3mce »
I never quit... I just ping out.

bushtech

  • Veteran
  • ***
  • Posts: 98
    • View Profile
Re: Time to update your whole system? Try GlobalUpgrades.sh Need testers.
« Reply #12 on: June 21, 2012, 10:47:00 pm »
L3mce
Big, big thanks to you, I really do appreciate it
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

avajon

  • Veteran
  • ***
  • Posts: 120
    • View Profile
Re: Time to update your whole system? Try GlobalUpgrades.sh Need testers.
« Reply #13 on: June 21, 2012, 11: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

l3mce

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1084
    • View Profile
Re: Time to update your whole system? Try GlobalUpgrades.sh Need testers.
« Reply #14 on: June 21, 2012, 11: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.
I never quit... I just ping out.