Auto-rolling for Newbees (like me)

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read this

Auto-rolling for Newbees (like me)

Postby Eko_taas on Tue Oct 19, 2010 10:01 pm

Tried to look/understand http://forums.linuxmint.com/viewtopic.php?f=141&t=55493 to get answer to above question, but could not find :cry: / understand :oops:

I would like to get my LMDE to automatically update e.g. once a week (this is testing machine, if working well others (now still Mint 9) to have the same.

As I could understand, better to close aps (like X) first. Also need for recovery back-ups understood.

What would be most simple / reliable way to do it? My status/hopes:
- Machine always on with one non-admin user auto-logged in (no update rights).
- Ongoing aps can be killed (if needed / makes it more safe)
Could give e.g. 5min to cancel / delay (e.g. 1h) update
- Recovery point / back-up could be created at this point
- Restart allowed (might be a good idea even if not needed).
- After update (re-start machine) machine should look like normal re-started machine (aps with autostart on).

I am sure too simple for you guys... and definitely impossible for me :roll:
Last edited by Eko_taas on Tue Oct 19, 2010 11:20 pm, edited 1 time in total.
Eko_taas
Level 2
Level 2
 
Posts: 75
Joined: Sat Jul 03, 2010 3:04 am

Linux Mint is funded by ads and donations.
 

Re: Auto-rolling for Newbees (like me)

Postby craigevil on Tue Oct 19, 2010 10:15 pm

Auto-updating is not good idea on Debian Testing or unstable. Squeeze OK now but a week or two after Squeeze is released testing gets a flood of new packages. Things break in Testing including things like not being able to login. Or having your desktop to be removed.

What you can do is use cron-apt to download the updates. Then once a week or so you run smxi.

You could install unattended-upgrades - automatic installation of security upgrades

You could also use debsecan.
This is the apt-get command for upgrading through debsecan:
Code:
apt-get update && apt-get install $(debsecan --suite testing --format packages --only-fixed)

debsecan is a tool to generate a list of vulnerabilities which affect
a particular Debian installation. debsecan runs on the host which is
to be checked, and downloads vulnerability information over the
Internet. It can send mail to interested parties when new
vulnerabilities are discovered or when security updates become
available.
Debian Sid KDE4.8.4 Kernel 3.4 Thinkpad R40 CPU Pentium M 1.3MHz RAM 2GB ATI Mobility 7500
Debian - "If you can't apt-get something, it isn't useful or doesn't exist"
Giant Debian sources.list | Debian upgrade script smxi | sysinfo script inxi
craigevil
Level 5
Level 5
 
Posts: 559
Joined: Wed Sep 15, 2010 6:10 am
Location: down the rabbit hole

Re: Auto-rolling for Newbees (like me)

Postby Eko_taas on Wed Jan 26, 2011 1:44 am

Finally I had some time to play with your advice - installed depsecan and started to play in terminal (not in my comfort zone yet :oops: )

I added cleaning-option (as proposed by terminal after 1st run):
apt-get update && apt-get install $(debsecan --suite testing --format packages --only-fixed) && apt-get remove --assume-yes


When running above in root-terminal , seems to work till at the end:
Code: Select all
...
Hit http://security.debian.org testing/updates/non-free amd64 Packages
Fetched 6,710 B in 5s (1,213 B/s)
Reading package lists... Done
Usage: debsecan OPTIONS...

debsecan: error: option --suite: invalid choice: 'testing' (choose from 'woody', 'sarge', 'etch', 'lenny', 'squeeze', 'sid')
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 32 not upgraded.
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 32 not upgraded.

Additionally: is it safe/better to use --assume-yes option (if run in crontab, nobody to answer) e.g.
Code: Select all
apt-get update --assume-yes && apt-get install --assume-yes


In short, what is the ultimate (but almost safe) :wink: command to run on root-crontab :?: If I get advice on debsecan, I can modify my testing (at root crontab now) :!:
Code: Select all
0 * * * * apt-get update && apt-get install --assume-yes && apt-get autoclean


Code: Select all
....
Hit http://packages.linuxmint.com debian/import amd64 Packages
Fetched 6,710 B in 5s (1,200 B/s)
Reading package lists... Done
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 32 not upgraded.
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Eko_taas
Level 2
Level 2
 
Posts: 75
Joined: Sat Jul 03, 2010 3:04 am

Re: Auto-rolling for Newbees (like me)

Postby Eko_taas on Wed Jan 26, 2011 4:36 am

Now few runs:
Code: Select all
apt-get update && apt-get install --assume-yes && apt-get autoclean
Get:1 http://packages.linuxmint.com debian Release.gpg [198 B]                 
....
Hit http://packages.linuxmint.com debian/import amd64 Packages                 
Fetched 6,710 B in 9s (675 B/s)                                               
Reading package lists... Done
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 32 not upgraded.


=> looks like all updated to me (have not tried yet any of upgrade/dselect-upgrade/dist-upgrade). Still makes me wonder why at the same time (and after) LMDE-Update manager reports 15 items to be updated, all in level 3).

To get a same result, should I use one of the "stronger" apt-get parameters?

Now testing ongoing now with root crontab incl. :?
Code: Select all
0 * * * * date >>/var/log/automatic_apt-get_report1.log
0 * * * * date >>/var/log/automatic_apt-get_report2.log
0 * * * * date >>/var/log/automatic_apt-get_report3.log
1 * * * * apt-get update >>/var/log/automatic_apt-get_report1.log && apt-get install --assume-yes >>/var/log/automatic_apt-get_report2.log && apt-get autoclean >>/var/log/automatic_apt-get_report3.log


Any ideas :?:
Eko_taas
Level 2
Level 2
 
Posts: 75
Joined: Sat Jul 03, 2010 3:04 am


Return to Newbie Questions

Who is online

Users browsing this forum: No registered users and 3 guests